View Single Post
Join Date: Jan 2011
Location: Overland Park, Kansas
Posts: 1,217

Old May 21st, 2012, 10:27 AM
~ We have to impose secondary natural weapon penalties if secondary tag is applied, 0 with improved multiattack, -2 with multiattack, -5 normally...

doneif (tagis[Helper.NatSecondary] = 0)
doneif (#hasfeat[fImpMultiA] <> 0)

if (#hasfeat[fMultiAtt] <> 0) then
   field[wAttBonus].value -= 2
   field[wAttBonus].value -= 5
The reason the code is what it is, is because the pincer is set up to automatically have a primary attack and this is the trick they are doing to make sure the attack values are being applied correctly (in case they are secondary and also if they are part of multiattack). So, if a creature is set up to so that they are secondary attacks, they should get the correct attack values applied (in other words, you end up removing the Helper.NatPrimary tag). In this regard, you are right Sendric, it should be looking for Helper.NatPrimary <> 0 (is there even an NatSecondary, it compiles, so there must be), since the software is only interested if that is there, otherwise it automatically assumes a secondary attack (the NatSecondary helper is not applied, so it always returns true and then always runs the resulting script).

You can run this script much easier by looking for the condition that imposes a secondary attack on the pincer, and then just deleting the Helper.NatPrimary tag from the pincer attack. This will automatically fix the attack values and damage without having to script it. I just don't know why the glabrezu would need to make its pincer attack secondary, so the script would only be needed for that. Any clue why this code is here?

Vist my D&D 3.5 homebrew campaign!
Kendall-DM is offline   #4 Reply With Quote