summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-03 23:27:22 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-03 23:27:22 +0000
commit58a49148ed8667e49214d4814fe771e7cceec427 (patch)
tree6542200adf9c37566b39efb3c86d4b25715c5593 /src/map/battle.c
parentd3e6e368ac40c44fb13978a7529f8f818cdc0731 (diff)
downloadhercules-58a49148ed8667e49214d4814fe771e7cceec427.tar.gz
hercules-58a49148ed8667e49214d4814fe771e7cceec427.tar.bz2
hercules-58a49148ed8667e49214d4814fe771e7cceec427.tar.xz
hercules-58a49148ed8667e49214d4814fe771e7cceec427.zip
Changes to reduce the number of map cell types
- Pneuma now again works via status change (see r3969) - removed unused CELL_SAFETYWALL - removed custom CELL_REGEN, it just increased regen rate (r1192, r1518) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12005 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 5aa862c67..4f164dd3c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -287,15 +287,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
sc = status_get_sc(bl);
- if((flag&(BF_MAGIC|BF_LONG)) == BF_LONG &&
- map_getcell(bl->m, bl->x, bl->y, CELL_CHKPNEUMA) &&
- skill_num != NPC_GUIDEDATTACK)
- return 0;
-
if (sc && sc->count) {
//First, sc_*'s that reduce damage to 0.
- if (sc->data[SC_SAFETYWALL] && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK
- ) {
+ if( sc->data[SC_SAFETYWALL] && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK )
+ {
struct skill_unit_group *group = (struct skill_unit_group *)sc->data[SC_SAFETYWALL]->val3;
if (group) {
if (--group->val2<=0)
@@ -304,7 +299,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
}
status_change_end(bl,SC_SAFETYWALL,-1);
}
-
+
+ if( sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG && skill_num != NPC_GUIDEDATTACK )
+ return 0;
+
if((sce=sc->data[SC_AUTOGUARD]) && flag&BF_WEAPON &&
!(skill_get_nk(skill_num)&NK_NO_CARDFIX_ATK) &&
rand()%100 < sce->val2)