summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-03 19:47:10 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-03 19:47:10 +0000
commit7a6dc99cb063cfa34618e3a1e9c73716b3612fb6 (patch)
tree76c3e260f7f8aaa960067edbf6d87dab7cc80942 /src
parent0eb4ba12344652dd948c3aece8264865ffa857e5 (diff)
downloadhercules-7a6dc99cb063cfa34618e3a1e9c73716b3612fb6.tar.gz
hercules-7a6dc99cb063cfa34618e3a1e9c73716b3612fb6.tar.bz2
hercules-7a6dc99cb063cfa34618e3a1e9c73716b3612fb6.tar.xz
hercules-7a6dc99cb063cfa34618e3a1e9c73716b3612fb6.zip
- 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 taken effect). In other words, it works just like before, except damage gets "buffered" into 500ms slots.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6463 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c15
-rw-r--r--src/map/status.c32
2 files changed, 31 insertions, 16 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 10b355d3f..25e92e15d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1424,19 +1424,8 @@ 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) {
- if (dstsd && dstsd->status.sp < tsc->data[SC_KAAHI].val3)
- ; //Not enough SP to cast
- else {
- int hp = status_get_max_hp(bl) - status_get_hp(bl);
- if (hp > tsc->data[SC_KAAHI].val2)
- hp = tsc->data[SC_KAAHI].val2;
- if (hp) {
- battle_heal(bl, bl, hp, -tsc->data[SC_KAAHI].val3, 1);
- clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
- }
- }
- }
+ if(tsc && tsc->data[SC_KAAHI].timer != -1)
+ tsc->data[SC_KAAHI].val4++; //Activate heal.
break;
case MO_EXTREMITYFIST: /* ˆ¢?C—…”e™€Œ? */
//ˆ¢?C—…‚ðŽg‚¤‚Æ5•ªŠÔŽ©‘R‰ñ•œ‚µ‚È‚¢‚悤‚É‚È‚é
diff --git a/src/map/status.c b/src/map/status.c
index 53b9891f9..b1c36fb16 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4438,8 +4438,11 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
calc_flag = 1;
break;
case SC_KAAHI:
- val2 = 200*val1; //HP heal
- val3 = 5*val1; //SP cost
+ if(flag&4)
+ break;
+ val2 = tick/500;
+ val3 = 200*val1; //HP heal
+ tick = 500;
break;
case SC_BLESSING:
if ((!undead_flag && race!=RC_DEMON) || bl->type == BL_PC)
@@ -5428,7 +5431,30 @@ 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) /* ’âŽ~ */