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.
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]"
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