added Righteous Cause
parent
0a9e317179
commit
fd93ea25d1
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue