Esempio n. 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;
            }
        }
Esempio n. 2
0
 public abstract void Revoke(Character character);
Esempio n. 3
0
 protected override void UnbindCharacter(Character character)
 {
     this.boundStat.PropertyChanged -= OnBoundStatPropertyChanged;
     this.boundStat = null;
 }
Esempio n. 4
0
 protected override void UnbindCharacter(Character character)
 {
     this.baseRule.UnbindCharacter(character);
 }
Esempio n. 5
0
 protected abstract void UnbindCharacter(Character character);
Esempio n. 6
0
 public override sealed void Apply(Character character)
 {
     character.GetStat(Stat).AddModifier(this);
     BindCharacter(character);
 }
Esempio n. 7
0
 public override void Apply(Character character)
 {
     character.TextStrings[this.name] = this.value;
 }
Esempio n. 8
0
 public override void Revoke(Character character)
 {
     character.Revoke(this.element);
 }
Esempio n. 9
0
 public void Apply(Character character)
 {
     foreach (Rule rule in this.rules) { rule.Apply(character); }
 }
Esempio n. 10
0
 public override void Revoke(Character character)
 {
     /// TODO: Errrr... maybe?
 }
Esempio n. 11
0
 public override void Apply(Character character)
 {
     character.Grant(this.element);
 }
Esempio n. 12
0
 public override void Apply(Character character)
 {
     character.Alias(this.name, this.alias);
 }
Esempio n. 13
0
 public void Unbind(Character character)
 {
     this.character.Inventory.PropertyChanged -= InventoryPropertyChanged;
     this.character = null;
 }
Esempio n. 14
0
 public void Bind(Character character)
 {
     this.character = character;
     this.character.Inventory.PropertyChanged += InventoryPropertyChanged;
 }
Esempio n. 15
0
 public override bool Check(Character character)
 {
     return character.Grants.Contains(this.boundElement);
 }
Esempio n. 16
0
 public void Revoke(Character character)
 {
     foreach (Rule rule in this.rules) { rule.Revoke(character); }
 }
Esempio n. 17
0
 public abstract bool Check(Character character);
Esempio n. 18
0
 public override bool Check(Character character)
 {
     return this.left.Check(character) && this.right.Check(character);
 }
Esempio n. 19
0
 public override void Revoke(Character character)
 {
     character.TextStrings.Remove(this.name);
 }
Esempio n. 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);
 }
Esempio n. 21
0
 public override void Revoke(Character character)
 {
     throw new NotImplementedException();
 }
Esempio n. 22
0
 public override bool Check(Character character)
 {
     return false;
 }
Esempio n. 23
0
 public override sealed void Revoke(Character character)
 {
     UnbindCharacter(character);
     character.GetStat(Stat).RemoveModifier(this);
 }
Esempio n. 24
0
 public override bool Check(Character character)
 {
     return !this.prereq.Check(character);
 }
Esempio n. 25
0
 protected override void UnbindCharacter(Character character)
 {
 }
Esempio n. 26
0
 public override bool Check(Character character)
 {
     throw new NotImplementedException();
 }
Esempio n. 27
0
 protected override void BindCharacter(Character character)
 {
     this.boundStat = character.GetStat(this.sourceStat);
     this.boundStat.PropertyChanged += OnBoundStatPropertyChanged;
 }
Esempio n. 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;
            }
Esempio n. 29
0
 protected override void UnbindCharacter(Character character)
 {
     this.predicate.Unbind(character);
     base.UnbindCharacter(character);
 }
Esempio n. 30
0
 public abstract void Apply(Character character);