public void ApplyStatModifiers(CatStats adventureStatGain) { Stats.Hunger = (Stats.Hunger + adventureStatGain.Hunger).Clamp(0, HungerCap); Stats.Thirst = (Stats.Thirst + adventureStatGain.Thirst).Clamp(0, ThirstCap); Stats.Kind = (Stats.Kind + adventureStatGain.Kind).Clamp(0, int.MaxValue); Stats.Lazy = (Stats.Lazy + adventureStatGain.Lazy).Clamp(0, int.MaxValue); Stats.Resourceful = (Stats.Resourceful + adventureStatGain.Resourceful).Clamp(0, int.MaxValue); Stats.Outgoing = (Stats.Outgoing + adventureStatGain.Outgoing).Clamp(0, int.MaxValue); Stats.High = (Stats.High + adventureStatGain.High).Clamp(0, int.MaxValue); }
public Cat(long ownerId, string name, Gender gender) : this() { OwnerId = ownerId; Name = name; Gender = gender; DateOfBirth = DateTimeOffset.UtcNow; Stats = new CatStats() { Hunger = HungerCap / 2, Thirst = ThirstCap / 2 }; }
public AdventureExploreNeighbourhood() : base(AdventureRef.ExploreNeighbourhood, "Explore neighbourhood", "Explore neighbourhood description", TimeSpan.FromMinutes(10)) { DropPool.Add(new DropPoolItem(ItemRef.Credit, 10, 15)); DropPool.Add(new DropPoolItem(ItemRef.Water, 1, 25)); DropPool.Add(new DropPoolItem(ItemRef.Milk, 1, 10)); DropPool.Add(new DropPoolItem(ItemRef.Tuna, 1, 25)); DropPool.Add(new DropPoolItem(ItemRef.Goldfish, 1, 1)); StatGain = new CatStats { Hunger = -2000, Thirst = -1000, Kind = 0, Lazy = -2, Resourceful = 2, Outgoing = 5, High = -10 }; }