mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Changes related to Cascade ability (#7583):
* Cascade: added correct spell ability choose for forced cast of mdf and adventure cards (can contains one or both sides); * Cascade: added tests from latest oracle changes; * AI: improved spell ability choose for forced cast (example: cast target card without mana cost); * GUI: improved spell ability choose for forced cast (now you can see only castable spells to choose); * Other: fixed wrong PlayFromNotOwnHandZone in some cards, fixed NPE;
This commit is contained in:
parent
0c65a6fb7e
commit
91f4d78992
12 changed files with 178 additions and 43 deletions
|
|
@ -2781,6 +2781,12 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
return randomOpponentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellAbility chooseAbilityForCast(Card card, Game game, boolean noMana) {
|
||||
Map<UUID, ActivatedAbility> useable = PlayerImpl.getSpellAbilities(this.getId(), card, game.getState().getZone(card.getId()), game);
|
||||
return (SpellAbility) useable.values().stream().findFirst().orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue