Example #1
0
        public static RuleDto NewRule(bool isEnabled, TargetRule rule)
        {
            if (rule is TargetPercentage)
            {
                return(New(isEnabled, rule as TargetPercentage));
            }
            if (rule is TargetSpecificUsers)
            {
                return(New(isEnabled, rule as TargetSpecificUsers));
            }

            return(null);
        }
Example #2
0
        public override int GetHashCode()
        {
            int hash = Level.GetHashCode();

            if (Description != null)
            {
                hash ^= Description.GetHashCode();
            }
            if (Name != null)
            {
                hash ^= Name.GetHashCode();
            }
            if (Icon != null)
            {
                hash ^= Icon.GetHashCode();
            }
            hash ^= IsHidden.GetHashCode();
            hash ^= IsPassive.GetHashCode();
            hash ^= Cooldown.GetHashCode();
            hash ^= CastingTime.GetHashCode();
            hash ^= ChannelingTime.GetHashCode();
            hash ^= ForceCost.GetHashCode();
            hash ^= EnergyCost.GetHashCode();
            hash ^= ApCost.GetHashCode();
            hash ^= ApType.GetHashCode();
            hash ^= MinRange.GetHashCode();
            hash ^= MaxRange.GetHashCode();
            hash ^= GCD.GetHashCode();
            hash ^= GcdOverride.GetHashCode();
            if (AbilityTokens != null)
            {
                hash ^= AbilityTokens.GetHashCode();
            }
            hash ^= TargetArc.GetHashCode();
            hash ^= TargetArcOffset.GetHashCode();
            hash ^= TargetRule.GetHashCode();
            hash ^= LineOfSightCheck.GetHashCode();
            hash ^= Pushback.GetHashCode();
            hash ^= IgnoreAlacrity.GetHashCode();
            return(hash);
        }
Example #3
0
 public Rule(TargetRule r, bool i, float v)
 {
     type    = r;
     inverse = i;
     value   = v;
 }
Example #4
0
 public SummonTokens(TargetRule t, params CardId[] cards)
     : base(t)
 {
     this.cards = cards;
 }
Example #5
0
 protected SubEffect(TargetRule t)
 {
     targetRule = t;
 }
Example #6
0
 public Draw(TargetRule t, int cards)
     : base(t)
 {
     cardCount = cards;
 }
Example #7
0
 public Shuffle(TargetRule t, bool optional)
     : base(t)
 {
     this.optional = optional;
 }
Example #8
0
 public Ping(TargetRule t, int damage)
     : base(t)
 {
     this.damage = damage;
 }
Example #9
0
 public MoveTo(TargetRule t, LocationPile pile)
     : base(t)
 {
     this.pile = pile;
 }
Example #10
0
 public ModifyUntil(TargetRule t, Modifiable attribute, Clojurex filter, int value)
     : base(t)
 {
     this.attribute = attribute;
     this.filter = filter;
     this.value = value;
 }
Example #11
0
 public Mill(TargetRule t, int cards)
     : base(t)
 {
     this.cards = cards;
 }
Example #12
0
 public GainLife(TargetRule t, int n)
     : base(t)
 {
     life = n;
 }
Example #13
0
 public GainBonusMana(TargetRule t, params Colour[] colours)
     : base(t)
 {
     this.colours = colours;
 }
Example #14
0
 public Exhaust(TargetRule t)
     : base(t)
 {
 }
Example #15
0
 public CounterSpell(TargetRule t)
     : base(t)
 {
 }