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