DoSomething() Update

This commit is contained in:
aqys
2026-03-26 08:50:00 +01:00
parent 5568cbc194
commit 210f55e8bc

View File

@@ -1,3 +1,5 @@
using PeopleVille.Equipment;
namespace PeopleVille.Persons namespace PeopleVille.Persons
{ {
public class AdultCitizen : Person public class AdultCitizen : Person
@@ -11,7 +13,38 @@ namespace PeopleVille.Persons
public void DoSomething() public void DoSomething()
{ {
// 50/50 om vi gør noget eller ej
if (RNG.ThrowDice(Dices.D2) == 1)
return;
bool hasGun = Inventory.OfType<Gun>().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()
{
//
} }
} }
} }