// parses input and adds to the players cult track public void AddToCult(int track) { CultIncome ci = null; switch (track) { case 0: ci = new CultIncome(1, 0, 0, 0); break; case 1: ci = new CultIncome(0, 1, 0, 0); break; case 2: ci = new CultIncome(0, 0, 1, 0); break; case 3: ci = new CultIncome(0, 0, 0, 1); break; } controller.AddCultIncome(ci); controller.AddSingleIncome(new SingleIncome(0, 0, -1, 0, 0)); controller.EndTurn(); //Then unpair the 4 cult buttons and send it off cults.transform.SetParent(offScreenTransform.transform); cults.GetComponent <RectTransform>().anchoredPosition = new Vector2(0, 0); }
public void AddCultIncome(CultIncome ci_) { if (ci_ != null) { localPlayer.AddSingleIncome(new SingleIncome(0, 0, 0, cultController.AddToTrackLevel(ci_, localPlayer), 0)); //Add to the cult track and then add any owed magic to player } }
//Cults public bool AddToTrackLevel(CultIncome income, int[] max) { bool temp = cd.Add_To_Track_Level(income, max); ui.UpdatePlayerCultText(cd); publicPlayerAttributes.CmdSetCultStandings(cd.GetLevels()); return(temp); }
public int AddToTrackLevel(CultIncome income, Player pl) { if (pl.AddToTrackLevel(income, max)) { //Rework the max for (int i = 0; i < pl.GetCultData().GetLevels().Length; i++) { if (pl.GetCultData().GetLevels()[i] == 10) { max[i] = 9; } } } return(pl.Get_Owed_CultMagic()); }
//Returns true if 10 is reached public bool Add_To_Track_Level(CultIncome income, int[] max) { int temp_value; //Just for comparing before/after for (int i = 0; i < 4; i++) { temp_value = levels[i]; levels[i] += income.GetIncome()[i]; Check_magic_owed(temp_value, levels[i]); //if the cult level passes a certain point then the player recieves magic; } //Make everything the max for (int i = 0; i < levels.Length; i++) { if (levels[i] > max[i]) { levels[i] = max[i]; } } //Check the max if (levels[0] >= 10 && max[0] == 10) { return(true); } if (levels[0] >= 10 && max[0] == 10) { return(true); } if (levels[0] >= 10 && max[0] == 10) { return(true); } if (levels[0] >= 10 && max[0] == 10) { return(true); } return(false); }
public RoundEndBonus(PointBonus pb, CultIncome ci, SingleIncome si) { RoundEndPointBonus = pb; cultCostPer = ci; cultPerBonus = si; }
/**For town tiles */ public FavourBonus(SingleIncome i_, int points_, CultIncome ci_) { income = i_; Points = points_; cult_income = ci_; }
/**For favour tiles */ public FavourBonus(SingleIncome i_, PointBonus pb_, CultIncome ci_) { income = i_; pointBonus = pb_; cult_income = ci_; }