private void GetListBoxReady(STATChart sc)
        {
            listBox1.Items.Clear();
            listBox2.Items.Clear();

            for (int i = 0; i < sc.currentPassiveStats.Count; i++)
            {
                if (sc.currentPassiveStats[i] != 0)
                {
                    int    index = i;
                    String s     = ((STATChart.PASSIVESTATSNames)index).ToString() + ": ";
                    listBox1.Items.Add(s);
                    listBox2.Items.Add("+" + sc.currentPassiveStats[i]);
                }
            }

            for (int i = 0; i < sc.currentSpecialStats.Count; i++)
            {
                if (sc.currentSpecialStats[i] != 0)
                {
                    int    index = i;
                    String s     = ((STATChart.SPECIALSTATSNames)index).ToString() + ": ";
                    listBox1.Items.Add(s);
                    listBox2.Items.Add("+" + sc.currentSpecialStats[i]);
                }
            }
        }
예제 #2
0
        static internal TBAGW.KeyValuePair <Type, int> getStat(String statName)
        {
            LuaStat     temp = new LuaStat(statName, 5);
            LuaStatEdit coll = new LuaStatEdit();

            coll.modifyStats.Add(temp);
            STATChart sc = coll.ExtractStatChart();

            for (int i = 0; i < sc.currentActiveStats.Count; i++)
            {
                if (sc.currentActiveStats[i] != 0)
                {
                    return(new TBAGW.KeyValuePair <Type, int>(typeof(STATChart.ACTIVESTATS), i));
                }
            }

            for (int i = 0; i < sc.currentPassiveStats.Count; i++)
            {
                if (sc.currentPassiveStats[i] != 0)
                {
                    return(new TBAGW.KeyValuePair <Type, int>(typeof(STATChart.PASSIVESTATS), i));
                }
            }

            for (int i = 0; i < sc.currentSpecialStats.Count; i++)
            {
                if (sc.currentSpecialStats[i] != 0)
                {
                    return(new TBAGW.KeyValuePair <Type, int>(typeof(STATChart.SPECIALSTATS), i));
                }
            }

            return(new TBAGW.KeyValuePair <Type, int>(null, 0));
        }
예제 #3
0
        private bool TryExtractSpecialStats(ref STATChart temp, LuaStat ls)
        {
            foreach (var item in Enum.GetNames(typeof(CritNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentSpecialStats[(int)TBAGW.STATChart.SPECIALSTATS.EXTRA_BASE_CRIT] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(DodgeNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentSpecialStats[(int)TBAGW.STATChart.SPECIALSTATS.EXTRA_BASE_DODGE] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(MPRegenNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentSpecialStats[(int)TBAGW.STATChart.SPECIALSTATS.DOT_MANA] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(HPRegenNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentSpecialStats[(int)TBAGW.STATChart.SPECIALSTATS.DOT_HP] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(HitChanceNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentSpecialStats[(int)TBAGW.STATChart.SPECIALSTATS.EXTRA_HIT_CHANCE] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(FailChance)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentSpecialStats[(int)TBAGW.STATChart.SPECIALSTATS.EXTRA_BASE_FAIL] += ls.value;
                    return(true);
                }
            }

            return(false);
        }
        internal virtual void Process()
        {
            STATChart    sc = statMod.ExtractStatChart();
            BaseModifier bm = new BaseModifier();

            bm.statModifier          = sc.Clone();
            bm.abilityModifierLength = length;
            lci.parent.modifierList.Add(bm);
        }
예제 #5
0
        internal void HandleLevelUp(BaseClass equippedClass, BaseCharacter currentBC)
        {
            STATChart   tempStatAddition = null;
            ClassPoints tempCP           = null;

            #region
            if (statAddition != null)
            {
                try
                {
                    tempStatAddition = statAddition.ExtractStatChart();
                }
                catch (Exception)
                {
                }
            }

            if (classPoints != null)
            {
                try
                {
                    tempCP = ClassPoints.toClassPoints(classPoints);
                }
                catch (Exception)
                {
                }
            }
            #endregion
            #region
            if (tempStatAddition != null)
            {
                try
                {
                    equippedClass.classStats.AddStatChartWithoutActive(tempStatAddition);
                }
                catch (Exception)
                {
                }
            }

            if (tempCP != null)
            {
                try
                {
                    equippedClass.AddPoints(tempCP);
                }
                catch (Exception)
                {
                }
            }
            #endregion

            additionStat   = tempStatAddition;
            additionPoints = tempCP;
            TBAGW.Utilities.ExpGainScreen.levelUpInfo = this;
        }
예제 #6
0
        private bool TryExtractActiveStats(ref STATChart temp, LuaStat ls)
        {
            foreach (var item in Enum.GetNames(typeof(HealthNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentActiveStats[(int)TBAGW.STATChart.ACTIVESTATS.HP] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(ManaNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentActiveStats[(int)TBAGW.STATChart.ACTIVESTATS.MANA] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(AmmoNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentActiveStats[(int)TBAGW.STATChart.ACTIVESTATS.AMMO] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(ShieldNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentActiveStats[(int)TBAGW.STATChart.ACTIVESTATS.SHIELD] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(StoredAPNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentActiveStats[(int)TBAGW.STATChart.ACTIVESTATS.STORED_AP] += ls.value;
                    return(true);
                }
            }
            return(false);
        }
        public void Start(STATChart start)
        {
            Show();
            editingStatChart = start;
            listBox1.Items.Clear();
            listBox1.SelectedIndex = -1;
            listBox1.Items.AddRange(editingStatChart.PassiveChartNames().ToArray());

            listBox2.Items.Clear();
            listBox2.SelectedIndex = -1;
            listBox2.Items.AddRange(editingStatChart.SpecialChartNames().ToArray());

            listBox3.Items.Clear();
            listBox3.SelectedIndex = -1;
            listBox3.Items.AddRange(editingStatChart.ActiveChartNames().ToArray());
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (button2.Enabled)
            {
                List <LUA.LuaGameClass> tempList = new List <LUA.LuaGameClass>();
                for (int i = 0; i < numericUpDown2.Value - numericUpDown1.Value; i++)
                {
                    var temp = LUA.LuaGameClass.editorSummon(selectedClass.Clone());
                    temp.parent.classLevel = ((int)numericUpDown1.Value) + i;
                    temp.level             = ((int)numericUpDown1.Value) + i;
                    temp.parent.HandleLevelUpEditorSimulation(temp);
                    temp.HandleLevelUp(temp.parent, new Utilities.Characters.BaseCharacter());
                    tempList.Add(temp);
                }

                STATChart tempStats = new STATChart(true);
                for (int i = 0; i < tempList.Count; i++)
                {
                    tempStats.AddStatChartWithoutActive(tempList[i].additionStat);
                }
                GetListBoxReady(tempStats);
            }
        }
예제 #9
0
        private bool TryExtractPassiveStats(ref STATChart temp, LuaStat ls)
        {
            foreach (var item in Enum.GetNames(typeof(MaxHealthNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.MAXHP] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(MaxManaNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.MAXMANA] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(MaxAmmoNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.MAXAMMO] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(MaxShieldNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.MAXSHIELD] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(StrNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.STR] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(DefNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.DEF] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(AgiNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.AGI] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(IntNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.INT] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(ApNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.AP] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(MobNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.MOB] += ls.value;
                    return(true);
                }
            }

            foreach (var item in Enum.GetNames(typeof(MasteryNames)))
            {
                if (item.Equals(ls.name, StringComparison.OrdinalIgnoreCase))
                {
                    temp.currentPassiveStats[(int)TBAGW.STATChart.PASSIVESTATS.MASTERY] += ls.value;
                    return(true);
                }
            }

            return(false);
        }
예제 #10
0
 private void ActivePassiveStatsEqual(ref STATChart temp)
 {
     temp.MakeSureActiveAndPassiveStatsEqual();
 }