private void HandleCosts(RessourceCosts costs, float tokens) { if (tokens > 0) { Wood.DecreaseWoodBy(costs.AmountOfWood); Fur.DecreaseBy(costs.AmountOfLeather); if (FoodStorage.Food < costs.AmountOfFood) { int foodCost = costs.AmountOfFood - FoodStorage.Food; foodUsed = FoodStorage.Food; FoodStorage.DecreaseFoodBy(FoodStorage.Food); permanentFoodUsed = foodCost; FoodStorage.DecreasePermantFoodBy(foodCost); } else { foodUsed = costs.AmountOfFood; FoodStorage.DecreaseFoodBy(foodUsed); } } else if (tokens == 0) { Wood.IncreaseWoodBy(costs.AmountOfWood); Fur.IncreaseBy(costs.AmountOfLeather); FoodStorage.IncreaseFoodBy(foodUsed); FoodStorage.IncreasePermantFoodBy(permanentFoodUsed); } }
public bool Carve(Mobile from, Item item) { if (!GatheredFur) { var fur = new Fur(FurType, Fur); if (from.Backpack == null || !from.Backpack.TryDropItem(from, fur, false)) { from.SendLocalizedMessage(1112359); // You would not be able to place the gathered kepetch fur in your backpack! fur.Delete(); } else { from.SendLocalizedMessage(1112360); // You place the gathered kepetch fur into your backpack. GatheredFur = true; return(true); } } else { PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1112358, from.NetState); // The Kepetch nimbly escapes your attempts to shear its mane. } return(false); }
public bool Carve(Mobile from, Item item) { if (!GatheredFur) { var fur = new Fur(FurType, Fur); if (from.Backpack == null || !from.Backpack.TryDropItem(from, fur, false)) { from.SendLocalizedMessage(1112352); // You would not be able to place the gathered boura fur in your backpack! fur.Delete(); } else { from.SendLocalizedMessage(1112353); // You place the gathered boura fur into your backpack. GatheredFur = true; return(true); } } else { PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1112354, from.NetState); // The boura glares at you and will not let you shear its fur. } return(false); }
public Rabbit(Eyes eyes, Fur fur, Gender gender, DateTime birthDate) { Eyes = eyes; Fur = fur; Gender = gender; this.birthDate = birthDate; }
public Hunt_RO(Hunt h, TrueScore t) { this.DataContext = Main.lang; InitializeComponent(); this.Top = Properties.Settings.Default.Hunt_ROWindowTop; this.Left = Properties.Settings.Default.Hunt_ROWindowLeft; lbl_map.Content = Map.GetNameFromID(h.mapId); cb_Animal.Content = Species.GetNameFromID(h.speciesID); cb_Sex.Content = Sex.GetNameFromID(h.sexID); txt_Weight.Text = h.weight.ToString(); cb_Fur.Content = Fur.GetNameFromID(h.furID); txt_Distance.Text = h.distance.ToString(); cb_Difficulty.Content = Difficulty.GetNameFromID(h.difficultyID); cb_TrophyKind.Content = TrophyKind.GetNameFromID(h.trophyKindID); cb_TrophyOrgan.Content = TrophyOrgane.GetNameFromID(h.trophyOrganeID); cb_Trophy.Content = Trophy.GetNameFromID(h.trophyID); txt_Score.Text = h.trophyScore.ToString(); txt_XP.Text = h.ep.ToString(); txt_Money.Text = h.money.ToString(); txt_SessionPt.Text = h.sessionPt.ToString(); txt_trueA.Text = t.trueA.ToString(); txt_trueB.Text = t.trueB.ToString(); txt_trueC.Text = t.trueC.ToString(); txt_trueD.Text = t.trueD.ToString(); txt_trueE.Text = t.trueE.ToString(); txt_trueF.Text = t.trueF.ToString(); txtBl_Note.Text = h.note; List <ControlHitList> list = h.GetControlHitList(); foreach (ControlHitList hC in list) { sp_Hits.Children.Add(hC); } }
public Rabbit(Eyes eyes, Fur fur, Gender gender, DateTime birthDay, Owner owner) { this.eyes = eyes; this.fur = fur; this.gender = gender; this.birthDay = birthDay; this.owner = owner; }
private void ExecuteFutureThreat() { Wood.DiscardAll(); FoodStorage.DiscardAll(); Fur.DiscardAll(); //TODO: skip production phase during this turn }
public Rabbit(Eyes eyes, Fur fur, Gender gender, DateTime birthDate) { Eyes = eyes; Fur = fur; Gender = gender; BirthDate = birthDate; double diff = (int)((DateTime.Now - birthDate).TotalDays) / 362.25; Console.WriteLine($"The rabbit has {Eyes} eyes,{Fur} fur,is a {Gender} and has {Math.Round(diff)} years old "); }
// Start is called before the first frame update void Start() { //TODO: Initialize all the other stuff Roof.SetStartValue(0); Wall.SetStartState(0); WeaponPower.SetStartValue(0); Fur.SetStartValue(0); Wood.SetStartValue(0); FoodStorage.SetStartValue(0, 0); Moral.SetStartValue(); TerrainStorage.CreateStorageSpace(); InventionStorage.CreateStorageSpace(); }
public static void CreateSystemTables() { Ammunition.CreateTable(); Difficulty.CreateTable(); Fur.CreateTable(); Lang_String.CreateTable(); Sex.CreateTable(); Species.CreateTable(); Trophy.CreateTable(); TrophyKind.CreateTable(); TrophyOrgane.CreateTable(); TrueScore.CreateTable(); Weapon.CreateTable(); Map.CreateTable(); Loadout_Line.CreateTable(); theHunterLog.Database.ObjectClasses.Version.CreateTable(); }
private void cb_Animal_SelectionChanged(object sender, SelectionChangedEventArgs e) { cb_Fur.Items.Clear(); ComboBoxItem cbIA = (ComboBoxItem)cb_Animal.SelectedItem; IEnumerable <Fur> ieF = Fur.GetFromSpeciesId(int.Parse(cbIA.Tag.ToString())); foreach (Fur ob in ieF) { ComboBoxItem cbI = new ComboBoxItem(); cbI.Content = ob.name; cbI.Tag = ob.id; cb_Fur.Items.Add(cbI); if (ob.id == 1) { cb_Fur.SelectedItem = cbI; } } }
private void ExecuteActiveThreat() { FoodStorage.IncreaseFoodBy(2); Fur.IncreaseBy(1); }
private void FillComboBoxesDe() { IEnumerable <Map> ieM = Map.GetAll(); foreach (Map ob in ieM) { ComboBoxItem cbM = new ComboBoxItem(); cbM.Content = ob.name; cbM.Tag = ob.id; cb_map.Items.Add(cbM); } if (lastMapIndex >= -1) { cb_map.SelectedIndex = lastMapIndex; } IEnumerable <Sex> ieS = Sex.GetAll(); foreach (Sex ob in ieS) { ComboBoxItem cbI = new ComboBoxItem(); cbI.Content = ob.name; cbI.Tag = ob.id; cb_Sex.Items.Add(cbI); } IEnumerable <Fur> ieF = Fur.GetAll(); foreach (Fur ob in ieF) { ComboBoxItem cbI = new ComboBoxItem(); cbI.Content = ob.name; cbI.Tag = ob.id; cb_Fur.Items.Add(cbI); if (ob.id == 1) { cb_Fur.SelectedItem = cbI; } } IEnumerable <Difficulty> ieDif = Difficulty.GetAll(); foreach (Difficulty ob in ieDif) { ComboBoxItem cbI = new ComboBoxItem(); cbI.Content = ob.name; cbI.Tag = ob.id; cb_Difficulty.Items.Add(cbI); } IEnumerable <TrophyKind> ieTrK = TrophyKind.GetAll(); foreach (TrophyKind ob in ieTrK) { ComboBoxItem cbI = new ComboBoxItem(); cbI.Content = ob.name; cbI.Tag = ob.id; cb_TrophyKind.Items.Add(cbI); if (ob.id == 1) { cb_TrophyKind.SelectedItem = cbI; } } IEnumerable <TrophyOrgane> ieTrO = TrophyOrgane.GetAll(); foreach (TrophyOrgane ob in ieTrO) { ComboBoxItem cbI = new ComboBoxItem(); cbI.Content = ob.name; cbI.Tag = ob.id; cb_TrophyOrgan.Items.Add(cbI); if (ob.id == 1) { cb_TrophyOrgan.SelectedItem = cbI; } } IEnumerable <Trophy> ieTr = Trophy.GetAll(); foreach (Trophy ob in ieTr) { ComboBoxItem cbI = new ComboBoxItem(); cbI.Content = ob.name; cbI.Tag = ob.id; cb_Trophy.Items.Add(cbI); if (ob.id == 1) { cb_Trophy.SelectedItem = cbI; } } }