added Righteous Cause

master
beholder 2011-09-04 19:56:10 +02:00
parent 0a9e317179
commit fd93ea25d1
2 changed files with 43 additions and 0 deletions

View File

@ -8078,6 +8078,16 @@ toughness=0
ability=first strike
timing=equipment
>Righteous Cause
image=http://magiccards.info/scans/en/cmd/29.jpg
value=4
rarity=U
type=Enchantment
color=w
converted=5
cost={3}{W}{W}
timing=enchantment
>Strandwalker
image=http://magiccards.info/scans/en/mbs/137.jpg
value=3

View File

@ -0,0 +1,33 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicChangeLifeAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenAttacksTrigger;
public class Righteous_Cause {
public static final MagicWhenAttacksTrigger T = new MagicWhenAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
final MagicPlayer player = permanent.getController();
return new MagicEvent(
permanent,
player,
new Object[]{player},
this,
player + " gains 1 life.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeLifeAction((MagicPlayer)data[0],1));
}
};
}