1
This commit is contained in:
parent
f6e05fcf49
commit
104b2f4b68
@ -114,5 +114,15 @@ enum HumanVirtualAttrType_e
|
||||
kHVAT_Dmg = 1001,
|
||||
kHVAT_BulletAngle = 1002,
|
||||
kHVAT_WeaponAtk = 1003,
|
||||
|
||||
kHVAT_ShotRange = 1004,
|
||||
kHVAT_WeaponExplosionContinueTime = 1005,
|
||||
kHVAT_RescueTime = 1006,
|
||||
kHVAT_PoisoningReduction = 1007,
|
||||
kHVAT_WeaponReloadTime = 1008,
|
||||
kHVAT_CarOil = 1009,
|
||||
kHVAT_WeaponExplosionDealyTime = 1010,
|
||||
kHVAT_WeaponDmg = 1011,
|
||||
kHVAT_WeaponExplosionRange = 1012,
|
||||
kHVAT_End
|
||||
};
|
||||
|
@ -243,9 +243,9 @@ void Bullet::ProcBomb()
|
||||
}
|
||||
if (IsCurrWeapon() &&
|
||||
sender.Get() &&
|
||||
sender.Get()->GetAbility()->GetAttrAbs(kHAT_WeaponExplosionDealyTime) > 0) {
|
||||
sender.Get()->GetAbility()->GetAttrAbs(kHVAT_WeaponExplosionDealyTime) > 0) {
|
||||
delay_time = delay_time -
|
||||
sender.Get()->GetAbility()->GetAttrAbs(kHAT_WeaponExplosionDealyTime);
|
||||
sender.Get()->GetAbility()->GetAttrAbs(kHVAT_WeaponExplosionDealyTime);
|
||||
delay_time = std::max(0, delay_time);
|
||||
}
|
||||
{
|
||||
@ -508,7 +508,7 @@ float Bullet::GetAtk()
|
||||
}
|
||||
float attr_rate = 1 + ability_->GetAttrRate(kHAT_Atk);
|
||||
if (IsCurrWeapon()) {
|
||||
attr_rate += ability_->GetAttrRate(kHAT_WeaponDmg);
|
||||
attr_rate += ability_->GetAttrRate(kHVAT_WeaponDmg);
|
||||
}
|
||||
return atk * attr_rate;
|
||||
}
|
||||
@ -517,7 +517,7 @@ float Bullet::GetExplosionRange()
|
||||
{
|
||||
float e_range = gun_meta->explosion_range();
|
||||
if (IsCurrWeapon()) {
|
||||
e_range *= (1 + ability_->GetAttrRate(kHAT_WeaponExplosionRange));
|
||||
e_range *= (1 + ability_->GetAttrRate(kHVAT_WeaponExplosionRange));
|
||||
}
|
||||
return e_range;
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ void Car::SetAttackDir(const glm::vec3& attack_dir)
|
||||
|
||||
void Car::DecOil(float dec_oil)
|
||||
{
|
||||
dec_oil *= 1 - GetAbility()->GetAttrRate(kHAT_CarOil);
|
||||
dec_oil *= 1 - GetAbility()->GetAttrRate(kHVAT_CarOil);
|
||||
cur_oil_ -= dec_oil;
|
||||
cur_oil_ = std::max(0.0f, cur_oil_);
|
||||
if (!HasOil()) {
|
||||
|
@ -127,7 +127,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
||||
} else if (cmd == "jiuyuan") {
|
||||
TryAddBuff(this, kRescuerBuffId);
|
||||
int downed_relive_time = mt::Param::GetIntParam("downed_relive_time") * 1000;
|
||||
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime);
|
||||
downed_relive_time -= GetAbility()->GetAttrAbs(kHVAT_RescueTime);
|
||||
downed_relive_time = std::max(0, downed_relive_time);
|
||||
downed_relive_time = 1000 * 30;
|
||||
StartAction(
|
||||
|
@ -1365,7 +1365,7 @@ void Creature::UpdatePoisoning()
|
||||
dmg = room->GetGasData().new_area_meta->hurt();
|
||||
}
|
||||
dmg = dmg * GetMaxHP();
|
||||
dmg *= 1 + GetAbility()->GetAttrRate(kHAT_PoisoningReduction);
|
||||
dmg *= 1 + GetAbility()->GetAttrRate(kHVAT_PoisoningReduction);
|
||||
if (room->IsPveRoom()) {
|
||||
dmg = std::max(1.0f, dmg);
|
||||
} else {
|
||||
@ -1617,7 +1617,7 @@ void Creature::AutoLoadingBullet(bool manual)
|
||||
on_loading_bullet();
|
||||
}
|
||||
int duration_time = p_weapon->GetReloadTime(this) *
|
||||
(1 + GetAbility()->GetAttrRate(kHAT_WeaponReloadTime));
|
||||
(1 + GetAbility()->GetAttrRate(kHVAT_WeaponReloadTime));
|
||||
StartAction(AT_Reload,
|
||||
duration_time,
|
||||
p_weapon->weapon_id,
|
||||
|
@ -151,7 +151,7 @@ void PBUtils::_Ability_FillMFAttrAdditionList(Ability* self,
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
for (int attr_id = 0; attr_id < kHAT_End; ++attr_id) {
|
||||
for (int attr_id = 0; attr_id < kNHAT_End; ++attr_id) {
|
||||
if (!(attr_id == 12 || attr_id == 33)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -308,8 +308,8 @@ void RoomObstacle::Active()
|
||||
void RoomObstacle::ActiveSelfExplosion()
|
||||
{
|
||||
total_explosion_times_ = meta->explosion_times();
|
||||
if (context_ability && context_ability->GetAttrAbs(kHAT_WeaponExplosionContinueTime) > 0.001f) {
|
||||
total_explosion_times_ += context_ability->GetAttrAbs(kHAT_WeaponExplosionContinueTime) * 1000 /
|
||||
if (context_ability && context_ability->GetAttrAbs(kHVAT_WeaponExplosionContinueTime) > 0.001f) {
|
||||
total_explosion_times_ += context_ability->GetAttrAbs(kHVAT_WeaponExplosionContinueTime) * 1000 /
|
||||
meta->explosion_interval();
|
||||
}
|
||||
room->xtimer.SetTimeoutEx
|
||||
@ -365,8 +365,8 @@ void RoomObstacle::ActiveTrap()
|
||||
void RoomObstacle::ActivePosionGas()
|
||||
{
|
||||
total_explosion_times_ = meta->explosion_times();
|
||||
if (context_ability && context_ability->GetAttrAbs(kHAT_WeaponExplosionContinueTime) > 0.001f) {
|
||||
total_explosion_times_ += context_ability->GetAttrAbs(kHAT_WeaponExplosionContinueTime) * 1000 /
|
||||
if (context_ability && context_ability->GetAttrAbs(kHVAT_WeaponExplosionContinueTime) > 0.001f) {
|
||||
total_explosion_times_ += context_ability->GetAttrAbs(kHVAT_WeaponExplosionContinueTime) * 1000 /
|
||||
meta->explosion_interval();
|
||||
}
|
||||
room->xtimer.SetTimeoutEx
|
||||
|
@ -336,10 +336,10 @@ void InternalShot(Creature* c,
|
||||
}
|
||||
int weapon_buff_id = 0;
|
||||
#if 1
|
||||
if (c->GetAbility()->GetAttrAddition(kHAT_ShotRange) > 0.00001f) {
|
||||
if (c->GetAbility()->GetAttrAddition(kHVAT_ShotRange) > 0.00001f) {
|
||||
if (fly_distance > 0.00001f) {
|
||||
} else {
|
||||
fly_distance = weapon_meta->range() * (1 + c->GetAbility()->GetAttrAddition(kHAT_ShotRange));
|
||||
fly_distance = weapon_meta->range() * (1 + c->GetAbility()->GetAttrAddition(kHVAT_ShotRange));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user