* M15 - Added 13 white cards.

This commit is contained in:
LevelX2 2014-07-05 11:57:54 +02:00
parent 133580bf70
commit 84ac387bbb
22 changed files with 1433 additions and 13 deletions

View file

@ -45,16 +45,20 @@ import mage.game.permanent.Permanent;
*/
public class BoostSourceWhileControlsEffect extends WhileConditionContiniousEffect {
private int power;
private int toughness;
private String filterDescription;
private final int power;
private final int toughness;
private final String filterDescription;
public BoostSourceWhileControlsEffect(FilterPermanent filter, int power, int toughness) {
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, new ControlsPermanentCondition(filter), Outcome.BoostCreature);
this.power = power;
this.toughness = toughness;
this.filterDescription = filter.getMessage();
staticText = "{this} gets " + String.format("%1$+d/%2$+d", power, toughness) + " as long as you control a " + filterDescription;
staticText = "{this} gets "
+ String.format("%1$+d/%2$+d", power, toughness)
+ " as long as you control "
+ (filterDescription.startsWith("an ") ? "":"a ")
+ filterDescription;
}
public BoostSourceWhileControlsEffect(final BoostSourceWhileControlsEffect effect) {

View file

@ -29,7 +29,6 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.ObjectColor;
import mage.constants.CardType;
/**
@ -39,10 +38,13 @@ import mage.constants.CardType;
public class SoldierToken extends Token {
public SoldierToken() {
this("10E");
}
public SoldierToken(String setCode) {
super("Soldier", "1/1 white Soldier creature token");
this.setOriginalExpansionSetCode("10E");
this.setOriginalExpansionSetCode(setCode);
cardType.add(CardType.CREATURE);
color = ObjectColor.WHITE;
color.setWhite(true);
subtype.add("Soldier");
power = new MageInt(1);
toughness = new MageInt(1);

View file

@ -40,7 +40,7 @@ import mage.watchers.Watcher;
/**
* Counts amount of life lost current turn by players.
* Counts amount of life lost current or last turn by players.
*
*
* @author LevelX2
@ -48,6 +48,7 @@ import mage.watchers.Watcher;
public class PlayerLostLifeWatcher extends Watcher {
private final Map<UUID, Integer> amountOfLifeLostThisTurn = new HashMap<>();
private final Map<UUID, Integer> amountOfLifeLostLastTurn = new HashMap<>();
public PlayerLostLifeWatcher() {
super("PlayerLostLifeWatcher", WatcherScope.GAME);
@ -87,8 +88,18 @@ public class PlayerLostLifeWatcher extends Watcher {
return 0;
}
public int getLiveLostLastTurn(UUID playerId) {
Integer amount = amountOfLifeLostLastTurn.get(playerId);
if (amount != null) {
return amount.intValue();
}
return 0;
}
@Override
public void reset() {
amountOfLifeLostLastTurn.clear();
amountOfLifeLostLastTurn.putAll(amountOfLifeLostThisTurn);
amountOfLifeLostThisTurn.clear();
}