summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorKomurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-01-30 08:16:31 +0000
committerKomurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-01-30 08:16:31 +0000
commitade714d129fe396f32009bcb7845b6c06e4e5398 (patch)
treea2cf79063d6281f40501719fd745e73451c446ed /src/map/battle.c
parent102c2281c2eff9b87c4b6c4f78f3113e989d400d (diff)
downloadhercules-ade714d129fe396f32009bcb7845b6c06e4e5398.tar.gz
hercules-ade714d129fe396f32009bcb7845b6c06e4e5398.tar.bz2
hercules-ade714d129fe396f32009bcb7845b6c06e4e5398.tar.xz
hercules-ade714d129fe396f32009bcb7845b6c06e4e5398.zip
Implemented bonus2 bSPVanishRate for Dark Priest Card - it isn't finished - I get '[Warning]: pc_bonus2: unknown type 0 50 10!' ~.~
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5109 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 91563d939..1e1c16c7f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3133,6 +3133,14 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
if (tsd && sd->sp_drain_type)
pc_heal(tsd, 0, -sp);
+
+ if (target && target->type == BL_PC && rand()%1000 < sd->sp_vanish_rate)
+ {
+ sp = tsd->status.hp * sd->sp_vanish_per/100;
+ if (sp > 0)
+ pc_heal(tsd, 0, -sp);
+
+ }
}
}
if (rdamage > 0) //By sending attack type "none" skill_additional_effect won't be invoked. [Skotlex]