Esempio n. 1
0
 public AttackData(WeaponSystem weapon, GameUnitFireAllocation allocation, AttackSpecialProperties specialProperties = AttackSpecialProperties.None)
 {
     this.Weapon            = weapon;
     this.DamageType        = weapon.GetDamageType();
     this.SpecialProperties = specialProperties;
     this.BonusDice         = 0;
     this.TrackRating       = weapon.GetTrackRating();
 }
Esempio n. 2
0
        public void InitServices()
        {
            this.services = new ServiceCollection()
                            .AddLogging()
                            .AddSingleton <IDiceUtility, MockDice>() // Always rolls sixes on d6; always rolls 99 on d100
                            .BuildServiceProvider();

            this.weapon           = new BeamBatterySystem(3, "(All arcs)");
            this.weaponAllocation = new GameUnitFireAllocation();

            this.distanceGraph = new FormationDistanceGraph();

            this.totalDummy = new TestDummyActor(this.services);
            this.phaseDummy = new TestDummyPhaseActor(this.services);

            this.engine = new EventHandlingEngine();

            this.phaseEvent  = new FiringPhaseEvent(1, 1, this.distanceGraph) as GamePhaseEvent;
            this.attackEvent = new WeaponAttackEvent(new TargetingData(), new AttackData(this.weapon, this.weaponAllocation));
        }