added Enclave Cryptologist and Halimar Wavewatch

master
beholder 2011-10-28 13:37:33 +02:00
parent bcf6d0b6af
commit 5a6dde8ee1
3 changed files with 138 additions and 0 deletions

View File

@ -17478,3 +17478,29 @@ color=g
converted=1
cost={G}
timing=pump
>Enclave Cryptologist
url=http://magiccards.info/roe/en/66.html
image=http://magiccards.info/scans/en/roe/66.jpg
value=2
rarity=U
type=Creature
subtype=Merfolk,Wizard
color=u
converted=1
cost={U}
pt=0/1
timing=main
>Halimar Wavewatch
url=http://magiccards.info/roe/en/72.html
image=http://magiccards.info/scans/en/roe/72.jpg
value=2
rarity=C
type=Creature
subtype=Merfolk,Soldier
color=u
converted=2
cost={1}{U}
pt=0/3
timing=main

View File

@ -0,0 +1,68 @@
package magic.card;
import magic.model.MagicCounterType;
import magic.model.MagicGame;
import magic.model.MagicManaCost;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicDrawAction;
import magic.model.condition.MagicCondition;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicDiscardEvent;
import magic.model.event.MagicEvent;
import magic.model.event.MagicLevelUpActivation;
import magic.model.event.MagicPermanentActivation;
import magic.model.event.MagicTapEvent;
import magic.model.event.MagicTiming;
public class Enclave_Cryptologist {
public static final MagicPermanentActivation A1 = new MagicLevelUpActivation(MagicManaCost.ONE_BLUE,3);
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CHARGE_COUNTER_CONDITION,
MagicCondition.CAN_TAP_CONDITION,
},
new MagicActivationHints(MagicTiming.Draw),
"Draw") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicTapEvent((MagicPermanent)source)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
final MagicPlayer player = source.getController();
final int amount = source.getCounters(MagicCounterType.Charge);
final String description = amount >= 3 ?
" draws a card." :
" draws a card, then discards a card.";
return new MagicEvent(
source,
player,
new Object[]{amount,player,source},
this,
player + description);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
final MagicPlayer player = (MagicPlayer)data[1];
game.doAction(new MagicDrawAction(player,1));
if ((Integer)data[0] <= 2) {
game.addEvent(new MagicDiscardEvent(
(MagicSource)data[2],
player,
1,
false));
}
}
};
}

View File

@ -0,0 +1,44 @@
package magic.card;
import magic.model.MagicAbility;
import magic.model.MagicCounterType;
import magic.model.MagicGame;
import magic.model.mstatic.MagicLayer;
import magic.model.MagicManaCost;
import magic.model.MagicPermanent;
import magic.model.MagicPowerToughness;
import magic.model.event.MagicLevelUpActivation;
import magic.model.event.MagicPermanentActivation;
import magic.model.mstatic.MagicStatic;
public class Halimar_Wavewatch {
public static final MagicStatic S1 = new MagicStatic(MagicLayer.SetPT) {
@Override
public void getPowerToughness(
final MagicGame game,
final MagicPermanent permanent,
final MagicPowerToughness pt) {
final int charges = permanent.getCounters(MagicCounterType.Charge);
if (charges >= 5) {
pt.set(6,6);
} else if (charges >= 1) {
pt.set(0,6);
}
}
};
public static final MagicStatic S2 = new MagicStatic(MagicLayer.Ability) {
@Override
public long getAbilityFlags(
final MagicGame game,
final MagicPermanent permanent,
final long flags) {
if (permanent.getCounters(MagicCounterType.Charge) >= 5) {
return flags|MagicAbility.Islandwalk.getMask();
}
return flags;
}
};
public static final MagicPermanentActivation A = new MagicLevelUpActivation(MagicManaCost.TWO,5);
}