From ce7a1812d7190be5aaba478892ead3e3b53f6580 Mon Sep 17 00:00:00 2001 From: Mahtra Date: Sat, 16 Sep 2023 22:12:34 +1200 Subject: [PATCH] [new script] Taisidon.lic --- taisidon.lic | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 taisidon.lic diff --git a/taisidon.lic b/taisidon.lic new file mode 100644 index 0000000000..2bd44cdaee --- /dev/null +++ b/taisidon.lic @@ -0,0 +1,142 @@ +custom_require.call(%w[common equipmanager common-travel]) + +class Taisidon + def initialize + arg_definitions = [ + [ + { name: 'restart', regex: /restart/i, optional: true, description: 'Start in the Morgue instead of on the dock.' }, + ] + ] + + args = parse_args(arg_definitions, true) + EquipmentManager.new.empty_hands + @murderer = '' + @weapon = '' + @crimescene = '' + @rooms = %w[16030 16027 16028 16029 16025 16026] + + if args.restart + DRCT.walk_to('16031') + morgue + else + DRC.bput('get my boarding pass', 'You get', 'What were') + start_story + end + end + + def start_story + case DRC.bput('redeem my pass', 'Once you redeem this', 'The REDEEM verb is used', 'Your task is to identify the murderer', 'The representative for a short cruise', 'The cruise coordinator takes') + when 'The representative for a short cruise' + echo "You're in the wrong room. Go to 15979." + when 'The REDEEM verb is used' + echo "You have no passes! Fix the things to board the Morada" + exit + when 'Once you redeem this' + start_story + when 'The cruise coordinator takes' + EquipmentManager.new.empty_hands + DRC.bput('ask coordinator about access', 'Your task is to identify') + morgue + end + end + + def morgue + case DRC.bput('study corpse', /clean edges/, /flesh and bone/, /internal bleeding/, /severe lacerations/, /curved puncture wounds/, + /ragged edges/, /criss-crossed/, /gashes and severe blunt/, /deep and lethal/) + when /clean edges/ + @weapon = 'zills' + when /flesh and bone/ + @weapon = 'cleaver' + when /internal bleeding/ + @weapon = 'baton' + when /severe lacerations/ + @weapon = 'bottle' + when /curved puncture wounds/ + @weapon = 'corkscrew' + when /ragged edges/ + @weapon = 'knife' + when /criss-crossed/ + @weapon = 'comb' + when /gashes and severe blunt/ + @weapon = 'logbook' + when /deep and lethal/ + @weapon = 'paintbrush' + else + echo("needs new match!!") + end + echo("Weapon: #{@weapon}") + patrol + end + + def questioning + return unless @murderer == '' + + # check alibi + suspect = DRRoom.npcs.first + case DRC.bput("ask #{suspect} about alibi", /says with a nervous tic/, /says coughing awkwardly/, 'Usage', /blinking excessively/, /says with trembling hands/, + "says, fingers tapping", /shifty eyes/, /tugging at their uniform/, /flushed face/, /pacing/, "says, \"") + when 'Usage' + echo("Something's wrong. Check the things!") + exit + when /says with a nervous tic/, /trembling hands/, /shifty eyes/, /tugging at their uniform/, /flushed face/, /pacing/, /blinking excessively/, "says, fingers tapping", /says coughing awkwardly/ + @murderer = suspect + echo("THATS THE GUY!") + when /says,/ + echo("The #{suspect} is innocent.") + end + end + + def investigate(room) + return unless @crimescene == '' + + case DRC.bput('search room', 'uncovers an area of', 'fails to turn up any clues', 'I could not find') + when 'I could not find' + echo("Something's wrong. Check the things!") + exit + when 'fails to turn up any clues' + echo("This is not the room, keep looking.") + when 'uncovers an area of' + echo("THIS IS THE SCENE OF THE CRIME!") + if room == '16026' + @crimescene = 'bar' + elsif room == '16025' + @crimescene = 'lounge' + elsif room == '16028' + @crimescene = 'buffet' + elsif room == '16029' + @crimescene = 'quarterdeck' + elsif room == '16027' + @crimescene = 'promenade' + elsif room == '16030' + @crimescene = 'foredeck' + else + echo("Something's wrong. Check the things!") + exit + end + end + end + + # ACCUSE chef WITH knife IN bar + def accuse + echo("Murderer: #{@murderer}") + echo("Weapon: #{@weapon}") + echo("Crime Scene: #{@crimescene}") + DRC.bput("accuse #{@murderer} with the #{@weapon} in #{@crimescene}", /coupon/) + EquipmentManager.new.empty_hands + end + + # move around to investigate + def patrol + @rooms.each do |room| + DRCT.walk_to(room) + questioning + investigate(room) + if @crimescene != '' && @murderer != '' + break + end + end + accuse + end +end + +Taisidon.new