fix(crew): grant ace qualification at the vehicle RP threshold
Settlement already added an expert crew's battle RP to expertToAceProgress but capped
it at train3Cost_exp and left the crew at expert. The stock tooltip says ace is
"obtained for free when the crew gets {expAmount} with the current vehicle"
(crew/qualification/specDescriptionPart), and the client's discount stages end at
75 % (wp_get_specialization_cost_gold -> aces.exe 2.61.0.37 0x9165f0). The crew now
becomes ace once the RP reaches the target and its progress entry is dropped, as
the client drops an empty expertToAceProgress block (0x93b4eb). The ace price no
longer has its own "free at 100 %" case, so it matches the price the client shows.
Checked: typecheck.
This commit is contained in:
1 parent
747c4d4594
commit
2a89070f3e
3 files changed
+28
-4
No files matched your search
@@ -98,6 +98,14 @@ export function addExpertToAceRp(crew: BlkBlock, vehicle: string, deltaRp: numbe
|
||||
if (next !== current) setParam(ensureBlock(crew, ACE_PROGRESS), vehicle, { type: 'int', value: next });
|
||||
}
|
||||
|
||||
/** Drop the vehicle's Expert-to-Ace RP, and the block when it is empty (as the client does, 0x93b4eb). */
|
||||
export function clearExpertToAceRp(crew: BlkBlock, vehicle: string): void {
|
||||
const progress = findBlock(crew, ACE_PROGRESS);
|
||||
if (!progress) return;
|
||||
progress.params = progress.params.filter((param) => param.name !== vehicle);
|
||||
if (progress.params.length === 0 && progress.blocks.length === 0) crew.blocks = crew.blocks.filter((block) => block !== progress);
|
||||
}
|
||||
|
||||
function intOf(block: BlkBlock, name: string): number {
|
||||
const value = findParam(block, name)?.value;
|
||||
if (value?.type === 'int64') return Number(value.value);
|
||||
|
||||
Reference in new issue
Block a user