Skip to content

Commit

Permalink
fix: 🐛 construction miss shield
Browse files Browse the repository at this point in the history
  • Loading branch information
panxuc authored and DreamEnderKing committed May 9, 2024
1 parent a56b1bf commit 0f48ce9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion logic/Gaming/ShipManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ public void BeAttacked(Ship ship, long AP, long teamID)
{
return;
}
if (ship.Armor > 0)
if (ship.Shield > 0)
{
ship.Shield.SubPositiveV(AP);
ShipManagerLogging.logger.ConsoleLogDebug(
LoggingFunctional.ShipLogInfo(ship)
+ $" 's shield is {ship.Shield}");
}
else if (ship.Armor > 0)
{
ship.Armor.SubPositiveV(AP);
ShipManagerLogging.logger.ConsoleLogDebug(
Expand Down

0 comments on commit 0f48ce9

Please sign in to comment.