Ejemplo n.º 1
0
 public static int GetAttack(FollowerCollect fc)
 {
     int attack = 0;
     foreach (var i in fc.Followers)
     {
         attack += FollowerLogic.GetAttack(i);
     }
     return attack;
 }
Ejemplo n.º 2
0
 public NormalFight(FollowerCollect partyA, FollowerCollect partyB, FightEventDelegate process)
 {
     PartyA = partyA;
     PartyB = partyB;
     ProcessEvent = process;
     Damage = new List<int>()
     {
         FollowerCollectLogic.GetAttack(partyA),
         FollowerCollectLogic.GetAttack(partyB)
     };
     AllHp = new List<int>(Damage.ToArray());
     CurHp = new List<int>(Damage.ToArray());
     CurAttack = Damage[0] >= Damage[1] ? 0 : 1;
 }
Ejemplo 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();
        }
Ejemplo n.º 4
0
 // 血量等于攻击力
 public static int GetHp(FollowerCollect fc)
 {
     return GetAttack(fc);
 }
Ejemplo n.º 5
0
 public static NormalFight CreateANormalFight(FollowerCollect partyA, FollowerCollect partyB, FightEventDelegate process)
 {
     var f = new NormalFight(partyA, partyB, process);
     return f;
 }