AI and Player battle trait interactions problem

Users who are viewing this thread

Tingyun

Knight at Arms
If the player uses strong trait to shield taunt, then all enemy troops have their damage set to 95%

(agent_set_damage_modifier, ":cur_agent", 95),

If the AI lord warcries, then he sets his troops to a damage of 103%

(agent_set_damage_modifier, ":cur_agent", 103),

The problem is these look like they overwrite each other, and only one will take effect, whichever of the player or the AI lord went 2nd in activating their ability. That means the player is either using an exploit, and overwriting the AI ability, or the player is cheated out of the effect of their own ability.

This problem only exists for the strong trait, since it is the only player trait that modifies enemy troops.

Everything is seen in module_mission_templates.py code.

Adding a check to see if the other effect has already occurred might allow an easy fix (i.e., when one of these traits is used, check whether the damage is currently set at 95 or 103, and if so, change it to 99 to reflect both traits being applied, and if it is at 99 and a trait is used again, then don't alter further because we know both traits have been applied already)
 
Back
Top Bottom