feature/IMP-112-ascension-8-9 #59

Merged
mr.two merged 13 commits from feature/IMP-112-ascension-8-9 into develop 2026-04-29 21:27:24 +00:00
3 changed files with 28 additions and 4 deletions
Showing only changes of commit 3356d837c2 - Show all commits

View File

@@ -15,7 +15,7 @@ Decision.register({
modes_for_ascension_levels[3] = "only_nothing" modes_for_ascension_levels[3] = "only_nothing"
modes_for_ascension_levels[4] = "normal" modes_for_ascension_levels[4] = "normal"
MinigameDDRWindow.start("game", "generated", { local ddr_config = {
on_win = function(game_context) on_win = function(game_context)
if (game_context.special_mode_condition and Context.ascension.level == 1) then if (game_context.special_mode_condition and Context.ascension.level == 1) then
Context.should_ascend = true Context.should_ascend = true
@@ -31,6 +31,11 @@ Decision.register({
Context.have_done_work_today = true Context.have_done_work_today = true
end, end,
special_mode = modes_for_ascension_levels[Ascension.get_level()] or "normal" special_mode = modes_for_ascension_levels[Ascension.get_level()] or "normal"
}) }
if Context.meters and Context.meters.wpm < 100 then
ddr_config.arrow_fall_speed = 2.5
ddr_config.arrow_spawn_interval = 30
end
MinigameDDRWindow.start("game", "generated", ddr_config)
end, end,
}) })

View File

@@ -3,10 +3,24 @@ Decision.register({
label = "Play Rhythm Game", label = "Play Rhythm Game",
handle = function() handle = function()
Meter.hide() Meter.hide()
MinigameRhythmWindow.start("game", { local wpm_at_start = Context.meters and Context.meters.wpm or 0
local rhythm_config = {
focus_center_x = (Config.screen.width / 2) - 22, focus_center_x = (Config.screen.width / 2) - 22,
focus_center_y = (Config.screen.height / 2) - 18, focus_center_y = (Config.screen.height / 2) - 18,
focus_initial_radius = 0, focus_initial_radius = 0,
}) on_win = function()
if wpm_at_start > 900 then
Meter.add("ism", math.floor(Meter.get_max() * 0.05))
Meter.add("bm", math.floor(Meter.get_max() * 0.05))
end
Meter.show()
Window.set_current("game")
end,
}
if wpm_at_start < 100 then
rhythm_config.line_speed = 0.025
rhythm_config.initial_target_width = 0.2
end
MinigameRhythmWindow.start("game", rhythm_config)
end, end,
}) })

View File

@@ -168,6 +168,7 @@ function Meter.apply_ddr_reward(mistake_count)
if not Context or not Context.meters then return end if not Context or not Context.meters then return end
local max = Meter.get_max() local max = Meter.get_max()
local m = Context.meters local m = Context.meters
local wpm_was_high = m.wpm > 900
local wpm_pct, ism_pct, bm_pct local wpm_pct, ism_pct, bm_pct
if mistake_count == 0 then if mistake_count == 0 then
wpm_pct, ism_pct, bm_pct = -0.10, 0.05, 0.05 wpm_pct, ism_pct, bm_pct = -0.10, 0.05, 0.05
@@ -185,6 +186,10 @@ function Meter.apply_ddr_reward(mistake_count)
if bm_pct ~= 0 then if bm_pct ~= 0 then
Meter.add("bm", math.floor(max * bm_pct)) Meter.add("bm", math.floor(max * bm_pct))
end end
if wpm_was_high then
Meter.add("ism", math.floor(max * 0.05))
Meter.add("bm", math.floor(max * 0.05))
end
m.combo = m.combo + 1 m.combo = m.combo + 1
m.combo_timer = 0 m.combo_timer = 0
end end