* Fixed poison status reducing health below 25%
* Per official behavior, Knight's Auto Counter skill is based off of player's ASPD for delay git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17329 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
af8ef75a53
commit
48c406ff36
@ -1707,8 +1707,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
|
||||
wd.type=0; //Normal attack
|
||||
wd.div_=skill_id?skill_get_num(skill_id,skill_lv):1;
|
||||
wd.amotion=(skill_id && skill_get_inf(skill_id)&INF_GROUND_SKILL)?0:sstatus->amotion; //Amotion should be 0 for ground skills.
|
||||
if(skill_id == KN_AUTOCOUNTER)
|
||||
wd.amotion >>= 1;
|
||||
/*if(skill_id == KN_AUTOCOUNTER) // counter attack obeys ASPD delay on official
|
||||
wd.amotion >>= 1; */
|
||||
wd.dmotion=tstatus->dmotion;
|
||||
wd.blewcount=skill_get_blewcount(skill_id,skill_lv);
|
||||
wd.flag = BF_WEAPON; //Initial Flag
|
||||
|
@ -7577,30 +7577,30 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
break;
|
||||
|
||||
case SC_DPOISON:
|
||||
//Lose 10/15% of your life as long as it doesn't brings life below 25%
|
||||
if (status->hp > status->max_hp>>2) {
|
||||
int diff = status->max_hp*(bl->type==BL_PC?10:15)/100;
|
||||
if (status->hp - diff < status->max_hp>>2)
|
||||
diff = status->hp - (status->max_hp>>2);
|
||||
if( val2 && bl->type == BL_MOB ) {
|
||||
struct block_list* src = map_id2bl(val2);
|
||||
if( src )
|
||||
mob_log_damage((TBL_MOB*)bl,src,diff);
|
||||
//Lose 10/15% of your life as long as it doesn't brings life below 25%
|
||||
if (status->hp > status->max_hp>>2) {
|
||||
int diff = status->max_hp*(bl->type==BL_PC?10:15)/100;
|
||||
if (status->hp - diff < status->max_hp>>2)
|
||||
diff = status->hp - (status->max_hp>>2);
|
||||
if( val2 && bl->type == BL_MOB ) {
|
||||
struct block_list* src = map_id2bl(val2);
|
||||
if( src )
|
||||
mob_log_damage((TBL_MOB*)bl,src,diff);
|
||||
}
|
||||
status_zap(bl, diff, 0);
|
||||
}
|
||||
status_zap(bl, diff, 0);
|
||||
}
|
||||
// fall through
|
||||
case SC_POISON:
|
||||
val3 = tick/1000; //Damage iterations
|
||||
if(val3 < 1) val3 = 1;
|
||||
tick_time = 1000; // [GodLesZ] tick time
|
||||
//val4: HP damage
|
||||
if (bl->type == BL_PC)
|
||||
val4 = (type == SC_DPOISON) ? 3 + status->max_hp/50 : 3 + status->max_hp*3/200;
|
||||
else
|
||||
val4 = (type == SC_DPOISON) ? 3 + status->max_hp/100 : 3 + status->max_hp/200;
|
||||
|
||||
break;
|
||||
// fall through
|
||||
val3 = tick/1000; //Damage iterations
|
||||
if(val3 < 1) val3 = 1;
|
||||
tick_time = 1000; // [GodLesZ] tick time
|
||||
//val4: HP damage
|
||||
if (bl->type == BL_PC)
|
||||
val4 = (type == SC_DPOISON) ? 2 + status->max_hp/50 : 2 + status->max_hp*3/200;
|
||||
else
|
||||
val4 = (type == SC_DPOISON) ? 2 + status->max_hp/100 : 2 + status->max_hp/200;
|
||||
break;
|
||||
|
||||
case SC_CONFUSION:
|
||||
clif_emotion(bl,E_WHAT);
|
||||
break;
|
||||
@ -10085,8 +10085,6 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
|
||||
break;
|
||||
|
||||
case SC_POISON:
|
||||
if(status->hp <= max(status->max_hp>>2, sce->val4)) //Stop damaging after 25% HP left.
|
||||
break;
|
||||
case SC_DPOISON:
|
||||
if (--(sce->val3) > 0) {
|
||||
if (!sc->data[SC_SLOWPOISON]) {
|
||||
@ -10096,7 +10094,8 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
|
||||
mob_log_damage((TBL_MOB*)bl,src,sce->val4);
|
||||
}
|
||||
map_freeblock_lock();
|
||||
status_zap(bl, sce->val4, 0);
|
||||
if(status->hp >= max(status->max_hp>>2, sce->val4)) //Stop damaging after 25% HP left.
|
||||
status_zap(bl, sce->val4, 0);
|
||||
if (sc->data[type]) { // Check if the status still last ( can be dead since then ).
|
||||
sc_timer_next(1000 + tick, status_change_timer, bl->id, data );
|
||||
}
|
||||
@ -10104,6 +10103,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SC_TENSIONRELAX:
|
||||
|
Loading…
x
Reference in New Issue
Block a user