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.
foreach pick in hero from BaseSkill
if (eachpick.tagis[SkillOver.aCHA] <> 0) then
eachpick.field[Bonus].value -= 4
elseif (eachpick.islinkage[skillattr] <> 0) then
if (eachpick.linkage[skillattr].tagis[thingid.aCHA] <> 0) then
eachpick.field[Bonus].value -= 4
endif
endif
nexteach
Just as a FYI I think you could simplify the above code a little to:Doh... found a way to do it in another thread... here is the code I used (for CHA skills)
~ loop through all the skills on the hero
foreach pick in hero from BaseSkill
~ If we are a Charisma based skill give a -4 Penalty
If (eachpick.tagis[SkillOver.aCHA] + eachpick.linkage[skillattr].tagis[thingid.aCHA] <> 0) then
eachpick.field[Penalty].value += -4
Endif
nexteach
Ahh. Thanks Mathias.I'd say do use islinkage[] - you don't know if some 3PP thing down the road will add a skill that doesn't have an associated attribute, and HL's editor will allow you to create skills without attribute linkages. Using linkage[skillattr] will give errors if it's not connected to anything, which is what islinkage[skillattr] tests.
Actaully this was for the various types of insanity. I needed to implement paranoia for Serpent's Skull.
For CoT I have done all the monsters from Bestiary (though I still cannot get the False Divinity ability of the Advodaza Devil working... ). Right now I am working on Legacy of Fire.