1
This commit is contained in:
parent
02bf5a8e28
commit
f2cb511bcd
@ -1272,18 +1272,20 @@ void Creature::UpdatePoisoning()
|
|||||||
} else {
|
} else {
|
||||||
dmg = std::max(1.0f, dmg);
|
dmg = std::max(1.0f, dmg);
|
||||||
}
|
}
|
||||||
float dmg_out = 0.0f;
|
if (!GetCar()) {
|
||||||
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
float dmg_out = 0.0f;
|
||||||
VP_Gas,
|
DecHP(dmg, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas,
|
||||||
TEXT("battle_server_killer_gas", "毒圈"),
|
VP_Gas,
|
||||||
dmg_out);
|
TEXT("battle_server_killer_gas", "毒圈"),
|
||||||
if (IsPlayer()) {
|
dmg_out);
|
||||||
int eliminate_time = std::min(30.0f, GetHP() / std::max(1.0f, dmg_out));
|
if (IsPlayer()) {
|
||||||
room->frame_event.AddPropChg(GetWeakPtrRef(),
|
int eliminate_time = std::min(30.0f, GetHP() / std::max(1.0f, dmg_out));
|
||||||
kPropEliminateTime,
|
room->frame_event.AddPropChg(GetWeakPtrRef(),
|
||||||
0,
|
kPropEliminateTime,
|
||||||
eliminate_time,
|
0,
|
||||||
true);
|
eliminate_time,
|
||||||
|
true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (dead) {
|
if (dead) {
|
||||||
poisoning_time = 0;
|
poisoning_time = 0;
|
||||||
|
@ -365,6 +365,7 @@ class Creature : public MoveableEntity
|
|||||||
void OnLand();
|
void OnLand();
|
||||||
std::shared_ptr<Compose> GetCompose() { return compose_; }
|
std::shared_ptr<Compose> GetCompose() { return compose_; }
|
||||||
void ClearGemStoneBuffs();
|
void ClearGemStoneBuffs();
|
||||||
|
virtual Car* GetCar() { return nullptr; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnBuffRemove(Buff& buff);
|
virtual void OnBuffRemove(Buff& buff);
|
||||||
|
@ -238,7 +238,7 @@ class Human : public Creature
|
|||||||
void OnEnable();
|
void OnEnable();
|
||||||
void OnDisable();
|
void OnDisable();
|
||||||
virtual void UpdateMove() override;
|
virtual void UpdateMove() override;
|
||||||
Car* GetCar() { return car_; }
|
virtual Car* GetCar() override { return car_; }
|
||||||
void SetCar(Car* car) { car_ = car; }
|
void SetCar(Car* car) { car_ = car; }
|
||||||
int GetSeat() { return seat_; }
|
int GetSeat() { return seat_; }
|
||||||
void SetSeat(int seat) { seat_ = seat; }
|
void SetSeat(int seat) { seat_ = seat; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user