Paris.Crenshaw
Well-known member
I'm reworking the Ghonhatine from PF16 and decided to have an activation-tracking to support the Feed racial ability.
The ability is as follows:
So...I wrote the following eval script:
I originally had this set for the Final Phase (User) with a priority of 10000, but I've found that the script doesn't work unless I use Final Phase with a priority of 10000.
I can get the attack and damage modifiers to work in the Final Phase (User) section, but adding the temp hit points doesn't work unless it's in the Final Phase.
Also, I thought that I should be able to use:
hero.child[Attack].field[tAtk].value += 2
to apply a bonus to all attacks but the bonus only shows up in the "Attack Bonus" and doesn't seem to do anything else. Only the code above seems to actually work.
Am I doing something wrong or is this correct?
The ability is as follows:
Feed (Su): Insatiable predators, ghonhatines are invigorated immediately after feeding. By spending a round devouring the body of a dead or unconscious creature, a ghonhatine gains 1d8+8 temporary hit points and a +2 bonus on attack and damage rolls for 8 rounds. The bonus to hit points and duration of this effect are Constitution-based.
So...I wrote the following eval script:
Code:
~Set abValue to creature's Con bonus.
field[abValue].value = #attrmod[aCON]
~Bonus to temp hit points and duration is Con dependent
field[abSumm].text = "Feed on a helpless creature to gain +2 atk/dmg and 1d8+" & field[abValue].value & ", for "& field[abValue].value & " rounds."
field[actName].text = "Fed [enter d8 result for temp hit points (" & field[abValue].value & " rds duration)]"
~If creature has fed, apply +2 atk and damage bonus and temp hit points.
If (field[abilActive].value <> 0) then
hero.child[Attack].field[tAtkMelee].value += 2
hero.child[Attack].field[tAtkRanged].value += 2
hero.child[Damage].field[tDamBonus].value += 2
herofield[tCurrentHP].value += field[actUser].value + field[abValue].value
Endif
I originally had this set for the Final Phase (User) with a priority of 10000, but I've found that the script doesn't work unless I use Final Phase with a priority of 10000.
I can get the attack and damage modifiers to work in the Final Phase (User) section, but adding the temp hit points doesn't work unless it's in the Final Phase.
Also, I thought that I should be able to use:
hero.child[Attack].field[tAtk].value += 2
to apply a bonus to all attacks but the bonus only shows up in the "Attack Bonus" and doesn't seem to do anything else. Only the code above seems to actually work.
Am I doing something wrong or is this correct?