[minor] changes to tooltip rule generation

This commit is contained in:
LevelX2 2013-05-22 17:23:51 +02:00
parent ac5c91763b
commit 5b4c2eb3fa
3 changed files with 13 additions and 2 deletions

View file

@ -147,6 +147,8 @@ class RavagerOfTheFellsAbility extends TriggeredAbilityImpl<RavagerOfTheFellsAbi
target1.setRequired(true);
this.addTarget(target1);
this.addTarget(new RavagerOfTheFellsTarget());
// Rule only shown on the night side
this.setRuleVisible(false);
}
public RavagerOfTheFellsAbility(final RavagerOfTheFellsAbility ability) {

View file

@ -85,7 +85,7 @@ class ArcTrailEffect extends OneShotEffect {
private ArcTrailEffect ( ) {
super(Outcome.Damage);
staticText = "{source} deals 2 damage to target creature or player and 1 damage to another target creature or player.";
staticText = "{source} deals 2 damage to target creature or player and 1 damage to another target creature or player";
}
@Override
@ -120,4 +120,4 @@ class ArcTrailEffect extends OneShotEffect {
return fINSTANCE;
}
}
}

View file

@ -3,6 +3,7 @@ package mage.abilities.decorator;
import mage.Constants;
import mage.Constants.Duration;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.FixedCondition;
import mage.abilities.effects.ContinuousEffect;
@ -103,6 +104,14 @@ public class ConditionalContinousEffect extends ContinuousEffectImpl<Conditional
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
public boolean hasLayer(Constants.Layer layer) {
return effect.hasLayer(layer);