MV Hey all! I'm working on a Suikoden dice cup minigame in MV and need another set of eyes

I'm working on a suikoden-inspired dice cup game. However, I'm running into a problem getting the house to roll.
I have 3 common events: Rolling the dice, Evaluating, and Scoring. Rolling the dice works fine, but when going through this event, the Evaluating, it fails when it's the house's turn to roll. And it skips the Scoring event entirely as a result.
I'm happy to provide any answers, but I have been staring at this for a while and don't see the issue.
Code:
◆Comment:---Sorting Dice---
◆Control Variables:#0027 Temp = 0
◆If:Die 1 > Die 2
  ◆Control Variables:#0027 Temp = Die 1
  ◆Control Variables:#0021 Die 1 = Die 2
  ◆Control Variables:#0022 Die 2 = Temp
  ◆
:End
◆If:Die 2 > Die 3
  ◆Control Variables:#0027 Temp = Die 2
  ◆Control Variables:#0022 Die 2 = Die 3
  ◆Control Variables:#0023 Die 3 = Temp
  ◆
:End
◆If:Die 1 > Die 2
  ◆Control Variables:#0027 Temp = Die 1
  ◆Control Variables:#0021 Die 1 = Die 2
  ◆Control Variables:#0022 Die 2 = Temp
  ◆
:End
◆Comment:---Score Calculation---
◆Control Variables:#0027 Temp = 0
◆Comment:---Triples---
◆If:Script:($gameVariables.value(21) === $gameVariables.value(22)) && ($gameVariables.value(22) === $gameVariables.value(23))
  ◆Control Variables:#0027 Temp = 100 + $gameVariables.value(21)
  ◆Jump to Label:ScoreDone
  ◆
:End
◆Comment:---1-2-3(Auto Loss)---
◆If:Script:[1,2,3].toString() === [$gameVariables.value(21),$gameVariables.value(22),$gameVariables.value(23)].sort().toString()
  ◆Control Variables:#0027 Temp = -1
  ◆Jump to Label:ScoreDone
  ◆
:End
◆Comment:---4-5-6(Auto Win)---
◆If:Script:[4,5,6].toString() === [$gameVariables.value(21),$gameVariables.value(22),$gameVariables.value(23)].sort().toString()
  ◆Control Variables:#0027 Temp = 200
  ◆Jump to Label:ScoreDone
  ◆
:End
◆Comment:---Check pairs: (x, x, y) → score = y---
◆If:Script:$gameVariables.value(21) === $gameVariables.value(22)
  ◆Control Variables:#0027 Temp = $gameVariables.value(23)
  ◆Text:None, Window, Bottom
  :    :Score of \v[23]
  ◆Jump to Label:ScoreDone
  ◆
:Else
  ◆If:Script:$gameVariables.value(23) === $gameVariables.value(22)
    ◆Control Variables:#0027 Temp = $gameVariables.value(21)
    ◆Text:None, Window, Bottom
    :    :Score of \v[21]
    ◆Jump to Label:ScoreDone
    ◆
  :Else
    ◆If:Script:$gameVariables.value(23) === $gameVariables.value(21)
      ◆Control Variables:#0027 Temp = $gameVariables.value(22)
      ◆Text:None, Window, Bottom
      :    :Score of \v[22]
      ◆Jump to Label:ScoreDone
      ◆
    :Else
      ◆Control Variables:#0027 Temp = 0
      ◆Text:None, Window, Bottom
      :    :No score
      ◆Jump to Label:ScoreDone
      ◆
    :End
    ◆
  :End
  ◆
:End
◆Label:ScoreDone
◆If:House Turn is OFF
  ◆Comment:Player Turn
  ◆Control Variables:#0025 Player Score = Temp
  ◆Text:None, Window, Bottom
  :    :Player score is \v[25]
  ◆
:Else
  ◆Comment:House Turn
  ◆Control Variables:#0026 House Score = Temp
  ◆Text:None, Window, Bottom
  :    :House score is \v[25]
  ◆Common Event:Compare Results
  ◆
:End
◆Comment:---Re-Roll Logic---
◆If:House Turn is OFF
  ◆If:Roll Attempts < 2
    ◆Show Choices:Roll again, Keep (Window, Right, #1, #2)
    :When Roll again
      ◆Control Variables:#0024 Roll Attempts += 1
      ◆Common Event:Roll Dice
      ◆
    :When Keep
      ◆Comment:End Player Turn
      ◆Control Switches:#0008 House Turn = ON
      ◆
    :End
    ◆
  :End
  ◆
:End
◆If:Roll Attempts < 2
  ◆If:House Score = 0
    ◆Comment:House re-rolls bad rolls
    ◆Control Variables:#0024 Roll Attempts += 1
    ◆Common Event:Roll Dice
    ◆
  :End
  ◆
:End

Thanks for any help!
I don't know, but here's a function that I think has most of the Suikoden dice mechanics (it currently just logs to console, you can add to store the result in game variable):

function diceRoll() {

const playerDice1 = Math.randomInt(6)+1;
const playerDice2 = Math.randomInt(6)+1;
const playerDice3 = Math.randomInt(6)+1;
const enemyDice1 = Math.randomInt(6)+1;
const enemyDice2 = Math.randomInt(6)+1;
const enemyDice3 = Math.randomInt(6)+1;
const playerRolls = [playerDice1, playerDice2, playerDice3];
const enemyRolls = [enemyDice1, enemyDice2, enemyDice3];
let playerScore = 0;
let enemyScore = 0;
let result = "";

console.log(playerRolls);
console.log(enemyRolls);

if (playerDice1 === playerDice2 && playerDice1 === playerDice3) {
if (playerDice1 === 1) {
playerScore = -2; // THREE 1s
} else {
playerScore = 8; // THREE OF THE SAME
}
} else if ([1,2,3].every(number => playerRolls.includes(number))) {
playerScore = -1; // 1,2,3
} else if ([4,5,6].every(number => playerRolls.includes(number))) {
playerScore = 7; // 4,5,6
} else if (playerDice1 === playerDice2) {
playerScore = playerDice3;
} else if (playerDice1 === playerDice3) {
playerScore = playerDice2;
} else if (playerDice2 === playerDice3) {
playerScore = playerDice1;
} else {
playerScore = 0;
}

if (enemyDice1 === enemyDice2 && enemyDice1 === enemyDice3) {
if (enemyDice1 === 1) {
enemyScore = -2;
} else {
enemyScore = 8;
}
} else if ([1,2,3].every(number => enemyRolls.includes(number))) {
enemyScore = -1;
} else if ([4,5,6].every(number => enemyRolls.includes(number))) {
enemyScore = 7;
} else if (enemyDice1 === enemyDice2) {
enemyScore = enemyDice3;
} else if (enemyDice1 === enemyDice3) {
enemyScore = enemyDice2;
} else if (enemyDice2 === enemyDice3) {
enemyScore = enemyDice1;
} else {
enemyScore = 0;
}

if (playerScore === enemyScore) {
result = "draw";
} else if (playerScore === 8) {
result = "player three of same"
} else if (enemyScore === 8) {
result = "enemy three of same"
} else if (playerScore === 7) {
result = "player 4,5,6"
} else if (enemyScore === 7) {
result = "enemy 4,5,6"
} else if (playerScore === -2) {
result = "player triple 1s"
} else if (enemyScore === -2) {
result = "enemy triple 1s"
} else if (playerScore === -1) {
result = "player 1,2,3"
} else if (enemyScore === -1) {
result = "enemy 1,2,3"
} else if (playerScore > enemyScore) {
result = "player win"
} else if (enemyScore > playerScore) {
result = "enemy win"
}

console.log(result);

}

Original thread: https://forums.rpgmakerweb.com/threads/hey-all-im-working-on-a-suikoden-dice-cup-minigame-in-mv-and-need-another-set-of-eyes.181034/