summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
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 )