Skip to content

Commit

Permalink
Fix Battle Engine
Browse files Browse the repository at this point in the history
Fix Battle Engine
  • Loading branch information
jonamix-ar committed Jun 4, 2024
1 parent 93665c5 commit 509384a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/Libraries/BattleEngine/CombatObject/PhysicShot.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class PhysicShot
private $bouncedDamage = 0;
private $hullDamage = 0;
private $cellDestroyed = 0;
private $fighters;

/**
* PhysicShot::__construct()
Expand Down
11 changes: 7 additions & 4 deletions app/Libraries/BattleEngine/Core/BattleReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Libraries\BattleEngine\Models\PlayerGroup;
use App\Libraries\BattleEngine\Utils\Events;
use App\Libraries\BattleEngine\Utils\Math;
use App\Libraries\Functions;
use Exception;

/**
Expand Down Expand Up @@ -256,7 +257,7 @@ public function getAttackerDebris()
$metal += $lost[0];
$crystal += $lost[1];
}
$factor = constant(strtoupper($role) . '_DEBRIS_FACTOR');
$factor = Functions::readConfig('fleet_cdr') / 100;
$sendMetal += $metal * $factor;
$sendCrystal += $crystal * $factor;
}
Expand All @@ -278,7 +279,7 @@ public function getDefenderDebris()
$metal += $lost[0];
$crystal += $lost[1];
}
$factor = constant(strtoupper($role) . '_DEBRIS_FACTOR');
$factor = Functions::readConfig('defs_cdr') / 100;
$sendMetal += $metal * $factor;
$sendCrystal += $crystal * $factor;
}
Expand All @@ -302,7 +303,8 @@ public function getAttackersTech()
$techs[$player->getId()] = [
$player->getWeaponsTech(),
$player->getShieldsTech(),
$player->getArmourTech()];
$player->getArmourTech()
];
}
return $techs;
}
Expand All @@ -315,7 +317,8 @@ public function getDefendersTech()
$techs[$player->getId()] = [
$player->getWeaponsTech(),
$player->getShieldsTech(),
$player->getArmourTech()];
$player->getArmourTech()
];
}
return $techs;
}
Expand Down

0 comments on commit 509384a

Please sign in to comment.