Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Azhrei
Senior Member
 
Join Date: Sep 2015
Posts: 435

Old December 30th, 2018, 05:24 PM
I have a new material that works a lot like obsidian, but it adds 1 point to the critical range of the weapon. So my scimitar, made of this material, would crit on 17-20, not 18-20. But how do I code this?

I noticed that the original obsidian material has an eval script. It's apparently calling functions defined elsewhere, but I'm not sure why the first one is there at all.
Code:
perform container.parent.setfocus

~ Our parent becomes Fragile
perform focus.assign[wSpecial.Fragile]
I've looked at the Improved Critical feat, but this is all greek to me! It does appear that I will need to combine the "perform container.parent.setfocus" from above with some part of the code below... Maybe this line is all I need, but somehow replacing 'each pick' with the parent? "perform eachpick.assign[Broadcast.ImpCrit]"
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
var name as string

~ If we haven't chosen anything, get out now
doneif (field[usrChosen1].ischosen + tagis[Target.?] = 0)

if (tagcount[Hero.MartVersa] + hero.tagcount[Hero.MartMaster] <> 0) then
  perform field[usrChosen1].chosen.pulltags[wFtrGroup.?]

  ~ this call takes care of mythic martial versatility and mythic martial mastery
  call MytMartial

  foreach pick in hero from BaseWep
    if (eachpick.tagmatch[wFtrGroup,wFtrGroup,initial] <> 0) then
      perform eachpick.assign[Broadcast.ImpCrit]
      perform eachpick.pulltags[ImpCrit.?]
      endif
    nexteach

  name = this.tagnames[wFtrGroup.?, ", "]
  perform hero.pushtags[ImpCrit.?]
else
  ~ Assign the appropriate tag to all weapons that meet the criteria
  var id as string
  call fTargetId
  foreach pick in hero where "IsWeapon." & id
    perform eachpick.assign[Broadcast.ImpCrit]
  nexteach

  ~ Forward the improved critical tag for the weapon to the hero
  perform hero.assignstr["ImpCrit." & id]
endif

~ Set our 'short name'
field[shortname].text = "Imp Crit: " & name

if (field[sbName].isempty <> 0) then
  field[sbName].text = "Improved Critical (" & lowercase(name) & ")"
endif
Azhrei is offline   #1 Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:55 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.