//Check if stored name matches name from line. If neq, minion has been transformed -> save the new minion instead public void checkIfNameMatches(string[] nameandid) { string id = nameandid[1]; string newName = nameandid[0]; DrawableCard c = minions[id]; if (c.getName().Equals("UnknownCard")) { return; } string oldName = c.getName(); if (!oldName.Equals(newName)) { int temp = c.BoardPosition; minions[id] = DrawableCard.makeDrawable(CardCreatorFactory.createFromName(newName).setId(int.Parse(id))); minions[id].BoardPosition = temp; if (board.p1Board.Contains(c)) { board.p1Board.Remove(c); board.p1Board.Add(minions[id]); } Console.WriteLine("Minion changed: " + oldName + " to " + minions[id].getReadableName()); } }
public override void addNewMinionToBoard(BoardSide current, Card c, int position, bool overAllow) { DrawableCard d = DrawableCard.makeDrawable(c); switch (d.getName()) { case "Guard Bot": d.pictureID = "BOT_218t"; break; case "Rat": d.pictureID = "CFM_316t"; break; case "Hyena": d.pictureID = "ULD_154t"; break; case "Microbot": d.pictureID = "BOT_312t"; break; case "Spider": d.pictureID = "OG_216a"; break; case "Voidwalker": d.pictureID = "CS2_065"; break; case "Robosaur": d.pictureID = "BOT_537t"; break; case "Imp": d.pictureID = "TB_BaconUps_030t"; break; case "Finkle Einhorn": d.pictureID = "EX1_finkle"; break; case "Big Bad Wolf": d.pictureID = "KAR_005a"; break; case "Ironhide Runt": d.pictureID = "TRL_232t"; break; case "Damaged Golem": d.pictureID = "skele21"; break; case "Bronze Warden": d.pictureID = "BGS_034"; break; case "Jo-E Bot": d.pictureID = "BOT_445t"; break; default: d.pictureID = "CFM_316t"; break; } base.addNewMinionToBoard(current, d, position, overAllow); }