diff --git a/Mage/src/mage/abilities/keyword/RenownAbility.java b/Mage/src/mage/abilities/keyword/RenownAbility.java index b6920d6d94..f6f3f77825 100644 --- a/Mage/src/mage/abilities/keyword/RenownAbility.java +++ b/Mage/src/mage/abilities/keyword/RenownAbility.java @@ -22,12 +22,10 @@ import mage.util.CardUtil; * * @author LevelX2 */ - - public class RenownAbility extends TriggeredAbilityImpl { private int renownValue; - + public RenownAbility(int renownValue) { super(Zone.BATTLEFIELD, new BecomeRenownSourceEffect(renownValue), false); this.renownValue = renownValue; @@ -50,7 +48,7 @@ public class RenownAbility extends TriggeredAbilityImpl { @Override public boolean checkInterveningIfClause(Game game) { - return getSourceObject(game) != null && !((Permanent)getSourceObject(game)).isRenown(); + return getSourceObject(game) != null && !((Permanent) getSourceObject(game)).isRenown(); } @Override @@ -59,11 +57,6 @@ public class RenownAbility extends TriggeredAbilityImpl { && ((DamagedPlayerEvent) event).isCombatDamage(); } - @Override - public String getRule() { - return "Whenever {this} deals combat damage to a player, " + super.getRule(); - } - public int getRenownValue() { return renownValue; } @@ -95,7 +88,7 @@ class BecomeRenownSourceEffect extends OneShotEffect { if (renownValue == Integer.MAX_VALUE) { renownValue = source.getManaCostsToPay().getX(); } - new AddCountersSourceEffect(CounterType.P1P1.createInstance(renownValue),true).apply(game, source); + new AddCountersSourceEffect(CounterType.P1P1.createInstance(renownValue), true).apply(game, source); permanent.setRenown(true); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BECOMES_RENOWN, source.getSourceId(), source.getSourceId(), source.getControllerId(), renownValue)); return true; @@ -106,9 +99,9 @@ class BecomeRenownSourceEffect extends OneShotEffect { private String setText(int renownValue) { // Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) StringBuilder sb = new StringBuilder("Renown "); - sb.append(renownValue == Integer.MAX_VALUE ? "X":renownValue) + sb.append(renownValue == Integer.MAX_VALUE ? "X" : renownValue) .append(". (When this creature deals combat damage to a player, if it isn't renowned, put ") - .append(renownValue == Integer.MAX_VALUE ? "X":CardUtil.numberToText(renownValue, "a")) + .append(renownValue == Integer.MAX_VALUE ? "X" : CardUtil.numberToText(renownValue, "a")) .append(" +1/+1 counter on it and it becomes renowned.)").toString(); return sb.toString(); }