
Originally Posted by
new2rsps
MATRIX 718
I'm trying to implement a better combat system;
i.e special attacks hit more accurately and reasonably higher when target is wearing mage or range gear (robes or hides)
and magic is more accurate when opponent is wearing melee gear
where would i start and what would i do? (please dont just comment "playercombat.java" or something like that

)
i dont want to edit the soaking formula to do this (lol, thats what ive been told to do)
If you look at the bottom of buttonhandler there is the code to get the soaking bonuses.
What you want to edit it probably a method called getRandomHit() or getRandom().
Make a statement somewhere about the soaking damage giving a Utils.getRandom() chance of missing. So like:
Code:
if (target instance of Player) {
Player player2 = (Player) target;
if (Utils.getRandom(100-player2.getSoakingDamageMage) == 0)//or < 10 or something like that
hit = 0;
}