From 210f55e8bc2d04d03de5ac6e41d8252ab657304a Mon Sep 17 00:00:00 2001 From: aqys Date: Thu, 26 Mar 2026 08:50:00 +0100 Subject: [PATCH] DoSomething() Update --- PeopleVille/Person/AdultCitizen.cs | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/PeopleVille/Person/AdultCitizen.cs b/PeopleVille/Person/AdultCitizen.cs index 3332ab8..73388b8 100644 --- a/PeopleVille/Person/AdultCitizen.cs +++ b/PeopleVille/Person/AdultCitizen.cs @@ -1,3 +1,5 @@ +using PeopleVille.Equipment; + namespace PeopleVille.Persons { public class AdultCitizen : Person @@ -11,7 +13,38 @@ namespace PeopleVille.Persons public void DoSomething() { + // 50/50 om vi gør noget eller ej + if (RNG.ThrowDice(Dices.D2) == 1) + return; + bool hasGun = Inventory.OfType().Any(); + bool hasUnder100 = Health < 100; + + if (hasGun && hasUnder100) + { + if (RNG.ThrowDice(Dices.D2) == 1) + ShootRandomPerson(); + else + EatFood(); + } + else if (hasGun) + { + ShootRandomPerson(); + } + else if (hasUnder100) + { + EatFood(); + } + } + + private void ShootRandomPerson() + { + // + } + + private void EatFood() + { + // } } } \ No newline at end of file