From: Erik V. <ev...@us...> - 2010-02-06 23:48:33
|
Update of /cvsroot/rails/18xx/rails/game/special In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9732/rails/game/special Modified Files: SpecialPropertyI.java SpecialProperty.java Log Message: Allow special token lays at any time during OR. This has changed the way that OR steps are handled. These can now be used again in the UI. Goal was to enable the extra NF token lay in 1835 Index: SpecialProperty.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/special/SpecialProperty.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** SpecialProperty.java 3 Feb 2010 05:37:55 -0000 1.23 --- SpecialProperty.java 6 Feb 2010 23:48:26 -0000 1.24 *************** *** 19,24 **** --- 19,30 ---- protected int closingValue = 0; protected BooleanState exercised; + + /* Usability conditions. Not all of these are already being used. */ protected boolean usableIfOwnedByPlayer = false; protected boolean usableIfOwnedByCompany = false; + protected boolean usableDuringSR = false; + protected boolean usableDuringOR = false; + protected boolean usableDuringTileLayingStep = false; + protected boolean usableDuringTokenLayingStep = false; protected String conditionText = ""; *************** *** 65,69 **** throw new ConfigurationException( "Missing condition in private special property"); ! // to be interpreted... transferText = tag.getAttributeAsString("transfer", ""); --- 71,80 ---- throw new ConfigurationException( "Missing condition in private special property"); ! setUsableDuringSR(whenText.equalsIgnoreCase("anyTurn") ! || whenText.equalsIgnoreCase("srTurn")); ! setUsableDuringOR(whenText.equalsIgnoreCase("anyTurn") ! || whenText.equalsIgnoreCase("orTurn")); ! setUsableDuringTileLayingStep(whenText.equalsIgnoreCase("tileLayingStep")); ! setUsableDuringTokenLayingStep(whenText.equalsIgnoreCase("tokenLayingStep")); transferText = tag.getAttributeAsString("transfer", ""); *************** *** 129,132 **** --- 140,176 ---- this.usableIfOwnedByPlayer = usableIfOwnedByPlayer; } + + + public boolean isUsableDuringOR() { + return usableDuringOR; + } + + public void setUsableDuringOR(boolean usableDuringOR) { + this.usableDuringOR = usableDuringOR; + } + + public boolean isUsableDuringSR() { + return usableDuringSR; + } + + public void setUsableDuringSR(boolean usableDuringSR) { + this.usableDuringSR = usableDuringSR; + } + + public boolean isUsableDuringTileLayingStep() { + return usableDuringTileLayingStep; + } + + public void setUsableDuringTileLayingStep(boolean usableDuringTileLayingStep) { + this.usableDuringTileLayingStep = usableDuringTileLayingStep; + } + + public boolean isUsableDuringTokenLayingStep() { + return usableDuringTokenLayingStep; + } + + public void setUsableDuringTokenLayingStep(boolean usableDuringTokenLayingStep) { + this.usableDuringTokenLayingStep = usableDuringTokenLayingStep; + } public void setExercised() { Index: SpecialPropertyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/special/SpecialPropertyI.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SpecialPropertyI.java 19 Jan 2010 19:54:42 -0000 1.8 --- SpecialPropertyI.java 6 Feb 2010 23:48:26 -0000 1.9 *************** *** 23,26 **** --- 23,42 ---- public void setUsableIfOwnedByPlayer(boolean usableIfOwnedByPlayer); + public boolean isUsableDuringOR(); + + public void setUsableDuringOR(boolean usableDuringOR); + + public boolean isUsableDuringSR(); + + public void setUsableDuringSR(boolean usableDuringSR); + + public boolean isUsableDuringTileLayingStep(); + + public void setUsableDuringTileLayingStep(boolean usableDuringTileLayingStep); + + public boolean isUsableDuringTokenLayingStep(); + + public void setUsableDuringTokenLayingStep(boolean usableDuringTokenLayingStep); + public void setExercised(); |