-
June 14th, 2014, 08:45 #11
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
Great to hear.
JPG
-
August 18th, 2014, 16:50 #12
-
August 25th, 2014, 05:18 #13
Saint
- Join Date
- Apr 2007
- Location
- Mississippi, USA
- Posts
- 1,093
Support:
https://support.fantasygrounds.com/
-
August 25th, 2014, 05:22 #14
-
August 26th, 2014, 10:39 #15
Saint
- Join Date
- Apr 2007
- Location
- Mississippi, USA
- Posts
- 1,093
The Lua code in manger_char.lua:
Code:function useHealingSurge(nodeChar) local rActor = ActorManager.getActor("pc", nodeChar); local level = DB.getValue(nodeChar, "level", 0); local recoveryDie = DB.getValue(nodeChar, "hp.surge", 0); local conMod = DB.getValue(nodeChar, "abilities.constitution.bonus", 0); -- Get the character's current wounds value local nWounds = DB.getValue(nodeChar, "hp.wounds", 0); -- If the character is not wounded, then let the user know and exit if nWounds <= 0 then ChatManager.Message(Interface.getString("message_charhsnotwounded"), false, rActor); return; end -- Determine whether the character has any healing surges remaining local nSurgesUsed = DB.getValue(nodeChar, "hp.surgesused", 0); local nSurgesMax = DB.getValue(nodeChar, "hp.surgesmax", 0); if nSurgesUsed >= nSurgesMax then ChatManager.Message(Interface.getString("message_charhsempty"), false, ActorManager.getActor("pc", nodeChar)); return; end local rAction = {}; rAction.name = "Healing Surge"; rAction.sTargeting = "self"; rAction.clauses = {}; local rActionClause = {}; rActionClause.dicestr = "" .. level .. recoveryDie[1] .. "+" .. conMod;--"2d6+5"; rActionClause.stat = {}; rActionClause.cost = 1; rActionClause.basemult = 0; table.insert(rAction.clauses, rActionClause); ActionHeal.performRoll(nil, rActor, rAction); end
Code:<dice_charheal name="healsurge" source="hp.surge"> <anchored to="healsurgesused" position="right" offset="82,0" width="46" /> <modifiersize>mini</modifiersize> <modifierfield>hp.surgemodifier</modifierfield> <script file="campaign/scripts/char_recoveryroll.lua" /> </dice_charheal>
Code:<template name="dice_charheal"> <basicdice> <script file="campaign/scripts/char_recoveryroll.lua" /> </basicdice> </template>
Code:function action(draginfo) local rActor, rAction, rFocus, nodeAbility rActor, rAction, rFocus = CharManager.getAdvancedRollStructures("heal", window.getDatabaseNode()); ActionHeal.performRoll(draginfo, rActor, rAction, rFocus); return true; end function onDragStart(button, x, y, draginfo) return action(draginfo); end function onDoubleClick(x,y) return action(); end
I had to change quite a few things that were expecting a flat number in various other parts of the rule set.Last edited by lokiare; August 26th, 2014 at 10:42. Reason: Forgot some stuff
Support:
https://support.fantasygrounds.com/
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks