diff --git a/octgnFX/Octgn.DataNew/CardPropertyComparer.cs b/octgnFX/Octgn.DataNew/CardPropertyComparer.cs index a6e06b47c..d884b0f8f 100644 --- a/octgnFX/Octgn.DataNew/CardPropertyComparer.cs +++ b/octgnFX/Octgn.DataNew/CardPropertyComparer.cs @@ -10,6 +10,8 @@ public class CardPropertyComparer : IComparer, IComparer { private readonly PropertyDef _property; + public PropertyDef Property { get { return _property; } } + public CardPropertyComparer(PropertyDef property) { _property = property; @@ -35,9 +37,35 @@ public int Compare(ICard x, ICard y) x.PropertySets[x.Alternate].Properties.TryGetValue(_property, out object px); y.PropertySets[y.Alternate].Properties.TryGetValue(_property, out object py); if (px == null) return py == null ? 0 : -1; + if (int.TryParse(px.ToString(), out int px2) && int.TryParse(py.ToString(), out int py2)) + { + return px2.CompareTo(py2); + } return px.ToString().CompareTo(py.ToString()); } #endregion } + public class CompoundComparer : IComparer + { + private readonly IComparer first; + private readonly IComparer second; + + public CompoundComparer(IComparer first, IComparer second) + { + this.first = first; + this.second = second; + } + + public int Compare(object x, object y) + { + int result = this.first.Compare(x, y); + if (result != 0) + { + return result; + } + return second.Compare(x, y); + } + } + } \ No newline at end of file diff --git a/octgnFX/Octgn.JodsEngine/Play/Dialogs/LimitedDialog.xaml b/octgnFX/Octgn.JodsEngine/Play/Dialogs/LimitedDialog.xaml index 754965485..a6c385637 100644 --- a/octgnFX/Octgn.JodsEngine/Play/Dialogs/LimitedDialog.xaml +++ b/octgnFX/Octgn.JodsEngine/Play/Dialogs/LimitedDialog.xaml @@ -1,67 +1,90 @@ - - - - - - - - - - - - - - - - Sealed - - (sorry, no other option in this release) - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + - - Add packs to my Limited Pool - Add packs to everyone's Limited Pool + + + -