Exemple #1
0
        public Choice(SelectRule rule, Character character)
        {
            this.rule = rule;
            this.character = character;
            this.options = new ObservableCollection<RuleElement>();

            FillItems();
            if (this.rule.Filter != null)
            {
                this.rule.Filter.FilterChanged += OnFilterChanged;
            }
        }
Exemple #2
0
 public abstract void Revoke(Character character);
Exemple #3
0
 protected override void UnbindCharacter(Character character)
 {
     this.boundStat.PropertyChanged -= OnBoundStatPropertyChanged;
     this.boundStat = null;
 }
Exemple #4
0
 protected override void UnbindCharacter(Character character)
 {
     this.baseRule.UnbindCharacter(character);
 }
Exemple #5
0
 protected abstract void UnbindCharacter(Character character);
Exemple #6
0
 public override sealed void Apply(Character character)
 {
     character.GetStat(Stat).AddModifier(this);
     BindCharacter(character);
 }
Exemple #7
0
 public override void Apply(Character character)
 {
     character.TextStrings[this.name] = this.value;
 }
Exemple #8
0
 public override void Revoke(Character character)
 {
     character.Revoke(this.element);
 }
Exemple #9
0
 public void Apply(Character character)
 {
     foreach (Rule rule in this.rules) { rule.Apply(character); }
 }
Exemple #10
0
 public override void Revoke(Character character)
 {
     /// TODO: Errrr... maybe?
 }
Exemple #11
0
 public override void Apply(Character character)
 {
     character.Grant(this.element);
 }
Exemple #12
0
 public override void Apply(Character character)
 {
     character.Alias(this.name, this.alias);
 }
Exemple #13
0
 public void Unbind(Character character)
 {
     this.character.Inventory.PropertyChanged -= InventoryPropertyChanged;
     this.character = null;
 }
Exemple #14
0
 public void Bind(Character character)
 {
     this.character = character;
     this.character.Inventory.PropertyChanged += InventoryPropertyChanged;
 }
Exemple #15
0
 public override bool Check(Character character)
 {
     return character.Grants.Contains(this.boundElement);
 }
Exemple #16
0
 public void Revoke(Character character)
 {
     foreach (Rule rule in this.rules) { rule.Revoke(character); }
 }
Exemple #17
0
 public abstract bool Check(Character character);
Exemple #18
0
 public override bool Check(Character character)
 {
     return this.left.Check(character) && this.right.Check(character);
 }
Exemple #19
0
 public override void Revoke(Character character)
 {
     character.TextStrings.Remove(this.name);
 }
Exemple #20
0
 public override bool Check(Character character)
 {
     int required = this.count;
     for (int i = 0; i < prereqs.Length && required > 0; i++)
     {
         if (this.prereqs[i].Check(character)) { required--; }
     }
     return (required == 0);
 }
Exemple #21
0
 public override void Revoke(Character character)
 {
     throw new NotImplementedException();
 }
Exemple #22
0
 public override bool Check(Character character)
 {
     return false;
 }
Exemple #23
0
 public override sealed void Revoke(Character character)
 {
     UnbindCharacter(character);
     character.GetStat(Stat).RemoveModifier(this);
 }
Exemple #24
0
 public override bool Check(Character character)
 {
     return !this.prereq.Check(character);
 }
Exemple #25
0
 protected override void UnbindCharacter(Character character)
 {
 }
Exemple #26
0
 public override bool Check(Character character)
 {
     throw new NotImplementedException();
 }
Exemple #27
0
 protected override void BindCharacter(Character character)
 {
     this.boundStat = character.GetStat(this.sourceStat);
     this.boundStat.PropertyChanged += OnBoundStatPropertyChanged;
 }
Exemple #28
0
            public override bool Check(Character character)
            {
                for (int i = 0; i < this.boundElements.Length; i++)
                {
                    if (character.Grants.Contains(this.boundElements[i])) { return true; }
                }

                 	            return false;
            }
Exemple #29
0
 protected override void UnbindCharacter(Character character)
 {
     this.predicate.Unbind(character);
     base.UnbindCharacter(character);
 }
Exemple #30
0
 public abstract void Apply(Character character);