From 2c82c85e3857f9bcf513f4771f393f5f788f7f3f Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 1 May 2006 21:14:27 +0000 Subject: - Added -DMAPREGSQL to Makefile, commented out by default for now. - Fixed AL_WARP displaying "Unknown Area" selections when you don't have all memo points used up. - Fixed alive_count not being reset on skill unitsetting, which leads to some groups not being cleared once all their units expire. - Optimized Kahii, will now only show the amount of HP healed. Moved to skill_counter additional effect so it may trigger even on miss. - SKA no longer blocks skills. - Modified the AM_TWILIGHT* skills to require 200 medicine bowls. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6435 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 36 +++++++++++++++++++++++------------- src/map/status.c | 9 +++++---- 2 files changed, 28 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index ac0a64acf..3fb8dfcbb 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1016,14 +1016,6 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int sc_start4(bl,SC_POISON,2*tsc->data[SC_SPLASHER].val1+10, tsc->data[SC_SPLASHER].val1,0,0,0, skill_get_time2(tsc->data[SC_SPLASHER].val2,tsc->data[SC_SPLASHER].val1)); - if(tsc->data[SC_KAAHI].timer != -1) { - if (dstsd && dstsd->status.sp < 5*tsc->data[SC_KAAHI].val1) - ; //Not enough SP to cast - else { - battle_heal(bl, bl, 200*tsc->data[SC_KAAHI].val1, -5*tsc->data[SC_KAAHI].val1, 1); - clif_skill_nodamage(NULL,bl,AL_HEAL,200*tsc->data[SC_KAAHI].val1,1); - } - } } } break; @@ -1410,7 +1402,8 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * int rate; struct map_session_data *sd=NULL; struct map_session_data *dstsd=NULL; - + struct status_change *tsc; + nullpo_retr(0, src); nullpo_retr(0, bl); @@ -1422,11 +1415,28 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * } if(skillid > 0 && skilllv <= 0) return 0; // don't forget auto attacks! - celest + tsc = status_get_sc(bl); + if (tsc && !tsc->count) + tsc = NULL; + BL_CAST(BL_PC, src, sd); BL_CAST(BL_PC, bl, dstsd); switch(skillid){ - case 0: //Normal Attack - Nothing here yet. + 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); + } + } + } break; case MO_EXTREMITYFIST: /* ˆ¢?C—…”e™€Œ? */ //ˆ¢?C—…‚ðŽg‚¤‚Æ5•ªŠÔŽ©‘R‰ñ•œ‚µ‚È‚¢‚悤‚ɂȂé @@ -6027,9 +6037,9 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil case AL_WARP: /* ƒ??ƒvƒ|?ƒ^ƒ‹ */ if(sd) { clif_skill_warppoint(sd,skillid,skilllv,mapindex_id2name(sd->status.save_point.map), - (skilllv>1)?mapindex_id2name(sd->status.memo_point[0].map):"", - (skilllv>2)?mapindex_id2name(sd->status.memo_point[1].map):"", - (skilllv>3)?mapindex_id2name(sd->status.memo_point[2].map):""); + (skilllv>1 && sd->status.memo_point[0].map)?mapindex_id2name(sd->status.memo_point[0].map):"", + (skilllv>2 && sd->status.memo_point[1].map)?mapindex_id2name(sd->status.memo_point[1].map):"", + (skilllv>3 && sd->status.memo_point[2].map)?mapindex_id2name(sd->status.memo_point[2].map):""); } break; diff --git a/src/map/status.c b/src/map/status.c index 8ceae398c..df12ad208 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -437,8 +437,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int (sc->data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) || sc->data[SC_SILENCE].timer != -1 || sc->data[SC_STEELBODY].timer != -1 || - sc->data[SC_BERSERK].timer != -1 || - sc->data[SC_SKA].timer != -1 + sc->data[SC_BERSERK].timer != -1 )) return 0; //Skill blocking. @@ -4430,7 +4429,10 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val val4 = gettick(); //Store time at which you started running. calc_flag = 1; break; - + case SC_KAAHI: + val2 = 200*val1; //HP heal + val3 = 5*val1; //SP cost + break; case SC_TRICKDEAD: /* Ž€‚ñ‚¾‚Ó‚è */ { struct view_data *vd = status_get_viewdata(bl); @@ -4561,7 +4563,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val case SC_CLOSECONFINE: case SC_SKILLRATE_UP: case SC_KAIZEL: - case SC_KAAHI: case SC_INTRAVISION: case SC_BASILICA: case SC_MAXOVERTHRUST: -- cgit v1.2.3-70-g09d2