Index: scripts/globals/weaponskills.lua =================================================================== --- scripts/globals/weaponskills.lua (revision 2132) +++ scripts/globals/weaponskills.lua (working copy) @@ -29,8 +29,12 @@ end ftp = fTP(tp,ftp100,ftp200,ftp300); + if (ignoredDef == nil) then + ignoredDef = 0; + end + --get cratio min and max - cratio = cRatio( ((attacker:getStat(MOD_ATT)*atkmulti)/target:getStat(MOD_DEF)),attacker:getMainLvl(),target:getMainLvl()); + cratio = cRatio(((attacker:getStat(MOD_ATT) * atkmulti) / (target:getStat(MOD_DEF) - ignoredDef)), attacker:getMainLvl(), target:getMainLvl()); ccmin = 0; ccmax = 0; hasMightyStrikes = attacker:hasStatusEffect(EFFECT_MIGHTY_STRIKES); @@ -42,7 +46,7 @@ ccritratio = 0; critrate = 0; - ccritratio = cCritRatio( ((attacker:getStat(MOD_ATT)*atkmulti)/target:getStat(MOD_DEF))+1,attacker:getMainLvl(),target:getMainLvl()); + ccritratio = cCritRatio(((attacker:getStat(MOD_ATT) * atkmulti) / (target:getStat(MOD_DEF) - ignoredDef)) + 1, attacker:getMainLvl(), target:getMainLvl()); if(canCrit) then --work out critical hit ratios, by +1ing critrate = fTP(attacker:getTP(),crit100,crit200,crit300); @@ -458,7 +462,7 @@ ftp = fTP(attacker:getTP(),ftp100,ftp200,ftp300); --get cratio min and max - cratio = cRatio( ((attacker:getRATT()*atkmulti)/target:getStat(MOD_DEF)),attacker:getMainLvl(),target:getMainLvl()); + cratio = cRatio(((attacker:getRATT() * atkmulti) / (target:getStat(MOD_DEF) - ignoredDef)), attacker:getMainLvl(), target:getMainLvl()); ccmin = 0; ccmax = 0; hasMightyStrikes = attacker:hasStatusEffect(EFFECT_MIGHTY_STRIKES); Index: scripts/globals/weaponskills/one_inch_punch.lua =================================================================== --- scripts/globals/weaponskills/one_inch_punch.lua (revision 2132) +++ scripts/globals/weaponskills/one_inch_punch.lua (working copy) @@ -26,8 +26,16 @@ canCrit = false; acc100 = 0.0; acc200= 0.0; acc300= 0.0; atkmulti = 1; + + tp = player:getTP(); + + --Defense ignored is 0%, 25%, 50% as per wiki.bluegartr.com + ignoredDef = target:getStat(MOD_DEF) * (((tp - 100) / 4) / 100); + damage, tpHits, extraHits = doPhysicalWeaponskill(player,target,numHits,str_wsc,dex_wsc,vit_wsc,agi_wsc,int_wsc,mnd_wsc,chr_wsc,canCrit,crit100,crit200,crit300,acc100,acc200,acc300,atkmulti); + ignoredDef = 0; --set back to 0 so different WSs from the same user won't ignore defense as well + return tpHits, extraHits, damage; end Index: scripts/globals/weaponskills/piercing_arrow.lua =================================================================== --- scripts/globals/weaponskills/piercing_arrow.lua (revision 2132) +++ scripts/globals/weaponskills/piercing_arrow.lua (working copy) @@ -27,8 +27,22 @@ canCrit = false; acc100 = 0.0; acc200= 0.0; acc300= 0.0; atkmulti = 1; + + tp = player:getTP(); + + --Defense ignored is 0%, 35%, 50% as per wiki.bluegartr.com + if (tp <= 200) then + --one extra TP over 100 equals an extra 0.35% of defense ignored + ignoredDef = target:getStat(MOD_DEF) * (((tp - 100) * 0.35) / 100); + else + --one extra TP over 200 equals an extra 0.15% of defense ignored on top of 35% of defense being ignored + ignoredDef = target:getStat(MOD_DEF) * ((35 + ((tp - 200) * 0.15)) / 100); + end + damage, tpHits, extraHits = doRangedWeaponskill(player,target,numHits,str_wsc,dex_wsc,vit_wsc,agi_wsc,int_wsc,mnd_wsc,chr_wsc,canCrit,crit100,crit200,crit300,acc100,acc200,acc300,atkmulti); + ignoredDef = 0; --set back to 0 so different WSs from the same user won't ignore defense as well + return tpHits, extraHits, damage; end Index: scripts/globals/weaponskills/split_shot.lua =================================================================== --- scripts/globals/weaponskills/split_shot.lua (revision 2132) +++ scripts/globals/weaponskills/split_shot.lua (working copy) @@ -26,8 +26,22 @@ canCrit = false; acc100 = 0.0; acc200= 0.0; acc300= 0.0; atkmulti = 1; + + tp = player:getTP(); + + --Defense ignored is 0%, 35%, 50% as per wiki.bluegartr.com + if (tp <= 200) then + --one extra TP over 100 equals an extra 0.35% of defense ignored + ignoredDef = target:getStat(MOD_DEF) * (((tp - 100) * 0.35) / 100); + else + --one extra TP over 200 equals an extra 0.15% of defense ignored on top of 35% of defense being ignored + ignoredDef = target:getStat(MOD_DEF) * ((35 + ((tp - 200) * 0.15)) / 100); + end + damage, tpHits, extraHits = doRangedWeaponskill(player,target,numHits,str_wsc,dex_wsc,vit_wsc,agi_wsc,int_wsc,mnd_wsc,chr_wsc,canCrit,crit100,crit200,crit300,acc100,acc200,acc300,atkmulti); + ignoredDef = 0; --set back to 0 so different WSs from the same user won't ignore defense as well + return tpHits, extraHits, damage; end Index: scripts/globals/weaponskills/wheeling_thrust.lua =================================================================== --- scripts/globals/weaponskills/wheeling_thrust.lua (revision 2132) +++ scripts/globals/weaponskills/wheeling_thrust.lua (working copy) @@ -26,8 +26,15 @@ canCrit = false; acc100 = 0.0; acc200= 0.0; acc300= 0.0; atkmulti = 1; + + tp = player:getTP(); + + --Defense ignored is 50%, 75%, 100% (guessed) + ignoredDef = target:getStat(MOD_DEF) * ((50 + ((tp - 100) / 4)) / 100); + damage, tpHits, extraHits = doPhysicalWeaponskill(player,target,numHits,str_wsc,dex_wsc,vit_wsc,agi_wsc,int_wsc,mnd_wsc,chr_wsc,canCrit,crit100,crit200,crit300,acc100,acc200,acc300,atkmulti); + + ignoredDef = 0; --set back to 0 so different WSs from the same user won't ignore defense as well return tpHits, extraHits, damage; - end