mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
Commander abilities - fixed rules text for alternative spells;
This commit is contained in:
parent
9db80a0cf3
commit
528ba66e16
1 changed files with 11 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue