• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Problem changing Unarmed Strike Damage

Lawful_g

Well-known member
I am doing a class special that sets unarmed strike damage to be 1d8 at 1st and 2nd level, and 1d10 at 3rd level. If the character already has damage equal to that, the damage dice is bumped up one level. I looked at the monk example and decided to do this with 2 separate eval scripts. There is no error on compile, but the damage is not changing. Here they are:

Post Levels (Users) 5000
~ Calculate our total level
var level as number
level = field[xTotalLev].value

~ Get our unarmed strike pick, delete the damage tag from it, and assign a new damage tag.
var result as number
var dice as string
if (level < 3) then
if (hero.child[wUnarmed].tagis[wMain.1d3_3] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.1d8_6]
dice = "1d8"
elseif (hero.child[wUnarmed].tagis[wMain.1d6_5] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.1d8_6]
dice = "1d8"
done
elseif (hero.child[wUnarmed].tagis[wMain.1d8_6] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.1d10_304]
dice = "1d10"
done
elseif (hero.child[wUnarmed].tagis[wMain.1d10_304] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.2d6_104]
dice = "2d6"
done
elseif (hero.child[wUnarmed].tagis[wMain.2d6_104] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.2d8_204]
dice = "2d8"
done
elseif (hero.child[wUnarmed].tagis[wMain.2d8_204] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.2d10_205]
dice = "2d10"
done
endif
endif

field[livename].text = "Unarmed Strike (" & dice & ")"

Post Levels (Users) 5100

~ Calculate our total level
var level as number
level = field[xTotalLev].value

~ At level 3+, increase our damage to d10 if it is lower than that, and increase by one step if it is equal to or higher than that.
var result as number
var dice as string
if (level >= 3) then
if (hero.child[wUnarmed].tagis[wMain.1d6_5] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.1d10_304]
dice = "1d10"
elseif (hero.child[wUnarmed].tagis[wMain.1d8_6] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.1d10_304]
dice = "1d10"
elseif (hero.child[wUnarmed].tagis[wMain.1d10_304] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.2d6_104]
dice = "2d6"
elseif (hero.child[wUnarmed].tagis[wMain.2d6_104] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.2d8_204]
dice = "2d8"
elseif (hero.child[wUnarmed].tagis[wMain.2d8_204] = 1) then
result = hero.child[wUnarmed].delete[wMain.?]
result = hero.child[wUnarmed].assign[wMain.2d10_205]
dice = "2d10"
endif
endif

field[livename].text = "Unarmed Strike (" & dice & ")"


Could you give me a hint mghel?
 
I'll check into the details Tuesday.

And please, my name is Mathias Gehl or mgehl, NOT M-G-Hell
 
Holy crepe! You're the second person in as many days that has pointed out I remembered their name wrong. I'm terrible with names, sorry about that.

Thanks again mgehl.
 
Back
Top