Skip to content

Commit

Permalink
modified SetBloonStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
gurrenm3 committed Nov 29, 2020
1 parent a9c557f commit bd725eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Gurren-Core.Lib/BTD6/_BloonModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@ public static BloonModel SetBloonStatus(string bloonId, [Optional] bool setCamo,
string regrowText = "";
string bloonBase = bloonId.Replace("Camo", "").Replace("Fortified", "").Replace("Regrow", "");

if (setCamo || (bloonId.Contains("Camo")))
if (setCamo)
{
if (Game.instance.GetBloonModel(bloonBase + "Camo") != null)
camoText = "Camo";
}
if (setFortified || (bloonId.Contains("Fortified")))
if (setFortified)
{
if (Game.instance.GetBloonModel(bloonBase + "Fortified") != null)
fortifiedText = "Fortified";
}
if (setRegrow || (bloonId.Contains("Regrow")))
if (setRegrow)
{
if (Game.instance.GetBloonModel(bloonBase + "Regrow") != null)
regrowText = "Regrow";
}

string newBloonID = bloonBase + regrowText + fortifiedText + camoText;
var newBloon = Game.instance.GetBloonModel(newBloonID);

return newBloon;
}

Expand Down

0 comments on commit bd725eb

Please sign in to comment.