diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-07-28 19:21:40 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-07-28 19:21:40 +0000 |
commit | 58aa5f00185701b698eaf6e514d89276e41d20d7 (patch) | |
tree | 28c8f0b999bdf19ae0fdaf797c15eb89e7de8bae /src/map/battle.c | |
parent | 10cd9e4aebf9efa7f12a357499e63ef0479947cf (diff) | |
download | hercules-58aa5f00185701b698eaf6e514d89276e41d20d7.tar.gz hercules-58aa5f00185701b698eaf6e514d89276e41d20d7.tar.bz2 hercules-58aa5f00185701b698eaf6e514d89276e41d20d7.tar.xz hercules-58aa5f00185701b698eaf6e514d89276e41d20d7.zip |
* Removed ridiculous refine_posword config switch
* TODO: remove getequipname() func, it can be fully replaced by editing a few scripts, plus it doesn't do what the docs say it should do
* Fixed a silly mistake in the main script engine loop ('pos' variable)
* Fixed monter -> monster typos
* Compacted some script function code (fewer LoC -> faster trac :)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10923 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 047e3229d..fa197563f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1150,10 +1150,7 @@ static struct Damage battle_calc_weapon_attack( if (sd && (skill = pc_checkskill(sd,BS_WEAPONRESEARCH)) > 0) hitrate += hitrate * ( 2 * skill ) / 100; - if (hitrate > battle_config.max_hitrate) - hitrate = battle_config.max_hitrate; - else if (hitrate < battle_config.min_hitrate) - hitrate = battle_config.min_hitrate; + hitrate = cap_value(hitrate, battle_config.min_hitrate, battle_config.max_hitrate); if(rand()%100 >= hitrate) wd.dmg_lv = ATK_FLEE; |