diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-01 21:14:27 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-01 21:14:27 +0000 |
commit | 2c82c85e3857f9bcf513f4771f393f5f788f7f3f (patch) | |
tree | e29a43029cde3a36f8c43aadfb5a55195350599e /src/map/skill.c | |
parent | 81a95db7c1ad0099c5198b1d891225918253fa29 (diff) | |
download | hercules-2c82c85e3857f9bcf513f4771f393f5f788f7f3f.tar.gz hercules-2c82c85e3857f9bcf513f4771f393f5f788f7f3f.tar.bz2 hercules-2c82c85e3857f9bcf513f4771f393f5f788f7f3f.tar.xz hercules-2c82c85e3857f9bcf513f4771f393f5f788f7f3f.zip |
- 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
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 36 |
1 files changed, 23 insertions, 13 deletions
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;
|