Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
~ If becomes a Wild Card then display it
if (hero.tagis[Edge.edgWCExtra] = 1) then
field[livename].text = "Wild Card"
endif
~ Display gender-specific name
if (hero.child[mscPerson].field[perGender].value = 1) then
field[livename].text = "Sorceress"
else
field[livename].text = "Sorcerer"
endif
var name as string
var desc as string
var evil as number
name = "Holy Warrior"
desc = "Repulse evil"
evil = #traitfound[trGoodEvil]
if (hero.tagis[Edge.edgEvilUnh] = 1) then
name = "Unholy Warrior"
desc = "Repulse good"
endif
if (evil < -3) then
name = "Unholy Warrior"
desc = "Repulse good"
endif
~Print the results
field[livename].text = name & ": " & desc
if (hero.tagis[source.AlterMagic] = 1) then
some cool code that does something
endif
var arcaneMod as number
var baseMod as number
var crank as number
var prank as number
var powerFocus as number
var powerName as string
var signature as number
var modifier as number
var cancel as number
var temp as number
var present as number
var modDisplay as string
var canDisplay as string
var firstSp as string
var secondSp as string
var fullDisp as string
baseMod = 0
arcaneMod = 0
crank = herofield[acRank].value
if (hero.tagis[source.ArcAttr] = 1) then
if (hero.tagis[Faction.facAM?] + hero.tagis[Faction.facAP?] <> 0) then
var arcane as number
arcane = #trait[attrArc]
~ Adjust the bonus to using the Power skill for d8 Arcane or greater.
if (arcane >= 4) then
arcaneMod += 1
endif
if (arcane >= 6) then
arcaneMod += 1
endif
endif
endif
~ Apply Conviction bonus of +1 to all Powers.
if (hero.tagis[Edge.edgConvict] = 1) then
baseMod += 1
endif
~ Iterate through the known Powers.
foreach pick in hero from Power
modifier = baseMod
cancel = 0
present = 0
canDisplay = ""
modDisplay = ""
firstSp = ""
secondSp = ""
fullDisp = ""
powerName = eachpick.field[name].text
powerFocus = 0
signature = 0
~ Psionics allow for getting a higher ranked power.
if (hero.tagis[Faction.facAP?] = 1) then
prank = eachpick.tagvalue[MinRank.?]
modifier += (crank - prank)
endif
~ Add +2 if has Healer Edge and is a healing power.
if (hero.tagis[Edge.edgHealer] + hero.tagis[Edge.edgHFDEira] <> 0) then
if (eachpick.tagis[Power.powGrHeal] <> 0) then
modifier += 2
endif
if (eachpick.tagis[Power.powHealing] <> 0) then
modifier += 2
endif
if (eachpick.tagis[Power.powHFHeal] <> 0) then
modifier += 2
endif
if (eachpick.tagis[Power.powHRegen] <> 0) then
modifier += 2
endif
if (eachpick.tagis[Power.powResurct] <> 0) then
modifier += 2
endif
if (eachpick.tagis[Power.powSuccor] <> 0) then
modifier += 2
endif
endif
~ Loop through the Spell Store edges and count those that apply.
foreach pick in hero from Edge
if (eachpick.tagis[Edge.edgHFASSpS] <> 0) then
if (compare(powerName, eachpick.field[usrChosen1].chosen.field[name].text) = 0) then
modifier += 1
cancel += 2
endif
endif
nexteach
~ Loop through the Power Focus edges and count those that apply.
foreach pick in hero from Edge
if (eachpick.tagis[Edge.edgPowFoci] <> 0) then
if (compare(powerName, eachpick.field[usrChosen1].chosen.field[name].text) = 0) then
powerFocus += 2
endif
endif
nexteach
foreach pick in hero from Edge
if (eachpick.tagis[Edge.edgPowFoc2] <> 0) then
if (compare(powerName, eachpick.field[usrChosen1].chosen.field[name].text) = 0) then
powerFocus += 1
endif
endif
nexteach
~ The Hellfrost campaign is in use.
if (hero.tagis[source.Hellfrost] = 1) then
~ All Elementalists get +2 to Elemental Manipulation.
if (hero.tagis[Faction.facAMHFE?] = 1) then
if (eachpick.tagis[Power.powelement] <> 0) then
signature = 2
endif
endif
~ End Elementalists.
~ Song Mages and their Traditions.
if (hero.tagis[Faction.facAMHFSn1] = 1) then
if (eachpick.tagis[Power.powWarrior] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facAMHFSn2] = 1) then
if (eachpick.tagis[Power.powSpeak] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facAMHFSn3] = 1) then
if (eachpick.tagis[Power.powFear] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facAMHFSn4] = 1) then
if (eachpick.tagis[Power.powSuccor] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facAMHFSn5] = 1) then
if (eachpick.tagis[Power.powDetect] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facAMHFSn6] = 1) then
if (eachpick.tagis[Power.powconfusi] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facAMHFSn7] = 1) then
if (eachpick.tagis[Power.powWildWlk] <> 0) then
signature = 2
endif
endif
~ End Song Mages.
~ Divine Arcane Backgrounds and Signature Powers.
if (hero.tagis[Faction.facADHFDar] + hero.tagis[Edge.edgHFPaTiw] <> 0) then
if (eachpick.tagis[Power.powSmite] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFEir] = 1) then
if (eachpick.tagis[Power.powHealing] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFThr] + hero.tagis[Edge.edgHFPaEo2] + hero.tagis[Edge.edgHFPrEo2] <> 0) then
if (eachpick.tagis[Power.powEntang] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Edge.edgHFPaEo1] + hero.tagis[Edge.edgHFPrEo1] + hero.tagis[Edge.edgHFWoWar] <> 0) then
if (eachpick.tagis[Power.powBeastFr] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFErt] = 1) then
if (eachpick.tagis[Power.powBurrow] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFFre] = 1) then
if (eachpick.tagis[Power.powWildWlk] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFHel] = 1) then
if (eachpick.tagis[Power.powZombie] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFHoe] + hero.tagis[Faction.facADHFRig] <> 0) then
if (eachpick.tagis[Power.powDetect] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFHot] + hero.tagis[Edge.edgHFPaVa1] + hero.tagis[Edge.edgHFPrVa1] + hero.tagis[Faction.facADHFVar] <> 0) then
if (eachpick.tagis[Power.powCharm] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFKen] = 1) then
if (eachpick.tagis[Power.powBolt] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFMae] = 1) then
if (eachpick.tagis[Power.powDispel] <> 0) then
signature = 2
if (hero.tagis[Edge.edgHFDMaer] <> 0) then
modifier += 2
endif
endif
endif
if (hero.tagis[Faction.facADHFNau] = 1) then
if (eachpick.tagis[Power.powTrait] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFNeo] = 1) then
if (eachpick.tagis[Power.powEnviron] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFNih] = 1) then
if (eachpick.tagis[Power.powHFObscr] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFNor] = 1) then
if (eachpick.tagis[Power.powHPrecog] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFSca] = 1) then
if (eachpick.tagis[Power.powWeakenU] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFSig] = 1) then
if (eachpick.tagis[Power.powjet] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFThu] = 1) then
if (eachpick.tagis[Power.powFly] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Edge.edgHFPrTiw] = 1) then
if (eachpick.tagis[Power.powArmor] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFUll] = 1) then
if (eachpick.tagis[Power.powAim] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Faction.facADHFUnk] = 1) then
if (eachpick.tagis[Power.powShape] <> 0) then
signature = 2
endif
endif
if (hero.tagis[Edge.edgHFPaVa2] + hero.tagis[Edge.edgHFPrVa2] <> 0) then
if (eachpick.tagis[Power.powHDiseas] <> 0) then
signature = 2
endif
endif
~ End Divine Backgrounds.
endif
~ End of Hellfrost Signature Powers
modifier = modifier + arcaneMod
cancel = cancel + powerFocus + signature
~ If possible, first apply cancel to a negative modifier.
if (modifier < 0) then
if (cancel > 0) then
~ Can only reduce to 0, not give a bonus.
temp = modifier + cancel
if (temp < 1) then
modifier = temp
cancel = 0
else
modifier = 0
cancel = temp
endif
endif
endif
~ Create the modifier display
if (modifier < 0) then
modDisplay = modifier
present += 1
endif
if (modifier > 0) then
modDisplay = "+" & modifier
present += 1
endif
~ Create the cancel-penalty display
if (cancel > 0) then
canDisplay = "(" & cancel & ")"
present += 1
endif
if (present > 0) then
firstSp = ": "
if (present > 1) then
secondSp = " "
endif
endif
~ Display the modifier and cancellation.
fullDisp = firstSp & modDisplay & secondSp & canDisplay
if (eachpick.tagis[Power.powelement] <> 0) then
eachpick.field[livename].text = "Elemental Manipul." & fullDisp
else
eachpick.field[livename].text = eachpick.field[name].text & fullDisp
endif
nexteach