PDA

View Full Version : Incorrect Handling of Effects on a "Half on Success"



Minty23185Fresh
August 29th, 2017, 18:58
For spells that deal both damage and an effect, and that dole out half damage on a successful saving throw, the effect that is applied is improperly handled by Fantasy Grounds. An example is the Sunbeam spell. When the spell is cast, targets get to make a saving throw, those that fail take full damage and are blinded. Those that succeed their saving throw take half damage and are not blinded.

Fantasy Grounds properly handles the damage part, but applies the effect (in the example, being blinded) to all targets whether they successfully saved or not.

In the attached screenshot, the Wizard is casting the Sunbeam spell at three ogres. As shown in the character sheet (on the right side of the screenshot) the ogres are allowed a constitution saving throw. The spell has both a damage component and an effect component.

As shown in the chat subwindow, on the left side, from top to bottom: (1) The ogres make their saving throws, Ogre 1 and Ogre 3 are successful, Ogre 2 is not. (2) Ogres 1 and 3 take half damage, Ogre 2 takes full damage. (3) All ogres are blinded, which is incorrect per the spell parameters.

I could not find an extension that remedies this so I have been working on one. Before I finish it up and post it, is this slated to be fixed in an upcoming release?

20274

Trenloe
August 29th, 2017, 19:12
When an action is set with Damage = "Half on Success" the creatures that fail the save are not removed from the FG targeting - so that damage can be applied correctly to all of the original targets (full or half).

When you then apply a non damage effect it is applied to all current targets. Which is all of the original targets due to the half on success damage setting.

This is an edge case where there is an additional effect/condition on top of the "Half on success" damage and will have to be manually handled.

Good luck with writing an extension for this - as subsequent damage/effects are asynchronous (i.e. additional actions after the save), it could be quite challenging to code reliably to cover all possible scenarios and the initiation order of various actions

Minty23185Fresh
August 29th, 2017, 22:08
... Good luck with writing an extension for this - as subsequent damage/effects are asynchronous (i.e. additional actions after the save), it could be quite challenging to code reliably to cover all possible scenarios and the initiation order of various actions

Yikes... Last time I tried to write an extension (EVOE) after a warning like that from you guys I found myself so far out to sea that I finally had to scuttle the boat. I thought I was nearly done with the extension and about ready to post it. Now I find myself reluctant to take the helm.. :confused:

Trenloe
August 29th, 2017, 22:13
I thought I was nearly done with the extension and about ready to post it. Now I find myself reluctant to take the helm.. :confused:
Hey, if you think you're nearly done then finish it up and post it. I'm hoping you've found a cool way of handling this. :)

Moon Wizard
August 29th, 2017, 22:23
This thread actually just sparked a random thought. Maybe I can just have the ruleset remove the targets when half damage applied/evaded?

JPG

Trenloe
August 29th, 2017, 22:33
This thread actually just sparked a random thought. Maybe I can just have the ruleset remove the targets when half damage applied/evaded?
That would probably work. As long as damage was the first action applied after the save - which was kinda what I was eluding to above when I mentioned "the initiation order of various actions" being a potential issue.

Zacchaeus
August 29th, 2017, 23:02
I can't think of any situation where such a removal would cause an issue.

Minty23185Fresh
September 2nd, 2017, 00:37
This thread actually just sparked a random thought. Maybe I can just have the ruleset remove the targets when half damage applied/evaded?JPG

My only complaint would be inconsistent behavior between the two buttons.
The Damage (Dmg) would not clear the unaffected targets.
But the Effect (Eff) button would.

Plus if someone applied the Effect first then the damage button would not work right (as Trenloe mentions).

Minty23185Fresh
September 2nd, 2017, 00:38
I just posted my extension (here (https://www.fantasygrounds.com/forums/showthread.php?39918-Enhanced-Effect-Handling-on-a-Successful-Spell-Saving-Throw-Extension-(EoSSE)-for-5E&p=352794#post352794)).

I followed the exact methodology that is currently (FG v3.3.2) used in the ruleset code to handle the damage to handle the effect application.

It took me about 2 weeks (~ 40-60 hours) to completely dissect the code and thoroughly understand it, then about 6 hours to develop the extension.

Nylanfs
September 6th, 2017, 02:42
Careful, that way lays madness...

Minty23185Fresh
September 20th, 2017, 19:20
The September 19, 2017 release of Fantasy Grounds v3.3.2 makes the extension (https://www.fantasygrounds.com/forums/showthread.php?39918-Enhanced-Effect-Handling-on-a-Successful-Spell-Saving-Throw-Extension-(EoSSE)-for-5E) developed for this minor issue obsolete, ALMOST.

To restate the problem: for powers (in particular spells), that deal both damage and an effect, and have the half damage on a successful save qualifier, Fantasy Grounds would incorrectly apply the effect to targeted creatures even if they made their save.

This issue has been remedied with FG v3.3.2, if and only if the damage is applied first. When the damage is applied first, and then the effect is applied, the effect is accurately applied only to those targeted creatures that failed their save(s). But if the effect is applied before the damage is applied, Fantasy Grounds fails. It incorrectly applies the effect to all targeted creatures.

Attached is a screenshot illustrating the issue that still remains. The setup is this: A sorcerer targeted three orcs and then cast a sunbeam spell. Both panels in the screenshot are copies of the chat window. In the left panel, the spell was cast, orcs 1 and 2 saved, orc 3 failed. Damage was applied, 1 & 2 received half damage, 3 received full. The effect was applied, and only orc 3 was blinded, which is correct Fantasy Grounds behavior. In the right panel, the spell was cast, orc 1 failed its save, orcs 2 and 3 successfully saved. The effect was applied, all three orcs went blind (this is incorrect behavior by Fantasy Grounds, only orc 1 should have been blinded), the damage was then applied, orc 1 receiving full damage, the other two receiving half.

20594

Nickademus
September 20th, 2017, 19:48
Is there a spell where the condition affects the damage dealt by the spell? If not, then this is fine; just always deal damage first.

Zacchaeus
September 20th, 2017, 22:01
Indeed. Apply damage first. No use blinding something and then killing it a few seconds later.