mirror of
https://github.com/magefree/mage.git
synced 2026-01-18 09:19:56 -08:00
Added a method to set the rule of an ability to the top of the rules shown in the tooltip.
This commit is contained in:
parent
c2360036f3
commit
d7ad639439
4 changed files with 42 additions and 1 deletions
|
|
@ -75,6 +75,7 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
|||
protected Zone zone;
|
||||
protected String name;
|
||||
protected boolean usesStack = true;
|
||||
protected boolean ruleAtTheTop = false;
|
||||
|
||||
@Override
|
||||
public abstract T copy();
|
||||
|
|
@ -108,6 +109,7 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
|||
this.alternativeCosts.add((AlternativeCost)cost.copy());
|
||||
}
|
||||
this.modes = ability.modes.copy();
|
||||
this.ruleAtTheTop = ability.ruleAtTheTop;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -507,4 +509,15 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
|||
public String toString() {
|
||||
return getRule();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getRuleAtTheTop() {
|
||||
return ruleAtTheTop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRuleAtTheTop(boolean ruleAtTheTop) {
|
||||
this.ruleAtTheTop = ruleAtTheTop;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue