This commit is contained in:
2026-07-09 21:33:33 +02:00
commit 84a2a365f3
2364 changed files with 950134 additions and 0 deletions
@@ -0,0 +1,45 @@
using System;
using Sirenix.OdinInspector;
using VOID.Generic.Dict;
namespace VOID.Generic.Objects.Unit.Data
{
[Serializable]
public record MainAttributes
{
[MinValue(1f)] public int strength = 5;
[MinValue(1f)] public int dexterity = 5;
[MinValue(1f)] public int intelligence = 5;
[MinValue(1f)] public int constitution = 5;
[MinValue(1f)] public int speed = 5;
[MinValue(1f)] public int perception = 5;
public int Get(MainAttributeType type)
{
return type switch
{
MainAttributeType.Strength => strength,
MainAttributeType.Dexterity => dexterity,
MainAttributeType.Intelligence => intelligence,
MainAttributeType.Constitution => constitution,
MainAttributeType.Speed => speed,
MainAttributeType.Perception => perception,
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
};
}
public void Set(MainAttributeType type, int value)
{
switch(type)
{
case MainAttributeType.Strength: strength = value; return;
case MainAttributeType.Dexterity: dexterity = value; return;
case MainAttributeType.Intelligence: intelligence = value; return;
case MainAttributeType.Constitution: constitution = value; return;
case MainAttributeType.Speed: speed = value; return;
case MainAttributeType.Perception: perception = value; return;
default: throw new ArgumentOutOfRangeException(nameof(type), type, null);
};
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 86c039ddbb434e77998688732f100389
timeCreated: 1693753877
@@ -0,0 +1,60 @@
using System;
using Sirenix.OdinInspector;
using VOID.Generic.Dict;
namespace VOID.Generic.Objects.Unit.Data
{
[Serializable]
public record SubAttributes
{
[MinValue(1f)] public int damageMin = 1;
[MinValue(1f)] public int damageMax = 1;
[MinValue(0f)] public float criticalDamageChance = 0f;
[MinValue(0f)] public float criticalDamageMultiplier = 2f;
public float accuracy = 0.6f;
public float dodge = 0.05f;
[MinValue(0f)] public float carryCapacity = 50f;
[MinValue(0f)] public float sight = 0f;
[MinValue(0f)] public float hear = 0f;
[MinValue(0f)] public float move = 0f;
public float initiative = 0f;
public float Get(SubAttributeType type)
{
return type switch
{
SubAttributeType.DamageMin => damageMin,
SubAttributeType.DamageMax => damageMax,
SubAttributeType.CriticalDamageChance => criticalDamageChance,
SubAttributeType.CriticalDamageMultiplier => criticalDamageMultiplier,
SubAttributeType.Accuracy => accuracy,
SubAttributeType.Dodge => dodge,
SubAttributeType.CarryCapacity => carryCapacity,
SubAttributeType.Sight => sight,
SubAttributeType.Hear => hear,
SubAttributeType.Move => move,
SubAttributeType.Initiative => initiative,
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
};
}
public void Set(SubAttributeType type, float value)
{
switch(type)
{
case SubAttributeType.DamageMin: damageMin = (int)value; return;
case SubAttributeType.DamageMax: damageMax = (int)value; return;
case SubAttributeType.CriticalDamageChance: criticalDamageChance = value; return;
case SubAttributeType.CriticalDamageMultiplier: criticalDamageMultiplier = value; return;
case SubAttributeType.Accuracy: accuracy = value; return;
case SubAttributeType.Dodge: dodge = value; return;
case SubAttributeType.CarryCapacity: carryCapacity = value; return;
case SubAttributeType.Sight: sight = value; return;
case SubAttributeType.Hear: hear = value; return;
case SubAttributeType.Move: move = value; return;
case SubAttributeType.Initiative: initiative = value; return;
default: throw new ArgumentOutOfRangeException(nameof(type), type, null);
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a04b60a1cc1845c185ea523f11bfa8ed
timeCreated: 1693754300
@@ -0,0 +1,33 @@
using System;
using Sirenix.OdinInspector;
using VOID.Generic.Dict;
namespace VOID.Generic.Objects.Unit.Data
{
[Serializable]
public record UnitResources
{
[MinValue(0f)] public float actionPoints = 2f;
[MinValue(0f)] public float movePoints = 0f;
public float Get(UnitResourceType type)
{
return type switch
{
UnitResourceType.ActionPoints => actionPoints,
UnitResourceType.MovePoints => movePoints,
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
};
}
public void Set(UnitResourceType type, float value)
{
switch(type)
{
case UnitResourceType.ActionPoints: actionPoints = value; return;
case UnitResourceType.MovePoints: movePoints = value; return;
default: throw new ArgumentOutOfRangeException(nameof(type), type, null);
};
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f8c212010f644721acbb0178154616e6
timeCreated: 1693747302