* Glory Bearers - fixed that it boost itself too;

This commit is contained in:
Oleg Agafonov 2020-01-28 01:46:40 +04:00
parent 684a4b3cc9
commit cc1840b109
2 changed files with 21 additions and 4 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
@ -11,7 +10,6 @@ import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author noxx
*/
public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityImpl {
@ -76,6 +74,17 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI
@Override
public String getRule() {
return "When" + (once ? "" : "ever") + " a" + (filter.getMessage().startsWith("a") ? "n " : " ") + filter.getMessage() + " attacks, " + super.getRule();
String an;
String who = filter.getMessage();
if (who.startsWith("another")) {
an = "";
} else if (who.startsWith("a")) {
an = "an";
} else {
an = "a";
}
return "When" + (once ? "" : "ever")
+ " " + an + who + " attacks, " + super.getRule();
}
}