davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
98 stars 25 forks source link

`Cunning Wisp` escaping from many spell responses: `Polymorph`, `Silence`, `Flash Flood`... #156

Open crabel opened 6 years ago

crabel commented 6 years ago

Had a game now, where my opponent used the switch creature power of a 4/1 creature (have forgotten the name). I transformed it into a frog and expected the power to malfunction. But the creatures were still switched. The powers were correctly applied, but the switch should not have happened since the transformation should take place before and cancel the power.

ghost commented 6 years ago

Can't confirm in any direction, but about the same time I think I tried to kill a Cunning Wisp with a Flash Flood and the game behaved in a similar manner.

ghost commented 6 years ago

Cunning Wisp: https://github.com/davewx7/citadel/blob/044839a67cba8c1769ef398e157733848f1c79a6/data/cards-minerva.cfg#L217-L264

Polymorph: https://github.com/davewx7/citadel/blob/044839a67cba8c1769ef398e157733848f1c79a6/data/cards-minerva.cfg#L931-L962

Flash Flood: https://github.com/davewx7/citadel/blob/044839a67cba8c1769ef398e157733848f1c79a6/data/cards-aether.cfg#L791-L828

ghost commented 6 years ago

Silence affected too: https://github.com/davewx7/citadel/blob/044839a67cba8c1769ef398e157733848f1c79a6/data/cards-aether.cfg#L289-L313

sapientN3T commented 5 years ago

I think this is operating as intended, but I admit it is a bit confusing.

When you respond to a spell or ability, you are not time traveling: you can't fully nullify the fact that it was cast/activated. However you can introduce effects that take effect prior to that spell or ability taking effect: these are what can cause it to fizzle.

The Swap ability description does not list any requirement stating the ability must exist on the creature for the swap to successfully complete. Thus, removing the ability from the creature will not cause the ability to fizzle.

However, I believe that it should fizzle if the Wisp would be dead at the time of the swap. Thus Flash Flood should cause the spell to fizzle. If it doesn't, then that is a bug.

ghost commented 5 years ago

[...] The Swap ability description does not list any requirement stating the ability must exist on the creature for the swap to successfully complete. Thus, removing the ability from the creature will not cause the ability to fizzle. [...]

Good point. This comment makes this a question.

[...] However, I believe that it should fizzle if the Wisp would be dead at the time of the swap. Thus Flash Flood should cause the spell to fizzle. If it doesn't, then that is a bug.

If this is still happening, then it'd make this a bug.

sapientN3T commented 5 years ago

@galegosimpatico I have added a test case "bad-swap" to demonstrate this issue.

Instructions: first target the assassin, then when the swap is in progress, target the wisp.

Note: this shows that the cunning wisp does not escape a Flash Flood spell response, as was claimed.

ghost commented 5 years ago

I briefly ran the old game code (eb738e102fd5fb86f4c6e3fac1b0b0968ad0d0c2 cherry picked on top of 059b693a2d0f853f7858627e866fa7ba583fb671 so requiring https://github.com/anura-engine/anura/commit/9bd2c75127f8803f4c9cffb47a892d3877aaa6ec) comparing to contemporary master (which includes eb738e102fd5fb86f4c6e3fac1b0b0968ad0d0c2 naturally) and I see no difference about how Silence, Flash Flood and Polymorph act towards Cunning Wisp.

Maybe I wanted to kill the Cunning Wisp with Flash Flood but it escaped using either Silence or Polymorph and I was confused and got it wrong. 😁