Skip to content

Commit

Permalink
Merge pull request #329 from Panxuc/dev
Browse files Browse the repository at this point in the history
fix: 🐛 Home add money after destroyed
  • Loading branch information
asdawej authored May 8, 2024
2 parents 282617b + 65cb19f commit 7940efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logic/GameClass/GameObj/Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Base : IPlayer
public Home Home { get; set; }
public MoneyPool MoneyPool { get; } = new();
public AtomicInt FactoryNum { get; } = new(0);
public int MoneyAddPerSecond => GameData.ScoreHomePerSecond + FactoryNum * GameData.ScoreFactoryPerSecond;
public int MoneyAddPerSecond => FactoryNum * GameData.ScoreFactoryPerSecond + (Home.HP > 0 ? GameData.ScoreHomePerSecond : 0);
public Base(Home home)
{
TeamID = new(home.TeamID);
Expand Down

0 comments on commit 7940efa

Please sign in to comment.