- Added new scheme: All in Good Time

- new player keyword "Schemes can't be set in motion this turn."
This commit is contained in:
moomarc
2013-03-10 10:15:52 +00:00
parent 45193939e2
commit 99ecca4805
6 changed files with 41 additions and 5 deletions

1
.gitattributes vendored
View File

@@ -217,6 +217,7 @@ res/cardsfolder/a/ali_baba.txt svneol=native#text/plain
res/cardsfolder/a/ali_from_cairo.txt svneol=native#text/plain res/cardsfolder/a/ali_from_cairo.txt svneol=native#text/plain
res/cardsfolder/a/alibans_tower.txt svneol=native#text/plain res/cardsfolder/a/alibans_tower.txt svneol=native#text/plain
res/cardsfolder/a/all_hallows_eve.txt svneol=native#text/plain res/cardsfolder/a/all_hallows_eve.txt svneol=native#text/plain
res/cardsfolder/a/all_in_good_time.txt -text
res/cardsfolder/a/all_is_dust.txt svneol=native#text/plain res/cardsfolder/a/all_is_dust.txt svneol=native#text/plain
res/cardsfolder/a/all_shall_smolder_in_my_wake.txt -text res/cardsfolder/a/all_shall_smolder_in_my_wake.txt -text
res/cardsfolder/a/all_suns_dawn.txt svneol=native#text/plain res/cardsfolder/a/all_suns_dawn.txt svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:All in Good Time
ManaCost:no cost
Types:Scheme
Text:no text
T:Mode$ SetInMotion | ValidCard$ Card.Self | Execute$ GoodTimes | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, take an extra turn after this one. Schemes can't be set in motion that turn.
SVar:GoodTimes:AB$ AddTurn | Cost$ 0 | NumTurns$ 1 | NoSchemes$ True
SVar:Picture:http://www.cardforge.org/fpics/lq_schemes/all_in_good_time.jpg
Oracle:When you set this scheme in motion, take an extra turn after this one. Schemes can't be set in motion that turn.
SetInfo:ARC Common

View File

@@ -59,6 +59,9 @@ public class AddTurnEffect extends SpellAbilityEffect {
if (sa.hasParam("SkipUntap")) { if (sa.hasParam("SkipUntap")) {
extra.setSkipUntap(true); extra.setSkipUntap(true);
} }
if (sa.hasParam("NoSchemes")) {
extra.setCantSetSchemesInMotion(true);
}
} }
} }
} }

View File

@@ -33,6 +33,7 @@ public class ExtraTurn {
private Player player = null; private Player player = null;
private boolean loseAtEndStep = false; private boolean loseAtEndStep = false;
private boolean skipUntap = false; private boolean skipUntap = false;
private boolean cantSetSchemesInMotion = false;
/** /**
* TODO: Write javadoc for Constructor. * TODO: Write javadoc for Constructor.
* @param player the player * @param player the player
@@ -83,4 +84,18 @@ public class ExtraTurn {
this.skipUntap = skipUntap; 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 } //end class Untap

View File

@@ -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("At the beginning of this turn's end step, you lose the game.");
p.removeKeyword("Skip the untap step of this turn."); p.removeKeyword("Skip the untap step of this turn.");
p.removeKeyword("Schemes can't be set in motion this turn.");
} }
Player next = getNextActivePlayer(); Player next = getNextActivePlayer();
VField nextField = CMatchUI.SINGLETON_INSTANCE.getFieldViewFor(next); VField nextField = CMatchUI.SINGLETON_INSTANCE.getFieldViewFor(next);
SDisplayUtil.showTab(nextField); SDisplayUtil.showTab(nextField);
if(game.getType() == GameType.Planechase) { if (game.getType() == GameType.Planechase) {
Card p = game.getActivePlane(); Card p = game.getActivePlane();
if(p != null) if (p != null) {
{
p.clearControllers(); p.clearControllers();
p.addController(next); p.addController(next);
game.getAction().controllerChangeZoneCorrection(p); game.getAction().controllerChangeZoneCorrection(p);
@@ -580,6 +580,9 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
if (extraTurn.isSkipUntap()) { if (extraTurn.isSkipUntap()) {
nextTurn.addKeyword("Skip the untap step of this turn."); 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; return nextTurn;
} }
if (nextTurn.skipTurnTimeVault()) { if (nextTurn.skipTurnTimeVault()) {

View File

@@ -225,6 +225,11 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
} }
public void setSchemeInMotion() { public void setSchemeInMotion() {
for (final Player p : game.getPlayers()) {
if (p.hasKeyword("Schemes can't be set in motion this turn.")) {
return;
}
}
// Replacement effects // Replacement effects
final HashMap<String, Object> repRunParams = new HashMap<String, Object>(); final HashMap<String, Object> repRunParams = new HashMap<String, Object>();