1
This commit is contained in:
parent
d3968caba5
commit
64d87ad396
@ -41,6 +41,10 @@ void AirRaid::Exec(int airraid_id)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
glm::vec3 center;
|
glm::vec3 center;
|
||||||
|
if (!GenAirRaidPos(raid_meta, center)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto raid_cb =
|
auto raid_cb =
|
||||||
[this, raid_meta, center]
|
[this, raid_meta, center]
|
||||||
(int event, const a8::Args* args)
|
(int event, const a8::Args* args)
|
||||||
|
@ -67,76 +67,6 @@ void SkillHelper::GetMagicIdAndBaseSkillId(int skill_id, int& magic_id, int& bas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int SkillHelper::GetCmxdDmg(Creature* c, const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
float dmg =
|
|
||||||
(skill_meta->_number_meta->_float_ratio +
|
|
||||||
skill_meta->_number_meta->_float_ratio2 * c->GetBattleContext()->GetHeroTotalAtk());
|
|
||||||
return dmg;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetCmxdRange(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_int_range;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetCmxdDistance(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_int_range2;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetCmxdExplosion(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetCmxdVertigoTime(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_time;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetJshxHp(Creature* c, const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
float hp =
|
|
||||||
(skill_meta->_number_meta->_float_ratio +
|
|
||||||
skill_meta->_number_meta->_float_ratio2 * c->GetBattleContext()->GetHeroTotalAtk()) *
|
|
||||||
(1 + c->GetBattleContext()->GetExtRecoverHp());
|
|
||||||
return hp;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetSwzbRadius(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_range;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetSwzbDmg(Creature* c, const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
float finaly_dmg =
|
|
||||||
(skill_meta->_number_meta->_float_ratio +
|
|
||||||
skill_meta->_number_meta->_float_ratio2 * c->GetBattleContext()->GetHeroTotalAtk());
|
|
||||||
return finaly_dmg;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetSwzbEffect(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetSwzbPullDistance(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_range2;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetSwzbBuffId(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return kVertigoEffectBuffId;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetSwzbBuffTime(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_time;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkillHelper::ProcBulletHitBuff(IBullet* bullet, Creature* c, int buff_uniid)
|
void SkillHelper::ProcBulletHitBuff(IBullet* bullet, Creature* c, int buff_uniid)
|
||||||
{
|
{
|
||||||
Buff* buff = c->GetBuffByUniId(buff_uniid);
|
Buff* buff = c->GetBuffByUniId(buff_uniid);
|
||||||
@ -177,62 +107,6 @@ void SkillHelper::ProcBulletHitBuff(IBullet* bullet, Creature* c, int buff_uniid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float SkillHelper::GetSjydhxRecoverHp(Creature* c, const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
float hp =
|
|
||||||
(skill_meta->_number_meta->_float_ratio +
|
|
||||||
skill_meta->_number_meta->_float_ratio2 * c->GetBattleContext()->GetHeroTotalAtk()) *
|
|
||||||
(1 + c->GetBattleContext()->GetExtRecoverHp());
|
|
||||||
#ifdef DEBUG
|
|
||||||
{
|
|
||||||
std::string dbg_msg = a8::Format
|
|
||||||
(
|
|
||||||
"skill_id:%d 瞬间移动回血 ratio:%f ratio2:%f human.atk:%f extRecoverHp:%f hp:%f",
|
|
||||||
{
|
|
||||||
skill_meta->skill_id(),
|
|
||||||
skill_meta->_number_meta->_float_ratio,
|
|
||||||
skill_meta->_number_meta->_float_ratio2,
|
|
||||||
c->GetBattleContext()->GetHeroTotalAtk(),
|
|
||||||
c->GetBattleContext()->GetExtRecoverHp(),
|
|
||||||
hp
|
|
||||||
});
|
|
||||||
c->SendDebugMsg(dbg_msg);
|
|
||||||
a8::XPrintf("%s\n", {dbg_msg});
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return hp;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetSjydhxForthDistance(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta && skill_meta->_number_meta ? skill_meta->_number_meta->_int_range : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetSjydhxBackTime(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta && skill_meta->_number_meta ? skill_meta->_number_meta->_float_time : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetYmczBuffTime(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta && skill_meta->_number_meta ? 3000 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SkillHelper::GetYmczReserveDistance(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_range2;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetYmczDmg(Creature* sender, Creature* target, const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
float finaly_dmg =
|
|
||||||
(skill_meta->_number_meta->_float_ratio +
|
|
||||||
skill_meta->_number_meta->_float_ratio2 *
|
|
||||||
sender->GetBattleContext()->GetHeroTotalAtk()) *
|
|
||||||
(1 - target->GetBattleContext()->GetDef() / (target->GetBattleContext()->GetDef() + 400));
|
|
||||||
return finaly_dmg;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SkillHelper::ProcBulletDmg(IBullet* bullet, Creature* target, float& finaly_dmg)
|
bool SkillHelper::ProcBulletDmg(IBullet* bullet, Creature* target, float& finaly_dmg)
|
||||||
{
|
{
|
||||||
finaly_dmg = 0.0f;
|
finaly_dmg = 0.0f;
|
||||||
@ -334,58 +208,3 @@ int SkillHelper::GetYlzDamage(Creature* sender, Creature* target, const mt::Skil
|
|||||||
skill_meta->_number_meta->damage_addition() * sender->GetBattleContext()->GetHeroTotalAtk();
|
skill_meta->_number_meta->damage_addition() * sender->GetBattleContext()->GetHeroTotalAtk();
|
||||||
return dmg;
|
return dmg;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SkillHelper::GetJyfhBuffId(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->buff_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetJyfhBuffTime(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_time;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetSsjsHpRate(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_ratio2;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetSsjsTime(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_time;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetSsjsProb(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_probability;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetSsjsSpeedRate(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetMyxySpeedRate(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetMyxyAtkRate(const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
return skill_meta->_number_meta->_float_ratio;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetLdfyHp(Creature* c, const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
float hp = skill_meta->_number_meta->_float_ratio + skill_meta->_number_meta->_float_ratio2 * c->GetMaxHP();
|
|
||||||
return hp;
|
|
||||||
}
|
|
||||||
|
|
||||||
float SkillHelper::GetLdfyBuffTime(Creature* c, const mt::Skill* skill_meta)
|
|
||||||
{
|
|
||||||
#if 1
|
|
||||||
return 99999;
|
|
||||||
#else
|
|
||||||
return skill_meta->_number_meta->_float_time;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
@ -11,47 +11,10 @@ class SkillHelper
|
|||||||
|
|
||||||
static void GetMagicIdAndBaseSkillId(int skill_id, int& magic_id, int& base_skill_id);
|
static void GetMagicIdAndBaseSkillId(int skill_id, int& magic_id, int& base_skill_id);
|
||||||
|
|
||||||
//瞬间移动回血
|
|
||||||
static float GetSjydhxRecoverHp(Creature* c, const mt::Skill* skill_meta);
|
|
||||||
static float GetSjydhxForthDistance(const mt::Skill* skill_meta);
|
|
||||||
static float GetSjydhxBackTime(const mt::Skill* skill_meta);
|
|
||||||
//此面向敌
|
|
||||||
static int GetCmxdDmg(Creature* c, const mt::Skill* skill_meta);
|
|
||||||
static int GetCmxdRange(const mt::Skill* skill_meta);
|
|
||||||
static int GetCmxdDistance(const mt::Skill* skill_meta);
|
|
||||||
static int GetCmxdExplosion(const mt::Skill* skill_meta);
|
|
||||||
static int GetCmxdVertigoTime(const mt::Skill* skill_meta);
|
|
||||||
//击杀回血
|
|
||||||
static int GetJshxHp(Creature* c, const mt::Skill* skill_meta);
|
|
||||||
//死亡自爆
|
|
||||||
static int GetSwzbRadius(const mt::Skill* skill_meta);
|
|
||||||
static int GetSwzbDmg(Creature* c, const mt::Skill* skill_meta);
|
|
||||||
static int GetSwzbEffect(const mt::Skill* skill_meta);
|
|
||||||
static int GetSwzbPullDistance(const mt::Skill* skill_meta);
|
|
||||||
static int GetSwzbBuffId(const mt::Skill* skill_meta);
|
|
||||||
static float GetSwzbBuffTime(const mt::Skill* skill_meta);
|
|
||||||
//野蛮冲撞
|
|
||||||
static int GetYmczBuffTime(const mt::Skill* skill_meta);
|
|
||||||
static int GetYmczReserveDistance(const mt::Skill* skill_meta);
|
|
||||||
static float GetYmczDmg(Creature* sender, Creature* target, const mt::Skill* skill_meta);
|
|
||||||
//医疗站
|
//医疗站
|
||||||
static int GetYlzRange(const mt::Skill* skill_meta);
|
static int GetYlzRange(const mt::Skill* skill_meta);
|
||||||
static int GetYlzRecoverHp(Creature* sender, Creature* target, const mt::Skill* skill_meta);
|
static int GetYlzRecoverHp(Creature* sender, Creature* target, const mt::Skill* skill_meta);
|
||||||
static int GetYlzDamage(Creature* sender, Creature* target, const mt::Skill* skill_meta);
|
static int GetYlzDamage(Creature* sender, Creature* target, const mt::Skill* skill_meta);
|
||||||
//救援防护
|
|
||||||
static int GetJyfhBuffId(const mt::Skill* skill_meta);
|
|
||||||
static float GetJyfhBuffTime(const mt::Skill* skill_meta);
|
|
||||||
//受伤加速
|
|
||||||
static float GetSsjsHpRate(const mt::Skill* skill_meta);
|
|
||||||
static float GetSsjsTime(const mt::Skill* skill_meta);
|
|
||||||
static float GetSsjsProb(const mt::Skill* skill_meta);
|
|
||||||
static float GetSsjsSpeedRate(const mt::Skill* skill_meta);
|
|
||||||
//免疫眩晕
|
|
||||||
static float GetMyxySpeedRate(const mt::Skill* skill_meta);
|
|
||||||
static float GetMyxyAtkRate(const mt::Skill* skill_meta);
|
|
||||||
//立盾防御
|
|
||||||
static float GetLdfyHp(Creature* c, const mt::Skill* skill_meta);
|
|
||||||
static float GetLdfyBuffTime(Creature* c, const mt::Skill* skill_meta);
|
|
||||||
|
|
||||||
static void ProcBulletHitBuff(IBullet* bullet, Creature* c, int buff_uniid);
|
static void ProcBulletHitBuff(IBullet* bullet, Creature* c, int buff_uniid);
|
||||||
static bool ProcBulletDmg(IBullet* bullet, Creature* target, float& finaly_dmg);
|
static bool ProcBulletDmg(IBullet* bullet, Creature* target, float& finaly_dmg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user