summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-11 17:09:09 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-11 17:09:09 +0000
commit4fc4f271eb042514ea22dd84b993b3bf288526a9 (patch)
tree8f1656e573d76c4d77d01015328c9cf1730bf14d /src/map/battle.c
parent41f42674bbc627216b96cefea6b4a4d10c010799 (diff)
downloadhercules-4fc4f271eb042514ea22dd84b993b3bf288526a9.tar.gz
hercules-4fc4f271eb042514ea22dd84b993b3bf288526a9.tar.bz2
hercules-4fc4f271eb042514ea22dd84b993b3bf288526a9.tar.xz
hercules-4fc4f271eb042514ea22dd84b993b3bf288526a9.zip
Re-phrased the attacker flee/def penalty config descs
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10530 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 38be508dd..f13125bb7 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1102,14 +1102,14 @@ static struct Damage battle_calc_weapon_attack(
if(battle_config.agi_penalty_type &&
battle_config.agi_penalty_target&target->type)
{
- unsigned char target_count; //256 max targets should be a sane max
- target_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv);
- if(target_count >= battle_config.agi_penalty_count)
+ unsigned char attacker_count; //256 max targets should be a sane max
+ attacker_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv);
+ if(attacker_count >= battle_config.agi_penalty_count)
{
if (battle_config.agi_penalty_type == 1)
- flee = (flee * (100 - (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
+ flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
else //asume type 2: absolute reduction
- flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
+ flee -= (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
if(flee < 1) flee = 1;
}
}
@@ -2585,14 +2585,14 @@ struct Damage battle_calc_misc_attack(
if(battle_config.agi_penalty_type &&
battle_config.agi_penalty_target&target->type)
{
- unsigned char target_count; //256 max targets should be a sane max
- target_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv);
- if(target_count >= battle_config.agi_penalty_count)
+ unsigned char attacker_count; //256 max targets should be a sane max
+ attacker_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv);
+ if(attacker_count >= battle_config.agi_penalty_count)
{
if (battle_config.agi_penalty_type == 1)
- flee = (flee * (100 - (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
+ flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
else //asume type 2: absolute reduction
- flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
+ flee -= (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
if(flee < 1) flee = 1;
}
}