added Takeno's Cavalry and AErathi Berserker
parent
8fd7c417be
commit
2abb183009
|
@ -12832,3 +12832,27 @@ converted=5
|
|||
cost={4}{R}
|
||||
pt=2/3
|
||||
timing=flash
|
||||
|
||||
>Takeno's Cavalry
|
||||
image=http://magiccards.info/scans/en/bok/24.jpg
|
||||
value=2
|
||||
rarity=C
|
||||
type=Creature
|
||||
subtype=Human,Samurai,Archer
|
||||
color=w
|
||||
converted=4
|
||||
cost={3}{W}
|
||||
pt=1/1
|
||||
timing=main
|
||||
|
||||
>AErathi Berserker
|
||||
image=http://magiccards.info/scans/en/lg/131.jpg
|
||||
value=3
|
||||
rarity=U
|
||||
type=Creature
|
||||
subtype=Human,Berserker
|
||||
color=r
|
||||
converted=5
|
||||
cost={2}{R}{R}{R}
|
||||
pt=2/4
|
||||
timing=main
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPermanentList;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicChangeTurnPTAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.trigger.MagicWhenBecomesBlockedTrigger;
|
||||
|
||||
public class AErathi_Berserker {
|
||||
public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
if (creature == permanent) {
|
||||
final MagicPermanentList plist = permanent.getBlockingCreatures();
|
||||
final int amount = 3 * (plist.size() - 1);
|
||||
if (amount > 0) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
new Object[]{permanent,amount},
|
||||
this,
|
||||
permanent + " gets +" + amount + "/+" + amount + " until end of turn.");
|
||||
}
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicChangeTurnPTAction(
|
||||
(MagicPermanent)data[0],
|
||||
(Integer)data[1],
|
||||
(Integer)data[1]));
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicDamage;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicSource;
|
||||
import magic.model.action.MagicDealDamageAction;
|
||||
import magic.model.action.MagicTargetAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.event.MagicActivationHints;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicPermanentActivation;
|
||||
import magic.model.event.MagicTapEvent;
|
||||
import magic.model.event.MagicTiming;
|
||||
import magic.model.target.MagicDamageTargetPicker;
|
||||
import magic.model.target.MagicTarget;
|
||||
import magic.model.trigger.MagicBecomesBlockedPumpTrigger;
|
||||
import magic.model.trigger.MagicWhenBlocksPumpTrigger;
|
||||
|
||||
public class Takeno_s_Cavalry {
|
||||
private static final int amount = 1;
|
||||
|
||||
public static final MagicBecomesBlockedPumpTrigger T1 = new MagicBecomesBlockedPumpTrigger(amount,amount);
|
||||
|
||||
public static final MagicWhenBlocksPumpTrigger T2 = new MagicWhenBlocksPumpTrigger(amount,amount);
|
||||
|
||||
public static final MagicPermanentActivation A = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicCondition.CAN_TAP_CONDITION},
|
||||
new MagicActivationHints(MagicTiming.Removal),
|
||||
"Damage") {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicTapEvent((MagicPermanent)source)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
MagicTargetChoice.NEG_TARGET_ATTACKING_OR_BLOCKING_SPIRIT,
|
||||
new MagicDamageTargetPicker(1),
|
||||
new Object[]{source},
|
||||
this,
|
||||
source + " deals 1 damage to target attacking or blocking Spirit$.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game,final MagicEvent event,final Object[] data,final Object[] choiceResults) {
|
||||
event.processTarget(game,choiceResults,0,new MagicTargetAction() {
|
||||
public void doAction(final MagicTarget target) {
|
||||
final MagicDamage damage = new MagicDamage((MagicSource)data[0],target,1,false);
|
||||
game.doAction(new MagicDealDamageAction(damage));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
|
@ -166,7 +166,11 @@ public class MagicTargetChoice extends MagicChoice {
|
|||
new MagicTargetChoice(MagicTargetFilter.TARGET_BLOCKING_CREATURE,true,MagicTargetHint.Positive,
|
||||
"target attacking creature");
|
||||
public static final MagicTargetChoice NEG_TARGET_ATTACKING_OR_BLOCKING_CREATURE =
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ATTACKING_OR_BLOCKING_CREATURE,true,MagicTargetHint.Negative,"target attacking creature");
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ATTACKING_OR_BLOCKING_CREATURE,true,MagicTargetHint.Negative,
|
||||
"target attacking or blocking creature");
|
||||
public static final MagicTargetChoice NEG_TARGET_ATTACKING_OR_BLOCKING_SPIRIT =
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ATTACKING_OR_BLOCKING_SPIRIT,true,MagicTargetHint.Negative,
|
||||
"target attacking or blocking Spirit");
|
||||
public static final MagicTargetChoice NEG_TARGET_ATTACKING_CREATURE_WITH_FLYING=
|
||||
new MagicTargetChoice(MagicTargetFilter.TARGET_ATTACKING_CREATURE_WITH_FLYING,true,MagicTargetHint.Negative,"target attacking creature with flying");
|
||||
public static final MagicTargetChoice NEG_TARGET_BLOCKED_CREATURE=
|
||||
|
|
|
@ -1222,18 +1222,27 @@ public interface MagicTargetFilter {
|
|||
};
|
||||
|
||||
MagicTargetFilter TARGET_ATTACKING_OR_BLOCKING_CREATURE=new MagicTargetFilter() {
|
||||
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||
|
||||
final MagicPermanent permanent=(MagicPermanent)target;
|
||||
return permanent.isCreature(game)&&(permanent.isAttacking()||permanent.isBlocking());
|
||||
}
|
||||
|
||||
public boolean acceptType(final MagicTargetType targetType) {
|
||||
|
||||
return targetType==MagicTargetType.Permanent;
|
||||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_ATTACKING_OR_BLOCKING_SPIRIT = new MagicTargetFilter() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||
final MagicPermanent permanent = (MagicPermanent)target;
|
||||
return permanent.isCreature(game) &&
|
||||
permanent.hasSubType(MagicSubType.Spirit,game) &&
|
||||
(permanent.isAttacking() ||
|
||||
permanent.isBlocking());
|
||||
}
|
||||
public boolean acceptType(final MagicTargetType targetType) {
|
||||
return targetType == MagicTargetType.Permanent;
|
||||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_ATTACKING_OR_BLOCKING_CREATURE_YOU_CONTROL=new MagicTargetFilter() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue