First the scripts set a variable 'toWeaken' to 1 for AOS. That means if the weapon loses dura, the amount is set at 1. Here you could say set the base to 2, and then use the arms lore skill value to calculate a chance to reduce it to 1.
Next it calculates the chance of it weakening. Here I think is the most appropriate place to integrate Arms Lore, because you gain a benefit of it without it being essential. Weaken chance is calculated like so:
Code: Select all
return (40 + (maxHits - curHits)) - (int)(((m_Deed != null)? m_Deed.SkillLevel : mob.Skills[skill].Value) / 10);
Which is then ran against:
Code: Select all
return ( GetWeakenChance( mob, skill, curHits, maxHits ) > Utility.Random( 100 ) );
This is rather high, but loot will be easy to come by so no big deal imo. As an example we could take arms lore skill, divide it by 50 and then divide the chance by that. So 100 arms lore / 50 = 2 = half chance to lose dura.
Finally it checks the repair difficulty vs skill and repairs if it succeeds. I don't think we should modify this as a high smith should still have the same chance to repair imo.
Armor uses the same math basically.