mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Added new scheme: All in Good Time
- new player keyword "Schemes can't be set in motion this turn."
This commit is contained in:
@@ -59,6 +59,9 @@ public class AddTurnEffect extends SpellAbilityEffect {
|
||||
if (sa.hasParam("SkipUntap")) {
|
||||
extra.setSkipUntap(true);
|
||||
}
|
||||
if (sa.hasParam("NoSchemes")) {
|
||||
extra.setCantSetSchemesInMotion(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ public class ExtraTurn {
|
||||
private Player player = null;
|
||||
private boolean loseAtEndStep = false;
|
||||
private boolean skipUntap = false;
|
||||
private boolean cantSetSchemesInMotion = false;
|
||||
/**
|
||||
* TODO: Write javadoc for Constructor.
|
||||
* @param player the player
|
||||
@@ -83,4 +84,18 @@ public class ExtraTurn {
|
||||
this.skipUntap = skipUntap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if Schemes can't be played during the extra turn
|
||||
*/
|
||||
public boolean isCantSetSchemesInMotion() {
|
||||
return cantSetSchemesInMotion;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param noSchemes set boolean if schemes can't be played this extra turn
|
||||
*/
|
||||
public void setCantSetSchemesInMotion(boolean noSchemes) {
|
||||
this.cantSetSchemesInMotion = noSchemes;
|
||||
}
|
||||
|
||||
} //end class Untap
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
||||
private int nCombatsThisTurn = 0;
|
||||
private boolean bPreventCombatDamageThisTurn = false;
|
||||
private int planarDiceRolledthisTurn = 0;
|
||||
|
||||
|
||||
private Player playerTurn = null;
|
||||
|
||||
// priority player
|
||||
@@ -540,16 +540,16 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
||||
|
||||
p.removeKeyword("At the beginning of this turn's end step, you lose the game.");
|
||||
p.removeKeyword("Skip the untap step of this turn.");
|
||||
p.removeKeyword("Schemes can't be set in motion this turn.");
|
||||
}
|
||||
|
||||
Player next = getNextActivePlayer();
|
||||
VField nextField = CMatchUI.SINGLETON_INSTANCE.getFieldViewFor(next);
|
||||
SDisplayUtil.showTab(nextField);
|
||||
|
||||
if(game.getType() == GameType.Planechase) {
|
||||
|
||||
if (game.getType() == GameType.Planechase) {
|
||||
Card p = game.getActivePlane();
|
||||
if(p != null)
|
||||
{
|
||||
if (p != null) {
|
||||
p.clearControllers();
|
||||
p.addController(next);
|
||||
game.getAction().controllerChangeZoneCorrection(p);
|
||||
@@ -580,6 +580,9 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
||||
if (extraTurn.isSkipUntap()) {
|
||||
nextTurn.addKeyword("Skip the untap step of this turn.");
|
||||
}
|
||||
if (extraTurn.isCantSetSchemesInMotion()) {
|
||||
nextTurn.addKeyword("Schemes can't be set in motion this turn.");
|
||||
}
|
||||
return nextTurn;
|
||||
}
|
||||
if (nextTurn.skipTurnTimeVault()) {
|
||||
|
||||
@@ -225,6 +225,11 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
|
||||
}
|
||||
|
||||
public void setSchemeInMotion() {
|
||||
for (final Player p : game.getPlayers()) {
|
||||
if (p.hasKeyword("Schemes can't be set in motion this turn.")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Replacement effects
|
||||
final HashMap<String, Object> repRunParams = new HashMap<String, Object>();
|
||||
|
||||
Reference in New Issue
Block a user