added Ajani Goldmane

master
melvin 2013-03-01 22:34:05 +08:00
parent 6c63525dc0
commit ad6a4e27b7
4 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,120 @@
[
new MagicPermanentActivation(
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION
],
new MagicActivationHints(MagicTiming.Main),
"+1") {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
MagicPutCounterEvent.Self(
source,
MagicCounterType.Charge,
1
),
new MagicPlayAbilityEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"You gain 2 life."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] choiceResults) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(), 2));
}
},
new MagicPermanentActivation(
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(1)
],
new MagicActivationHints(MagicTiming.Main),
"-1") {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
new MagicRemoveCounterEvent(
source,
MagicCounterType.Charge,
1
),
new MagicPlayAbilityEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Put a +1/+1 counter on each creature you control. Those creatures gain vigilance until end of turn."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] choiceResults) {
final Collection<MagicPermanent> targets = game.filterPermanents(
event.getPlayer(),
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL
);
for (final MagicPermanent target : targets) {
game.doAction(new MagicChangeCountersAction(
target,
MagicCounterType.PlusOne,
1,
true
));
game.doAction(new MagicSetAbilityAction(target, MagicAbility.Vigilance));
}
}
},
new MagicPermanentActivation(
[
MagicCondition.SORCERY_CONDITION,
MagicCondition.ABILITY_ONCE_CONDITION,
MagicConditionFactory.ChargeCountersAtLeast(6)
],
new MagicActivationHints(MagicTiming.Main),
"-6") {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
new MagicRemoveCounterEvent(
source,
MagicCounterType.Charge,
6
),
new MagicPlayAbilityEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Put a white Avatar creature token onto the battlefield. " +
"It has \"This creature's power and toughness are each equal to your life total.\""
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] choiceResults) {
game.doAction(new MagicPlayTokenAction(event.getPlayer(), TokenCardDefinitions.get("Avatar")));
}
}
]

View File

@ -0,0 +1,11 @@
name=Ajani Goldmane
url=http://magiccards.info/m11/en/1.html
image=http://magiccards.info/scans/en/m11/1.jpg
value=3.189
rarity=M
type=Planeswalker
subtype=Ajani
cost={2}{W}{W}
ability=enters with charge 4
timing=main
requires_groovy_code

View File

@ -0,0 +1,9 @@
[
new MagicCDA() {
@Override
public void modPowerToughness(final MagicGame game,final MagicPlayer player,final MagicPowerToughness pt) {
final amt = player.getLife();
pt.set(amt, amt);
}
}
]

View File

@ -0,0 +1,9 @@
name=Avatar
token=Avatar
image=http://magiccards.info/extras/token/magic-2011/avatar.jpg
value=4
type=Creature
subtype=Avatar
color=w
cost={0}
requires_groovy_code