AI do not support forced to attack and other restrictions
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
Search `checkIfAttackersValid` -- only human player used that code. Code inside:
* `getCombat().getCreaturesForcedToAttack` -- filled by `checkAttackRequirements` before select attackers start with goaded and other checks and choices;
* `getCombat().getMaxAttackers()` - filled by `setDefenders` before declare blockers start
AI and tests ignore that restrictions and allow to select any configuration, but human getting a warning message and can't finish with bad selection.
Affected cards:
* override `playerMustBeAttackedIfAble`
* restriction example: "must attack you or a planeswalker you control with at least one creature each combat if able"
* only one card use it: [[Trove of Temptation]] (card [[Firkraag, Cunning Instigator]] can help with tests cause it check forced status)
* use `player.setMaxAttackedBy`
* restriction example: "no more than one creature can attack you each combat"
* three cards use it: [[Crawlspace]] [[Judoon Enforcers]] [[Mirri, Weatherlight Duelist]]
Must be improved somehow. Maybe tests can be improved too.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.