Exemplo n.º 1
0
    public override void OnApply(MovingObject target)
    {
        this.target = target;

        //Make sure there is only one stack of shock on a unit at a time.
        if (target.shock)
        {
            StatusEffect shock = target.statuses.Find(x => x.name == "shock");
            target.statuses.Remove(shock);
            Destroy(shock);
        }
        else
        {
            if (target.wet)
            {
                target.ApplyStatus(Object.Instantiate(stun));
            }
            target.shock = true;
        }
    }