[CMR] Implemented Yurlock of Scorch Thrash

This commit is contained in:
Evan Kranzler 2020-11-08 14:42:50 -05:00
parent 5578437dde
commit e387cf3c54
4 changed files with 153 additions and 1 deletions

View file

@ -1540,7 +1540,10 @@ public abstract class GameImpl implements Game, Serializable {
@Override
public void emptyManaPools() {
for (Player player : getPlayers().values()) {
player.getManaPool().emptyPool(this);
int amount = player.getManaPool().emptyPool(this);
if (state.isManaBurn() && amount > 0) {
player.loseLife(amount, this, false);
}
}
}

View file

@ -103,6 +103,7 @@ public class GameState implements Serializable, Copyable<GameState> {
private int permanentOrderNumber;
private final Map<UUID, FilterCreaturePermanent> usePowerInsteadOfToughnessForDamageLethalityFilters = new HashMap<>();
private Set<MageObjectReference> commandersToStay = new HashSet<>(); // commanders that do not go back to command zone
private boolean manaBurn = false;
private int applyEffectsCounter; // Upcounting number of each applyEffects execution
@ -1089,6 +1090,7 @@ public class GameState implements Serializable, Copyable<GameState> {
state.clearAbilities();
}
cardAttribute.clear();
this.setManaBurn(false);
}
public void clear() {
@ -1269,4 +1271,12 @@ public class GameState implements Serializable, Copyable<GameState> {
void setCommanderShouldStay(Card card, Game game) {
commandersToStay.add(new MageObjectReference(card, game));
}
public void setManaBurn(boolean manaBurn) {
this.manaBurn = manaBurn;
}
public boolean isManaBurn() {
return manaBurn;
}
}