This commit is contained in:
aozhiwei 2022-10-11 19:02:28 +08:00
parent 17455d5df3
commit bfdbcbbd14
3 changed files with 30 additions and 1 deletions

View File

@ -592,6 +592,19 @@ float BattleDataContext::GetWeaponAtk(Bullet* bullet)
if (weapon) {
return weapon->GetAtk();
}
if (bullet->skill_meta && bullet->skill_meta->number_meta) {
switch (bullet->skill_meta->GetMagicId()) {
case MAGIC_HLYZ:
{
return bullet->skill_meta->number_meta->float_ratio;
}
break;
default:
{
}
break;
}
}
return bullet->gun_meta->i->atk();
}

View File

@ -416,6 +416,23 @@ void Skill::ProcJSHX()
if (!owner->dead) {
float add_hp = SkillHelper::GetJshxHp(owner, meta);
owner->AddHp(add_hp);
#ifdef DEBUG
{
std::string dbg_msg = a8::Format
(
"skill_id:%d 击杀回血 rnd:%d add_hp:%f ratio:%f ratio:%f human.atk:%f human.extRecoverHp:%f",
{
meta->i->skill_id(),
add_hp,
meta->number_meta->float_ratio,
meta->number_meta->float_ratio2,
owner->GetBattleContext()->GetHeroTotalAtk(),
owner->GetBattleContext()->GetExtRecoverHp()
});
owner->SendDebugMsg(dbg_msg);
a8::XPrintf("%s\n", {dbg_msg});
}
#endif
}
}
);

View File

@ -332,7 +332,6 @@ bool SkillHelper::ProcBulletDmg(Bullet* bullet, Creature* target, float& finaly_
}
switch (skill_meta->GetMagicId()) {
case MAGIC_AXXF:
case MAGIC_HLYZ:
case MAGIC_FG:
{
finaly_dmg =