Senior Member
Join Date: Aug 2010
Posts: 576
|
Could some one explain to me what the first Eval script for Shifter claws is doing. I understand what the other 2 scripts are doing but I have no clue what the first is doing.
|
#1 |
Senior Member
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841
|
Hi there,
I did the majority of the files for Ultimate Wilderness. Just to be sure do you mean the one in cShfClaws (which is the class ability) or xShfClaws which is a helper that takes care of most of the mechanics of shifter claws (needed to do it this way because of archetypes changing the function of claws or granting different classes claws)? I am guessing you mean the one in xShfClaws since it is rather complex. Here is the annotated script. Before I begin here is what some of the fields do abValue - stores our overall shifter level abValue2 - value to increase our critical multiplier by abValue5 - a flag that is nonzero when claws are active abText - claws damage text abText2 - DR bypass text Code:
~ Get out if our effective shifter level is 0 or less doneif (field[abValue].value <= 0) perform assign[Helper.ShowSpec] Code:
~ if we are in our major form, make sure we are still active if (hero.tagis[Hero.MajorForm] <> 0) then perform delete[Helper.SpcDisable] trustme field[polyDefLst].value = 1 endif Code:
~ Get our claw damage pick, delete the damage tag from it, and ~ assign the new tag ~ we search for the attack with the ShifterClw tag so we ~ can use claw damage with major form natural attacks and ~ some archetypes replace the claw with a different attack ~ additionally we can use the claw attack damage in place of some ~ natural attack's damage when in wild shape ~ first get our new damage tag var level as number var clawavg as number level = field[abValue].value call ShfWepBase ~ set our dice damage in abText var dicetext as string call wMainText field[abText].text = dicetext Code:
~ get out if we have not been activated by whatever called us ~ this is determined by abValue5 doneif (field[abValue5].value = 0) Code:
~ now apply damage, critical increases, and DR bypass to all shifter claw weapons foreach pick in hero from BaseWep where "Helper.ShifterClw" ~ we only increase our damage if our shifter claw damage is better, ~ in other words has a greater average var dicetext as string var average as number dicetext = eachpick.tagnames[wMain.?] call DieAverage ~ if our claw avg is greater than the current attack's avg ~ replace it if (clawavg >= average) then perform eachpick.delete[wMain.?] perform eachpick.pushtags[wMain.?] endif ~ if abValue2 has a value increase our weapon's critical multipler ~ by that ammount if (field[abValue2].value <> 0) then var crit as number crit = eachpick.tagvalue[wCritMult.?] crit += field[abValue2].value ~ crit should be at least 3, and no more than 4 if this runs crit = maximum(3,crit) crit = minimum(4,crit) perform eachpick.delete[wCritMult.?] perform eachpick.assignstr["wCritMult." & crit] endif ~ finally give each weapon the DR bypass info in a situational ~ rageshape ignores hardness instead of the usual DR var ignoretxt as string if (#hasarchetype[arShfRages] <> 0) then ignoretxt = "" else ignoretxt = "DR/" endif if (field[abText2].isempty = 0) then #situational_nonstatblock[eachpick,"Attacks ignore " & ignoretxt & field[abText2].text,field[name].text] endif nexteach Last edited by frumple; November 15th, 2017 at 06:18 PM. |
#2 |
|
|