public int _bst => baseHp + baseMp + baseAtk + baseDef + baseSpd + baseLck; // DEBUG ONLY public int GetStat(StatID stat, int lv) { switch (stat) { case StatID.ExperienceReward: return(Mathf.RoundToInt(0.06f * baseExpReward * lv + 3)); case StatID.MoneyReward: return(Mathf.RoundToInt(0.045f * baseMoneyReward * lv + 3)); case StatID.Health: return(Mathf.RoundToInt(0.17f * baseHp * lv + 40)); case StatID.Magic: return(Mathf.RoundToInt(0.05f * baseMp * lv + 40)); case StatID.Attack: return(Mathf.RoundToInt(0.03f * baseAtk * lv + 5)); case StatID.Defence: return(Mathf.RoundToInt(0.03f * baseDef * lv + 5)); case StatID.Speed: return(Mathf.RoundToInt(0.03f * baseSpd * lv + 5)); case StatID.Luck: return(Mathf.RoundToInt(0.03f * baseLck * lv + 5)); default: return(1); } }
public virtual void DegenerateOn(StatID ID) { GetStat(ID); if (PinnedStat != null) { PinnedStat.Degenerate = true; } }
public virtual void DegenerateOff(StatID ID) { GetStat(ID); if (PinnedStat != null) { PinnedStat.Degenerate = false; } }
public virtual void _DisableStat(StatID iD) { PinnedStat = GetStat(iD); if (PinnedStat != null) { PinnedStat.Active = false; } }
public virtual void _EnableStat(StatID iD) { PinnedStat = GetStat(iD); if (PinnedStat != null) { PinnedStat.Active = true; } }
public StatValues GetStat(StatID id) { //Cycle through each stat and see if it matches the passed inID foreach (StatValues stat in _stats) { if (stat._id == id) { return(stat); } } //Return a none stat if no stat is found return(new StatValues(StatID.NONE, 0.0f)); }
public static string StatIDToString(StatID id) { switch (id) { case StatID.B_AtBats: return("At Bats"); case StatID.B_Runs: return("Runs"); case StatID.B_Hits: return("Hits"); case StatID.B_Walks: return("Walks"); case StatID.B_HomeRuns: return("Home Runs"); case StatID.B_RunsBattedIn: return("RBIs"); case StatID.B_StolenBases: return("Steals"); case StatID.B_OnBasePercentage: return("OBP"); case StatID.P_OutsRecorded: return("Outs Recorded"); case StatID.P_EarnedRunAverage: return("Earned Run Average"); case StatID.P_WHIP: return("WHIP"); case StatID.P_EarnedRuns: return("Earned Runs"); case StatID.P_WalksAndHits: return("Walks and Hits"); case StatID.P_Strikeouts: return("Strikeouts"); case StatID.P_Wins: return("Wins"); case StatID.P_Losses: return("Losses"); case StatID.P_Saves: return("Saves"); case StatID.P_Holds: return("Holds"); default: return("Unknown"); } }
public StatModifier(StatModifier mod) { ID = mod.ID; modify = mod.modify; Value = new FloatReference(mod.Value.Value); }
public virtual void _PinStat(StatID ID) { GetStat(ID); }
/// <summary>Enable a stat</summary> public virtual void Stat_Enable(StatID iD) => Stat_Get(iD)?.SetActive(true);
public virtual void Stat_Disable(StatID iD) { Stat_Get(iD); PinnedStat?.SetActive(false); }
/// <summary>Find a Stat Using a StatID and Return if the Stat is on the List. Also Saves it to the PinnedStat</summary> public virtual Stat Stat_Get(StatID ID) { return(Stat_Get(ID.ID)); }
public virtual void Stat_ModifyValue(StatID ID, float modifyvalue, StatOption modifyType) { Stat_Get(ID)?.Modify(modifyvalue, modifyType); }
public virtual Stat GetStat(StatID ID) { return(GetStat(ID.ID)); }
public void setStat(StatID stat, int value) { stats[stat] = value; }
public int getStat(StatID stat) => stats[stat];
/// <summary>Enable a stat Degeneration logic</summary> public virtual void DegenerateOn(StatID ID) => Stat_Get(ID)?.SetDegeneration(true);
/// <summary>Disable a stat Degeneration logic</summary> public virtual void DegenerateOff(StatID ID) => Stat_Get(ID)?.SetDegeneration(false);
/// <summary>Disable a stat</summary> public virtual void Stat_Disable(StatID iD) => Stat_Get(iD)?.SetActive(false);
public virtual void Stat_ModifyValue(StatID ID, float modifyvalue) { Stat_Get(ID)?.Modify(modifyvalue); }
public virtual void DegenerateOn(StatID ID) { Stat_Get(ID); PinnedStat?.SetDegeneration(true); }
public virtual void Stats_Update(StatID iD) { Stats_Update(iD.ID); }
/// <summary> /// Constructs a goal using th stat and the given value. /// </summary> /// <param name="stat"></param> /// <param name="count"></param> public ChallengeGoal(StatID stat, Int32 count) { Stat = stat; Count = count; }
public virtual void Stat_Enable(StatID iD) { Stat_Get(iD); PinnedStat?.SetActive(true); }
public StatModifier() { ID = null; modify = StatOption.None; Value = new FloatReference(0); }
// public virtual void _DisableStat(StatID iD) { Stat_Disable(iD); } //OLD VERSION public virtual void DegenerateOff(StatID ID) { Stat_Get(ID); PinnedStat?.SetDegeneration(false); }
/// <summary>Find a Stat Using a StatID and Return if the Stat is on the List. Also Saves it to the PinnedStat</summary> public virtual Stat Stat_Get(StatID ID) => Stat_Get(ID.ID);
/// <summary>Set PinnedStat searching for a StatID</summary> public virtual void Stat_Pin(StatID ID) { Stat_Get(ID); }
public StatValues(StatID id, float val) { _id = id; _value = val; }