speed(); $seconds = fn (float $atSpeedOne) => (int) round($atSpeedOne / $speed); $night = $config->get('combat.night'); $season = new Season($config); [$raidMin, $raidMax] = $config->get('raids.every_hours', [0, 0]); $drop = $config->get('combat.conquest.loyalty.drop', [20, 35]); return [ 'pace' => [ 'speed' => $speed, 'unit_speed' => (float) $config->get('movement.unit_speed', 1), 'protection' => $seconds($config->get('combat.beginner_protection', 0)), // Real time, not world time. 'inactive' => (int) ($config->get('world.inactive_days', 0) * 86400), ], 'village' => [ 'space' => (int) $config->get('world.village.space'), 'space_per_hq_level' => (int) $config->get('world.village.space_per_hq_level'), 'builders' => (int) $config->get('world.builders.base', 2), 'map_size' => (int) $config->get('world.map.size'), ], 'combat' => [ 'morale' => (bool) ($config->get('combat.morale.enabled') ?? false), 'luck' => (int) round($config->get('combat.luck', 0) * 100), 'night' => ($night['enabled'] ?? false) ? ['start' => $night['start'], 'end' => $night['end'], 'factor' => $night['factor']] : null, 'noble_distance' => (int) $config->get('combat.conquest.max_distance', 0), 'loyalty_drop' => $drop, 'loyalty_regen' => round($config->get('combat.conquest.loyalty.regen_per_hour', 1) * $speed, 2), ], // Real time, not world time. 'raids' => (bool) $config->get('raids.enabled') ? [ 'every' => [(int) round($raidMin * 3600), (int) round($raidMax * 3600)], 'warning' => (int) round($config->get('raids.gather_hours', 0) * 3600), 'range' => (int) $config->get('raids.range'), ] : null, 'tribes' => [ 'max_members' => (new Diplomacy($config))->maxMembers(), 'notice' => (new Diplomacy($config))->noticeSeconds(), ], 'season' => $season->count() > 0 ? [ 'crowns' => $season->count(), 'needed' => $season->needed(), 'crowns_after' => $seconds($config->get('world.season.crowns_after_days', 30) * 86400), 'hold' => $season->holdSeconds(), ] : null, ]; } }