Beispiel #1
0
        public GrowSimulator BuildSim()
        {
//            uint uid = UnitForm.GetUnitIDWhereSupportClass((uint)this.AddressList.SelectedIndex);
            uint uid = 0;

            GrowSimulator sim = new GrowSimulator();

            UnitForm.GetSim(ref sim
                            , uid //支援クラス
                            );
            sim.SetClassBase(
                (int)B11.Value                 //hp
                , (int)B12.Value               //str
                , (int)B13.Value               //skill
                , (int)B14.Value               //spd
                , (int)B15.Value               //def
                , (int)B16.Value               //res
                , (int)MagicExtClassBase.Value //magic extends
                );
            sim.SetClassGrow(
                (int)B27.Value                 //hp
                , (int)B28.Value               //str
                , (int)B29.Value               //skill
                , (int)B30.Value               //spd
                , (int)B31.Value               //def
                , (int)B32.Value               //res
                , (int)B33.Value               //luck
                , (int)MagicExtClassGrow.Value //magic extends
                );

            return(sim);
        }
Beispiel #2
0
        public GrowSimulator BuildSim()
        {
            GrowSimulator sim = new GrowSimulator();

            sim.SetUnitBase((int)B11.Value   //LV
                            , (int)b12.Value //hp
                            , (int)b13.Value //str
                            , (int)b14.Value //skill
                            , (int)b15.Value //spd
                            , (int)b16.Value //def
                            , (int)b17.Value //res
                            , (int)b18.Value //luck
                            , 0
                            );
            sim.SetUnitGrow(
                (int)B28.Value   //hp
                , (int)B29.Value //str
                , (int)B30.Value //skill
                , (int)B31.Value //spd
                , (int)B32.Value //def
                , (int)B33.Value //res
                , (int)B34.Value //luck
                , 0
                );
            ClassForm.GetSim(ref sim
                             , (uint)B5.Value //支援クラス
                             );

            return(sim);
        }
Beispiel #3
0
        public static void GetSim(ref GrowSimulator sim, uint cid)
        {
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(cid);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }
            sim.SetClassBase(
                (int)Program.ROM.u8(addr + 11)                            //hp
                , (int)Program.ROM.u8(addr + 12)                          //str
                , (int)Program.ROM.u8(addr + 13)                          //skill
                , (int)Program.ROM.u8(addr + 14)                          //spd
                , (int)Program.ROM.u8(addr + 15)                          //def
                , (int)Program.ROM.u8(addr + 16)                          //res
                , (int)MagicSplitUtil.GetClassBaseMagicExtends(cid, addr) //ext_magic
                );
            sim.SetClassGrow(
                (int)Program.ROM.u8(addr + 27)                            //hp
                , (int)Program.ROM.u8(addr + 28)                          //str
                , (int)Program.ROM.u8(addr + 29)                          //skill
                , (int)Program.ROM.u8(addr + 30)                          //spd
                , (int)Program.ROM.u8(addr + 31)                          //def
                , (int)Program.ROM.u8(addr + 32)                          //res
                , (int)Program.ROM.u8(addr + 33)                          //luck
                , (int)MagicSplitUtil.GetClassGrowMagicExtends(cid, addr) //ext_magic
                );
        }
Beispiel #4
0
        private void AddressList_SelectedIndexChanged(object sender, EventArgs e)
        {
            X_SIM.Value = GrowSimulator.CalcMaxLevel((uint)B5.Value);
            X_SIM_ValueChanged(null, null);
            CheckHardCodingWarning();
//            MeleeAndMagicFix();
        }
Beispiel #5
0
        private void AddressList_SelectedIndexChanged(object sender, EventArgs e)
        {
            U.ForceUpdate(X_SIM, GrowSimulator.CalcMaxLevel((uint)this.AddressList.SelectedIndex));

            X_SIM_ValueChanged(null, null);
            CheckHardCodingWarning();
        }
Beispiel #6
0
        public GrowSimulator BuildSim()
        {
            GrowSimulator sim = new GrowSimulator();

            UnitForm.SetSimUnit(ref sim
                                , 0 //支援クラス
                                );
            sim.SetClassBase(
                (int)B11.Value   //hp
                , (int)B12.Value //str
                , (int)B13.Value //skill
                , (int)B14.Value //spd
                , (int)B15.Value //def
                , (int)B16.Value //res
                , 0              //magic extends
                );
            sim.SetClassGrow(
                (int)B27.Value   //hp
                , (int)B28.Value //str
                , (int)B29.Value //skill
                , (int)B30.Value //spd
                , (int)B31.Value //def
                , (int)B32.Value //res
                , (int)B33.Value //luck
                , 0              //magic extends
                );

            return(sim);
        }
Beispiel #7
0
        public static void SetSimUnit(ref GrowSimulator sim, uint uid)
        {
            if (uid == 0 || uid == U.NOT_FOUND)
            {
                return;
            }
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(uid - 1);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }

            sim.SetUnitBase((int)Program.ROM.u8(addr + 11)                                  //LV
                            , (int)(sbyte)Program.ROM.u8(addr + 12)                         //hp
                            , (int)(sbyte)Program.ROM.u8(addr + 13)                         //str
                            , (int)(sbyte)Program.ROM.u8(addr + 14)                         //skill
                            , (int)(sbyte)Program.ROM.u8(addr + 15)                         //spd
                            , (int)(sbyte)Program.ROM.u8(addr + 16)                         //def
                            , (int)(sbyte)Program.ROM.u8(addr + 17)                         //res
                            , (int)(sbyte)Program.ROM.u8(addr + 18)                         //luck
                            , (int)(sbyte)MagicSplitUtil.GetUnitBaseMagicExtends(uid, addr) //magic ext
                            );
            sim.SetUnitGrow(
                (int)Program.ROM.u8(addr + 28)                           //hp
                , (int)Program.ROM.u8(addr + 29)                         //str
                , (int)Program.ROM.u8(addr + 30)                         //skill
                , (int)Program.ROM.u8(addr + 31)                         //spd
                , (int)Program.ROM.u8(addr + 32)                         //def
                , (int)Program.ROM.u8(addr + 33)                         //res
                , (int)Program.ROM.u8(addr + 34)                         //luck
                , (int)MagicSplitUtil.GetUnitGrowMagicExtends(uid, addr) //magic ext
                );
        }
Beispiel #8
0
 private void AddressList_SelectedIndexChanged(object sender, EventArgs e)
 {
     X_SIM.Value = GrowSimulator.CalcMaxLevel((uint)B5.Value);
     X_SIM_ValueChanged(null, null);
     SkillUtil.MakeUnitSkillButtons(X_SkillType, (uint)this.AddressList.SelectedIndex + 1, this.X_SkillButtons, this.X_Tooltip);
     CheckHardCodingWarning();
 }
        public void SetParam(uint lv, uint grow, uint unitid, uint classid)
        {
            if (classid == 0)
            {
                classid = UnitForm.GetUnitIDWhereSupportClass(unitid);
            }

            GrowSimulator sim = new GrowSimulator();

            UnitForm.SetSimUnit(ref sim, unitid);
            ClassForm.SetSimClass(ref sim, classid);

            if (UnitForm.isHighClass(unitid) || ClassForm.isHighClass(classid))
            {
                lv += 10;
            }

            GrowSimulator.GrowOptionEnum growOption = GrowSimulator.GrowOptionEnum.None;
            if (grow == 1)
            {
                growOption = GrowSimulator.GrowOptionEnum.ClassGrow;
                sim.SetUnitLv1();
            }
            sim.Grow((int)lv, growOption);

            U.SelectedIndexSafety(X_SIM_HP, sim.sim_hp);
            U.SelectedIndexSafety(X_SIM_STR, sim.sim_str);
            U.SelectedIndexSafety(X_SIM_SKILL, sim.sim_skill);
            U.SelectedIndexSafety(X_SIM_SPD, sim.sim_spd);
            U.SelectedIndexSafety(X_SIM_DEF, sim.sim_def);
            U.SelectedIndexSafety(X_SIM_RES, sim.sim_res);
            U.SelectedIndexSafety(X_SIM_LUCK, sim.sim_luck);
            U.SelectedIndexSafety(X_SIM_MAGICEX_Value, sim.sim_ext_magic);
        }
Beispiel #10
0
        public static void GetSim(ref GrowSimulator sim, uint uid)
        {
            if (uid == 0)
            {
                return;
            }
            uid--;
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(uid);

            if (!Program.ROM.isSafetyOffset(addr))
            {
                return;
            }

            sim.SetUnitBase((int)Program.ROM.u8(addr + 11)   //LV
                            , (int)Program.ROM.u8(addr + 12) //hp
                            , (int)Program.ROM.u8(addr + 13) //str
                            , (int)Program.ROM.u8(addr + 14) //skill
                            , (int)Program.ROM.u8(addr + 15) //spd
                            , (int)Program.ROM.u8(addr + 16) //def
                            , (int)Program.ROM.u8(addr + 17) //res
                            , (int)Program.ROM.u8(addr + 18) //luck
                            );
            sim.SetUnitGrow(
                (int)Program.ROM.u8(addr + 28)   //hp
                , (int)Program.ROM.u8(addr + 29) //str
                , (int)Program.ROM.u8(addr + 30) //skill
                , (int)Program.ROM.u8(addr + 31) //spd
                , (int)Program.ROM.u8(addr + 32) //def
                , (int)Program.ROM.u8(addr + 33) //res
                , (int)Program.ROM.u8(addr + 34) //luck
                );
        }
Beispiel #11
0
        private void AddressList_SelectedIndexChanged(object sender, EventArgs e)
        {
            U.ForceUpdate(X_SIM, GrowSimulator.ClassMaxLevel((uint)this.AddressList.SelectedIndex));

            X_SIM_ValueChanged(null, null);
            SkillUtil.MakeClassSkillButtons(X_SkillType, (uint)this.AddressList.SelectedIndex, this.X_SkillButtons, this.X_Tooltip);

            //SkillSystemsによる 特効リワーク
            if (PatchUtil.SearchClassType() == PatchUtil.class_type_enum.SkillSystems_Rework)
            {
                X_CLASSTYPE.Text = ClassForm.GetClassType((uint)this.D80.Value);
            }
        }
        public GrowSimulator BuildSim()
        {
            GrowSimulator sim = new GrowSimulator();

            UnitForm.GetSim(ref sim
                            , (uint)B0.Value //ユニット
                            );
            ClassForm.GetSim(ref sim
                             , (uint)B1.Value //クラス
                             );

            return(sim);
        }
Beispiel #13
0
        private void X_SIM_ValueChanged(object sender, EventArgs e)
        {
            if (this.InputFormRef != null && this.InputFormRef.IsUpdateLock)
            {
                return;
            }

            GrowSimulator sim = BuildSim();

            sim.Grow((int)X_SIM.Value, true);

            X_SIM.Value       = sim.sim_lv;
            X_SIM_HP.Value    = sim.sim_hp;
            X_SIM_STR.Value   = sim.sim_str;
            X_SIM_SKILL.Value = sim.sim_skill;
            X_SIM_SPD.Value   = sim.sim_spd;
            X_SIM_DEF.Value   = sim.sim_def;
            X_SIM_RES.Value   = sim.sim_res;
            X_SIM_LUCK.Value  = sim.sim_luck;
        }
Beispiel #14
0
        private void X_SIM_ValueChanged(object sender, EventArgs e)
        {
            if (this.InputFormRef != null && this.InputFormRef.IsUpdateLock)
            {
                return;
            }

            GrowSimulator sim = BuildSim();

            sim.Grow((int)X_SIM.Value, false);

            X_SIM.Value = sim.sim_lv;
            U.SelectedIndexSafety(X_SIM_HP, sim.sim_hp);
            U.SelectedIndexSafety(X_SIM_STR, sim.sim_str);
            U.SelectedIndexSafety(X_SIM_SKILL, sim.sim_skill);
            U.SelectedIndexSafety(X_SIM_SPD, sim.sim_spd);
            U.SelectedIndexSafety(X_SIM_DEF, sim.sim_def);
            U.SelectedIndexSafety(X_SIM_RES, sim.sim_res);
            U.SelectedIndexSafety(X_SIM_LUCK, sim.sim_luck);
            U.SelectedIndexSafety(X_SIM_SUM_RATE, sim.sim_sum_grow_rate);
        }
Beispiel #15
0
        private void X_SIM_ValueChanged(object sender, EventArgs e)
        {
            if (this.InputFormRef != null && this.InputFormRef.IsUpdateLock)
            {
                return;
            }

            using (U.ActiveControlSave uac = new U.ActiveControlSave(this))
            {
                GrowSimulator sim = BuildSim();
                sim.Grow((int)X_SIM.Value, GrowSimulator.GrowOptionEnum.ClassGrow);

                U.SelectedIndexSafety(X_SIM_HP, sim.sim_hp);
                U.SelectedIndexSafety(X_SIM_STR, sim.sim_str);
                U.SelectedIndexSafety(X_SIM_SKILL, sim.sim_skill);
                U.SelectedIndexSafety(X_SIM_SPD, sim.sim_spd);
                U.SelectedIndexSafety(X_SIM_DEF, sim.sim_def);
                U.SelectedIndexSafety(X_SIM_RES, sim.sim_res);
                U.SelectedIndexSafety(X_SIM_LUCK, sim.sim_luck);
                U.SelectedIndexSafety(X_SIM_SUM_RATE, sim.sim_sum_grow_rate);
            }
        }
Beispiel #16
0
 private void AddressList_SelectedIndexChanged(object sender, EventArgs e)
 {
     X_SIM.Value = GrowSimulator.CalcMaxLevel((uint)B5.Value);
     X_SIM_ValueChanged(null, null);
 }