mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Disturb check for Enchantment
This commit is contained in:
@@ -178,10 +178,13 @@ public final class GameActionUtil {
|
||||
final String[] k = keyword.split(":");
|
||||
final Cost disturbCost = new Cost(k[1], true);
|
||||
|
||||
final SpellAbility backSA = source.getAlternateState().getFirstAbility();
|
||||
SpellAbility newSA = source.getAlternateState().getType().isCreature() ?
|
||||
sa.copyWithManaCostReplaced(activator, disturbCost) :
|
||||
backSA.copyWithManaCostReplaced(activator, disturbCost);
|
||||
SpellAbility newSA;
|
||||
if (source.getAlternateState().getType().isEnchantment()) {
|
||||
newSA = source.getAlternateState().getFirstAbility().copyWithManaCostReplaced(activator,
|
||||
disturbCost);
|
||||
} else {
|
||||
newSA = sa.copyWithManaCostReplaced(activator, disturbCost);
|
||||
}
|
||||
newSA.setActivatingPlayer(activator);
|
||||
|
||||
newSA.putParam("PrecostDesc", "Disturb —");
|
||||
|
||||
Reference in New Issue
Block a user