implement [MH3] Primal Prayers ; use choice panel for cast mode choice ; allow some restricted "as thought as it had flash" to work only on matching alternative cast. (#12420)

This commit is contained in:
Susucre 2024-07-30 15:47:39 +02:00 committed by GitHub
parent 503e842b51
commit c0eab28626
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 1105 additions and 596 deletions

View file

@ -161,10 +161,10 @@ public class Spell extends StackObjectImpl implements Card {
this.startingDefense = spell.startingDefense;
}
public boolean activate(Game game, boolean noMana) {
public boolean activate(Game game, Set<MageIdentifier> allowedIdentifiers, boolean noMana) {
setCurrentActivatingManaAbilitiesStep(ActivationManaAbilityStep.BEFORE); // mana payment step started, can use any mana abilities, see AlternateManaPaymentAbility
if (!ability.activate(game, noMana)) {
if (!ability.activate(game, allowedIdentifiers, noMana)) {
return false;
}
@ -182,7 +182,7 @@ public class Spell extends StackObjectImpl implements Card {
// see https://github.com/magefree/mage/issues/6603
payNoMana |= ability.getSpellAbilityType() == SpellAbilityType.SPLIT_FUSED;
if (!spellAbility.activate(game, payNoMana)) {
if (!spellAbility.activate(game, allowedIdentifiers, payNoMana)) {
return false;
}
}