fix: exclude synchronized dex from inheritance

This commit is contained in:
2026-08-11 08:11:58 +00:00
parent 32d2f7b0d1
commit 3d6a10b206
2 changed files with 46 additions and 13 deletions
+23
View File
@@ -5,6 +5,7 @@ use sammo\CentennialAllStarGrowth;
use sammo\CentennialAllStarGrowthService;
use sammo\General;
use sammo\GameConst;
use sammo\InheritancePointManager;
$loader = require __DIR__ . '/../vendor/autoload.php';
$loader->addPsr4('sammo\\', __DIR__ . '/../hwe/sammo', true);
@@ -550,6 +551,28 @@ final class CentennialAllStarGrowthTest extends TestCase
self::assertSame(1, $result['previousDexExtensionMilestone']);
}
public function testSynchronizedDexDoesNotIncreaseInheritancePoint(): void
{
$vars = $this->emptyGeneralVars();
$vars['dex1'] = 1_300_000;
$vars['dex2'] = 1_300_000;
$aux = CentennialAllStarGrowthService::initialAux(
$this->singleDexTarget('inheritance', 0),
[]
);
$aux['granted']['dex1'] = 1_000_000;
$general = $this->createStateGeneralMock($vars, $aux);
self::assertSame(
1_400.0,
InheritancePointManager::getInstance()->getDexInheritancePoint(
$general,
1_000_000,
[1, 2, 3, 4, 5]
)
);
}
public function testDexExtensionDoesNotRefillConsumedConversionBudget(): void
{
$target = $this->singleDexTarget('extended-consumed', 0, 2000000);