Ejemplo n.º 1
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.SetSimClass(ref sim
                                  , (uint)B5.Value //支援クラス
                                  );

            return(sim);
        }
        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);
        }