fix(game): restore physical target-bank rules

Attach recovered score and rule flags to type-2 collision records. Deactivate
complete three-line groups through their contact owner, rearm all five
bumper-value groups after completion, and rearm all four central groups after
advancing the TDK diamond.

Remove the broad side and colored-target coordinate checks those physical
records replace. Preserve exact 5,000, 100,000, bank, and wheel-trigger scores
from the initialized object ledger.

Test Plan:
- `cargo test --all-targets` -- 46 passed
- `cargo clippy --all-targets -- -D warnings` -- passed
- `cargo build --profile production` -- passed
- target-bank deactivation, completion, and rearm test -- passed
- `git diff --cached --check` -- passed
This commit is contained in:
2026-08-22 21:20:15 +02:00
parent 20e751de80
commit 1ca8597080
4 changed files with 129 additions and 34 deletions
+32
View File
@@ -18,6 +18,9 @@ pub struct TableSegment {
pub segment: Segment,
pub normal_rebound: f32,
pub tangent_coupling: f32,
pub score: u32,
pub flags: u16,
pub contact_group: u8,
}
impl TableSegment {
@@ -40,11 +43,40 @@ impl TableSegment {
27 | 28 | 29 | 30 | 31 | 32 | 105 => (0.60, 0.20),
_ => (0.60, 0.10),
};
let score = match id {
12 => 5_000,
45 => 100_000,
84 | 90..=99 | 102 | 109 | 112 | 115 | 118 => 1_500,
121 => 2_000,
_ => 0,
};
let flags = match id {
84 => 0x0004,
90..=104 => 0x208a,
109 | 112 | 115 | 118 => 0x2092,
121 => 0x0400,
_ => 0,
};
let contact_group = match id {
90..=92 => 90,
93..=95 => 93,
96..=98 => 96,
99..=101 => 99,
102..=104 => 102,
109..=111 => 109,
112..=114 => 112,
115..=117 => 115,
118..=120 => 118,
_ => 0,
};
Self {
id,
segment: Segment::new(start, end, normal_rebound),
normal_rebound,
tangent_coupling,
score,
flags,
contact_group,
}
}
}