Good afternoon. Hi, I am currently using Selchar Durability script and, essentially, the way the script works is that every time you land a successful hit, it takes durability off the weapon. While the script works as intended, I wanted to ask for assistance as, they way I want to implement it, is that it takes durability when the attack misses or the target evades as well, not only when it lands a successful hit.
I know very few about programming, but like most people working in RPG Maker project I believe, after a while, you get some very basic understanding, which lead me to try to modify the script a bit, specifically, this part:
I only added the parts in blue and modified nothing else, it did work, durability started to be reduced by missed chances as well, but after a while, it sort of reverted back to normal for some reason, and stopped reducing durability after missed chances. Is there a more "Permanent" solution to this issue?
I know very few about programming, but like most people working in RPG Maker project I believe, after a while, you get some very basic understanding, which lead me to try to modify the script a bit, specifically, this part:
#===============================================================================
# On Successful Damage
#===============================================================================
alias :process_weapon_durability_mdv :make_damage_value
def make_damage_value(user, item)
process_weapon_durability_mdv(user, item)
user.process_weapon_durability(item) if user.actor? && @result.missed
user.process_weapon_durability(item) if user.actor? && @result.evaded
user.process_weapon_durability(item) if user.actor? && @result.hit?
end