mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* ConditionalReplacementEffect - Added text method that uses text of decorated effect.
This commit is contained in:
parent
4e35568bb5
commit
ecd790515a
1 changed files with 9 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
||||||
package mage.abilities.decorator;
|
package mage.abilities.decorator;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.FixedCondition;
|
import mage.abilities.condition.FixedCondition;
|
||||||
import mage.abilities.effects.ReplacementEffect;
|
import mage.abilities.effects.ReplacementEffect;
|
||||||
|
@ -115,6 +116,14 @@ public class ConditionalReplacementEffect extends ReplacementEffectImpl<Conditio
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getText(Mode mode) {
|
||||||
|
if (staticText == null || staticText.isEmpty() && this.effect != null) { // usefull for conditional night/day card abilities
|
||||||
|
return effect.getText(mode);
|
||||||
|
}
|
||||||
|
return staticText;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConditionalReplacementEffect copy() {
|
public ConditionalReplacementEffect copy() {
|
||||||
return new ConditionalReplacementEffect(this);
|
return new ConditionalReplacementEffect(this);
|
||||||
|
|
Loading…
Reference in a new issue