fixed some typos. shortened lines. added whitespace

master
beholder 2011-11-06 11:32:56 +01:00
parent f08c80e2a4
commit e4795d49f0
9 changed files with 70 additions and 36 deletions

View File

@ -26,7 +26,7 @@ public class Ajani_s_Pridemate {
MagicSimpleMayChoice.DEFAULT_YES),
new Object[]{permanent},
this,
player + " may put a +1/+1 counter on " + permanent + "."):
player + " may$ put a +1/+1 counter on " + permanent + "."):
MagicEvent.NONE;
}
@Override
@ -36,7 +36,11 @@ public class Ajani_s_Pridemate {
final Object data[],
final Object[] choiceResults) {
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
game.doAction(new MagicChangeCountersAction((MagicPermanent)data[0],MagicCounterType.PlusOne,1,true));
game.doAction(new MagicChangeCountersAction(
(MagicPermanent)data[0],
MagicCounterType.PlusOne,
1,
true));
}
}
};

View File

@ -20,9 +20,9 @@ public class Armadillo_Cloak {
public static final MagicWhenDamageIsDealtTrigger T = new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
final MagicPlayer player=permanent.getController();
final int amount=damage.getDealtAmount();
return (permanent.getEnchantedCreature()==damage.getSource()) ?
final MagicPlayer player = permanent.getController();
final int amount = damage.getDealtAmount();
return (permanent.getEnchantedCreature() == damage.getSource()) ?
new MagicEvent(
permanent,
player,
@ -37,7 +37,9 @@ public class Armadillo_Cloak {
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeLifeAction((MagicPlayer)data[0],(Integer)data[1]));
game.doAction(new MagicChangeLifeAction(
(MagicPlayer)data[0],
(Integer)data[1]));
}
};
}

View File

@ -28,7 +28,8 @@ public class Balefire_Dragon {
player,
new Object[]{permanent,game.getOpponent(player),amount},
this,
permanent + " deals " + amount + " damage to each creature defending player controls."):
permanent + " deals " + amount +
" damage to each creature defending player controls."):
MagicEvent.NONE;
}
@Override

View File

@ -29,7 +29,11 @@ public class Bloodcrazed_Neonate {
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeCountersAction((MagicPermanent)data[0],MagicCounterType.PlusOne,1,true));
game.doAction(new MagicChangeCountersAction(
(MagicPermanent)data[0],
MagicCounterType.PlusOne,
1,
true));
}
};
}

View File

@ -32,7 +32,9 @@ public class Dissipation_Field {
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicRemoveFromPlayAction((MagicPermanent)data[0],MagicLocationType.OwnersHand));
game.doAction(new MagicRemoveFromPlayAction(
(MagicPermanent)data[0],
MagicLocationType.OwnersHand));
}
};
}

View File

@ -29,7 +29,11 @@ public class Falkenrath_Marauders {
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeCountersAction((MagicPermanent)data[0],MagicCounterType.PlusOne,2,true));
game.doAction(new MagicChangeCountersAction(
(MagicPermanent)data[0],
MagicCounterType.PlusOne,
2,
true));
}
};
}

View File

@ -47,8 +47,13 @@ public class Goblin_Lackey {
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
event.processTargetCard(game,choiceResults,1,new MagicCardAction() {
public void doAction(final MagicCard card) {
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.OwnersHand));
game.doAction(new MagicPlayCardAction(card,(MagicPlayer)data[0],MagicPlayCardAction.NONE));
game.doAction(new MagicRemoveCardAction(
card,
MagicLocationType.OwnersHand));
game.doAction(new MagicPlayCardAction(
card,
(MagicPlayer)data[0],
MagicPlayCardAction.NONE));
}
});
}

View File

@ -11,34 +11,46 @@ import magic.model.event.MagicDiscardEvent;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenDamageIsDealtTrigger;
public class Mask_of_Memory {
public static final MagicWhenDamageIsDealtTrigger T = new MagicWhenDamageIsDealtTrigger() {
public static final MagicWhenDamageIsDealtTrigger T = new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
final MagicPlayer player=permanent.getController();
return (permanent.getEquippedCreature()==damage.getSource()&&damage.getTarget().isPlayer()&&damage.isCombat()) ?
new MagicEvent(
permanent,
player,
new MagicSimpleMayChoice(
"You may draw two cards.",
MagicSimpleMayChoice.DRAW_CARDS,
2,
MagicSimpleMayChoice.DEFAULT_NONE),
new Object[]{permanent,player},
this,
"You may$ draw two cards. If you do, discard a card."):
MagicEvent.NONE;
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicDamage damage) {
final MagicPlayer player = permanent.getController();
return (permanent.getEquippedCreature() == damage.getSource() &&
damage.getTarget().isPlayer() &&
damage.isCombat()) ?
new MagicEvent(
permanent,
player,
new MagicSimpleMayChoice(
"You may draw two cards.",
MagicSimpleMayChoice.DRAW_CARDS,
2,
MagicSimpleMayChoice.DEFAULT_NONE),
new Object[] {permanent, player},
this,
"You may$ draw two cards. If you do, discard a card.") :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game,final MagicEvent event,final Object data[],final Object[] choiceResults) {
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
if (MagicChoice.isYesChoice(choiceResults[0])) {
final MagicPlayer player=(MagicPlayer)data[1];
game.doAction(new MagicDrawAction(player,2));
game.addEvent(new MagicDiscardEvent((MagicPermanent)data[0],player,1,false));
final MagicPlayer player = (MagicPlayer)data[1];
game.doAction(new MagicDrawAction(player, 2));
game.addEvent(new MagicDiscardEvent(
(MagicPermanent)data[0],
player,
1,
false));
}
}
};
};
}

View File

@ -19,7 +19,7 @@ public class Sanguine_Bond {
player,
new Object[]{game.getOpponent(player),amount},
this,
game.getOpponent(player) + " loses "+amount+" life."):
game.getOpponent(player) + " loses " + amount + " life."):
MagicEvent.NONE;
}
@Override