// claims the land once called - removes defender and places attacker
    // NOTE: do not change order of commands below
    public void ClaimLand(GameObject attackingCountry, GameObject defendingCountry)
    {
        victoryCry.Play();
        controlTaken = true;
        defendingCountry.gameObject.tag = "SelectedCountry";
        addSoldier = defendingCountry.GetComponent <AddSoldier> ();

        // Adds a new soldier to defending country (attacker colour)
        addSoldier.PlaceSoldier();
        // causes a troop to be added to defender and removed from attacker in UpdateTroopCounter;
        countryManagement.ChangeArmySize(defendingCountry, 1);
        // Removes a soldier from attacker (moved to defender land - now claimed)
        armyManagement.RemoveDead("AttackingCountry", 1);
        // default transfers all attackers over to claimed land
        soldierTransfer.DefaultTransfer(attackingCountry, defendingCountry);
        // update the number of territories dictionary
        territoryCount.UpdateTerritoryBank(attackingCountry, defendingCountry);
        // update continent bonus
        continentBonus.UpdateContBonus();

        // set button colours
        buttonColour.BattleBattleColour(attackingCountry, defendingCountry);
        buttonColour.BattleAttackColour(false);
        buttonColour.BattlePlusMinusColour(false);

        // update instructions
        gameInstructions.BattleClaim(defendingCountry);
    }
Exemple #2
0
 // Set up all the game statistics lists
 public void SetUpGameStats(int numberOfPlayers)
 {
     //BuildGameStats ();
     // set up number of territories list
     territoryCount.BuildTerritoryBank(numberOfPlayers);
     // set up number of troops list
     troopCount.BuildTroopBank(numberOfPlayers);
     // set up territory bonus list
     territoryBonus.BuildTerritoryBonus(numberOfPlayers);
     // set up continent bonus list
     continentBonus.BuildContBonus(numberOfPlayers);
     //Do i need this line of code?
     continentBonus.UpdateContBonus();
     // set up soldier bonus list
     soldierBonus.UpdateSoldierBonus(numberOfPlayers);
     // build rank table
     playerRank.BuildRankTable(boardSetUp.numberOfPlayers);
 }
Exemple #3
0
 void UpdateStats()
 {
     // calculate bonus from continent bonus
     continentBonus.UpdateContBonus();
     // give player bonus soldiers
     deploySoldiers.BonusStore();
     // displays the players turn, game turn numbers & game instructions
     displayTurn.UpdateTurnText(CurrentPlayer(), turn);
     gameInstructions.PlaceTroops();
     // prevents player adding multiple players during openingPhase
     if (phases.openingPhase)
     {
         allocateSoldiers.dropCounter = turn;
     }
     // update rank display before player 1's turn - 3 rotations brings it back to original category
     if (!phases.openingPhase & CurrentPlayer() == 1)
     {
         for (int i = 0; i < 3; i++)
         {
             changeCategory.RotateCategory();
         }
     }
 }