mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
* Glory Bearers - fixed that it boost itself too;
This commit is contained in:
parent
684a4b3cc9
commit
cc1840b109
2 changed files with 21 additions and 4 deletions
|
@ -7,6 +7,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -15,6 +17,12 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class GloryBearers extends CardImpl {
|
public final class GloryBearers extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
public GloryBearers(UUID ownerId, CardSetInfo setInfo) {
|
public GloryBearers(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}");
|
||||||
|
|
||||||
|
@ -27,7 +35,7 @@ public final class GloryBearers extends CardImpl {
|
||||||
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(
|
this.addAbility(new AttacksCreatureYouControlTriggeredAbility(
|
||||||
new BoostTargetEffect(0, 1)
|
new BoostTargetEffect(0, 1)
|
||||||
.setText("it gets +0/+1 until end of turn"),
|
.setText("it gets +0/+1 until end of turn"),
|
||||||
false, true
|
false, filter, true
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.abilities.common;
|
package mage.abilities.common;
|
||||||
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
@ -11,7 +10,6 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author noxx
|
* @author noxx
|
||||||
*/
|
*/
|
||||||
public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityImpl {
|
public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
@ -76,6 +74,17 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue