From 2520b10ebe8f8e6d06e767b48968a6dbf8db2fca Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 12 Dec 2023 19:11:51 -0500 Subject: Added orange puzzles (the addition data is bad btw) --- randomizer/generator.gd | 72 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) (limited to 'randomizer') diff --git a/randomizer/generator.gd b/randomizer/generator.gd index e04d0e3..fb0c6b0 100644 --- a/randomizer/generator.gd +++ b/randomizer/generator.gd @@ -526,7 +526,10 @@ func generate(chosen_seed): _gSingle("Painting Room/Panel_any_many", kBlueMiddle) _gSingle("Painting Room/Panel_man_many", kBlueMiddle) _clearFlag(kShortAnswer) - _writePanel("Painting Room/Panel_order_onepathmanyturns", "order", "%s road %s turns" % [_answer_by_path["Painting Room/Panel_eon_one"], _answer_by_path["Painting Room/Panel_any_many"]]) + _gOrangeAddition("Painting Room/Panel_send_use_turns") + _gOrangeWord("Painting Room/Panel_trust_06890") + _gOrangeNumber("Painting Room/Panel_06890_trust") + _writePanel("Painting Room/Panel_order_onepathmanyturns", "order", "%s road %s %s" % [_answer_by_path["Painting Room/Panel_eon_one"], _answer_by_path["Painting Room/Panel_any_many"], _answer_by_path["Painting Room/Panel_send_use_turns"]]) _gStack2("Ceiling Room/Panel_blue_top_1", kBlueTop, "Ceiling Room/Panel_red_bot_1", kRedBottom) _gStack2( @@ -606,6 +609,25 @@ func generate(chosen_seed): _gCopyHidden("Color Arrow Room/Panel_purple_near", "Color Arrow Room/Panel_purple_afar") _gCopyHidden("Color Arrow Room/Panel_green_near", "Color Arrow Room/Panel_green_afar") + _gOrangeNumber("Orange Room/Panel_lust") + _gOrangeNumber("Orange Room/Panel_read") + _gOrangeNumber("Orange Room/Panel_sew") + _gOrangeNumber("Orange Room/Panel_dead") + _writePanel("Tower Room/Panel_1234567890_wanderlust", "12345656", "the wanderer") + _gOrangeNumber("Tower Room/Panel_834283054_undaunted") + _gOrangeWord("Orange Room/Panel_learn") + _gOrangeWord("Orange Room/Panel_dust") + _gOrangeWord("Orange Room/Panel_star") + _gOrangeWord("Orange Room/Panel_wander") + _gOrangeWord("Tower Room/Panel_wanderlust_1234567890") + _gOrangeAddition("Tower Room/Panel_dads_ale_dead_1") + _gOrangeAddition("Tower Room/Panel_art_art_eat_2") + _gOrangeAddition("Tower Room/Panel_deer_wren_rats_3") + _gOrangeAddition("Tower Room/Panel_learns_unsew_unrest_4") + _gOrangeAddition("Tower Room/Panel_drawl_runs_enter_5") + _gOrangeAddition("Tower Room/Panel_reads_rust_lawns_6") + _gOrangeAddition("Tower Room/Panel_waded_wee_warts_7") + _setFlag(kObscureHint) _gSingle("Entry Room/Panel_forward_forward", kWhiteMiddle) _gSingle("Entry Room/Panel_between_between", kWhiteMiddle) @@ -867,6 +889,54 @@ func _gExactLength(panel_path, puzzle_type, answer_length): _setPanel(panel_path, hint_id, answer_id) +func _gOrangeNumber(panel_path): + var word_id = _pickRandom(_generated_puzzles.wanderlust) + var answer = _answer_by_id[word_id] + var hint = _applyCipher(answer) + _writePanel(panel_path, hint, answer) + + +func _gOrangeWord(panel_path): + var word_id = _pickRandom(_generated_puzzles.wanderlust) + var hint = _answer_by_id[word_id] + var answer = _applyCipher(hint) + _writePanel(panel_path, hint, answer) + + +func _gOrangeAddition(panel_path): + var puzzle = _pickRandom(_generated_puzzles.addition) + var word1 = _answer_by_id[puzzle[0]] + var word2 = _answer_by_id[puzzle[1]] + var solution = _answer_by_id[puzzle[2]] + _writePanel(panel_path, "%s + %s" % [word1, word2], solution) + + +func _applyCipher(text): + var result = text + for i in range(result.length()): + if result.substr(i,1) == "w": + result[i] = "1" + elif result.substr(i,1) == "a": + result[i] = "2" + elif result.substr(i,1) == "n": + result[i] = "3" + elif result.substr(i,1) == "d": + result[i] = "4" + elif result.substr(i,1) == "e": + result[i] = "5" + elif result.substr(i,1) == "r": + result[i] = "6" + elif result.substr(i,1) == "l": + result[i] = "7" + elif result.substr(i,1) == "u": + result[i] = "8" + elif result.substr(i,1) == "s": + result[i] = "9" + elif result.substr(i,1) == "t": + result[i] = "0" + return result + + func _filterBestPuzzles(input): var acceptable = [] for word_id in input: -- cgit 1.4.1