Flee not working after long play time.
Summary
Flee doesn't seem to be working sometimes after heavy game sessions some players report that they've been getting hit by Mobs like Archer Skeletons which have low HIT with pretty much 0 missed attacks.
Steps to Reproduce
Not known, but potentially:
- Mob a lot of mobs
- Get hit since Flee gets reduced,
- repeat several times with different mob counts.
- Get attacked by 1 Mob only.
Actual result
(If attacked by 1 Monster) Some players claim they get hit like 100% of time, their flee doesn't seem to be working anymore, even though they have 230~240 Flee.
Expected result
(If attacked by 1 Monster) They should be able to dodge 95% of the attacks. (Depends on the Mob, but let's say we have a Hydra in this case)
Notes
Hercules Code-Snippet seems alright(As the actual battle-flee value gets recalculated at every attack based on the unchanged status flee):
if (!(nk&NK_IGNORE_FLEE))
{
i = 0; //Temp for "hit or no hit"
if(tsc && tsc->opt1 && tsc->opt1 != OPT1_STONEWAIT && tsc->opt1 != OPT1_BURNING)
i = 1;
else {
short
flee = tstatus->flee,
#ifdef RENEWAL
hitrate = 0; //Default hitrate
#else
hitrate = 80; //Default hitrate
#endif
if(battle_config.agi_penalty_type && battle_config.agi_penalty_target&target->type) {
unsigned char attacker_count; //256 max targets should be a sane max
attacker_count = unit->counttargeted(target);
if(attacker_count >= battle_config.agi_penalty_count)
{
if (battle_config.agi_penalty_type == 1)
flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100;
else // assume type 2: absolute reduction
flee -= (attacker_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num;
if(flee < 1) flee = 1;
}
}
hitrate+= sstatus->hit - flee;
#ifdef RENEWAL
if( sd ) //in Renewal hit bonus from Vultures Eye is not anymore shown in status window
hitrate += pc->checkskill(sd,AC_VULTURE);
#endif
if( skill_id == KO_MUCHANAGE )
hitrate = (int)((10 - ((float)1 / (status_get_dex(src) + status_get_luk(src))) * 500) * ((float)skill_lv / 2 + 5));
hitrate = cap_value(hitrate, battle_config.min_hitrate, battle_config.max_hitrate);
if(rnd()%100 < hitrate)
i = 1;
}
if (!i) {
md.damage = 0;
md.dmg_lv=ATK_FLEE;
}
}
Source: battle.c battle_calc_misc_attack()