void PackageActionsForBoard() { FindNPCInputs(); // Figure out how to set appropriate cards based on inputs here GS = GameState.GS_SIMULATING; // print("INPUT: Inputs accepted! Starting sim..."); // Find the Card Manager, get associated cards with our indexes GBCommands = new GameboardCommand[NPCCurrentChoices.Length + 2]; // # of NPC's plus 2 players GBCommands[0] = new GameboardCommand(P1Character, CManager.GetCardFromCurrentPool(P1CurrentChoice)); GBCommands[1] = new GameboardCommand(P2Character, CManager.GetCardFromCurrentPool(P2CurrentChoice)); for (int i = 2; i < GBCommands.Length; i++) { GBCommands[i] = new GameboardCommand(NPCCharacters[i - 2], CManager.GetCardFromCurrentPool(NPCCurrentChoices[i - 2])); } BoardActionCycle = 0; BoardUpdateTime = BOARDUPDATECYCLE; }
// ONLY execute move if true, ONLY execute action if true // NOTE: ZACKM - THIS IS HORRENDOUS CODE. OH MY GOODNESS GRACIOUS! void ExecuteGBCommand(GameboardCommand GBCom, int CurrCycle, bool bExecuteMove, bool bExecuteAction) { CardCommand CommandToExecute = GBCom.GetCard().GetCommands()[CurrCycle]; switch (CommandToExecute) { case CardCommand.CC_MoveLeft: if (bExecuteMove) { // Debug.Log(GBCom.GetCharacter().tag + " moved left"); GBController.MoveCharacter(GBCom.GetCharacter(), TileClass.WEST); } break; case CardCommand.CC_MoveRight: if (bExecuteMove) { // Debug.Log(GBCom.GetCharacter().tag + " moved right"); GBController.MoveCharacter(GBCom.GetCharacter(), TileClass.EAST); } break; case CardCommand.CC_MoveUp: if (bExecuteMove) { // Debug.Log(GBCom.GetCharacter().tag + " moved up"); GBController.MoveCharacter(GBCom.GetCharacter(), TileClass.NORTH); } break; case CardCommand.CC_MoveDown: if (bExecuteMove) { // Debug.Log(GBCom.GetCharacter().tag + " moved down"); GBController.MoveCharacter(GBCom.GetCharacter(), TileClass.SOUTH); } break; case CardCommand.CC_AttackAdj: if (bExecuteAction) { // Debug.Log(GBCom.GetCharacter().tag + " attacked adjacently"); GBController.CharacterSwipe(GBCom.GetCharacter()); } break; case CardCommand.CC_ShootLeft: if (bExecuteAction) { // Debug.Log(GBCom.GetCharacter().tag + " shot to the left"); GBController.CharacterShoot(GBCom.GetCharacter(), TileClass.WEST); } break; case CardCommand.CC_ShootRight: if (bExecuteAction) { // Debug.Log(GBCom.GetCharacter().tag + " shot to the right"); GBController.CharacterShoot(GBCom.GetCharacter(), TileClass.EAST); } break; case CardCommand.CC_ShootUp: if (bExecuteAction) { // Debug.Log(GBCom.GetCharacter().tag + " shot up"); GBController.CharacterShoot(GBCom.GetCharacter(), TileClass.NORTH); } break; case CardCommand.CC_ShootDown: if (bExecuteAction) { // Debug.Log(GBCom.GetCharacter().tag + " shot down"); GBController.CharacterShoot(GBCom.GetCharacter(), TileClass.SOUTH); } break; case CardCommand.CC_HoldPosition: if (bExecuteMove) { // Debug.Log(GBCom.GetCharacter().tag + " did not move"); } break; } }