Reveal selected ball centres before native split and verify exact selected IDs

This commit is contained in:
NINI
2026-10-07 00:31:12 +09:00
parent cc88785e7c
commit 196f0ebb07
2 changed files with 21 additions and 1 deletions
+6 -1
View File
@@ -53,13 +53,18 @@ function SplitReal([int]$Stage,[int]$Selected,[string]$Name) {
$before=Save "$Name-before-$attempt"; $board=Board $before $Stage
$group=@($board.groups|Sort-Object {$_.ballIds.Count} -Descending)[0]
$ids=@(if($Stage-eq13-and$Selected-eq2){$group.ballIds[0];$group.ballIds[-1]}else{$group.ballIds|Select-Object -First $Selected})
if(@($ids|Where-Object{!(BallClear $board $_)}).Count){Orbit "$Name-reveal-selected-$attempt" $board;continue}
TapBall "$Name-choose-$attempt" $board $ids[0]
Step "$Name-mode-$attempt" @('shell','input','tap','312','832')
foreach($id in $ids){TapBall "$Name-select-$attempt-$id" $board $id}
$point=BallPoint $board $ids[0]
Step "$Name-drag-$attempt" @('shell','input','swipe',"$($point[0])","$($point[1])","$($point[0])","$($point[1]-160)",'500')
$after=Save "$Name-after-$attempt"; $actual=Board $after $Stage
if($null-eq$actual-or$actual.groups.Count-gt$board.groups.Count){return $after}
if($null-eq$actual){$actual=$after.latestFreePlay}
if($actual.groups.Count-gt$board.groups.Count){
Check "$Name-exact-selected-ids-$attempt" (@($actual.groups|Where-Object{(($_.ballIds|Sort-Object)-join',')-eq(($ids|Sort-Object)-join',')}).Count-eq1) 'Native split group is exactly the tapped selection, not an occluded substitute'
return $after
}
# Cancel failed selection before a new view; do not silently turn an invalid selection into a solve.
Step "$Name-cancel-$attempt" @('shell','input','tap','312','832')
Orbit "$Name-orbit-$attempt" $board