2013-05-30 22:15:02 -07:00
|
|
|
[
|
|
|
|
new MagicPermanentActivation(
|
|
|
|
new MagicActivationHints(MagicTiming.Block,true,1),
|
|
|
|
"First strike"
|
|
|
|
) {
|
|
|
|
|
|
|
|
@Override
|
2013-08-30 21:00:50 -07:00
|
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
2013-05-30 22:15:02 -07:00
|
|
|
return [
|
|
|
|
new MagicPayManaCostEvent(source,"{R/W}"),
|
|
|
|
new MagicPlayAbilityEvent(source)
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
|
|
|
|
return new MagicEvent(
|
|
|
|
source,
|
|
|
|
this,
|
|
|
|
"Red creatures and white creatures you control gain first strike until end of turn."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
final MagicPlayer player=event.getPlayer();
|
|
|
|
final Collection<MagicPermanent> targets=game.filterPermanents(
|
|
|
|
player,
|
|
|
|
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
|
|
|
|
for (final MagicPermanent creature : targets) {
|
|
|
|
if (creature.hasColor(MagicColor.Red) ||
|
|
|
|
creature.hasColor(MagicColor.White)) {
|
2013-07-06 23:57:29 -07:00
|
|
|
game.doAction(new MagicGainAbilityAction(creature,MagicAbility.FirstStrike));
|
2013-05-30 22:15:02 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
|
|
@Override
|
2013-06-19 07:23:35 -07:00
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPayedCost payedCost) {
|
2013-05-30 22:15:02 -07:00
|
|
|
return new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
new MagicMayChoice(
|
|
|
|
new MagicPayManaCostChoice(MagicManaCost.create("{X}"))
|
|
|
|
),
|
|
|
|
this,
|
|
|
|
"You may pay\$ {X}\$. If you do, put X 1/1 red and white Goblin Soldier creature tokens onto the battlefield."
|
|
|
|
);
|
|
|
|
}
|
2013-06-23 18:29:26 -07:00
|
|
|
|
2013-05-30 22:15:02 -07:00
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
if (event.isYes()) {
|
2013-05-30 22:36:14 -07:00
|
|
|
game.doAction(new MagicPlayTokensAction(
|
|
|
|
event.getPlayer(),
|
2013-05-30 22:15:02 -07:00
|
|
|
TokenCardDefinitions.get("Goblin Soldier"),
|
2013-05-30 22:36:14 -07:00
|
|
|
event.getPaidMana().getX()
|
2013-05-30 22:15:02 -07:00
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|