added Ashmouth Hound. cleaned up Amphibious Kavu
parent
1d47b30e0b
commit
19769b8f23
|
@ -3945,6 +3945,18 @@ cost={2}{U}
|
|||
pt=1/4
|
||||
timing=main
|
||||
|
||||
>Ashmouth Hound
|
||||
image=http://magiccards.info/scans/en/isd/128.jpg
|
||||
value=2
|
||||
rarity=C
|
||||
type=Creature
|
||||
subtype=Elemental,Hound
|
||||
color=r
|
||||
converted=2
|
||||
cost={1}{R}
|
||||
pt=2/1
|
||||
timing=main
|
||||
|
||||
>Avacynian Priest
|
||||
image=http://magiccards.info/scans/en/isd/4.jpg
|
||||
value=1
|
||||
|
|
|
@ -4,9 +4,7 @@ import magic.model.MagicColor;
|
|||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPermanentList;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicChangeTurnPTAction;
|
||||
import magic.model.action.MagicDestroyAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.trigger.MagicWhenBecomesBlockedTrigger;
|
||||
import magic.model.trigger.MagicWhenBlocksTrigger;
|
||||
|
@ -15,7 +13,6 @@ public class Amphibious_Kavu {
|
|||
public static final MagicWhenBecomesBlockedTrigger T1 = 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();
|
||||
boolean pump = false;
|
||||
|
@ -29,7 +26,7 @@ public class Amphibious_Kavu {
|
|||
if (pump) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
permanent.getController(),
|
||||
new Object[]{permanent},
|
||||
this,
|
||||
permanent + " gets +3/+3 until end of turn.");
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicDamage;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPermanentList;
|
||||
import magic.model.action.MagicDealDamageAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.trigger.MagicWhenBecomesBlockedTrigger;
|
||||
import magic.model.trigger.MagicWhenBlocksTrigger;
|
||||
|
||||
public class Ashmouth_Hound {
|
||||
public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
||||
if (creature == permanent) {
|
||||
final MagicPermanentList plist = permanent.getBlockingCreatures();
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
new Object[]{permanent,plist},
|
||||
this,
|
||||
permanent + " deals 1 damage to blocking creature.");
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicPermanent permanent = (MagicPermanent)data[0];
|
||||
final MagicPermanentList plist = (MagicPermanentList)data[1];
|
||||
for (final MagicPermanent blocker : plist) {
|
||||
final MagicDamage damage = new MagicDamage(permanent,blocker,1,false);
|
||||
game.doAction(new MagicDealDamageAction(damage));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicWhenBlocksTrigger T2 = new MagicWhenBlocksTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent data) {
|
||||
final MagicPermanent blocked = permanent.getBlockedCreature();
|
||||
return (permanent == data && blocked.isValid()) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
new Object[]{permanent,blocked},
|
||||
this,
|
||||
permanent + " deals 1 damage to " + blocked + "."):
|
||||
MagicEvent.NONE;
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicDamage damage = new MagicDamage(
|
||||
(MagicPermanent)data[0],
|
||||
(MagicPermanent)data[1],
|
||||
1,
|
||||
false);
|
||||
game.doAction(new MagicDealDamageAction(damage));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue