public override bool CanBeBought(int shopPos, GameHandler gameHandler, ulong curPlayer, ulong enemy) { if (gameHandler.players[curPlayer].buyHistory.Last().Count == 0) { return(base.CanBeBought(shopPos, gameHandler, curPlayer, enemy)); } if (gameHandler.players[curPlayer].buyHistory.Last().Last().name == "Morphing Nanoswarm" || gameHandler.players[curPlayer].buyHistory.Last().Last().name == this.name) { return(base.CanBeBought(shopPos, gameHandler, curPlayer, enemy)); } Upgrade u = gameHandler.players[curPlayer].buyHistory.Last().Last(); return(u.CanBeBought(shopPos, gameHandler, curPlayer, enemy)); }