- Prevent NPE in quest draft tournament screen if the tournament hasn't started yet.
- Added some test code for testing AIvsAI match result injections (will be removed later).
Note: There's still a limitation in the simulated AI where it doesn't know what to do when multiple effects from an ability require targets. This can be addressed in the future to support things like Cryptic Command to both counter a spell and bounce a permanent.
Since marked damage affects attack/block decisions and this is used for scoring, it resulted in a different score being computed in the sub game, triggering a copy error.
Adds a test.
Also fixes creature power evaluation copy paste error.
- Might need to do something about CNS Conspiracies and other substandard cards enering the quest pool (e.g. from reward booster packs), which tended to "corrupt" the quest save by introducing cards into the pool which can't be loaded later (and used to crash).
Revert to the original implementation of adding the ability to the Game cache in clone(), but now update this in setHostCard() if the new card comes from a different Game object.
Looks like setHostCard() is being called when the clone gets added to a card. However, previously the SpellAbility was being added to the Game in clone(), which doesn't work if the cloned ability should be part of a different Game - such as in simulation AI code. So, this change moves that to addSpellAbility().
Also fixes a bug in the main game code where if you have Clone try to copy a token with abilities, like an Eldrazi Scion, it would previously not get those abilities.
Adds a test for the game simulation/copy case.
This fixes all the simulated AI logic to correctly look at all the sub-abilities for target choices. However, it still doesn't support multiple sub-abilities with targets.
Also fixes an issue - still with Wild Slash - where the AI would only look at top-level SA restrictions when determining whether a card is playable. For Wild slash, the top-level SA is the ferocious clause - while the 2 damage clause is a sub-ability and doesn't have the same restrictions.