diff options
author | Vicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-07-27 02:55:21 +0000 |
---|---|---|
committer | Vicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-07-27 02:55:21 +0000 |
commit | 9e5844193ac03b80f69e5a3d8ef8775e30d93915 (patch) | |
tree | 92d19d67bb26c50f543eafcc997bf243dba79181 | |
parent | 7d0670e755c689eed12af0f8b89b936557f897c9 (diff) | |
download | hercules-9e5844193ac03b80f69e5a3d8ef8775e30d93915.tar.gz hercules-9e5844193ac03b80f69e5a3d8ef8775e30d93915.tar.bz2 hercules-9e5844193ac03b80f69e5a3d8ef8775e30d93915.tar.xz hercules-9e5844193ac03b80f69e5a3d8ef8775e30d93915.zip |
* Changed the way hit bonus is applied.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10916 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/battle.c | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index b899efb0b..8a6f8112e 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2007/07/27 + * Changed the way hit bonus is applied. + http://www.eathena.ws/board/index.php?showtopic=157438 [Vicious] * Cleaned up mob drop code, crashfix is still needed though... * Reduced ignore-list length to 20, added proper reply packet * Cleaned up some very poorly written pm-ignore code (see r141) diff --git a/src/map/battle.c b/src/map/battle.c index b6d9dfd89..047e3229d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1110,18 +1110,19 @@ static struct Damage battle_calc_weapon_attack( if(wd.flag&BF_LONG && !skill_num && //Fogwall's hit penalty is only for normal ranged attacks. tsc && tsc->data[SC_FOGWALL].timer!=-1) - hitrate-=50; + hitrate -= 50; if(sd && flag.arrow) hitrate += sd->arrow_hit; if(skill_num) switch(skill_num) { //Hit skill modifiers + //It is proven that bonus is applied on final hitrate, not hit. case SM_BASH: - hitrate += 5*skill_lv; + hitrate += hitrate * 5 * skill_lv / 100; break; case SM_MAGNUM: - hitrate += 10*skill_lv; + hitrate += hitrate * 10 * skill_lv / 100; break; case KN_AUTOCOUNTER: case PA_SHIELDCHAIN: @@ -1134,20 +1135,20 @@ static struct Damage battle_calc_weapon_attack( case NPC_DARKNESSATTACK: case NPC_UNDEADATTACK: case NPC_TELEKINESISATTACK: - hitrate += 20; + hitrate += hitrate * 20 / 100; break; case KN_PIERCE: - hitrate += hitrate*(5*skill_lv)/100; + hitrate += hitrate * 5 * skill_lv / 100; break; case AS_SONICBLOW: if(sd && pc_checkskill(sd,AS_SONICACCEL)>0) - hitrate += 50; + hitrate += hitrate * 50 / 100; break; } // Weaponry Research hidden bonus if (sd && (skill = pc_checkskill(sd,BS_WEAPONRESEARCH)) > 0) - hitrate += hitrate*(2*skill)/100; + hitrate += hitrate * ( 2 * skill ) / 100; if (hitrate > battle_config.max_hitrate) hitrate = battle_config.max_hitrate; @@ -1157,7 +1158,7 @@ static struct Damage battle_calc_weapon_attack( if(rand()%100 >= hitrate) wd.dmg_lv = ATK_FLEE; else - flag.hit =1; + flag.hit = 1; } //End hit/miss calculation if (flag.hit && !flag.infdef) //No need to do the math for plants |