From 201d850ec63f84808533d44b37caa5f582c4c25e Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 9 May 2006 17:08:09 +0000 Subject: - 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 --- src/map/battle.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/map/battle.c') 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; } } -- cgit v1.2.3-70-g09d2