Replaced diceBag()->normal with diceBag()->pseudoBell, added a few fight fixes.
This commit is contained in:
+2
-2
@@ -388,8 +388,8 @@ class Battle
|
||||
$defendersDefense = (int) round($defendersDefense, 0);
|
||||
|
||||
// Lets roll the
|
||||
$attackersAtkRoll = $this->game->getDiceBag()->normal(0, $attackersAttack);
|
||||
$defendersDefRoll = $this->game->getDiceBag()->normal(0, $defendersDefense);
|
||||
$attackersAtkRoll = $this->game->getDiceBag()->pseudoBell(0, $attackersAttack);
|
||||
$defendersDefRoll = $this->game->getDiceBag()->pseudoBell(0, $defendersDefense);
|
||||
$damage = $attackersAtkRoll - $defendersDefRoll;
|
||||
|
||||
// If the attacker's attack after modification is bigger than before,
|
||||
|
||||
+1
-1
@@ -536,7 +536,7 @@ class BuffList
|
||||
if ($buff->getBadguyDamageReflection() !== 0.) {
|
||||
if ($damage > 0) {
|
||||
// Damage is > 0, so badguy takes damage, we can normally reflect
|
||||
$reflectedDamage = (int)round($buff->getGoodguyDamageReflection() * $damage, 0);
|
||||
$reflectedDamage = (int)round($buff->getBadguyDamageReflection() * $damage, 0);
|
||||
if ($reflectedDamage === 0) {
|
||||
$message = $buff->getNoEffectMessage();
|
||||
} else {
|
||||
|
||||
@@ -33,6 +33,7 @@ class BattleTest extends CoreModelTestCase
|
||||
|
||||
public function getMockGame(Character $character): Game
|
||||
{
|
||||
mt_srand(0);
|
||||
$game = $this->getMockBuilder(Game::class)
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
Reference in New Issue
Block a user