Example #1
0
 public virtual void RemoveFrom(Attributes attributes)
 {
     foreach (AttributeModifier selfModifier in SelfModifiers)
     {
         attributes.Remove(selfModifier);
     }
 }
Example #2
0
        public override void OnCure(GameObject go, object instance_data)
        {
            Attributes attributes = go.GetAttributes();

            for (int i = 0; i < attributeModifiers.Length; i++)
            {
                AttributeModifier modifier = attributeModifiers[i];
                attributes.Remove(modifier);
            }
        }
Example #3
0
        public void Apply(AttributeLevels levels)
        {
            Attributes attributes = levels.GetAttributes();

            if (modifier != null)
            {
                attributes.Remove(modifier);
                modifier = null;
            }
            modifier = new AttributeModifier(attribute.Id, (float)GetLevel(), DUPLICANTS.MODIFIERS.SKILLLEVEL.NAME, false, false, true);
            attributes.Add(modifier);
        }