* 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:
hipsterfont 2013-05-16 22:26:43 +00:00
parent af8ef75a53
commit 48c406ff36
2 changed files with 27 additions and 27 deletions

View File

@ -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

View File

@ -7589,18 +7589,18 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
}
status_zap(bl, diff, 0);
}
// fall through
case SC_POISON:
// 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) ? 3 + status->max_hp/50 : 3 + status->max_hp*3/200;
val4 = (type == SC_DPOISON) ? 2 + status->max_hp/50 : 2 + status->max_hp*3/200;
else
val4 = (type == SC_DPOISON) ? 3 + status->max_hp/100 : 3 + status->max_hp/200;
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,6 +10094,7 @@ 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();
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: