/// <summary> /// Initializes a new instance of the <see cref="Battle" /> class. /// </summary> internal Battle(Device device, Level attacker, Level defender, bool duel) { this.Duel = duel; this.Device = device; this.Attacker = attacker; this.Defender = defender; this.BattleLog = new BattleLog(this); this.Recorder = new BattleRecorder(this); this.Commands = new List <Command>(64); this.Viewers = new List <Device>(32); this.AttackTime = Globals.AttackLength; this.PreparationTime = duel ? Globals.AttackPrepartionLength2 : Globals.AttackPrepartionLength; this.RemainingBattleTime = 1000 * (this.AttackTime + this.PreparationTime) / 16; this.EndClientTurn(); }
/// <summary> /// Initializes a new instance of the <see cref="Battle" /> class. /// </summary> internal Battle(Device device, Level attacker, Level defender, bool duel) { this.Duel = duel; this.Device = device; this.Attacker = attacker; this.Defender = defender; this.BattleLog = new BattleLog(this); this.Recorder = new BattleRecorder(this); this.Commands = new List <Command>(64); this.Viewers = new List <Device>(32); this.AttackTime = Globals.AttackLength; this.PreparationTime = duel ? Globals.AttackPrepartionLength2 : Globals.AttackPrepartionLength; this.RemainingBattleTime = 1000 * (this.AttackTime + this.PreparationTime) / 16; this.WinScore = this.Attacker.Player.Score + Core.Resources.Random2.Next(10, 20);//_Battle.Defender.Player.Score + 1 this.WinDuelScore = this.Attacker.Player.DuelScore + Core.Resources.Random2.Next(10, 20); this.LostScore = this.Attacker.Player.Score - Core.Resources.Random2.Next(10, 20); this.EndClientTurn(); }