Example #1
0
        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);
            }
        }
Example #2
0
 public virtual void DegenerateOn(StatID ID)
 {
     GetStat(ID);
     if (PinnedStat != null)
     {
         PinnedStat.Degenerate = true;
     }
 }
Example #3
0
 public virtual void DegenerateOff(StatID ID)
 {
     GetStat(ID);
     if (PinnedStat != null)
     {
         PinnedStat.Degenerate = false;
     }
 }
Example #4
0
        public virtual void _DisableStat(StatID iD)
        {
            PinnedStat = GetStat(iD);

            if (PinnedStat != null)
            {
                PinnedStat.Active = false;
            }
        }
Example #5
0
        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));
 }
Example #7
0
        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");
            }
        }
Example #8
0
 public StatModifier(StatModifier mod)
 {
     ID     = mod.ID;
     modify = mod.modify;
     Value  = new FloatReference(mod.Value.Value);
 }
Example #9
0
 public virtual void _PinStat(StatID ID)
 {
     GetStat(ID);
 }
Example #10
0
 /// <summary>Enable a stat</summary>
 public virtual void Stat_Enable(StatID iD) => Stat_Get(iD)?.SetActive(true);
Example #11
0
 public virtual void Stat_Disable(StatID iD)
 {
     Stat_Get(iD);
     PinnedStat?.SetActive(false);
 }
Example #12
0
 /// <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));
 }
Example #13
0
 public virtual void Stat_ModifyValue(StatID ID, float modifyvalue, StatOption modifyType)
 {
     Stat_Get(ID)?.Modify(modifyvalue, modifyType);
 }
Example #14
0
 public virtual Stat GetStat(StatID ID)
 {
     return(GetStat(ID.ID));
 }
Example #15
0
 public void setStat(StatID stat, int value)
 {
     stats[stat] = value;
 }
Example #16
0
 public int getStat(StatID stat) => stats[stat];
Example #17
0
 /// <summary>Enable a stat Degeneration logic</summary>
 public virtual void DegenerateOn(StatID ID) => Stat_Get(ID)?.SetDegeneration(true);
Example #18
0
 /// <summary>Disable a stat Degeneration logic</summary>
 public virtual void DegenerateOff(StatID ID) => Stat_Get(ID)?.SetDegeneration(false);
Example #19
0
 /// <summary>Disable a stat</summary>
 public virtual void Stat_Disable(StatID iD) => Stat_Get(iD)?.SetActive(false);
Example #20
0
 public virtual void Stat_ModifyValue(StatID ID, float modifyvalue)
 {
     Stat_Get(ID)?.Modify(modifyvalue);
 }
Example #21
0
 public virtual void DegenerateOn(StatID ID)
 {
     Stat_Get(ID);
     PinnedStat?.SetDegeneration(true);
 }
Example #22
0
 public virtual void Stats_Update(StatID iD)
 {
     Stats_Update(iD.ID);
 }
Example #23
0
 /// <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;
 }
Example #24
0
 public virtual void Stat_Enable(StatID iD)
 {
     Stat_Get(iD);
     PinnedStat?.SetActive(true);
 }
Example #25
0
 public StatModifier()
 {
     ID     = null;
     modify = StatOption.None;
     Value  = new FloatReference(0);
 }
Example #26
0
        // public virtual void _DisableStat(StatID iD)    { Stat_Disable(iD); } //OLD VERSION


        public virtual void DegenerateOff(StatID ID)
        {
            Stat_Get(ID);
            PinnedStat?.SetDegeneration(false);
        }
Example #27
0
 /// <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);
Example #28
0
 /// <summary>Set PinnedStat searching for a StatID</summary>
 public virtual void Stat_Pin(StatID ID)
 {
     Stat_Get(ID);
 }
Example #29
0
 public StatValues(StatID id, float val)
 {
     _id    = id;
     _value = val;
 }