summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-24 19:33:37 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-24 19:33:37 +0000
commit34a1a63f26ecc52c524183e6aa477ebfc5dab904 (patch)
tree4da6076ebc49228099c95e6306720cf9ff02b4bc /src/map/battle.c
parent6240fbceaa9a5f366bfcf7b95c3dd959ec04e60c (diff)
downloadhercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.tar.gz
hercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.tar.bz2
hercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.tar.xz
hercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.zip
- NPC_MAGICALATTACK now starts a state similar to Sacrificial Ritual, in the sense that every normal attack afterwards becomes a Magical Attack. The skill duration is 15 secs.
- Corrected some trade-cancel calls in trade_traderequest. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10346 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 60fdc0a3b..38be508dd 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2899,8 +2899,12 @@ int battle_weapon_attack(struct block_list* src, struct block_list* target, unsi
if (rand()%100 < triple_rate)
return skill_attack(BF_WEAPON,src,src,target,MO_TRIPLEATTACK,damage,tick,0);
}
- else if (sc && sc->data[SC_SACRIFICE].timer != -1)
- return skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,sc->data[SC_SACRIFICE].val1,tick,0);
+ else if (sc) {
+ if (sc->data[SC_SACRIFICE].timer != -1)
+ return skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,sc->data[SC_SACRIFICE].val1,tick,0);
+ if (sc->data[SC_MAGICALATTACK].timer != -1)
+ return skill_attack(BF_MAGIC,src,src,target,NPC_MAGICALATTACK,sc->data[SC_MAGICALATTACK].val1,tick,0);
+ }
wd = battle_calc_weapon_attack(src, target, 0, 0, flag);