Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Battle Engine #606

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading