37 lines
763 B
C#
37 lines
763 B
C#
|
public record Player
|
||
|
{
|
||
|
public string Name { get; init; }
|
||
|
public nuint Strength { get; init; }
|
||
|
public nuint Perception { get; init; }
|
||
|
public nuint Endurance { get; init; }
|
||
|
public nuint Charisma { get; init; }
|
||
|
public nuint Intelligence { get; init; }
|
||
|
public nuint Agility { get; init; }
|
||
|
public nuint Luck { get; init; }
|
||
|
|
||
|
// public Person(string Name, nuint Strength, nuint Perception, nuint Endurance, nuint Charisma, nuint Intelligence, nuint Agility, nuint Luck, )
|
||
|
// {
|
||
|
// Name
|
||
|
//}
|
||
|
|
||
|
public bool isValid()
|
||
|
{
|
||
|
return StatSum() <= 35;
|
||
|
}
|
||
|
|
||
|
public nint StatSum()
|
||
|
{
|
||
|
nuint sum = 0;
|
||
|
|
||
|
sum += Strength;
|
||
|
sum += Perception;
|
||
|
sum += Endurance;
|
||
|
sum += Charisma;
|
||
|
sum += Intelligence;
|
||
|
sum += Agility;
|
||
|
sum += Luck;
|
||
|
|
||
|
return (nint) sum;
|
||
|
}
|
||
|
}
|