Skip to content

Commit

Permalink
Merge pull request #400 from eesast/dev
Browse files Browse the repository at this point in the history
v1.2.4
  • Loading branch information
hhzzff authored May 24, 2024
2 parents 0923161 + 3e201cf commit 724ac37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions logic/GameClass/GameObj/Areas/Construction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,17 @@ public bool Construct(int constructSpeed, ConstructionType constructionType, Shi
}
public bool BeAttacked(Bullet bullet)
{
var previousActivated = IsActivated.Get();
if (bullet!.Parent!.TeamID != TeamID)
{
long subHP = bullet.AP;
HP.SubPositiveV(subHP);
}
if (HP == 0)
if (HP.IsBelowMaxTimes(0.5))
{
IsActivated.Set(false);
}
return HP.IsBelowMaxTimes(0.5);
return HP.IsBelowMaxTimes(0.5) && previousActivated;
}
public void AddConstructNum(int add = 1)
{
Expand Down

0 comments on commit 724ac37

Please sign in to comment.