* Add "ask simulated ai" dev option.
Also moves the setup/dump game state options at the end of the list, as they're different from the other ones and shouldn't just be in the middle.
Also makes the code a bit more concise for the different mouse listeners.
* Fix comment location.
This change improves Simulated AI logic by eliminating many unnecessary simulations, particularly due to:
- Invalid targets involving counterspells countering themselves (including modal spells).
- Pruning identical land drop decisions.
Tests are added to cover these cases.
Some core logic is changed, in particular, SpellAbility.canTarget() was not rejecting self-targeting for counterspells. This was likely being done at a higher level somewhere (e.g. in UI code for choosing targets for the human player or AI-specific code for non-simulated AI).
Additionally, a convenience SpellAbility.hasLegalTargets() method is added, from the logic that was previously in AIController.java, so that it can be re-used by the simulation AI code.
A few small style clean ups are included in the code being changed.
Uses a seeded deterministic random generator when simulating choices, which ensures the same number of sub-choices are always used, which the code requires. Adds a test.
Fixes a bug where a card's image will be repeatedly downloaded when ImageCache would return for a reason other than the image not being present, such as when requesting a very small image. That happened in practice during the drawing a card animation, where the card is scaled during the animation.
This got broken by the following refactor:
79c9c914e2
The result was that simulation AI was ignoring certain decision trees that involved
playing lands, leading to not considering certain lines of play and some log
messages printed to standard error. I've added a test that covers this logic to prevent
it breaking again in the future.
Also, a couple small clean ups to related tests.
* round 1
* round 2
* 10 more (Oct 1)
* attempt to add "Pump" to EffectAi
* more 10/4
* more/fixes 10/4
* more 10/4 (80 to go...)
* more 10/4 (70 to go...)
* 10/5 (60 to go...)
* more 10/5 (50 to go...)
* more 10/5 (40 to go...)
* more 10/5 (30 to go...)
* 10/6 (20 to go...)
* more 10/6 (10 to go...)
* more 10/6 (last of pump -> effect)
* more 10/6 (continuous kw static > cantblockby... 30 to go)
* more 10/6 (continuous > cantblockby... 20 to go)
* more 10/6 (continuous > cantblockby... 10 to go)
* last 10/6 (continuous > cantblockby)
* Final keyword cleanup?
* GameSimulationTest.testEquippedAbilities use Shroud instead of Unblockable
* fish token!
* CreatureEvaluator evaluate for unblockable
* AttachAi evaluate for unblockable