Esempio n. 1
0
 public static int GetAttack(Follower f)
 {
     // 基础战力 + (星级基础战力 + 星级战力成长 * 等级) * 成长细数
     int attack = f.BasicAttack;
     attack += (int)(GetGrowAttack(f.CurStar, f.CurLevel) * f.GrowRatio);
     return attack;
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            PlayerObject.Instance.Self.Money = 99999;
            PlayerObject.Instance.Self.Exp = 99999;

            Follower f1 = new Follower();
            Console.WriteLine(FollowerLogic.GetAttack(f1));

            var p = FollowerLevelLogic.UpgradeRequire(f1);
            if (p != null)
            {
                Console.WriteLine(p.Exp);
                Console.WriteLine(p.Money);
            }

            FollowerLevelLogic.Upgrade(f1);
            Console.WriteLine(FollowerLogic.GetAttack(f1));

            var p2 = FollowerLevelLogic.UpgradeRequire(f1);
            if (p2 != null)
            {
                Console.WriteLine(p2.Exp);
                Console.WriteLine(p2.Money);
            }

            FollowerLevelLogic.Upgrade(f1);
            Console.WriteLine(FollowerLogic.GetAttack(f1));
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            ModuleManager.Instance.Init();

            var FollowerLevelModule = ModuleManager.Instance.GetModule("FollowerLevelModule");
            var FollowerModule = ModuleManager.Instance.GetModule("FollowerModule");
            var FollowerStarModule = ModuleManager.Instance.GetModule("FollowerStarModule");
            var FollowerCollectModule = ModuleManager.Instance.GetModule("FollowerCollectModule");

            var follower = new Follower()
            {
                CurStar = 1,
                CurLevel = 2,
            };

            //-------------------------FollowerLevelModule-------------------------------
            Console.WriteLine((FollowerLevelModule.CallFunc("CanUpgrade", follower)[0].ToString()));
            Console.WriteLine(((Package)FollowerLevelModule.CallFunc("UpgradeRequire", follower)[0]).Exp);
            Console.WriteLine(FollowerLevelModule.CallFunc("Upgrade", follower)[0].ToString());
            Console.WriteLine(((Package)FollowerLevelModule.CallFunc("UpgradeRequire", follower)[0]).Exp);

            //-------------------------FollowerModule------------------------------------
            Console.WriteLine(FollowerModule.CallFunc("GetAttack", follower)[0].ToString());

            //-------------------------FollowerModule------------------------------------
            Console.WriteLine(follower.CurStar + " " + follower.CurLevel);
            Console.WriteLine(FollowerStarModule.CallFunc("CanUpgrade", follower)[0].ToString());
            follower.CurLevel = 31;
            Console.WriteLine(FollowerStarModule.CallFunc("CanUpgrade", follower)[0].ToString());
            Console.WriteLine(((Package)FollowerStarModule.CallFunc("UpgradeRequire", follower)[0]).Exp);
            Console.WriteLine(((Package)FollowerStarModule.CallFunc("UpgradeRequire", follower)[0]).Money);
            Console.WriteLine(FollowerStarModule.CallFunc("Upgrade", follower)[0].ToString());
            Console.WriteLine(follower.CurStar + " " + follower.CurLevel);

            FollowerCollect fc = new FollowerCollect()
            {
                Followers = new List<Follower>()
            };
            fc.Followers.Add(follower);
            Console.WriteLine(FollowerCollectModule.CallFunc("GetAttack", fc)[0].ToString());

            Console.ReadKey();
        }
Esempio n. 4
0
 public static bool Upgrade(Follower f)
 {
     f.CurLevel++;
     return true;
 }
Esempio n. 5
0
 public static Package UpgradeRequire(Follower f)
 {
     var p = new Package();
     p.Exp = 100;
     return p;
 }
Esempio n. 6
0
 public static bool CanUpgrade(Follower f)
 {
     return true;
 }
Esempio n. 7
0
 public static Package UpgradeRequire(Follower f)
 {
     return null;
 }