Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ function MP.reset_game_states()
end_pvp = false,
enemy = {
score = MP.INSANE_INT.empty(),
real_score = MP.INSANE_INT.empty(),
score_text = "0",
hands = 4,
hands_text = "4",
Expand Down
2 changes: 2 additions & 0 deletions lib/ghost_replay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function MP.GHOST.init_playback(ante)
MP.GHOST._hand_idx = 1
local score = MP.INSANE_INT.from_string(hands[1].score)
MP.GAME.enemy.score = score
MP.GAME.enemy.real_score = score
MP.GAME.enemy.score_text = MP.INSANE_INT.to_string(score)
MP.GAME.enemy.hands = hands[1].hands_left or 0
MP.GAME.enemy.info_received = true
Expand Down Expand Up @@ -97,6 +98,7 @@ function MP.GHOST.advance_hand()
func = function(t) return math.floor(t) end,
}))

MP.GAME.enemy.real_score = score
MP.GAME.enemy.hands = entry.hands_left or 0
MP.GAME.enemy.info_received = true
if MP.UI.juice_up_pvp_hud then MP.UI.juice_up_pvp_hud() end
Expand Down
2 changes: 2 additions & 0 deletions networking/action_handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ local function action_start_blind(p)
-- Reset the stored opponent score each blind so the first frame after we
-- play (which lifts the "???" mask) shows 0, not last blind's stale score.
MP.GAME.enemy.score = MP.INSANE_INT.empty()
MP.GAME.enemy.real_score = MP.INSANE_INT.empty()
MP.GAME.enemy.score_text = "0"
-- Re-mask the opponent's hands until the first enemyInfo of the new blind.
MP.GAME.enemy.info_received = false
Expand Down Expand Up @@ -428,6 +429,7 @@ local function action_enemy_info(p)
play_sound("gong", 0.765, 0.4)
end

MP.GAME.enemy.real_score = score
MP.GAME.enemy.hands = hands_left
MP.GAME.enemy.skips = skips
MP.GAME.enemy.lives = lives
Expand Down
6 changes: 4 additions & 2 deletions ui/game/timer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ function MP.UI.cam_timer_opponent()
if MP.GAME.timer <= 0 then return false end
if MP.GAME.nemesis_timer_started then return false end
if MP.is_pvp_boss() and MP.is_layer_active("pvp_timer") then
if MP.GAME.end_pvp then return false end
if G.STATE == G.STATES.ROUND_EVAL or G.STATE == G.STATES.NEW_ROUND then return false end
if MP.INSANE_INT.greater_than(MP.GAME.score, MP.GAME.enemy.score) then return true end
if MP.INSANE_INT.equal(MP.GAME.score, MP.GAME.enemy.score) then return MP.GAME.pvp_reached_first end
if MP.LOBBY.config.hide_score_until_played and not MP.GAME.enemy.info_received then return false end
if MP.INSANE_INT.greater_than(MP.GAME.score, MP.GAME.enemy.real_score) then return true end
if MP.INSANE_INT.equal(MP.GAME.score, MP.GAME.enemy.real_score) then return MP.GAME.pvp_reached_first end
return false
end
return MP.GAME.ready_blind
Expand Down