summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-09 17:08:09 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-09 17:08:09 +0000
commit201d850ec63f84808533d44b37caa5f582c4c25e (patch)
tree97069a114e46d4fa379a3348f5e6a3be0e6abb90 /src/map/battle.c
parent78c3ef3eee96f59282e699b3c7da7dad592ab5ea (diff)
downloadhercules-201d850ec63f84808533d44b37caa5f582c4c25e.tar.gz
hercules-201d850ec63f84808533d44b37caa5f582c4c25e.tar.bz2
hercules-201d850ec63f84808533d44b37caa5f582c4c25e.tar.xz
hercules-201d850ec63f84808533d44b37caa5f582c4c25e.zip
- Script commands sc_start, sc_start2 and sc_start4 will now start regardless of sc defense of the target player (that is, they cannot be avoided)
- Fixed a possible counter overflow in attacked_count, changed the var size to unsigned char since the code can handle the overflow now. - Multiple targets again reduces armor defense, as reported by Tharis. - Increased dex increase of NPC_POWERUP to +20 per level. - Fog of Wall's -50 hit reduction is now only for ranged attacks. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6528 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index af477cb2c..045e7ed90 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1305,7 +1305,9 @@ static struct Damage battle_calc_weapon_attack(
hitrate+= status_get_hit(src) - flee;
- if((sc && sc->data[SC_FOGWALL].timer!=-1) || (tsc && tsc->data[SC_FOGWALL].timer!=-1))
+ if(wd.flag&BF_LONG && (
+ (sc && sc->data[SC_FOGWALL].timer!=-1) ||
+ (tsc && tsc->data[SC_FOGWALL].timer!=-1)))
hitrate-=50;
if(sd && flag.arrow)
@@ -1871,11 +1873,10 @@ static struct Damage battle_calc_weapon_attack(
target_count = unit_counttargeted(target,battle_config.vit_penalty_count_lv);
if(target_count >= battle_config.vit_penalty_count) {
if(battle_config.vit_penalty_type == 1) {
-// armor defense shouldn't be reduced from what people are saying. [Skotlex]
-// def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
+ def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
def2 = (def2 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100;
} else { //Assume type 2
-// def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
+ def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
}
}