Ejemplo n.º 1
0
 public override bool DoEffect()
 {
     if (TempStat != null && MainStat != null)
     {
         return(MainStat.NegativeEffect(TempStat));
     }
     return(false);
 }
Ejemplo n.º 2
0
 public bool Check()
 {
     if (TempStat != null && MainStat != null)
     {
         if (MainStat.Is(TempStat) == true)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 3
0
    void AddSubStats(int value, MainStat mainStat)
    {
        if (value <= 0)
        {
            return;
        }
        var stats    = mainToSubConversion[mainStat];
        var newStats = stats.Scale(value);

        foreach (var statChange in newStats)
        {
            combinedSub = combinedSub.AddSubStatChange(statChange);
        }
    }
Ejemplo n.º 4
0
 public override bool Equals(Object obj)
 {
     //Check for null and compare run-time types.
     if ((obj == null) || !this.GetType().Equals(obj.GetType()))
     {
         return(false);
     }
     else
     {
         GemStone other = (GemStone)obj;
         return((Type == other.Type) &&
                (Set == other.Set || Set == RUNESET.ALL || other.Set == RUNESET.ALL) &&
                (MainStat.ToLower() == other.MainStat.ToLower() || MainStat.ToLower().Equals("all") || other.MainStat.ToLower().Equals("all")) &&
                (Rarity == other.Rarity || Rarity == RARITY.ALL || other.Rarity == RARITY.ALL));
     }
 }
Ejemplo n.º 5
0
    public int GetValue(MainStat stat)
    {
        switch (stat)
        {
        case MainStat.Strength: return(str);

        case MainStat.Constitution: return(con);

        case MainStat.Dexterity: return(dex);

        case MainStat.Intelligence: return(intel);

        case MainStat.Luck: return(lck);
        }
        return(0);
    }
Ejemplo n.º 6
0
    public static Color ByMainStat(MainStat stat)
    {
        switch (stat)
        {
        case MainStat.Strength:
            return(MAIN_STRENGTH);

        case MainStat.Constitution:
            return(MAIN_CONSTITUTION);

        case MainStat.Dexterity:
            return(MAIN_DEXTERITY);

        case MainStat.Intelligence:
            return(MAIN_INTELLIGENCE);

        case MainStat.Luck:
            return(MAIN_LUCK);
        }
        return(Color.black);
    }
 public ItemStatFocus GetFocusByStats(MainStat primary, MainStat second)
 {
     return(focuses.FirstOrDefault(focus => focus.focus[0] == primary && focus.focus[1] == second));
 }
Ejemplo n.º 8
0
 public StatValue(MainStat MS, int Value)
 {
     TheStat  = MS;
     TheValue = Value;
 }
Ejemplo n.º 9
0
 public override int GetHashCode()
 {
     return(Type.GetHashCode() ^ Set.GetHashCode() ^ MainStat.GetHashCode() ^ Rarity.GetHashCode());
 }
Ejemplo n.º 10
0
 public override string ToString()
 {
     return("Type: " + Type + "\nRarity: " + Rarity + "\nMain: " + MainStat?.ToString() +
            "\n----------\n" + string.Join("\n", SubStats) + "\n----------");
 }
Ejemplo n.º 11
0
 public BaseItemCollection GetCollectionByMainStat(MainStat stat)
 {
     return(collections.FirstOrDefault(e => e.MainStat == stat));
 }