Exemplo n.º 1
0
            private bool IsAStatsCardINeed(IBestiaryInfoElement element, int gameMode)
            {
                NPCStatsReportInfoElement nPCStatsReportInfoElement = element as NPCStatsReportInfoElement;

                if (nPCStatsReportInfoElement == null)
                {
                    return(false);
                }
                if (nPCStatsReportInfoElement.GameMode != gameMode)
                {
                    return(false);
                }
                return(true);
            }
Exemplo n.º 2
0
            public int Compare(BestiaryEntry x, BestiaryEntry y)
            {
                NPCStatsReportInfoElement cardX = x.Info.FirstOrDefault <IBestiaryInfoElement>((Func <IBestiaryInfoElement, bool>)(element => this.IsAStatsCardINeed(element, Main.GameMode))) as NPCStatsReportInfoElement;
                NPCStatsReportInfoElement cardY = y.Info.FirstOrDefault <IBestiaryInfoElement>((Func <IBestiaryInfoElement, bool>)(element => this.IsAStatsCardINeed(element, Main.GameMode))) as NPCStatsReportInfoElement;

                if (cardX == null && cardY != null)
                {
                    return(1);
                }
                if (cardY == null && cardX != null)
                {
                    return(-1);
                }
                return(cardX == null || cardY == null ? 0 : this.Compare(cardX, cardY));
            }
Exemplo n.º 3
0
            public int Compare(BestiaryEntry x, BestiaryEntry y)
            {
                NPCStatsReportInfoElement nPCStatsReportInfoElement  = x.Info.FirstOrDefault((IBestiaryInfoElement element) => IsAStatsCardINeed(element, Main.GameMode)) as NPCStatsReportInfoElement;
                NPCStatsReportInfoElement nPCStatsReportInfoElement2 = y.Info.FirstOrDefault((IBestiaryInfoElement element) => IsAStatsCardINeed(element, Main.GameMode)) as NPCStatsReportInfoElement;

                if (nPCStatsReportInfoElement == null && nPCStatsReportInfoElement2 != null)
                {
                    return(1);
                }
                if (nPCStatsReportInfoElement2 == null && nPCStatsReportInfoElement != null)
                {
                    return(-1);
                }
                if (nPCStatsReportInfoElement == null || nPCStatsReportInfoElement2 == null)
                {
                    return(0);
                }
                return(Compare(nPCStatsReportInfoElement, nPCStatsReportInfoElement2));
            }
Exemplo n.º 4
0
 public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY)
 {
     return(cardY.LifeMax.CompareTo(cardX.LifeMax));
 }
Exemplo n.º 5
0
 public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY)
 {
     return(cardY.MonetaryValue.CompareTo(cardX.MonetaryValue));
 }
Exemplo n.º 6
0
 public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY)
 {
     return(cardY.Defense.CompareTo(cardX.Defense));
 }
Exemplo n.º 7
0
 public abstract int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY);