nosas / OmniToon

[WIP] ToonTown AI - Python Plays ToonTown
3 stars 0 forks source link

Handle special case: Multi-targeted Trap #101

Closed nosas closed 6 months ago

nosas commented 6 months ago

The level 7 Trap - Railroad - has many special cases that need to be handled:

  1. If there are lured Cogs and non-lured Cogs during a battle and a Toon uses this Gag, the lured Cogs will be pushed back. (Q: Is pushed back the same as unlured?)
  2. In order to work properly, no other Trap Gags must be deployed already nor can any Trap Gags be used in the same round with the Railroad. In doing so, both Trap Gags will cancel out.
  3. The Railroad is technically a single Trap. If a single-targeted Lure triggers the Trap on a single Cog, the remaining Cogs should also have their traps cleared as the Railroad is no longer triggerable.
nosas commented 6 months ago

Here is where the OG TT deals with the trap: https://github.com/forest2001/Toontown-Rewritten/blob/master/toontown/battle/BattleCalculatorAI.py#L470

nosas commented 6 months ago

Done in #100