From 5d379983519317865fcc650a254fd314e0a32b38 Mon Sep 17 00:00:00 2001 From: rud0lp20 Date: Mon, 21 May 2012 17:05:05 +0000 Subject: Fixed bugreport:5777 WL_DRAINLIFE HP absorption based on damage is now working properly. Thanks to Rytech Fixed WL_SOULEXPANSION now it should do double damage on White Imprisoned targets and WL_WHITEIMPRISON should not work with bosses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16137 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 7 ++++--- src/map/skill.c | 15 +++++++-------- src/map/status.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 36f158ff8..565f6e312 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -403,10 +403,11 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag skill_num == WL_SOULEXPANSION || (skill_num && skill_get_ele(skill_num, skill_lv) == ELE_GHOST) || (!skill_num && (status_get_status_data(src))->rhw.ele == ELE_GHOST) - ) + ){ + if( skill_num == WL_SOULEXPANSION ) + damage <<= 1; // If used against a player in White Imprison, the skill deals double damage. status_change_end(bl,SC_WHITEIMPRISON,INVALID_TIMER); // Those skills do damage and removes effect - else - { + }else{ d->dmg_lv = ATK_BLOCK; return 0; } diff --git a/src/map/skill.c b/src/map/skill.c index eaa2b3331..1331e2064 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4031,16 +4031,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int break; case WL_DRAINLIFE: { - int heal = skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag); - int rate = 70 + 4 * skilllv + ( sd ? sd->status.job_level : 50 ) / 5; + int heal = skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag); + int rate = 70 + 5 * skilllv; - heal = 8 * skilllv; - if( status_get_lv(src) > 100 ) heal = heal * status_get_lv(src) / 100; // Base level bonus. + heal = heal * (5 + 5 * skilllv) / 100; - if( bl->type == BL_SKILL ) - heal = 0; // Don't absorb heal from Ice Walls or other skill units. + if( bl->type == BL_SKILL ) + heal = 0; // Don't absorb heal from Ice Walls or other skill units. - if( heal && rnd()%100 < rate ) + if( heal && rnd()%100 < rate ) { status_heal(src, heal, 0, 0); clif_skill_nodamage(NULL, src, AL_HEAL, heal, 1); @@ -7568,7 +7567,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case WL_WHITEIMPRISON: - if( !(tsc && tsc->data[type]) && (src == bl || battle_check_target(src, bl, BCT_ENEMY)) ) + if( !(tsc && tsc->data[type]) && (src == bl || battle_check_target(src, bl, BCT_ENEMY)) && !is_boss(bl) )// Should not work with bosses. { int rate = 50 + 3 * skilllv + ( sd? sd->status.job_level : 50 ) / 4; i = sc_start2(bl,type,rate,skilllv,src->id,(src == bl)?skill_get_time2(skillid,skilllv):skill_get_time(skillid, skilllv)); diff --git a/src/map/status.c b/src/map/status.c index b375a5240..2da269239 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6249,7 +6249,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_MARSHOFABYSS: case SC_ADORAMUS: - // Exploid prevention - kRO Fix + // Exploit prevention - kRO Fix case SC_PYREXIA: case SC_DEATHHURT: case SC_TOXIN: -- cgit v1.2.3-70-g09d2