nosas / OmniToon

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

Group and order Toon attacks by `Gag.track` in ToonAttackState's `handle_attacks()` method #44

Closed nosas closed 3 years ago

nosas commented 3 years ago

Currently, Toons are attacking Cogs sequentially based on who picked a Gag first.

We need to...

  1. Group Toon attacks by Gag.track
  2. Order the attacks from lowest Gag.track number to highest order=(Toon-up, Trap, Lure, Sound, Throw, Squirt, Drop)
  3. Attack the Cog with all Gags of the same Gag.track, ,in order from lowest Gag.track number to highest
nosas commented 3 years ago

Dictionaries are sorted by default in Python3.7+ : https://github.com/nosas/ttr_ai/issues/44