summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--db/const.txt2
-rw-r--r--db/skill_cast_db.txt2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/skill.c4
-rw-r--r--src/map/status.c14
-rw-r--r--src/map/status.h6
7 files changed, 26 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 71bdcff2c..8319a1ab4 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2008/10/09
+ * Rev. 13272 Updated NPC_REBIRTH. Has it's own values, and no longer leeches off SL_KAIZEL. [L0ne_W0lf]
2008/10/06
* Rev. 13264 Damage count on rebirthed mobs is now reset. (Valaris) [L0ne_W0lf]
* Rev. 13263 voided out clif_blown as per Valaris' instruction. [L0ne_W0lf]
diff --git a/db/const.txt b/db/const.txt
index 030a1e478..195c5c580 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -798,6 +798,8 @@ SC_SEVENWIND 274
SC_DEF_RATE 275
SC_SPREGEN 276
SC_WALKSPEED 277
+SC_WALKSPEED 277
+SC_REBIRTH 284
e_gasp 0
e_what 1
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 9a246ae9c..0273cdcad 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -336,6 +336,8 @@
206,0,0,0,0,3000
//-- NPC_HALLUCINATION
207,0,0,0,30000:40000:50000:60000:70000:80000:90000:100000:110000:120000,0
+//-- NPC_REBIRTH
+208,4500:4000:3500:3000:2500:2000:1500,0,0,1800000,2000
//==========================================
diff --git a/src/map/mob.c b/src/map/mob.c
index 809ce3f77..0c6ada573 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2313,7 +2313,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
//Emperium destroyed by script. Discard mvp character. [Skotlex]
mvp_sd = NULL;
- if( !md->sc.data[SC_KAIZEL] )
+ if( !md->sc.data[SC_REBIRTH] )
{ // Only trigger event on final kill
md->status.hp = 0; //So that npc_event invoked functions KNOW that mob is dead
if( src )
diff --git a/src/map/skill.c b/src/map/skill.c
index e4a4b1bbb..9dcdae732 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4610,8 +4610,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case NPC_REBIRTH:
- //New rebirth System uses Kaizel [Skotlex]
- sc_start(bl,type,100,skilllv,skill_get_time(SL_KAIZEL,skilllv));
+ //Rebirth system now uses SC_REBIRTH instead of SC_KAIZEL. [L0ne_W0lf]
+ sc_start(bl,type,100,skilllv,skill_get_time(NPC_REBIRTH,skilllv));
break;
case NPC_DARKBLESSING:
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 )
diff --git a/src/map/status.h b/src/map/status.h
index f5e36ec88..b4b6dde61 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -287,7 +287,7 @@ typedef enum sc_type {
SC_INCHEALRATE,
SC_PNEUMA,
SC_AUTOTRADE,
- SC_KSPROTECTED,
+ SC_KSPROTECTED, //270
SC_ARMOR_RESIST,
SC_SPCOST_RATE,
SC_COMMONSC_RESIST,
@@ -299,11 +299,13 @@ typedef enum sc_type {
// Mercenary Only Bonus Effects
SC_MERC_FLEEUP,
SC_MERC_ATKUP,
- SC_MERC_HPUP,
+ SC_MERC_HPUP, //280
SC_MERC_SPUP,
SC_MERC_HITUP,
SC_MERC_QUICKEN,
+ SC_REBIRTH,
+
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;