public override GameObject Mutate(GameObject abilityObject, Vector3 location, Vector3 targetLocation)
    {
        // get a reference to the child's SummonEntityOnDeath component, this the component that makes the wolf
        SummonEntityOnDeath summoner = abilityObject.GetComponent <SummonEntityOnDeath>();

        // add additional duration
        summoner.duration += additionalDuration;

        // add additional stats
        summoner.statList.AddRange(statList);
        summoner.limit = 3 + additionalSkeletons;

        // change limit type
        if (limitDuration)
        {
            summoner.limitNumber   = false;
            summoner.limitDuration = true;
        }

        // change the adapter
        SkeletonAdapter adapter = abilityObject.AddComponent <SkeletonAdapter>();

        adapter.tempStats = tempStats;

        return(abilityObject);
    }
Ejemplo n.º 2
0
    public override GameObject Mutate(GameObject abilityObject, Vector3 location, Vector3 targetLocation)
    {
        // get a reference to the child's SummonEntityOnDeath component, this the component that makes the wolf
        SummonEntityOnDeath summoner = abilityObject.GetComponent <SummonEntityOnDeath>();

        // add additional duration
        summoner.duration += additionalDuration;

        // add additional stats
        summoner.statList.AddRange(statList);
        summoner.limit = 3 + additionalSkeletons;

        // change limit type
        if (limitDuration)
        {
            summoner.limitNumber   = false;
            summoner.limitDuration = true;
        }

        // change the adapter
        SkeletonAdapter adapter = abilityObject.AddComponent <SkeletonAdapter>();

        adapter.tempStats = tempStats;

        // add extra abilities
        if (usesDeathSlash)
        {
            adapter.extraAbilities.Add(new EntityAdapter.ExtraAbility(AbilityIDList.getAbility(AbilityID.deathSlash), 1, 0.2f * (1 + increasedDeathSlashCooldownRecovery), 0f, 1.2f, 1.6f, 11.8f, false));
        }

        return(abilityObject);
    }