string GetAbilityDescription(int slot)
    {
        int    id   = pinfo.GetAbilityID(slot);
        string desc = "";

        //Debug.Log("SLOT" + slot+"ID"+id);
        switch (id)
        {
        case 1:     //frenzy
            Frenzy frenzy = (Frenzy)pinfo.abilities[slot];
            frenzy.CalculateMult();
            desc = frenzy.GetDescription();
            break;

        case 2:     //rage
            Rage rage = (Rage)pinfo.abilities[slot];
            rage.CalculateMult();
            desc = rage.GetDescription();
            break;


        case 3:     //Mine
            Mine mine = (Mine)pinfo.abilities[slot];
            mine.CalculateDamage();
            desc = mine.GetDescription();
            break;

        case 4:     //Mine
            Fireball fireball = (Fireball)pinfo.abilities[slot];
            fireball.CalculateDamage();
            desc = fireball.GetDescription();
            break;
        }
        return(desc);
    }
Beispiel #2
0
    public void UpdateAbilityData(int slot)
    {
        int id = abilities[slot].GetID();

        switch (id)
        {
        case 1:
            Frenzy frenzy = (Frenzy)abilities[slot];
            frenzy.CalculateMult();
            break;

        case 2:
            Rage rage = (Rage)abilities[slot];
            rage.CalculateMult();
            break;

        case 3:
            Mine mine = (Mine)abilities[slot];
            mine.CalculateDamage();
            break;

        case 4:
            Fireball fireball = (Fireball)abilities[slot];
            fireball.CalculateDamage();
            break;
        }
    }