From 528ba66e164fbd79b42c505408ddc6c9319d6733 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 14 Jul 2019 01:21:55 +0400 Subject: [PATCH] Commander abilities - fixed rules text for alternative spells; --- .../mage/abilities/common/CastCommanderAbility.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/common/CastCommanderAbility.java b/Mage/src/main/java/mage/abilities/common/CastCommanderAbility.java index e0921660147..68ceca8ea6a 100644 --- a/Mage/src/main/java/mage/abilities/common/CastCommanderAbility.java +++ b/Mage/src/main/java/mage/abilities/common/CastCommanderAbility.java @@ -9,16 +9,20 @@ import mage.constants.Zone; */ public class CastCommanderAbility extends SpellAbility { + private String ruleText; + public CastCommanderAbility(Card card, SpellAbility spellTemplate) { super(spellTemplate); this.newId(); this.setCardName(spellTemplate.getCardName()); - zone = Zone.COMMAND; - spellAbilityType = spellTemplate.getSpellAbilityType(); + this.zone = Zone.COMMAND; + this.spellAbilityType = spellTemplate.getSpellAbilityType(); + this.ruleText = spellTemplate.getRule(); // need to support custom rule texts like OverloadAbility } public CastCommanderAbility(final CastCommanderAbility ability) { super(ability); + this.ruleText = ability.ruleText; } @Override @@ -26,4 +30,9 @@ public class CastCommanderAbility extends SpellAbility { return new CastCommanderAbility(this); } + @Override + public String getRule() { + return ruleText; + } + }