Пример #1
0
        }                                            // null - > infinite?


        public virtual void StackWith(AppliedCharacterEffect effect) // possibly virtual
        {
            Debug.Assert(this.EffectId == effect.EffectId);

            this.Value += effect.Value;
            // TODO: stack infinity or time...
        }
Пример #2
0
        internal void ApplyEffect(AppliedCharacterEffect effect)
        {
            AppliedCharacterEffect currentEffect;

            if (this._appliedCharacterEffects.TryGetValue(effect.EffectId, out currentEffect))
            {
                if (effect.ReplacePrevious)
                {
                    this._appliedCharacterEffects[effect.EffectId] = effect;
                }
                else
                {
                    currentEffect.StackWith(effect);
                }
            }
            else
            {
                this._appliedCharacterEffects.Add(effect.EffectId, effect);
            }
        }
Пример #3
0
        // TODO: more props like whether is temporary or constant, where it started, link to source (if external) / feat item, when it ends...
        // TODO: below some proposals, but this is not finished...



        public void AddExtraEfect(AppliedCharacterEffect efefctBuilder)
        {
            throw new NotImplementedException();
        }
Пример #4
0
 internal void RemoveEffect(AppliedCharacterEffect effect)
 {
     this._appliedCharacterEffects.Remove(effect.EffectId);
 }