summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-16 12:46:21 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-16 12:46:21 +0000
commitd704f26907c104336bc47fde4e27448dcfa38444 (patch)
treecda6f3758af8c7ba80d0c125039f89a8eae87d17 /src/map/mob.c
parent4431323e09b1ab9875ea8ac67f0ecd1b36420559 (diff)
downloadhercules-d704f26907c104336bc47fde4e27448dcfa38444.tar.gz
hercules-d704f26907c104336bc47fde4e27448dcfa38444.tar.bz2
hercules-d704f26907c104336bc47fde4e27448dcfa38444.tar.xz
hercules-d704f26907c104336bc47fde4e27448dcfa38444.zip
Added 3 more of the new card effects
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1117 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 15f06f940..b32db9966 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2164,8 +2164,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
struct item item;
int ret;
int drop_rate;
- int skill,sp;
-
+
nullpo_retr(0, md); //srcはNULLで呼ばれる場合もあるので、他でチェック
max_hp = status_get_max_hp(&md->bl);
@@ -2384,14 +2383,20 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(src && src->type == BL_MOB)
mob_unlocktarget((struct mob_data *)src,tick);
- /* ソウルドレイン */
- if(sd && sd->state.attack_type == BF_MAGIC && (skill=pc_checkskill(sd,HW_SOULDRAIN))>0){
- clif_skill_nodamage(src,&md->bl,HW_SOULDRAIN,skill,1);
- sp = (status_get_lv(&md->bl))*(65+15*skill)/100;
- if(sd->status.sp + sp > sd->status.max_sp)
- sp = sd->status.max_sp - sd->status.sp;
- sd->status.sp += sp;
- clif_heal(sd->fd,SP_SP,sp);
+
+ if(sd) {
+ int sp = 0;
+ if (sd->state.attack_type == BF_MAGIC && (i=pc_checkskill(sd,HW_SOULDRAIN))>0){ /* ソウルドレイン */
+ clif_skill_nodamage(src,&md->bl,HW_SOULDRAIN,i,1);
+ sp += (status_get_lv(&md->bl))*(65+15*i)/100;
+ }
+ sp += sd->sp_gain_value;
+ if (sp > 0) {
+ if(sd->status.sp + sp > sd->status.max_sp)
+ sp = sd->status.max_sp - sd->status.sp;
+ sd->status.sp += sp;
+ clif_heal(sd->fd,SP_SP,sp);
+ }
}
// map外に消えた人は計算から除くので