mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Merge branch 'master' of https://git.cardforge.org/core-developers/forge into adventure
This commit is contained in:
@@ -1967,7 +1967,6 @@ public class GameAction {
|
||||
}
|
||||
|
||||
// If pl has Backup Plan as a Conspiracy draw that many extra hands
|
||||
|
||||
}
|
||||
|
||||
// Choose starting hand for each player with multiple hands
|
||||
|
||||
@@ -69,7 +69,6 @@ public class MustBlockEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // mustBlockResolve()
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,17 +38,26 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
||||
forge.game.trigger.Trigger.resetIDs();
|
||||
TriggerHandler trigHandler = game.getTriggerHandler();
|
||||
trigHandler.clearDelayedTrigger();
|
||||
trigHandler.clearPlayerDefinedDelayedTrigger();
|
||||
trigHandler.suppressMode(TriggerType.ChangesZone);
|
||||
// Avoid Psychic Surgery trigger in new game
|
||||
trigHandler.suppressMode(TriggerType.Shuffled);
|
||||
|
||||
game.getPhaseHandler().resetExtra();
|
||||
game.getPhaseHandler().setPlayerDeclaresAttackers(null);
|
||||
game.getPhaseHandler().setPlayerDeclaresBlockers(null);
|
||||
game.getUntap().clearCommands();
|
||||
game.getUpkeep().clearCommands();
|
||||
game.getEndOfCombat().clearCommands();
|
||||
game.getEndOfTurn().clearCommands();
|
||||
game.getCleanup().clearCommands();
|
||||
|
||||
game.getStack().reset();
|
||||
game.clearCounterAddedThisTurn();
|
||||
game.resetPlayersAttackedOnNextTurn();
|
||||
game.resetPlayersAttackedOnNextTurn();
|
||||
game.setMonarch(null);
|
||||
game.setDayTime(null);
|
||||
GameAction action = game.getAction();
|
||||
|
||||
for (Player p: players) {
|
||||
@@ -57,9 +66,13 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
||||
p.resetSpellCastThisGame();
|
||||
p.onCleanupPhase();
|
||||
p.setLandsPlayedLastTurn(0);
|
||||
p.setSpellsCastLastTurn(0);
|
||||
p.setLifeLostLastTurn(0);
|
||||
p.resetCommanderStats();
|
||||
p.resetCompletedDungeons();
|
||||
p.setBlessing(false);
|
||||
p.clearController();
|
||||
p.setMustAttackEntity(null);
|
||||
|
||||
CardCollection newLibrary = new CardCollection(p.getCardsIn(restartZones, false));
|
||||
List<Card> filteredCards = null;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class SkipPhaseEffect extends SpellAbilityEffect {
|
||||
final String name = hostCard.getName() + "'s Effect";
|
||||
final String image = hostCard.getImageKey();
|
||||
final boolean isNextThisTurn = duration != null && duration.equals("NextThisTurn");
|
||||
|
||||
|
||||
final Card eff = createEffect(sa, player, name, image);
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
@@ -89,7 +89,7 @@ public class SkipPhaseEffect extends SpellAbilityEffect {
|
||||
sb.append(" of your next turn.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final String repeffstr = sb.toString();
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, eff, true);
|
||||
// Set to layer to Control so it will be applied before "would begin your X phase/step" replacement effects
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SkipTurnEffect extends SpellAbilityEffect {
|
||||
sb.append("skips his/her next ").append(numTurns).append(" turn(s).");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resolve(SpellAbility sa) {
|
||||
final Card hostCard = sa.getHostCard();
|
||||
|
||||
@@ -6157,7 +6157,9 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
}
|
||||
|
||||
public void onCleanupPhase(final Player turn) {
|
||||
setDamage(0);
|
||||
if (!this.hasKeyword("Damage isn't removed from CARDNAME during cleanup steps.")) {
|
||||
setDamage(0);
|
||||
}
|
||||
setHasBeenDealtDeathtouchDamage(false);
|
||||
resetReceivedDamageFromThisTurn();
|
||||
setRegeneratedThisTurn(0);
|
||||
|
||||
@@ -51,6 +51,14 @@ public class Phase implements java.io.Serializable {
|
||||
private final HashMap<Player, ArrayList<GameCommand>> untilEndMap = new HashMap<>();
|
||||
private final HashMap<Player, ArrayList<GameCommand>> registerMap = new HashMap<>();
|
||||
|
||||
public void clearCommands() {
|
||||
at.clear();
|
||||
until.clear();
|
||||
untilMap.clear();
|
||||
untilEndMap.clear();
|
||||
registerMap.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Add a hardcoded trigger that will execute "at <phase>".
|
||||
|
||||
@@ -60,7 +60,7 @@ public abstract class AbilityStatic extends Ability implements Cloneable {
|
||||
|
||||
return this.getRestrictions().canPlay(c, this);
|
||||
}
|
||||
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final Object clone() {
|
||||
|
||||
@@ -102,7 +102,7 @@ public final class AbilitySub extends SpellAbility implements java.io.Serializab
|
||||
public void resolve() {
|
||||
effect.resolve(this);
|
||||
}
|
||||
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final Object clone() {
|
||||
|
||||
@@ -67,6 +67,7 @@ public class LandAbility extends Ability {
|
||||
|
||||
return p.canPlayLand(land, false, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
getHostCard().setSplitStateToPlayAbility(this);
|
||||
@@ -81,6 +82,7 @@ public class LandAbility extends Ability {
|
||||
result.setState(CardStateName.Original, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toUnsuppressedString() {
|
||||
StringBuilder sb = new StringBuilder("Play land");
|
||||
|
||||
@@ -132,7 +132,6 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
|
||||
@Override
|
||||
public boolean isAbility() { return false; }
|
||||
|
||||
|
||||
/**
|
||||
* @return the castFaceDown
|
||||
*/
|
||||
|
||||
@@ -230,7 +230,6 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
||||
if (params.containsKey("ConditionTargetsSingleTarget")) {
|
||||
this.setTargetsSingleTarget(true);
|
||||
}
|
||||
|
||||
} // setConditions
|
||||
|
||||
/**
|
||||
@@ -390,8 +389,7 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
||||
int life = 1;
|
||||
if (this.getLifeTotal().equals("OpponentSmallest")) {
|
||||
life = activator.getOpponentsSmallestLifeTotal();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
life = AbilityUtils.getDefinedPlayers(host, this.getLifeTotal(), sa).getFirst().getLife();
|
||||
}
|
||||
|
||||
@@ -432,7 +430,6 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
||||
if (matchTgt == null || matchTgt.getFirstTargetedSpell() == null
|
||||
|| matchTgt.getFirstTargetedSpell().getTargets() == null) {
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
Set<GameObject> targets = new HashSet<>();
|
||||
|
||||
@@ -604,7 +604,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
int activationLimit = AbilityUtils.calculateAmount(c, limit, sa);
|
||||
this.setActivationLimit(activationLimit);
|
||||
|
||||
if ((this.getActivationLimit() != -1) && (sa.getActivationsThisTurn() >= this.getActivationLimit())) {
|
||||
if (this.getActivationLimit() != -1 && sa.getActivationsThisTurn() >= this.getActivationLimit()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -614,7 +614,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
int gameActivationLimit = AbilityUtils.calculateAmount(c, limit, sa);
|
||||
this.setGameActivationLimit(gameActivationLimit);
|
||||
|
||||
if ((this.getGameActivationLimit() != -1) && (sa.getActivationsThisGame() >= this.getGameActivationLimit())) {
|
||||
if (this.getGameActivationLimit() != -1 && sa.getActivationsThisGame() >= this.getGameActivationLimit()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,6 @@ public class SpellPermanent extends SpellApiBased {
|
||||
if (this.getPayCosts().getTotalMana().countX() > 0 && StringUtils.isNotBlank(getHostCard().getSVar("X"))) {
|
||||
this.setSVar("X", this.getHostCard().getSVar("X"));
|
||||
}
|
||||
|
||||
} // Spell_Permanent()
|
||||
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ public class TriggerHandler {
|
||||
playerDefinedDelayedTriggers.put(player, trig);
|
||||
}
|
||||
|
||||
public final void clearPlayerDefinedDelayedTrigger() {
|
||||
playerDefinedDelayedTriggers.clear();
|
||||
}
|
||||
|
||||
public final void handlePlayerDefinedDelTriggers(final Player player) {
|
||||
delayedTriggers.addAll(playerDefinedDelayedTriggers.removeAll(player));
|
||||
}
|
||||
|
||||
8
forge-gui/res/cardsfolder/upcoming/patient_zero.txt
Normal file
8
forge-gui/res/cardsfolder/upcoming/patient_zero.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Patient Zero
|
||||
ManaCost:1 B
|
||||
Types:Creature Zombie
|
||||
PT:2/2
|
||||
K:Lifelink
|
||||
S:Mode$ Continuous | Affected$ Creature.OppCtrl | AddHiddenKeyword$ Damage isn't removed from CARDNAME during cleanup steps. | Description$ Damage isn't removed from creatures your opponents control during cleanup steps.
|
||||
DeckHas:Ability$LifeGain
|
||||
Oracle:Lifelink\nDamage isn't removed from creatures your opponents control during cleanup steps.
|
||||
Reference in New Issue
Block a user