added Ulvenwald Bear and Village Survivors

master
beholder 2012-02-27 12:25:47 +01:00
parent c150312826
commit 177b1add38
4 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,13 @@
>Ulvenwald Bear
url=http://magiccards.info/dka/en/129.html
image=http://magiccards.info/scans/en/dka/129.jpg
value=2
rarity=C
type=Creature
subtype=Bear
color=g
converted=3
cost={2}{G}
pt=2/2
timing=smain
requires_card_code

View File

@ -0,0 +1,14 @@
>Village Survivors
url=http://magiccards.info/dka/en/130.html
image=http://magiccards.info/scans/en/dka/130.jpg
value=4
rarity=U
type=Creature
subtype=Human
color=g
converted=5
cost={4}{G}
pt=4/5
ability=vigilance
timing=fmain
requires_card_code

View File

@ -0,0 +1,42 @@
package magic.card;
import magic.model.MagicCounterType;
import magic.model.MagicGame;
import magic.model.MagicPlayer;
import magic.model.MagicPermanent;
import magic.model.action.MagicChangeCountersAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
public class Ulvenwald_Bear {
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
if (game.getCreatureDiedThisTurn()) {
return new MagicEvent(
permanent,
player,
new Object[]{permanent},
this,
permanent + " enters the battlefield with two +1/+1 counters on it ");
}
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeCountersAction(
(MagicPermanent)data[0],
MagicCounterType.PlusOne,
2,
true));
}
@Override
public boolean usesStack() {
return false;
}
};
}

View File

@ -0,0 +1,20 @@
package magic.card;
import magic.model.MagicAbility;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.mstatic.MagicLayer;
import magic.model.mstatic.MagicStatic;
import magic.model.target.MagicTargetFilter;
public class Village_Survivors {
public static final MagicStatic S = new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL) {
@Override
public long getAbilityFlags(final MagicGame game,final MagicPermanent permanent,final long flags) {
return permanent.getController().getLife() <= 5 ?
flags|MagicAbility.Vigilance.getMask() : flags;
}
};
}