added Serra Ascendant

master
beholder 2011-09-02 12:16:17 +02:00
parent 3fb88450d4
commit 382f346166
2 changed files with 52 additions and 0 deletions

View File

@ -998,6 +998,20 @@ power=1
toughness=3 toughness=3
timing=main timing=main
>Serra Ascendant
image=http://magiccards.info/scans/en/m11/28.jpg
value=2
rarity=R
type=Creature
subtype=Human,Monk
color=w
converted=1
cost={W}
power=1
toughness=1
ability=lifelink
timing=main
>Skinrender >Skinrender
image=http://magiccards.info/scans/en/som/78.jpg image=http://magiccards.info/scans/en/som/78.jpg
value=4 value=4

View File

@ -0,0 +1,38 @@
package magic.card;
import magic.model.MagicAbility;
import magic.model.MagicCardDefinition;
import magic.model.MagicChangeCardDefinition;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPowerToughness;
import magic.model.variable.MagicDummyLocalVariable;
import magic.model.variable.MagicLocalVariable;
import magic.model.variable.MagicStaticLocalVariable;
public class Serra_Ascendant {
private static final MagicLocalVariable LV = new MagicDummyLocalVariable() {
@Override
public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) {
if (permanent.getController().getLife() >= 30) {
pt.power += 5;
pt.toughness += 5;
}
}
@Override
public long getAbilityFlags(final MagicGame game,final MagicPermanent permanent,final long flags) {
return permanent.getController().getLife() >= 30 ?
flags|MagicAbility.Flying.getMask() : flags;
}
};
public static final MagicChangeCardDefinition SET = new MagicChangeCardDefinition() {
@Override
public void change(MagicCardDefinition cdef) {
cdef.addLocalVariable(MagicStaticLocalVariable.getInstance());
cdef.addLocalVariable(LV);
}
};
}