Beispiel #1
0
    //need more generic way to apply effects to targets
    public void UseItem(ITarget source, ITarget target)
    {
        foreach (var effect in itemEffectList)
        {
            switch (effect.effectType)
            {
            case EffectType.HealSelf:
                source.AddEffect(effect);
                break;

            case EffectType.CureSelf:
                source.AddEffect(effect);
                break;

            case EffectType.DamageEnemy:
                target.AddEffect(effect);
                break;

            case EffectType.BuffDamage:
                source.AddEffect(effect);
                break;

            case EffectType.BuffDefense:
                source.AddEffect(effect);
                break;

            default:
                break;
            }
        }
    }