public static List <SpellInfo> GetCharacterSpells(Divine.Moniker moniker)
    {
        var spellInfoList = new List <SpellInfo>();

        var spellCount = AppearanceConfigData.instance.GetUnitMagicsCount(moniker);

        for (var index = 0; index < spellCount; ++index)
        {
            var appearance = AppearanceConfigData.instance.GetMagicWithIndex(moniker, index);
            spellInfoList.Add(new SpellInfo(
                                  index,
                                  appearance._isInstant, appearance._dontShowToUser, appearance._needTargetToComeNear,
                                  appearance._spellName, appearance._cost, appearance._prefabName,
                                  appearance._spellType, appearance._damageType, appearance._spellImpact, null));
        }

        return(spellInfoList);
    }
Exemple #2
0
    //Base Methods
    public CharInfo(
        Divine.Moniker moniker, BattleObjStats initialStats, List <SpellInfo> spells,
        Dexterity priority, int xp, int level, long id,
        int coolDownRemainingTime, int cardCount, NextUpgradeStats nextUpgradeStats,
        Divine.Moniker owner = Divine.Moniker.Unknown, bool isActive = true)

    {
        this.xp    = xp;
        this.level = level;

        uniqueID     = id;
        this.spells  = spells;
        this.moniker = moniker;
        turnPriority = priority;
        baseStats    = initialStats;
        ownerHero    = owner;

        curCardCount          = cardCount;
        this.nextUpgradeStats = nextUpgradeStats;
        SetRemainingCooldownTime(coolDownRemainingTime);
        enableInStart = isActive;
    }