Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Confusion spell

How is Confusion supposed to work?

1. Gaining control of a unit is temporal and reverts at end of turn. There is a 25% chance for it to roll "control" again and keep control next turn.
2. Gaining control of a unit is permanent. There is a 25% chance to roll "control" again and return the unit, 75% chance to keep control next turn.

I'm asking because ever since I started playing insecticide, I have a feeling that the spell is not symmetrical. I think I get "1." when I cast the spell, but get "2." when the AI casts it. I'm not sure if this was also the case in 1.31, it was way too long ago to remember.

Anyone can confirm this, or knows which of the two is the correct effect of the spell?
Based on wiki I think "1." is the correct behavior?
Reply

1 for sure. It's supposed to roll 1d4 every round for the effect. The unit is confused, after all. Possession is a different spell.
Reply

Some code investigation results

-When the player presses the "done" button, control does not revert to the AI if the unit was temporally controlled. Instead control is retained and the unit pretty much acts as though it was your unit with the AI's confusion instead of the opposite from that point onward. (BUG)
-The AI never returns the control of the unit, regardless of the action the unit takes which results in the same effect. (BUG)
-If the unit runs out of movement while under player control, control is properly returned, unless the above already happened last turn, and this is the only case when it works as intended.

However, at the same time

-Units temporally controlled count for the original owner's so temporal taking of the last unit is not ending the battle. We observe the opposite because the bug makes the temporal control "permanent".
-Dispel Magic does not remove confuse if you hit a temporarily switched unit you currently control with it.
-Dispel Magic does only remove Confusion from an enemy unit, if it is temporally controlled by the enemy, but is normally yours. Doing so returns control of the unit.

In other words, everything works properly with both Dispel and the battle ending, but the unit is not in temporal but permanent control which messes it up.

Edit : I managed to fix this bug by moving the "return control" code elsewhere.

Oh, and Possession and Creature Binding can only be dispelled from your "own" units and even then they don't return control. This latter cannot be fixed as dispelling harmful effects from enemy creatures is an exception that has to be coded separately, and the only spell that was done so is Confusion.
Reply

That needs to be noted somewhere, and help text updated. "Dispelling Possession won't get your unit back" or some such. I remember being greatly peeved by this before.
Reply



Forum Jump: