64 lines
1.6 KiB
C#
64 lines
1.6 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace RacesOfValheim
|
|
{
|
|
public static class AswidProgression
|
|
{
|
|
public enum FormType
|
|
{
|
|
None,
|
|
Bat
|
|
}
|
|
|
|
public class FormRules
|
|
{
|
|
public FormType Form = FormType.None;
|
|
public bool NeedsNight = false;
|
|
}
|
|
|
|
public class AswidRules
|
|
{
|
|
// Add state 0 properties here
|
|
public float BonusHealth = 0f;
|
|
public float BonusStamina = 0f;
|
|
public bool HasSurtlingForm = false;
|
|
public float LifestealPercent = 0f;
|
|
}
|
|
|
|
public static AswidRules GetRules(int state)
|
|
{
|
|
AswidRules rules = new AswidRules();
|
|
rules.LifestealPercent = (state * 2f) / 100f; // 2% per state
|
|
|
|
// State 0 is the base state, no modifiers yet.
|
|
if (state >= 1)
|
|
{
|
|
// Future modifiers
|
|
}
|
|
|
|
if (state >= 8) // Fader
|
|
{
|
|
rules.HasSurtlingForm = true;
|
|
}
|
|
|
|
return rules;
|
|
}
|
|
|
|
public static FormRules GetGKeyRules(int state)
|
|
{
|
|
FormRules rules = new FormRules();
|
|
if (state >= 3)
|
|
{
|
|
rules.Form = FormType.Bat;
|
|
rules.NeedsNight = false; // The Elder: always
|
|
}
|
|
else if (state >= 2)
|
|
{
|
|
rules.Form = FormType.Bat;
|
|
rules.NeedsNight = true; // Eikthyr: night only
|
|
}
|
|
return rules.Form != FormType.None ? rules : null;
|
|
}
|
|
}
|
|
}
|