View Single Post
TheIronGolem
Senior Member
 
Join Date: Feb 2015
Posts: 676

Old January 30th, 2020, 06:08 AM
Code:
hero.child[sk(Skill)].field[BonComp].value += field[abValue].value
This is why it's stacking. You have multiple scripts pointing to the same skill and saying "increase the competence bonus by X". Instead, try this:

Code:
hero.child[sk(Skill)].field[BonComp].value = maximum(hero.child[sk(Skill)].field[BonComp].value ,field[abValue].value)
Or this macro which amounts to the same thing:

Code:
#applybonus[BonComp,hero.child[sk(Skill),field[abValue].value]
This means "set the competence bonus to X or the existing bonus, whichever is larger".
TheIronGolem is offline   #3 Reply With Quote