1
This commit is contained in:
parent
3ef48f3206
commit
08342d31a2
@ -57,8 +57,8 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
if (hum != player && !hum->dead &&
|
||||
(hum->team_id == 0 || player->team_id != hum->team_id)) {
|
||||
#endif
|
||||
float dmg = gun_meta->i->atk() * (1 + player->buff.damage_add);
|
||||
float def = hum->def + hum->buff.def_add;
|
||||
float dmg = gun_meta->i->atk() * (1 + player->ability.damage_add);
|
||||
float def = hum->def + hum->ability.def_add;
|
||||
float finaly_dmg = dmg * (1 - def/MetaMgr::Instance()->K);
|
||||
player->stats.damage_amount_out += finaly_dmg;
|
||||
hum->DecHP(finaly_dmg, player->entity_uniid, player->name, gun_meta->i->id());
|
||||
@ -77,7 +77,7 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
{
|
||||
Obstacle* obstacle = (Obstacle*)target;
|
||||
if (!obstacle->dead && obstacle->meta->i->attack_type() == 1) {
|
||||
float dmg = gun_meta->i->atk() * (1 + player->buff.damage_add);
|
||||
float dmg = gun_meta->i->atk() * (1 + player->ability.damage_add);
|
||||
float def = 0;
|
||||
float finaly_dmg = dmg * (1 - def/MetaMgr::Instance()->K);
|
||||
#if 0
|
||||
|
@ -67,7 +67,7 @@ void Human::Initialize()
|
||||
float Human::GetSpeed()
|
||||
{
|
||||
if (downed) {
|
||||
return meta->i->move_speed3() + buff.speed;
|
||||
return meta->i->move_speed3() + ability.speed;
|
||||
} else {
|
||||
if (shot_hold) {
|
||||
if (curr_weapon->weapon_idx == GUN_SLOT1 ||
|
||||
@ -77,7 +77,7 @@ float Human::GetSpeed()
|
||||
}
|
||||
}
|
||||
}
|
||||
return meta->i->move_speed() + buff.speed;
|
||||
return meta->i->move_speed() + ability.speed;
|
||||
}
|
||||
}
|
||||
|
||||
@ -867,18 +867,7 @@ void Human::RecalcVolume()
|
||||
|
||||
void Human::RecalcBuff()
|
||||
{
|
||||
buff = HumanAbility();
|
||||
#if 0
|
||||
if (skin_jlf_meta) {
|
||||
buff.damage_add += skin_jlf_meta->GetAttrValue(skin_jlf.skin_lv, EA_Atk);
|
||||
buff.def_add += skin_jlf_meta->GetAttrValue(skin_jlf.skin_lv, EA_Def);
|
||||
buff.speed += skin_jlf_meta->GetAttrValue(skin_jlf.skin_lv, EA_Speed);
|
||||
} else if (skin_meta) {
|
||||
buff.damage_add += skin_meta->GetAttrValue(skin.skin_lv, EA_Atk);
|
||||
buff.def_add += skin_meta->GetAttrValue(skin.skin_lv, EA_Def);
|
||||
buff.speed += skin_meta->GetAttrValue(skin.skin_lv, EA_Speed);
|
||||
}
|
||||
#endif
|
||||
ability = HumanAbility();
|
||||
}
|
||||
|
||||
int Human::GetInventory(int slot_id)
|
||||
|
@ -48,7 +48,7 @@ class Human : public Entity
|
||||
MetaData::Tank* skin_meta = nullptr;
|
||||
MetaData::Skill* skill_meta = nullptr;
|
||||
MetaData::Tank* skin_jlf_meta = nullptr;
|
||||
HumanAbility buff;
|
||||
HumanAbility ability;
|
||||
int born_point = 0;
|
||||
|
||||
a8::Vec2 move_dir;
|
||||
|
@ -204,7 +204,7 @@ void Obstacle::Explosion(Bullet* bullet)
|
||||
if (!hum->dead && (hum->team_id == 0 || hum->team_id != player->team_id)) {
|
||||
#endif
|
||||
float dmg = meta->i->damage();
|
||||
float def = hum->def + hum->buff.def_add;
|
||||
float def = hum->def + hum->ability.def_add;
|
||||
float finaly_dmg = dmg * (1 - def/MetaMgr::Instance()->K);
|
||||
hum->DecHP(finaly_dmg, VP_Mine, "地雷", VW_Mine);
|
||||
}
|
||||
|
@ -621,22 +621,6 @@ void Room::FetchBuilding(Human* hum)
|
||||
|
||||
void Room::OnHumanDie(Human* hum)
|
||||
{
|
||||
#if 0
|
||||
if (hum->skill_meta && hum->skill_meta->i->type() == ST_SelfDetonate) {
|
||||
for (auto& pair : human_hash_) {
|
||||
if (pair.second != hum && (pair.second->team_id == 0 || pair.second->team_id != hum->team_id)) {
|
||||
float distance = (hum->pos - pair.second->pos).Norm();
|
||||
if (distance <= hum->skill_meta->area) {
|
||||
pair.second->DecHP(hum->skill_meta->value1,
|
||||
hum->entity_uniid,
|
||||
hum->name,
|
||||
VW_SelfDetonate);
|
||||
}
|
||||
}
|
||||
}
|
||||
frame_event.AddExplosionEx(hum, 0, hum->pos, 1);
|
||||
}
|
||||
#endif
|
||||
--alive_count_;
|
||||
NotifyUiUpdate();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user