예제 #1
0
    public void RunEffect()
    {
        GameObject effects = GameObject.Find("Effects");

        switch (effect)
        {
        case Effects.ArmorUp:
            // less inc physical dmg
            break;

        case Effects.Burn:

            Burn burn = effects.GetComponent <Burn> ();
            damage = burn.Damage(damage, 3);
            //= damage / 3;
            burn.ApplyBurn(3, damage);
            break;

        case Effects.Bleed:
//				GameObject Bleed = GameObject.Find ("_Scripts");
            Bleed bleed = effects.GetComponent <Bleed> ();
            bleed.ApplyBleed();
            break;

        case Effects.Chill:
            // same as slow, but second proc will apply "frozen". Also apply frozen if speed = 0
            Chill chill = effects.GetComponent <Chill> ();
            chill.ApplyChill();
            break;

        case Effects.Slow:
//				GameObject Slow = GameObject.Find ("_Scripts");
            Slow slow = effects.GetComponent <Slow> ();
            slow.ApplySlow();
            break;

        case Effects.Freeze:
            // enemy will turns as long as frozen. Burn will neutralize effect. 50% less physical dmg
            Frozen frozen = effects.GetComponent <Frozen> ();
            frozen.ApplyFrozen();
            break;

        case Effects.Poison:
//				GameObject Poison = GameObject.Find ("_Scripts");
            Poison poison = effects.GetComponent <Poison> ();
            poison.damage = damage / 5;
            poison.ApplyPoison();
            break;

        case Effects.ShieldUp:
            // block next melee or ranged attack
            break;

        case Effects.SpeedUp:
            // 20% more MS
            break;

        case Effects.Stun:
//				GameObject Stun = GameObject.Find ("_Scripts");
            Stun stun = effects.GetComponent <Stun> ();
            stun.ApplyStun();
            break;

        case Effects.Blind:
            //				GameObject Stun = GameObject.Find ("_Scripts");
            Blind blind = effects.GetComponent <Blind> ();
            blind.Applyblind();
            break;

        case Effects.RemoveBleed:
            // Remove bleed stacks from target
            break;

        case Effects.MagicResUp:
            // less inc magic dmg
            break;

        case Effects.Restoration:
//				GameObject Restoration = GameObject.Find ("_Scripts");
            Restoration restoration = effects.GetComponent <Restoration> ();
            restoration.heal = healDot;
            restoration.ApplyRestoration();
            break;

        case Effects.Fly:
            // walk through objects
            break;

        case Effects.FullVision:
            // see full map
            break;

        case Effects.SharedVision:
            // all players see shared vision
            break;

        case Effects.VisionTotem:
            // tetem taht grands only vision
            break;

        case Effects.SpellTotem:
            // "playable" totem
            break;

        case Effects.Cure:
            // remove all negative effect
            break;

        case Effects.AiAlly:
            // summon AI ally
            break;

        case Effects.Empty:

            break;

        default:
            break;
        }
    }