change enum comparison

This commit is contained in:
igoudt 2018-07-08 13:11:39 +02:00
parent 36c004122a
commit d6450eed94
32 changed files with 41 additions and 40 deletions

View file

@ -88,7 +88,7 @@ public class AddCardTypeTargetEffect extends ContinuousEffectImpl {
sb.append(cardType.toString().toLowerCase(Locale.ENGLISH)).append(" ");
}
sb.append("in addition to its other types");
if (getDuration().equals(Duration.EndOfTurn)) {
if (getDuration() == Duration.EndOfTurn) {
sb.append(" until end of turn");
}
return sb.toString();

View file

@ -29,7 +29,7 @@ public class DiesReplacementEffect extends ReplacementEffectImpl {
public DiesReplacementEffect(MageObjectReference objectRef, Duration duration) {
super(duration, Outcome.Exile);
this.objectRef = objectRef;
staticText = "If that creature would die " + (duration.equals(Duration.EndOfTurn) ? "this turn" : "") + ", exile it instead";
staticText = "If that creature would die " + (duration == Duration.EndOfTurn ? "this turn" : "") + ", exile it instead";
}
public DiesReplacementEffect(final DiesReplacementEffect effect) {