summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-10-09 17:21:32 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-10-09 17:21:32 +0000
commit8a7e51e73c3d15c1736d2d575a767904faa755e8 (patch)
treedb5ee703e7f5878a6b074943c3e013a72ed26c90 /src/map/status.c
parent99683b97ecb468dcea41817bccb0d6c28daf4d2d (diff)
downloadhercules-8a7e51e73c3d15c1736d2d575a767904faa755e8.tar.gz
hercules-8a7e51e73c3d15c1736d2d575a767904faa755e8.tar.bz2
hercules-8a7e51e73c3d15c1736d2d575a767904faa755e8.tar.xz
hercules-8a7e51e73c3d15c1736d2d575a767904faa755e8.zip
Updated NPC_REBIRTH. Has it's own values, and no longer leeches off SL_KAIZEL.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13272 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 61c60d9c8..1134c83da 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -216,7 +216,7 @@ void initChangeTables(void)
add_sc( NPC_DEFENDER , SC_ARMOR );
add_sc( NPC_LICK , SC_STUN );
set_sc( NPC_HALLUCINATION , SC_HALLUCINATION , SI_HALLUCINATION , SCB_NONE );
- add_sc( NPC_REBIRTH , SC_KAIZEL );
+ add_sc( NPC_REBIRTH , SC_REBIRTH );
add_sc( RG_RAID , SC_STUN );
set_sc( RG_STRIPWEAPON , SC_STRIPWEAPON , SI_STRIPWEAPON , SCB_WATK );
set_sc( RG_STRIPSHIELD , SC_STRIPSHIELD , SI_STRIPSHIELD , SCB_DEF );
@@ -793,6 +793,15 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
return hp+sp;
}
+ if( !((TBL_MOB*)target)->state.rebirth && sc && sc->data[SC_REBIRTH] && target->type == BL_MOB )
+ { // Ensure the monster has not already rebirthed before doing so.
+ int time = skill_get_time2(NPC_REBIRTH,sc->data[SC_REBIRTH]->val1);
+ status_revive(target, sc->data[SC_REBIRTH]->val2, 0);
+ status_change_clear(target,0);
+ ((TBL_MOB*)target)->state.rebirth = 1;
+ return hp+sp;
+ }
+
status_change_clear(target,0);
if(flag&4) //Delete from memory. (also invokes map removal code)
@@ -6077,6 +6086,9 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_MERC_SPUP:
val2 = 5 * val1;
break;
+ case SC_REBIRTH:
+ val2 = 20*val1; //% of life to be revived with
+ break;
default:
if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )