Skip to content

Commit

Permalink
fix: 🐛 wormhole keep killing
Browse files Browse the repository at this point in the history
  • Loading branch information
panxuc committed May 21, 2024
1 parent 64ed675 commit 37ba976
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion logic/Gaming/AttackManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ private void BombObj(Bullet bullet, GameObj objBeingShot)
}
break;
case GameObjType.Wormhole:
var previousHP = ((WormholeCell)objBeingShot).Wormhole.HP;
((WormholeCell)objBeingShot).Wormhole.BeAttacked(bullet);
if (((WormholeCell)objBeingShot).Wormhole.HP < GameData.WormholeHP / 2)
if (previousHP >= GameData.WormholeHP / 2 && ((WormholeCell)objBeingShot).Wormhole.HP < GameData.WormholeHP / 2)
{
var shipList = gameMap.ShipInTheList(((WormholeCell)objBeingShot).Wormhole.Cells);
if (shipList != null)
Expand Down

0 comments on commit 37ba976

Please sign in to comment.