setAccessible(true); $low = [ 'leadership' => 80, 'strength' => 70, 'intel' => 10, 'dex' => [0, 0, 0, 0, 0], ]; $high = [ 'leadership' => 95, 'strength' => 85, 'intel' => 10, 'dex' => [0, 0, 0, 0, 0], ]; self::assertSame(100000, $method->invoke(null, $low, 0)); self::assertSame(100000.0, $method->invoke(null, $low, 1)); self::assertSame(150000.0, $method->invoke(null, $high, 1)); self::assertSame(100000, $method->invoke(null, $high, 0)); } public function testEveryHistoricalEventSpecialHasAnImplementation(): void { $pool = json_decode( file_get_contents(self::POOL_PATH), true, 512, JSON_THROW_ON_ERROR ); $column = array_flip($pool['columns']); foreach ($pool['data'] as $row) { $special = $row[$column['specialDomestic']]; if ($special === null) { continue; } self::assertFileExists( __DIR__ . "/../hwe/sammo/ActionSpecialDomestic/{$special}.php" ); } } public function testEveryHistoricalEventSpecialIsExposedToTheFrontend(): void { $pool = json_decode( file_get_contents(self::POOL_PATH), true, 512, JSON_THROW_ON_ERROR ); $column = array_flip($pool['columns']); $registeredSpecials = array_flip(array_merge( GameConst::$availableSpecialDomestic, GameConst::$optionalSpecialDomestic )); foreach ($pool['data'] as $row) { $special = $row[$column['specialDomestic']]; if ($special === null || $special === '') { continue; } self::assertArrayHasKey( $special, $registeredSpecials, "{$special} must be included in GetConst iActionInfo.specialDomestic" ); } } }