summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 15:31:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-02 15:31:16 +0000
commit0aeec655ffcf8b5ec07403d28230f58c6aa60a15 (patch)
tree919fbb16119fb4983bad299b92126f419692281c /src/map/battle.c
parent9f50edd607e15ab31109bce9f914ec86a184154a (diff)
downloadhercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.tar.gz
hercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.tar.bz2
hercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.tar.xz
hercules-0aeec655ffcf8b5ec07403d28230f58c6aa60a15.zip
- Gospel no longer blocks item usage of whoever is in the area of effect.
- Added the long/near attack_def_rate card effects to battle_calc_magic - Cleaned up a bit the slim pitcher code. - Elemental fields should vanish on map-change now. - Land Protector only blocks magical skills. - Adjusted the duration of blind/bleeding of Meteor Assault git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5426 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index ee7c4e6a8..4a5105d84 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2671,6 +2671,12 @@ struct Damage battle_calc_magic_attack(
continue;
}
}
+ //It was discovered that ranged defense also counts vs magic! [Skotlex]
+ if (ad.flag&BF_SHORT)
+ cardfix=cardfix*(100-tsd->near_attack_def_rate)/100;
+ else
+ cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;
+
cardfix=cardfix*(100-tsd->magic_def_rate)/100;
MATK_RATE(cardfix);