Example #1
0
 public static FleetDamages GetEachFirstEnemyDamages(this Raigeki raigeki)
 => raigeki?.api_edam?.GetEachDamages()
 ?? defaultValue;
Example #2
0
 public static FleetDamages GetEachSecondEnemyDamages(this Raigeki raigeki)
 => raigeki?.api_edam?.GetEachDamages(true)
 ?? defaultValue;
Example #3
0
 public static IEnumerable <Attack> GetEnemyDamages(this Raigeki raigeki, int friendFleetIndex, int enemyFleetIndex)
 => raigeki?.api_fydam?
 .GetDamages(raigeki.api_frai, raigeki.api_fcl, friendFleetIndex, enemyFleetIndex, FleetType.Friend, FleetType.Enemy)
 ?? EmptyDamages;
Example #4
0
 public static FleetDamages GetEachFirstFriendDamages(this Raigeki raigeki)
 => raigeki?.api_fdam?.GetEachDamages()
 ?? defaultValue;
 public static FleetDamages[] GetEnemyDamagesCombined(this Raigeki raigeki)
 => raigeki?.api_edam?.GetCombinedDamages()
 ?? FleetDamages.EmptyDamages;
 public static FleetDamages GetEnemyDamages(this Raigeki raigeki)
 => raigeki?.api_edam?.GetDamages()
 ?? FleetDamages.EmptyDamage;
 public static FleetDamages GetFriendDamages(this Raigeki raigeki)
 => raigeki?.api_fdam?.GetDamages()
 ?? FleetDamages.EmptyDamage;
        private void TorpedoCombined(Raigeki torpedo)
        {
            if (torpedo == null) return;

            var friendDamages = torpedo.GetFriendDamagesCombined();
            var enemyDamages = torpedo.GetEnemyDamagesCombined();
            for (var i = 0; i < friendDamages.Length; i++)
            {
                this.FriendFleet.Fleets[i].CalcDamages(friendDamages[i]);
            }

            for (var i = 0; i < enemyDamages.Length; i++)
            {
                this.EnemyFleet.Fleets[i].CalcDamages(enemyDamages[i]);
            }
        }
        private void Torpedo(Raigeki torpedo, int friendFleetIndex = 0, int enemyFleetIndex = 0)
        {
            if (torpedo == null) return;

            var friendDamage = torpedo.GetFriendDamages();
            var enemyDamage = torpedo.GetEnemyDamages();
            this.FriendFleet.Fleets[friendFleetIndex].CalcDamages(friendDamage);
            this.EnemyFleet.Fleets[enemyFleetIndex].CalcDamages(enemyDamage);
        }