added MagicCondition.YOUR_UPKEEP_CONDITION. added Augur il-Vec
parent
7cd9066c95
commit
f78e4546c4
|
@ -15835,3 +15835,17 @@ cost={2}{B}
|
||||||
pt=3/1
|
pt=3/1
|
||||||
ability=shadow
|
ability=shadow
|
||||||
timing=main
|
timing=main
|
||||||
|
|
||||||
|
>Augur il-Vec
|
||||||
|
url=http://magiccards.info/fut/en/2.html
|
||||||
|
image=http://magiccards.info/scans/en/fut/2.jpg
|
||||||
|
value=2
|
||||||
|
rarity=C
|
||||||
|
type=Creature
|
||||||
|
subtype=Human,Cleric
|
||||||
|
color=w
|
||||||
|
converted=2
|
||||||
|
cost={1}{W}
|
||||||
|
pt=1/3
|
||||||
|
ability=shadow
|
||||||
|
timing=main
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
package magic.card;
|
||||||
|
|
||||||
|
import magic.model.MagicGame;
|
||||||
|
import magic.model.MagicPayedCost;
|
||||||
|
import magic.model.MagicPermanent;
|
||||||
|
import magic.model.MagicPlayer;
|
||||||
|
import magic.model.MagicSource;
|
||||||
|
import magic.model.action.MagicChangeLifeAction;
|
||||||
|
import magic.model.condition.MagicCondition;
|
||||||
|
import magic.model.event.MagicActivationHints;
|
||||||
|
import magic.model.event.MagicEvent;
|
||||||
|
import magic.model.event.MagicPermanentActivation;
|
||||||
|
import magic.model.event.MagicSacrificeEvent;
|
||||||
|
import magic.model.event.MagicTiming;
|
||||||
|
|
||||||
|
public class Augur_il_Vec {
|
||||||
|
public static final MagicPermanentActivation A = new MagicPermanentActivation(
|
||||||
|
new MagicCondition[]{MagicCondition.YOUR_UPKEEP_CONDITION},
|
||||||
|
new MagicActivationHints(MagicTiming.None),
|
||||||
|
"Life+4") {
|
||||||
|
@Override
|
||||||
|
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||||
|
return new MagicEvent[]{new MagicSacrificeEvent((MagicPermanent)source)};
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||||
|
final MagicPlayer player=source.getController();
|
||||||
|
return new MagicEvent(
|
||||||
|
source,
|
||||||
|
player,
|
||||||
|
new Object[]{player},
|
||||||
|
this,
|
||||||
|
player + " gains 4 life.");
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeEvent(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicEvent event,
|
||||||
|
final Object[] data,
|
||||||
|
final Object[] choiceResults) {
|
||||||
|
game.doAction(new MagicChangeLifeAction((MagicPlayer)data[0],4));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,6 +9,7 @@ import magic.model.MagicPermanent;
|
||||||
import magic.model.MagicSource;
|
import magic.model.MagicSource;
|
||||||
import magic.model.MagicSubType;
|
import magic.model.MagicSubType;
|
||||||
import magic.model.MagicType;
|
import magic.model.MagicType;
|
||||||
|
import magic.model.phase.MagicPhaseType;
|
||||||
|
|
||||||
public interface MagicCondition {
|
public interface MagicCondition {
|
||||||
|
|
||||||
|
@ -37,6 +38,13 @@ public interface MagicCondition {
|
||||||
return game.canPlaySorcery(source.getController());
|
return game.canPlaySorcery(source.getController());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MagicCondition YOUR_UPKEEP_CONDITION = new MagicCondition() {
|
||||||
|
public boolean accept(final MagicGame game,final MagicSource source) {
|
||||||
|
return game.isPhase(MagicPhaseType.Upkeep) &&
|
||||||
|
game.getTurnPlayer() == source.getController();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
MagicCondition ONE_LIFE_CONDITION=new MagicCondition() {
|
MagicCondition ONE_LIFE_CONDITION=new MagicCondition() {
|
||||||
public boolean accept(final MagicGame game,final MagicSource source) {
|
public boolean accept(final MagicGame game,final MagicSource source) {
|
||||||
|
|
Loading…
Reference in New Issue