When the party is invisible, it seems to make no difference. #110

Closed
opened 2018-02-15 08:44:10 +00:00 by daerogami · 12 comments
daerogami commented 2018-02-15 08:44:10 +00:00 (Migrated from github.com)

It should make the party immune to archery and melee, but not spells.


This is an item logged from the To-Do and was originally reported by (@CelticMinstrel?). If you are familiar with or can recreate this bug, please provide details here.

It should make the party immune to archery and melee, but not spells. --- This is an item logged from the To-Do and was originally reported by (@CelticMinstrel?). If you are familiar with or can recreate this bug, please provide details here.
CelticMinstrel commented 2020-02-10 05:41:40 +00:00 (Migrated from github.com)

Just to clarify for anyone less familiar with the game, "invisible" means the Sanctuary spell.

Just to clarify for anyone less familiar with the game, "invisible" means the Sanctuary spell.
daerogami commented 2020-03-04 16:19:59 +00:00 (Migrated from github.com)

Is this based on the DnD/Pathfinder Sanctuary spell where a monster has to roll for a chance to even be allowed to roll an attack? When I played as a kid and phones hung on walls, I never understood this spell so I never really used it.

Is this based on the DnD/Pathfinder Sanctuary spell where a monster has to roll for a chance to even be allowed to roll an attack? When I played as a kid and phones hung on walls, I never understood this spell so I never really used it.
NQNStudios commented 2024-12-01 14:37:11 +00:00 (Migrated from github.com)

Is this related to #153 ?

Is this related to #153 ?
CelticMinstrel commented 2024-12-01 23:22:09 +00:00 (Migrated from github.com)

Pretty sure it was the Sanctuary spell, not Dust of Hiding.

Pretty sure it was the Sanctuary spell, not Dust of Hiding.
NQNStudios commented 2024-12-01 23:32:05 +00:00 (Migrated from github.com)

I thought maybe they were both invisibility.

Edit: I don't know how Sanctuary works, or how dust of hiding is supposed to work.

I thought maybe they were both invisibility. Edit: I don't know how Sanctuary works, *or* how dust of hiding is supposed to work.
CelticMinstrel commented 2024-12-01 23:46:13 +00:00 (Migrated from github.com)

They do both use the same status effect, but the possible bug with Dust of Hiding in #153 was that the status effect is not even applied, while this bug is that the status effect does not work as expected.

They do both use the same status effect, but the possible bug with Dust of Hiding in #153 was that the status effect is not even applied, while this bug is that the status effect does not work as expected.
NQNStudios commented 2025-02-08 23:17:11 +00:00 (Migrated from github.com)

Ok, it looks like sanctuary is correctly blocking melee attacks but not ranged.

Image
Ok, it looks like sanctuary is correctly blocking melee attacks but not ranged. <img width="228" alt="Image" src="https://github.com/user-attachments/assets/8bca3cca-d959-4aa7-bb9a-97328aa20202" />
NQNStudios commented 2025-02-08 23:24:26 +00:00 (Migrated from github.com)

This code handles the case for melee attacks:

f22f248f4e/src/game/boe.combat.cpp (L2805-L2811)

This code should handle it for ranged attacks:

f22f248f4e/src/game/boe.combat.cpp (L3080-L3085)

This code handles the case for melee attacks: https://github.com/NQNStudios/cboe/blob/f22f248f4e05c1f3f0c9ef74126b870e1d1b74fb/src/game/boe.combat.cpp#L2805-L2811 This code should handle it for ranged attacks: https://github.com/NQNStudios/cboe/blob/f22f248f4e05c1f3f0c9ef74126b870e1d1b74fb/src/game/boe.combat.cpp#L3080-L3085
CelticMinstrel commented 2025-02-08 23:38:52 +00:00 (Migrated from github.com)

So does that mean it's working just fine?

So does that mean it's working just fine?
NQNStudios commented 2025-02-08 23:57:20 +00:00 (Migrated from github.com)

I don't know how JV intended for the spell to work.

The issue description says:

It should make the party immune to archery and melee, but not spells.

And actually, neither of these things are true currently. It works more for melee than for archery, but both attack types can still land, and are more likely to the higher the monster's level.

Melee attacks are a D100 vs. hit_chance[level / 2].
Ranged attacks are D100 vs. hit_chance[level].

So ranged attacks hit Invisible characters more often. We could divide the level by 2 for ranged attacks and have them behave more similarly.

I don't know how JV intended for the spell to work. The issue description says: > It should make the party immune to archery and melee, but not spells. And actually, neither of these things are true currently. It works *more* for melee than for archery, but both attack types can still land, and are more likely to the higher the monster's level. Melee attacks are a D100 vs. hit_chance[level / 2]. Ranged attacks are D100 vs. hit_chance[level]. So ranged attacks hit Invisible characters more often. We could divide the level by 2 for ranged attacks and have them behave more similarly.
NQNStudios commented 2025-02-09 00:09:01 +00:00 (Migrated from github.com)

One thing's true for sure: it does make a difference. The spell description says that monsters "probably" won't be able to attack your PC--which is not exactly mathematically true, but it definitely doesn't promise full immunity which would be an outright lie.

One thing's true for sure: it does make a difference. The spell description says that monsters "probably" won't be able to attack your PC--which is not exactly mathematically true, but it definitely doesn't promise full immunity which would be an outright lie.
NQNStudios commented 2025-02-09 00:11:00 +00:00 (Migrated from github.com)

Waaaaaait a second. With top-level monsters, the number to beat will be 99 even after the level (array index) is halved. which definitely is not fair.

std::array<short, 51> hit_chance = {
	20,30,40,45,50,55,60,65,69,73,
	77,81,84,87,90,92,94,96,97,98,99
	,99,99,99,99,99,99,99,99,99,99
	,99,99,99,99,99,99,99,99,99,99,
	99,99,99,99,99,99,99,99,99,99};

In order to make the spell description's use of "probably" accurate, we'd want to half the hit chance, not the level.

Waaaaaait a second. With top-level monsters, the number to beat will be 99 even after the level (array index) is halved. which definitely is not fair. ``` std::array<short, 51> hit_chance = { 20,30,40,45,50,55,60,65,69,73, 77,81,84,87,90,92,94,96,97,98,99 ,99,99,99,99,99,99,99,99,99,99 ,99,99,99,99,99,99,99,99,99,99, 99,99,99,99,99,99,99,99,99,99}; ``` In order to make the spell description's use of "probably" accurate, we'd want to half the hit chance, not the level.
Sign in to join this conversation.
No description provided.