public void InvokeAction(byte actionID, Vector2Int actionToPos, int newID = -1) { int manaCost = 0; if (actionID == 0) { manaCost = GeneralManager.MANA_COST_0; } else if (actionID == 1) { GeneralManager.GamePiece myPiece = GeneralManager.gameBoard.GetPieceAtPosition(curSelected); if (myPiece.piece == GeneralManager.GamePieceEnum.Pawn) { manaCost = GeneralManager.MANA_COST_1_0; } else { manaCost = GeneralManager.MANA_COST_1_1; } } else if (actionID == 2) { if (newID == 1) { manaCost = GeneralManager.MANA_COST_2_1; } else if (newID == 2) { manaCost = GeneralManager.MANA_COST_2_2; } else if (newID == 3) { manaCost = GeneralManager.MANA_COST_2_3; } else if (newID == 4) { manaCost = GeneralManager.MANA_COST_2_4; } } else if (actionID == 3) { manaCost = GeneralManager.MANA_COST_3; } else if (actionID == 4) { manaCost = GeneralManager.MANA_COST_4; } else if (actionID == 5) { manaCost = GeneralManager.MANA_COST_5; } if (manaCost <= currentMana) { ClientAction newAction = new ClientAction(); newAction.actionIndex = actionID; newAction.actionFromPos = curSelected; newAction.actionToPos = actionToPos; newAction.newID = (byte)newID; // Temp GeneralManager.ExecuteAction(team, newAction); currentMana -= manaCost; UpdateBoardVisuals(); } }