Closed nosas closed 3 years ago
First thing to do is make choose_attack
's target argument be mandatory. We're also going to change the target argument to targets
, so we can pass in the list of possible targets.
Toon no longer has a .choose_attack()
function, instead they return a list of possible/viable attacks against each target.
We're seeing a lot of issues when selecting a viable Gag, especially when picking a Lure/Trap gag against Cogs that are already Lured/Trapped.
This is happening because we're allowing
None
value to be passed in for thetarget
argument inToon.choose_attack()
when choosing an attack.To correct this behavior, we're going to make the
target
arg a required argument and follow this pattern in ToonAttackState:This refactoring should fix issues #69, #71, #72