Inheritance: ElementHost
Esempio n. 1
0
        private void WriteToList(List <Tuple <string, int> > spells)
        {
            SpellList.Items.Clear();
            TimerList.Items.Clear();

            foreach (Tuple <string, int> spell in spells)
            {
                SpellList.Items.Add(spell.Item1);
                TimerList.Items.Add(spell.Item2.ToString());
            }
            SpellBox.ResetText();
            DurationBox.ResetText();
        }
Esempio n. 2
0
        public Estimation(Stats baseStats, Stats procStats, ShamanTalents talents, CalculationOptionsElemental calcOpts)
        {
            this.baseStats = baseStats;
            this.procStats = procStats;
            this.talents   = talents;
            this.calcOpts  = calcOpts;

            Stats addedStats = baseStats.Clone();

            addedStats.Accumulate(procStats);
            CombatFactors combatFactors = new CombatFactors(talents, addedStats, Math.Max(calcOpts.NumberOfTargets - 1, 0), calcOpts.LatencyCast, calcOpts.LatencyGcd, calcOpts.UseFireNova, calcOpts.UseChainLightning, calcOpts.UseDpsTotem);

            spellbox = new SpellBox(combatFactors);
        }
Esempio n. 3
0
        public Solver(Stats baseStats, Stats procStats, PriestTalents talents, CalculationOptionsShadowPriest calcOpts)
        {
            this.baseStats = baseStats;
            this.procStats = procStats;
            this.talents   = talents;
            this.calcOpts  = calcOpts;

            Stats addedStats = baseStats.Clone();

            addedStats.Accumulate(procStats);
            CombatFactors combatFactors = new CombatFactors(talents, addedStats, Math.Max(calcOpts.NumberOfTargets - 1, 0), calcOpts.LatencyCast, calcOpts.LatencyGcd);

            spellbox = new SpellBox(combatFactors);
        }
Esempio n. 4
0
        public Rotation(SpellBox spellBox, PriestTalents talents, IRotationOptions rotOpt)
            : this()
        {
            Talents = talents;
            DP      = spellBox.DP;
            MB      = spellBox.MB;
            MF      = spellBox.MF;
            Fiend   = spellBox.Fiend;
            SWD     = spellBox.SWD;
            SWP     = spellBox.SWP;
            VT      = spellBox.VT;
            Spike   = spellBox.Spike;

            //useXXX = rotOpt.UseDpsFireTotem;

            CalculateRotation();
        }
Esempio n. 5
0
        public Rotation(ShamanTalents talents, SpellBox spellBox, IRotationOptions rotOpt)
            : this()
        {
            Talents = talents;
            LB      = spellBox.LB;
            CL      = spellBox.CL;
            LvB     = spellBox.LvB;
            LvBFS   = spellBox.LvBFS;
            FS      = spellBox.FS;
            ES      = spellBox.ES;
            FrS     = spellBox.FrS;
            FN      = spellBox.FN;
            ST      = spellBox.ST;
            MT      = spellBox.MT;
            FE      = spellBox.FE;

            useDpsFireTotem = rotOpt.UseDpsFireTotem;

            CalculateRotation(rotOpt.UseFireNova, rotOpt.UseChainLightning, rotOpt.UseDpsFireTotem, rotOpt.UseFireEle);
        }
Esempio n. 6
0
    public GameCharacter BuildCharacter(int id, Player owner, Tile t)
    {
        CharacterData characterData = GetCharacterData(id);

        if (characterData == null)
        {
            return(null);
        }

        GameCharacter spawnCharacter = (GameCharacter)Instantiate(baseCharacter);

        spawnCharacter.id = id;

        spawnCharacter.SetOwningPlayer(owner);

        // translate base character to game character by setting attributes
        spawnCharacter.gameName = characterData.name;
        spawnCharacter.name     = _mappedCharacterCounts[id] + "-" + spawnCharacter.gameName.ToLower();

        spawnCharacter.gameDescription = characterData.description;

        // prefab specific data
        spawnCharacter.GetComponent <SpriteRenderer>().color = characterData.linkColor;
        spawnCharacter.avatarRenderer.sprite = characterData.sprite;

        spawnCharacter.health.linkColor = characterData.linkColor;

        // attributes
        Move move = spawnCharacter.move;

        move.SetBaseMoveRange(characterData.moveRange);

        Health health = spawnCharacter.health;

        health.maxSize = characterData.maxSize;

        // spells
        SpellBox spellBox = spawnCharacter.spellBox;

        int[] spellIds =
        {
            characterData.spellIdA,
            characterData.spellIdB,
            characterData.spellIdC,
            characterData.spellIdD,
        };

        int i = 0;

        for (; i < spellIds.Length; i++)
        {
            spellBox.SetSpellSlotIndex((spellIds[i] > -1) ? SpellBuilder.Instance.GetSpellData(spellIds[i]) : null, i);
        }

        spawnCharacter.Reset();
        spawnCharacter.SetTile(t);

        _mappedCharacterCounts[id]++;

        GameMap.Instance.RegisterCharacter(spawnCharacter);

        return(spawnCharacter);
    }