summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-12 16:32:34 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-12 16:32:34 +0000
commit1b28f3cc0bc670b82e71d12ad67e263f4e04d1f3 (patch)
treed16af0b7ad223dab2257f55fa7c03966e6fc1458 /src/map/battle.c
parentaa12e269a5affb4daa1f7d5c05160cab22d05aca (diff)
downloadhercules-1b28f3cc0bc670b82e71d12ad67e263f4e04d1f3.tar.gz
hercules-1b28f3cc0bc670b82e71d12ad67e263f4e04d1f3.tar.bz2
hercules-1b28f3cc0bc670b82e71d12ad67e263f4e04d1f3.tar.xz
hercules-1b28f3cc0bc670b82e71d12ad67e263f4e04d1f3.zip
- Simplified the mob-drops structure by using a single timer with a linked list of drops instead of separate timers for each drop.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6014 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index cb12328c6..6986826f0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1136,7 +1136,7 @@ static struct Damage battle_calc_weapon_attack(
break;
case CR_SHIELDCHARGE:
- flag.weapon = 0;
+// flag.weapon = 0;
case NPC_PIERCINGATT:
wd.flag=(wd.flag&~BF_RANGEMASK)|BF_SHORT;
break;
@@ -1924,11 +1924,12 @@ static struct Damage battle_calc_weapon_attack(
vit_def = def2 + (vit_def>0?rand()%vit_def:0);
}
- if ((sd && battle_config.player_defense_type)
- || (md && battle_config.monster_defense_type)
- || (pd && battle_config.pet_defense_type)
- )
+ if (sd && battle_config.player_defense_type)
vit_def += def1*battle_config.player_defense_type;
+ else if (md && battle_config.monster_defense_type)
+ vit_def += def1*battle_config.monster_defense_type;
+ else if(pd && battle_config.pet_defense_type)
+ vit_def += def1*battle_config.pet_defense_type;
else
ATK_RATE2(flag.idef?100:100-def1, flag.idef2?100:100-def1);
ATK_ADD2(flag.idef?0:-vit_def, flag.idef2?0:-vit_def);