Ejemplo n.º 1
0
    void AddEffect()
    {
        //add effect to pokemon list
        pokemon = isPlayer ? fightManager.currentPlayerPokemon : fightManager.currentEnemyPokemon;
        EffectModel effect = pokemon.AddEffect(fightManager.ItemUsed.itemData.Effect);

        previousHealth = pokemon.CurrentHealth;

        //apply effect
        string effectDescription;

        effect.ApplyEffect(pokemon, isPlayer, out effectDescription);

        //show effect description
        fightManager.FightUIManager.SetDescription(effectDescription, CheckLife);
    }