void BuyGoblinBox() { if (ShowingVillage.Members.Count == 0) { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "No goblins for sale here."); } if (team.Treasure >= 5) { var options = ShowingVillage.Members.Take(4).Select(g => new PlayerChoice.ChoiceOption() { Action = () => PlayerController.BuyGoblin(g, 5, ShowingVillage), Description = g.name + " the " + g.ClassType }).ToList(); options.Add(No); PlayerChoice.SetupPlayerChoice(options.ToArray(), "Buy a Goblin for 5 goblin treasures?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You do not have enough goblin treasure to buy goblins."); } }
void BuyFoodBox() { if (team.Treasure >= 2) { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { BuyFood, No }, "Buy 5 food for 2 Goblin Treasures?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You do not have enough goblin treasure to buy food."); } }
void SacGoblinBox() { //TODO: maybe shuffle first var options = team.Members.Take(4).Select(g => new PlayerChoice.ChoiceOption() { Action = () => PlayerController.SacGoblin(g, Monument), Description = g.name + " the " + g.ClassType }).ToList(); options.Add(No); PlayerChoice.SetupPlayerChoice(options.ToArray(), "Sacrifice a Goblin to the Big stone?"); }
void SellGoblinBox() { //TODO: maybe shuffle first var options = team.Members.Where(g => g != team.Leader).Take(4).Select(g => new PlayerChoice.ChoiceOption() { Action = () => PlayerController.SellGoblin(g, 2, ShowingVillage), Description = g.name + " the " + g.ClassType }).ToList(); options.Add(No); PlayerChoice.SetupPlayerChoice(options.ToArray(), "Sell a Goblin for 2 goblin treasures?"); }
void SacTreasureBox() { if (team.Treasure >= 3) { var options = new List <PlayerChoice.ChoiceOption> { SacTreasureOption, No }; PlayerChoice.SetupPlayerChoice(options.ToArray(), "Sacrifice 3 goblin treasure to Big Stone?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You do not have enough goblin treasure to sacrifice."); } }
private void Heal() { if (team.Treasure >= 2) { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { new PlayerChoice.ChoiceOption() { Action = () => ShowingHut.PayToHeal(2, team), Description = "Ok" }, No }, "Heal goblins for 2 treasure?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You do not have enough treasure to pay the witch."); } }
private void BuyStaff() { var amount = 5; if (team.Treasure >= amount) { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { new PlayerChoice.ChoiceOption() { Action = () => ShowingHut.BuyStaff(amount, team), Description = "Ok" }, No }, "Buy magic stick for 5 treasure?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You do not have enough treasure to buy stick."); } }
void StealTreasureBox() { if (Monument.Treasure <= 0) { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "No treasure to steal."); } else { var options = new List <PlayerChoice.ChoiceOption>() { new PlayerChoice.ChoiceOption() { Action = () => PlayerController.StealTreasure(Monument), Description = "Yes" }, No }; PlayerChoice.SetupPlayerChoice(options.ToArray(), "Steal treasure from Big Stone?"); } }
void SacFoodBox() { if (team.Food >= 1) { var amount = Mathf.Min(team.Food, 5); PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { new PlayerChoice.ChoiceOption() { Action = () => PlayerController.SacFood(amount), Description = "Ok" }, No }, "Sacrifice " + amount.ToString("D") + " food to Big Stone?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You do not have any food to sacrifice."); } }
void LureMonsterBox() { if (team.Food >= 1) { var amount = Mathf.Min(team.Food, 3); PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { new PlayerChoice.ChoiceOption() { Action = () => Cave.LureMonster(team, amount), Description = "Ok" }, No }, "Put " + amount.ToString("D") + " food out to attract monster?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You do not have any food put out."); } }
void SendInGoblinBox() { //TODO: maybe shuffle first if (!Cave.Explored) { var options = team.Members.Where(ge => ge.InArea == Cave.InArea).Take(4).Select(g => new PlayerChoice.ChoiceOption() { Action = () => Cave.SendInGoblin(g), Description = g.name + " the " + g.ClassType }).ToList(); options.Add(No); PlayerChoice.SetupPlayerChoice(options.ToArray(), "Send a Goblin in to the Cave?"); } else { PlayerChoice.SetupPlayerChoice(new PlayerChoice.ChoiceOption[] { OkOption }, "You have already explored the cave."); } }