summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-04 14:17:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-04 14:17:51 +0000
commit07e900f02b198bbfec480fceefb4a492f5ca8911 (patch)
treeed7ccf14c60719ae053f6a859c9bf0c2db5d26aa
parentdf2b2685b7a23a4132af0cf9d863daa0669d2f4f (diff)
downloadhercules-07e900f02b198bbfec480fceefb4a492f5ca8911.tar.gz
hercules-07e900f02b198bbfec480fceefb4a492f5ca8911.tar.bz2
hercules-07e900f02b198bbfec480fceefb4a492f5ca8911.tar.xz
hercules-07e900f02b198bbfec480fceefb4a492f5ca8911.zip
- Rewrote Kaahi to behave as it should. It will hear whatever amount of damage accumulates in the time2 interval (500ms by default) after being hit.
- Changed skill_unit_move_unit_group to enable moving of all types of ground-skills except ensembles. - Modified NPC_STUNATTACK: Max level is 5, stun duration is 1+lv seconds. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6466 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--db/Changelog.txt5
-rw-r--r--db/skill_cast_db.txt4
-rw-r--r--db/skill_db.txt2
-rw-r--r--src/map/skill.c14
-rw-r--r--src/map/status.c72
-rw-r--r--src/map/status.h1
7 files changed, 66 insertions, 38 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 488a172d8..0ebe2ae54 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,12 @@ 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.
+2006/05/04
+ * Rewrote Kaahi to behave as it should. It will heal whatever amount of
+ damage accumulates in the time2 interval (500ms by default) after being
+ hit. [Skotlex]
+ * Changed skill_unit_move_unit_group to enable moving of all types of
+ ground-skills except ensembles (fixes warmth not following you) [Skotlex]
2006/05/03
* Kaahi now triggers every 500ms rather than on every hit (but it only
heals if in those 500ms an attack that would previously trigger Kaahi has
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 5f5d7bae5..9f5cdc69a 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -26,6 +26,11 @@
-----
=========================
+
+05/04
+ * Modified NPC_STUNATTACK: Max level is 5, stun duration is 1+lv seconds
+ (these duration values are guessed, but they are better than the previous
+ 5+lv seconds) [Skotlex]
05/03
* Fusion's cast time reduced to 0. [Skotlex]
* Removed all Novice Job bonusses [Playtester]
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index 6f26fab77..514c1fa4d 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -296,7 +296,7 @@
//-- NPC_SILENCEATTACK
178,0,0,0,0,10000:12000:14000:16000:18000:20000:22000:24000:26000:28000
//-- NPC_STUNATTACK
-179,0,0,0,0,6000:7000:8000:9000:10000:11000:12000:13000:14000:15000
+179,0,0,0,0,2000:3000:4000:5000:6000
//-- NPC_PETRIFYATTACK
180,0,0,0,0,10000:11000:12000:13000:14000:15000:16000:17000:18000:19000
//-- NPC_CURSEATTACK
@@ -741,7 +741,7 @@
//-- SL_KAIZEL
462,4500:4000:3500:3000:2500:2000:1500,0,0,1800000,2000
//-- SL_KAAHI
-463,0,0,0,1800000,0
+463,0,0,0,1800000,500
//-- SL_KAUPE
464,500,0,0,600000,0
//-- SL_KAITE
diff --git a/db/skill_db.txt b/db/skill_db.txt
index e4e2fe851..328a45de7 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -198,7 +198,7 @@
176,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0 //NPC_POISON#Poison Attack#
177,7,6,1,-1,0,0,10,1,no,0,2,0,weapon,0 //NPC_BLINDATTACK#Darkness Attack#
178,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0 //NPC_SILENCEATTACK#Silence Attack#
-179,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0 //NPC_STUNATTACK#Stun Attack#
+179,-1,6,1,-1,0,0,5,1,no,0,2,0,weapon,0 //NPC_STUNATTACK#Stun Attack#
180,7,6,1,-1,0,0,10,1,no,0,2,0,weapon,0 //NPC_PETRIFYATTACK#Petrify Attack#
181,7,6,1,7,0,0,10,1,no,0,2,0,weapon,0 //NPC_CURSEATTACK#Cursing Attack #
182,-1,6,1,-1,0,0,10,1,no,0,2,0,weapon,0 //NPC_SLEEPATTACK#Sleep attack#
diff --git a/src/map/skill.c b/src/map/skill.c
index 25e92e15d..527480a6a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1424,8 +1424,10 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
switch(skillid){
case 0: //Normal Attack
- if(tsc && tsc->data[SC_KAAHI].timer != -1)
- tsc->data[SC_KAAHI].val4++; //Activate heal.
+ if(tsc && tsc->data[SC_KAAHI].timer != -1 && tsc->data[SC_KAAHI].val4 == -1)
+ tsc->data[SC_KAAHI].val4 = add_timer(
+ tick+skill_get_time2(SL_KAAHI,tsc->data[SC_KAAHI].val1),
+ kaahi_heal_timer, bl->id, SC_KAAHI); //Activate heal.
break;
case MO_EXTREMITYFIST: /* ˆ¢?C—…”e™€Œ? */
//ˆ¢?C—…‚ðŽg‚¤‚Æ5•ªŠÔŽ©‘R‰ñ•œ‚µ‚È‚¢‚悤‚É‚È‚é
@@ -9844,13 +9846,9 @@ int skill_unit_move_unit_group( struct skill_unit_group *group, int m,int dx,int
if (group->unit==NULL)
return 0;
- i = skill_get_unit_flag(group->skill_id); //Check the flag...
- if (!(
- (i&UF_DANCE && !(i&UF_ENSEMBLE)) || //Only non ensemble dances and traps can be moved.
- skill_get_inf2(group->skill_id)&INF2_TRAP
- ))
+ if (skill_get_unit_flag(group->skill_id)&UF_ENSEMBLE) //Ensembles may not be moved around.
return 0;
-
+
m_flag = (int *) aMalloc(sizeof(int)*group->unit_count);
memset(m_flag,0,sizeof(int)*group->unit_count);// ˆÚ“®ƒtƒ‰ƒO
// m_flag
diff --git a/src/map/status.c b/src/map/status.c
index b1c36fb16..279d2e5f3 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3915,6 +3915,15 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
//Must not override a casting gospel char.
if (sc->data[type].val4 == BCT_SELF)
return 0;
+ case SC_KAAHI:
+ if(sc->data[type].val1 > val1)
+ return 1;
+ //Delete timer if it exists.
+ if (sc->data[type].val4 != -1) {
+ delete_timer(sc->data[type].val4,kaahi_heal_timer);
+ sc->data[type].val4=-1;
+ }
+ break;
default:
if(sc->data[type].val1 > val1)
return 1; //Return true to not mess up skill animations. [Skotlex
@@ -4438,11 +4447,13 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
calc_flag = 1;
break;
case SC_KAAHI:
- if(flag&4)
+ if(flag&4) {
+ val4 = -1;
break;
- val2 = tick/500;
- val3 = 200*val1; //HP heal
- tick = 500;
+ }
+ val2 = 200*val1; //HP heal
+ val3 = 5*val2; //SP cost
+ val4 = -1; //Kaahi Timer.
break;
case SC_BLESSING:
if ((!undead_flag && race!=RC_DEMON) || bl->type == BL_PC)
@@ -5192,6 +5203,13 @@ int status_change_end( struct block_list* bl , int type,int tid )
skill_delunitgroup(bl, group);
}
break;
+ case SC_KAAHI:
+ //Delete timer if it exists.
+ if (sc->data[type].val4 != -1) {
+ delete_timer(sc->data[type].val4,kaahi_heal_timer);
+ sc->data[type].val4=-1;
+ }
+ break;
//gs_something2 [Vicious]
case SC_MADNESSCANCEL:
@@ -5327,6 +5345,29 @@ int status_change_end( struct block_list* bl , int type,int tid )
return 1;
}
+int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
+{
+ struct block_list *bl;
+ struct status_change *sc;
+ int hp;
+
+ bl=map_id2bl(id);
+ sc=status_get_sc(bl);
+ if (!sc || data != SC_KAAHI || sc->data[data].timer==-1)
+ return 0;
+
+ if (bl->type == BL_PC && ((TBL_PC*)bl)->status.sp < sc->data[data].val3)
+ return 0;
+
+ hp = status_get_max_hp(bl) - status_get_hp(bl);
+ if (hp > sc->data[data].val2)
+ hp = sc->data[data].val2;
+ if (hp) {
+ battle_heal(bl, bl, hp, -sc->data[data].val3, 1);
+ clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
+ }
+ return 1;
+}
/*==========================================
* ƒXƒe[ƒ^ƒXˆÙíI—¹ƒ^ƒCƒ}[
@@ -5432,29 +5473,6 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
}
break;
- case SC_KAAHI:
- if(sc->data[type].val4) { //Heal
- sc->data[type].val4 = 0;
- if (sd && sd->status.sp < 5*sc->data[SC_KAAHI].val1)
- ; //Not enough SP to cast
- else {
- int hp = status_get_max_hp(bl) - status_get_hp(bl);
- if (hp > sc->data[SC_KAAHI].val2)
- hp = sc->data[SC_KAAHI].val2;
- if (hp) {
- battle_heal(bl, bl, hp, -5*sc->data[SC_KAAHI].val1, 1);
- clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
- }
- }
- }
- if( (--sc->data[type].val2)>0 ){
- sc->data[type].timer=add_timer(
- 500+tick, status_change_timer,
- bl->id, data);
- return 0;
- }
- break;
-
case SC_PROVOKE: /* ƒvƒƒ{ƒbƒN/ƒI?ƒgƒo?ƒT?ƒN */
if(sc->data[type].val2!=0){ /* ƒI?ƒgƒo?ƒT?ƒNi‚P•b‚²‚Æ‚ÉHPƒ`ƒFƒbƒNj */
if(sd && sd->status.hp>sd->status.max_hp>>2) /* ’âŽ~ */
diff --git a/src/map/status.h b/src/map/status.h
index 57db4c937..ad3053df1 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -508,6 +508,7 @@ int status_get_sc_def(struct block_list *bl, int type);
int status_change_start(struct block_list *bl,int type,int rate,int val1,int val2,int val3,int val4,int tick,int flag);
int status_change_end( struct block_list* bl , int type,int tid );
+int kaahi_heal_timer(int tid, unsigned int tick, int id, int data);
int status_change_timer(int tid, unsigned int tick, int id, int data);
int status_change_timer_sub(struct block_list *bl, va_list ap );
int status_change_clear(struct block_list *bl,int type);