updated some fight effect text

This commit is contained in:
Evan Kranzler 2021-11-14 15:30:27 -05:00
parent c355834a4e
commit b625aa05c5
19 changed files with 52 additions and 78 deletions

View file

@ -64,10 +64,10 @@ public class DamageWithPowerFromOneToAnotherTargetEffect extends OneShotEffect {
throw new IllegalStateException("It must have two targets, but found " + mode.getTargets().size());
}
String targetName = mode.getTargets().get(1).getTargetName();
// Target creature you control deals damage equal to its power to target creature you don't control
String sb = (this.firstTargetName != null ? this.firstTargetName : "Target " + mode.getTargets().get(0).getTargetName()) +
" deals damage equal to its power to target " +
mode.getTargets().get(1).getTargetName();
" deals damage equal to its power to " + (targetName.contains("other") ? "" : "target ") + targetName;
return sb;
}
}

View file

@ -7,6 +7,7 @@ import mage.cards.Card;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
import java.util.UUID;
@ -19,11 +20,6 @@ public class FightTargetsEffect extends OneShotEffect {
super(Outcome.Damage);
}
public FightTargetsEffect(String effectText) {
this();
this.staticText = effectText;
}
public FightTargetsEffect(final FightTargetsEffect effect) {
super(effect);
}
@ -70,18 +66,20 @@ public class FightTargetsEffect extends OneShotEffect {
@Override
public FightTargetsEffect copy() {
return new FightTargetsEffect(this);
}
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "target " + mode
.getTargets().get(0).getTargetName() + " fights another target " + mode
.getTargets().get(1).getTargetName();
Target target=mode.getTargets().get(1);
StringBuilder sb=new StringBuilder("target ");
sb.append(mode.getTargets().get(0).getTargetName());
sb.append(" fights ");
if(!target.getTargetName().contains("other")){
sb.append("target ");
}
sb.append(target.getTargetName());return sb.toString();
}
}