Add script for Veteran's Armaments

master
Jericho Pumpkin 2013-10-11 22:08:27 +00:00
parent 9b6b99e680
commit 4c87442e5a
2 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,54 @@
def act = {
final MagicGame game, final MagicEvent event ->
final int amount = event.getPlayer().getOpponent().getNrOfAttackers() + event.getPlayer().getNrOfAttackers();
game.doAction(new MagicChangeTurnPTAction(event.getPermanent(),amount,amount));
} as MagicEventAction
def evt = {
final MagicPermanent permanent ->
return new MagicEvent(
permanent,
act,
"SN gets +X/+X until end of turn, where X is the number of attacking creatures."
);
}
[
new MagicWhenBlocksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent blocker) {
return (permanent.getEquippedCreature() == blocker) ? evt(blocker) : MagicEvent.NONE;
}
},
new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
return (permanent.getEquippedCreature() == attacker) ? evt(attacker) : MagicEvent.NONE;
}
},
new MagicWhenOtherComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
return (otherPermanent.isCreature() &&
otherPermanent.hasSubType(MagicSubType.Soldier)) ?
new MagicEvent(
permanent,
new MagicMayChoice(),
otherPermanent,
this,
"You may\$ attach SN to RN."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicAttachAction(
event.getPermanent(),
event.getRefPermanent()
));
}
}
}
]

View File

@ -0,0 +1,11 @@
name=Veteran's Armaments
url=http://magiccards.info/mt/en/146.html
image=http://magiccards.info/scans/en/mt/146.jpg
value=3.538
rarity=U
cost={2}
equip={2}
type=Tribal,Artifact
subtype=Soldier,Equipment
timing=artifact
requires_groovy_code