public static int GetAttack(FollowerCollect fc) { int attack = 0; foreach (var i in fc.Followers) { attack += FollowerLogic.GetAttack(i); } return attack; }
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; }
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(); }
// 血量等于攻击力 public static int GetHp(FollowerCollect fc) { return GetAttack(fc); }
public static NormalFight CreateANormalFight(FollowerCollect partyA, FollowerCollect partyB, FightEventDelegate process) { var f = new NormalFight(partyA, partyB, process); return f; }