diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-12-12 19:11:51 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-12-12 19:11:51 -0500 |
commit | 2520b10ebe8f8e6d06e767b48968a6dbf8db2fca (patch) | |
tree | 953d32fa088ab5022fe6a48387c4a343e44a8bc2 /randomizer/generator.gd | |
parent | fa2a7d48ae0f357e5b87619d0727868e54c34258 (diff) | |
download | lingo-randomizer-2520b10ebe8f8e6d06e767b48968a6dbf8db2fca.tar.gz lingo-randomizer-2520b10ebe8f8e6d06e767b48968a6dbf8db2fca.tar.bz2 lingo-randomizer-2520b10ebe8f8e6d06e767b48968a6dbf8db2fca.zip |
Added orange puzzles (the addition data is bad btw)
Diffstat (limited to 'randomizer/generator.gd')
-rw-r--r-- | randomizer/generator.gd | 72 |
1 files changed, 71 insertions, 1 deletions
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): | |||
526 | _gSingle("Painting Room/Panel_any_many", kBlueMiddle) | 526 | _gSingle("Painting Room/Panel_any_many", kBlueMiddle) |
527 | _gSingle("Painting Room/Panel_man_many", kBlueMiddle) | 527 | _gSingle("Painting Room/Panel_man_many", kBlueMiddle) |
528 | _clearFlag(kShortAnswer) | 528 | _clearFlag(kShortAnswer) |
529 | _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"]]) | 529 | _gOrangeAddition("Painting Room/Panel_send_use_turns") |
530 | _gOrangeWord("Painting Room/Panel_trust_06890") | ||
531 | _gOrangeNumber("Painting Room/Panel_06890_trust") | ||
532 | _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"]]) | ||
530 | 533 | ||
531 | _gStack2("Ceiling Room/Panel_blue_top_1", kBlueTop, "Ceiling Room/Panel_red_bot_1", kRedBottom) | 534 | _gStack2("Ceiling Room/Panel_blue_top_1", kBlueTop, "Ceiling Room/Panel_red_bot_1", kRedBottom) |
532 | _gStack2( | 535 | _gStack2( |
@@ -606,6 +609,25 @@ func generate(chosen_seed): | |||
606 | _gCopyHidden("Color Arrow Room/Panel_purple_near", "Color Arrow Room/Panel_purple_afar") | 609 | _gCopyHidden("Color Arrow Room/Panel_purple_near", "Color Arrow Room/Panel_purple_afar") |
607 | _gCopyHidden("Color Arrow Room/Panel_green_near", "Color Arrow Room/Panel_green_afar") | 610 | _gCopyHidden("Color Arrow Room/Panel_green_near", "Color Arrow Room/Panel_green_afar") |
608 | 611 | ||
612 | _gOrangeNumber("Orange Room/Panel_lust") | ||
613 | _gOrangeNumber("Orange Room/Panel_read") | ||
614 | _gOrangeNumber("Orange Room/Panel_sew") | ||
615 | _gOrangeNumber("Orange Room/Panel_dead") | ||
616 | _writePanel("Tower Room/Panel_1234567890_wanderlust", "12345656", "the wanderer") | ||
617 | _gOrangeNumber("Tower Room/Panel_834283054_undaunted") | ||
618 | _gOrangeWord("Orange Room/Panel_learn") | ||
619 | _gOrangeWord("Orange Room/Panel_dust") | ||
620 | _gOrangeWord("Orange Room/Panel_star") | ||
621 | _gOrangeWord("Orange Room/Panel_wander") | ||
622 | _gOrangeWord("Tower Room/Panel_wanderlust_1234567890") | ||
623 | _gOrangeAddition("Tower Room/Panel_dads_ale_dead_1") | ||
624 | _gOrangeAddition("Tower Room/Panel_art_art_eat_2") | ||
625 | _gOrangeAddition("Tower Room/Panel_deer_wren_rats_3") | ||
626 | _gOrangeAddition("Tower Room/Panel_learns_unsew_unrest_4") | ||
627 | _gOrangeAddition("Tower Room/Panel_drawl_runs_enter_5") | ||
628 | _gOrangeAddition("Tower Room/Panel_reads_rust_lawns_6") | ||
629 | _gOrangeAddition("Tower Room/Panel_waded_wee_warts_7") | ||
630 | |||
609 | _setFlag(kObscureHint) | 631 | _setFlag(kObscureHint) |
610 | _gSingle("Entry Room/Panel_forward_forward", kWhiteMiddle) | 632 | _gSingle("Entry Room/Panel_forward_forward", kWhiteMiddle) |
611 | _gSingle("Entry Room/Panel_between_between", kWhiteMiddle) | 633 | _gSingle("Entry Room/Panel_between_between", kWhiteMiddle) |
@@ -867,6 +889,54 @@ func _gExactLength(panel_path, puzzle_type, answer_length): | |||
867 | _setPanel(panel_path, hint_id, answer_id) | 889 | _setPanel(panel_path, hint_id, answer_id) |
868 | 890 | ||
869 | 891 | ||
892 | func _gOrangeNumber(panel_path): | ||
893 | var word_id = _pickRandom(_generated_puzzles.wanderlust) | ||
894 | var answer = _answer_by_id[word_id] | ||
895 | var hint = _applyCipher(answer) | ||
896 | _writePanel(panel_path, hint, answer) | ||
897 | |||
898 | |||
899 | func _gOrangeWord(panel_path): | ||
900 | var word_id = _pickRandom(_generated_puzzles.wanderlust) | ||
901 | var hint = _answer_by_id[word_id] | ||
902 | var answer = _applyCipher(hint) | ||
903 | _writePanel(panel_path, hint, answer) | ||
904 | |||
905 | |||
906 | func _gOrangeAddition(panel_path): | ||
907 | var puzzle = _pickRandom(_generated_puzzles.addition) | ||
908 | var word1 = _answer_by_id[puzzle[0]] | ||
909 | var word2 = _answer_by_id[puzzle[1]] | ||
910 | var solution = _answer_by_id[puzzle[2]] | ||
911 | _writePanel(panel_path, "%s + %s" % [word1, word2], solution) | ||
912 | |||
913 | |||
914 | func _applyCipher(text): | ||
915 | var result = text | ||
916 | for i in range(result.length()): | ||
917 | if result.substr(i,1) == "w": | ||
918 | result[i] = "1" | ||
919 | elif result.substr(i,1) == "a": | ||
920 | result[i] = "2" | ||
921 | elif result.substr(i,1) == "n": | ||
922 | result[i] = "3" | ||
923 | elif result.substr(i,1) == "d": | ||
924 | result[i] = "4" | ||
925 | elif result.substr(i,1) == "e": | ||
926 | result[i] = "5" | ||
927 | elif result.substr(i,1) == "r": | ||
928 | result[i] = "6" | ||
929 | elif result.substr(i,1) == "l": | ||
930 | result[i] = "7" | ||
931 | elif result.substr(i,1) == "u": | ||
932 | result[i] = "8" | ||
933 | elif result.substr(i,1) == "s": | ||
934 | result[i] = "9" | ||
935 | elif result.substr(i,1) == "t": | ||
936 | result[i] = "0" | ||
937 | return result | ||
938 | |||
939 | |||
870 | func _filterBestPuzzles(input): | 940 | func _filterBestPuzzles(input): |
871 | var acceptable = [] | 941 | var acceptable = [] |
872 | for word_id in input: | 942 | for word_id in input: |