Example #1
0
        public static General GenerateGeneral(GeneralTemplate template)
        {
            General config = new General();

            config.ID = template.ID;
            config.Title = template.Title;
            config.Name = template.Name;
            config.Star = template.Star;
            config.SoldierType = template.SoldierType;
            config.Nationality = template.Nationality;
            config.InitialLv = 1;
            config.IconID = "g1.png";
            config.ModelPatch = ModelPatchList[template.SoldierType];
            config.AttackType = template.SoldierType == 3 ? 8003 : 1;
            config.CriticalRate = 200;
            config.DodgeRate = 200;
            config.HitRate = 100;
            config.Souls = 0;
            config.Description = "";
            config.Rank1LeastLevel = 10;
            config.Rank2LeastLevel = 20;
            config.Rank3LeastLevel = 30;
            config.Rank4LeastLevel = 40;
            config.Rank5LeastLevel = 50;
            config.HPRankRate = 1.2f;
            config.ATKRankRate = 1.2f;
            config.DEFRankRate = 1.2f;

            config.HP = Formula.HPFromSta(template.Stamina * 5 );
            config.AttackPower = Formula.ATKFromStr(template.Strength * 5 );
            config.DefensePower = Formula.DEFFromAgi(template.Agility * 5);
            config.HPGrowth = Formula.HPFromSta(template.Stamina);
            config.ATKGrowth = Formula.ATKFromStr(template.Strength);
            config.DEFGrowth = Formula.DEFFromAgi(template.Agility);

            return config;
        }
Example #2
0
        public static General GenerateGeneral(int id, string name,int soldierType, MainAttribute attribute)
        {
            General config = new General();
            config.ID = id;

            config.Name = name;
            config.Title = "";
            config.Star = 1;
            config.SoldierType = soldierType;
            config.Nationality = 0;
            config.InitialLv = 1;
            config.IconID = "g0.png";
            config.ModelPatch = ModelPatchList[soldierType];
            config.AttackType = soldierType == 3 ? 8003 : 1;
            config.CriticalRate = 200;
            config.DodgeRate = 200;
            config.HitRate = 100;
            config.Souls = 0;
            config.RankUpLevel1Costs = "2,1003,100;";
            config.RankUpLevel2Costs = "2,1003,200;";
            config.RankUpLevel3Costs = "2,1003,300;";
            config.RankUpLevel4Costs = "2,1003,400;";
            config.RankUpLevel5Costs = "2,1003,500;";
            config.Rank1LeastLevel = 10;
            config.Rank2LeastLevel = 20;
            config.Rank3LeastLevel = 30;
            config.Rank4LeastLevel = 40;
            config.Rank5LeastLevel = 50;

            config.HP = attribute.HP;
            config.AttackPower = attribute.ATK;
            config.DefensePower = attribute.DEF;
            config.HPGrowth = attribute.HP_GROWTH;
            config.ATKGrowth = attribute.ATK_GROWTH;
            config.DEFGrowth = attribute.DEF_GROWTH;

            config.MoveSpeed = attribute.MOVE_SPEED;
            config.AttackRange = attribute.ATTACK_RANGE;
            config.AttackSpeed = attribute.ATTACK_SPEED;

            return config;
        }