Пример #1
0
        private void DoHit(Attackable target)
        {
            foreach (MissileEffect e in data.onHit)
            {
                switch (e.type)
                {
                case MissileEffectType.Buff:
                    if (target is Character)
                    {
                        Character c = (Character)target;
                        c.AddBuff(new BuffInstance()
                        {
                            buff = e.buffData, duration = e.buffDuration, origin = owner, target = c, canExpire = true
                        });
                    }
                    break;

                case MissileEffectType.Damage:
                    target.Damage(e.damageAmount, e.damageType);
                    break;

                case MissileEffectType.ParticleBurst:
                    break;

                default:
                    break;
                }
            }
        }
Пример #2
0
 public override IEnumerator OnTriggerEffects(Character caster, Character target)
 {
     caster.AddBuff(new BuffInstance {
         buff = buff, duration = duration, origin = caster, target = caster, canExpire = true
     });
     yield return(null);
 }