|
From: <za...@us...> - 2011-08-25 13:19:50
|
Revision: 15326
http://pcgen.svn.sourceforge.net/pcgen/?rev=15326&view=rev
Author: zaister
Date: 2011-08-25 13:19:42 +0000 (Thu, 25 Aug 2011)
Log Message:
-----------
Create variable to read number of legs
Issue#: CODE-1094
Modified Paths:
--------------
Trunk/pcgen/code/src/java/pcgen/core/term/TermEvaluatorBuilderPCVar.java
Trunk/pcgen/data/alpha/paizo/pathfinder_rpg/core_rulebook/pfcr_abilities_class_common.lst
Trunk/pcgen/docs/listfilepages/globalfilestagpages/globalfilesdefine.html
Trunk/pcgen/docs/navlistindex.html
Added Paths:
-----------
Trunk/pcgen/code/src/java/pcgen/core/term/PCHandsTermEvaluator.java
Trunk/pcgen/code/src/java/pcgen/core/term/PCLegsTermEvaluator.java
Added: Trunk/pcgen/code/src/java/pcgen/core/term/PCHandsTermEvaluator.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/core/term/PCHandsTermEvaluator.java (rev 0)
+++ Trunk/pcgen/code/src/java/pcgen/core/term/PCHandsTermEvaluator.java 2011-08-25 13:19:42 UTC (rev 15326)
@@ -0,0 +1,55 @@
+/**
+ * pcgen.core.term.PCBABTermEvaluator.java
+ * Copyright (c) 2008 Andrew Wilson <nu...@us...>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Created 03-Aug-2008 22:45:18
+ *
+ * Current Ver: $Revision:$
+ * Last Editor: $Author:$
+ * Last Edited: $Date:$
+ *
+ */
+
+package pcgen.core.term;
+
+import pcgen.core.PlayerCharacter;
+
+public class PCHandsTermEvaluator
+ extends BasePCTermEvaluator implements TermEvaluator {
+
+ public PCHandsTermEvaluator(
+ String originalText)
+ {
+ this.originalText = originalText;
+ }
+
+ @Override
+ public Float resolve(PlayerCharacter pc)
+ {
+ return (float) pc.getHands();
+ }
+
+ public boolean isSourceDependant()
+ {
+ return false;
+ }
+
+ public boolean isStatic()
+ {
+ return false;
+ }
+}
Property changes on: Trunk/pcgen/code/src/java/pcgen/core/term/PCHandsTermEvaluator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: Trunk/pcgen/code/src/java/pcgen/core/term/PCLegsTermEvaluator.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/core/term/PCLegsTermEvaluator.java (rev 0)
+++ Trunk/pcgen/code/src/java/pcgen/core/term/PCLegsTermEvaluator.java 2011-08-25 13:19:42 UTC (rev 15326)
@@ -0,0 +1,55 @@
+/**
+ * pcgen.core.term.PCBABTermEvaluator.java
+ * Copyright (c) 2008 Andrew Wilson <nu...@us...>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Created 03-Aug-2008 22:45:18
+ *
+ * Current Ver: $Revision:$
+ * Last Editor: $Author:$
+ * Last Edited: $Date:$
+ *
+ */
+
+package pcgen.core.term;
+
+import pcgen.core.PlayerCharacter;
+
+public class PCLegsTermEvaluator
+ extends BasePCTermEvaluator implements TermEvaluator {
+
+ public PCLegsTermEvaluator(
+ String originalText)
+ {
+ this.originalText = originalText;
+ }
+
+ @Override
+ public Float resolve(PlayerCharacter pc)
+ {
+ return (float) pc.getLegs();
+ }
+
+ public boolean isSourceDependant()
+ {
+ return false;
+ }
+
+ public boolean isStatic()
+ {
+ return false;
+ }
+}
Property changes on: Trunk/pcgen/code/src/java/pcgen/core/term/PCLegsTermEvaluator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: Trunk/pcgen/code/src/java/pcgen/core/term/TermEvaluatorBuilderPCVar.java
===================================================================
--- Trunk/pcgen/code/src/java/pcgen/core/term/TermEvaluatorBuilderPCVar.java 2011-08-24 20:40:54 UTC (rev 15325)
+++ Trunk/pcgen/code/src/java/pcgen/core/term/TermEvaluatorBuilderPCVar.java 2011-08-25 13:19:42 UTC (rev 15326)
@@ -1705,6 +1705,30 @@
{
return new PCBonusLangTermEvaluator(expressionString);
}
+ },
+
+ COMPLETE_PC_HANDS("HANDS", new String[] { "HANDS" }, true)
+ {
+ public TermEvaluator getTermEvaluator(
+ final String expressionString,
+ final String src,
+ final String matchedSection) {
+
+ return new PCHandsTermEvaluator(expressionString);
+ }
+
+ },
+
+ COMPLETE_PC_LEGS("LEGS", new String[] { "LEGS" }, true)
+ {
+ public TermEvaluator getTermEvaluator(
+ final String expressionString,
+ final String src,
+ final String matchedSection) {
+
+ return new PCLegsTermEvaluator(expressionString);
+ }
+
};
static String subtokenString = "(FEATAUTOTYPE|FEATNAME|FEATTYPE|VFEATTYPE)";
Modified: Trunk/pcgen/data/alpha/paizo/pathfinder_rpg/core_rulebook/pfcr_abilities_class_common.lst
===================================================================
--- Trunk/pcgen/data/alpha/paizo/pathfinder_rpg/core_rulebook/pfcr_abilities_class_common.lst 2011-08-24 20:40:54 UTC (rev 15325)
+++ Trunk/pcgen/data/alpha/paizo/pathfinder_rpg/core_rulebook/pfcr_abilities_class_common.lst 2011-08-25 13:19:42 UTC (rev 15326)
@@ -78,4 +78,4 @@
CATEGORY=FEAT|CMB Output.MOD DEFINE:CMB_Grapple|0 DEFINE:CMD_Grapple|0 BONUS:VAR|CMB_Grapple|CMB BONUS:VAR|CMD_Grapple|CMD BONUS:VAR|CMB_Grapple|1|PREFEAT:1,Weapon Focus(Grapple) BONUS:VAR|CMB_Grapple|1|PREFEAT:1,Greater Weapon Focus(Grapple)
CATEGORY=FEAT|CMB Output.MOD DEFINE:CMB_Overrun|0 DEFINE:CMD_Overrun|0 BONUS:VAR|CMB_Overrun|CMB BONUS:VAR|CMD_Overrun|CMD
CATEGORY=FEAT|CMB Output.MOD DEFINE:CMB_Sunder|0 DEFINE:CMD_Sunder|0 BONUS:VAR|CMB_Sunder|CMB BONUS:VAR|CMD_Sunder|CMD
-CATEGORY=FEAT|CMB Output.MOD DEFINE:CMB_Trip|0 DEFINE:CMD_Trip|0 BONUS:VAR|CMB_Trip|CMB BONUS:VAR|CMD_Trip|CMD BONUS:VAR|CMD_Trip|2|PRELEGSEQ:3 BONUS:VAR|CMD_Trip|4|PRELEGSEQ:4 BONUS:VAR|CMD_Trip|8|PRELEGSEQ:6 BONUS:VAR|CMD_Trip|12|PRELEGSEQ:8
+CATEGORY=FEAT|CMB Output.MOD DEFINE:CMB_Trip|0 DEFINE:CMD_Trip|0 BONUS:VAR|CMB_Trip|CMB BONUS:VAR|CMD_Trip|CMD BONUS:VAR|CMD_Trip|(var("LEGS")-2)*2|PRELEGSGT:2
Modified: Trunk/pcgen/docs/listfilepages/globalfilestagpages/globalfilesdefine.html
===================================================================
--- Trunk/pcgen/docs/listfilepages/globalfilestagpages/globalfilesdefine.html 2011-08-24 20:40:54 UTC (rev 15325)
+++ Trunk/pcgen/docs/listfilepages/globalfilestagpages/globalfilesdefine.html 2011-08-25 13:19:42 UTC (rev 15326)
@@ -237,6 +237,11 @@
(0=Light, 1=Medium 2=Heavy, 3=Over-Loaded).</p>
<p></p>
+ <p class="new">*** New 5.17.9</p><p></p>
+ <p class="indent2"><code><a name="HANDS">HANDS</a></code></p>
+ <p class="indent3">This is the number of hands the character has.</p>
+ <p></p>
+
<p class="new">*** Updated 5.11.4</p><p></p>
<p class="indent2"><code><a name="HASDEITY">HASDEITY:</a></code></p>
<p class="indent3">This returns 1 if the character has the named deity, otherwise 0.</p>
@@ -271,6 +276,11 @@
<p class="indent3">This is the character's actual Intelligence score.</p>
<p></p>
+ <p class="new">*** New 5.17.9</p><p></p>
+ <p class="indent2"><code><a name="LEGS">LEGS</a></code></p>
+ <p class="indent3">This is the number of legs the character has.</p>
+ <p></p>
+
<p class="indent2"><code><a name="MOVEBASE">MOVEBASE</a></code></p>
<p class="indent3">This is the character's racial-based movement.</p>
<p></p>
Modified: Trunk/pcgen/docs/navlistindex.html
===================================================================
--- Trunk/pcgen/docs/navlistindex.html 2011-08-24 20:40:54 UTC (rev 15325)
+++ Trunk/pcgen/docs/navlistindex.html 2011-08-25 13:19:42 UTC (rev 15326)
@@ -759,6 +759,7 @@
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#DEXSCORE">DEXSCORE</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#ECL">ECL</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#ENCUMBERANCE">ENCUMBERANCE</a> <span class="note">(Global Variables)</span></li>
+ <li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#HANDS">HANDS</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#HASDEITY">HASDEITY</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#HASFEAT">HASFEAT</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#HD">HD</a> <span class="note">(Global Variables)</span></li>
@@ -767,6 +768,7 @@
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#INITIATIVEMOD">INITIATIVEMOD</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#INT">INT</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#INTSCORE">INTSCORE</a> <span class="note">(Global Variables)</span></li>
+ <li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#LEGS">LEGS</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#MOVEBASE">MOVEBASE</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#SHIELDACCHECK">SHIELDACCHECK</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#SIZE">SIZE</a> <span class="note">(Global Variables)</span></li>
@@ -2090,6 +2092,7 @@
<ul>
<li><a href="listfilepages/datafilestagpages/datafilesequipment.html#HANDS">HANDS</a> <span class="deprecated">(Deprecated)</span></li>
<li><a href="listfilepages/globalfilestagpages/globalfilesbonus.html#EQMHANDS">HANDS</a> <span class="note">(EQM Bonus)</span></li>
+ <li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#HANDS">HANDS</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/systemfilestagpages/gamemodemiscinfolist.html#HANDS">HANDS</a> <span class="note">(Misc Info)</span></li>
<li><a href="listfilepages/datafilestagpages/datafilesraces.html#HANDS">HANDS</a> <span class="note">(Race)</span></li>
<li><a href="listfilepages/datafilestagpages/datafilestemplates.html#HANDS">HANDS</a> <span class="note">(Template)</span></li>
@@ -2208,6 +2211,7 @@
<li>
<a href="listfilepages/listindex.html#TAGINFO">LEGS</a>
<ul>
+ <li><a href="listfilepages/globalfilestagpages/globalfilesdefine.html#LEGS">LEGS</a> <span class="note">(Global Variables)</span></li>
<li><a href="listfilepages/datafilestagpages/datafilesraces.html#LEGS">LEGS</a> <span class="note">(Race)</span></li>
<li><a href="listfilepages/datafilestagpages/datafilestemplates.html#LEGS">LEGS</a> <span class="note">(Template)</span></li>
</ul>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|