Skip to content

Commit

Permalink
Added new routine, 'ScanSub', which allows the player to scan their s…
Browse files Browse the repository at this point in the history
…ecurity card FOB in the Tutorial elevator (instead of 'insert fob into scanner'); added failing test, which checks that punyinform indicates that the player first picks up the fob before scanning it a second time.
  • Loading branch information
libraun committed Sep 23, 2024
1 parent 38ea810 commit 82ad358
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
46 changes: 46 additions & 0 deletions untitledHeistGame.inf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Constant OPTIONAL_PROVIDE_UNDO;
Constant INITIAL_LOCATION_VALUE = Tutorial;
Constant DEBUG;


Constant voxfail = "The tower silently listens to your voice, but then flashes red and buzzes disapprovingly. Red text appears on a screen: ~YOU ARE NOT JOHN TITOR THIS LOGIN ATTEMPT WILL BE REPORTED.~";
Constant handfail = "You place your hand on the handprint recognizer. Light scans your hand before flashing red and buzzing disapprovingly. Red text appears on a screen: ~YOU ARE NOT JOHN TITOR THIS LOGIN ATTEMPT WILL BE REPORTED.~";

Expand Down Expand Up @@ -112,6 +113,7 @@ Verb 'type' * -> TypeErr
}
}
];


Verb 'hint' * -> Hint;

Expand All @@ -132,6 +134,40 @@ Verb 'plunge'
* noun -> Plunge
* multiexcept 'with' held -> Plunge;


[ IsSecurityCard;
return (noun == securityCard);
];

! This routine checks if player is in elevator and if they're trying
! to scan the fob. If true, operates identically to inserting
! fob into scanner in the tutorial.
[ScanSub;
if (location ~= Tutorial) {

print "You see nothing to scan...";
return false;
}
if (noun == securityCard && securityCard hasnt heavy) {

print "You insert the fob into the scanner. The green lights happily flash a few times, and the door opens! You have completed the tutorial. To enter the game proper type ~north~ or ~n~. If you ever need help try the commands help or intro!";
give elevatorDoor open;
give elevatorDoor ~locked;
}
if (noun==securityCard && securityCard has heavy) {
print "Oops, you fumble the fob and drop it on the floor of the elevator! Use ~take [object]~ to pick up an object. Try grabbing the fob and try again!";
give securityCard ~heavy;
move securityCard to Tutorial;
update_moved = True;
}

return true;
];

Verb 'scan'
* noun=IsSecurityCard -> Scan;


Extend 'pick' first
* noun 'with' held -> Unlock
* 'apart'/'open' noun 'with' held -> Unlock
Expand Down Expand Up @@ -233,6 +269,8 @@ with

has light;



Object -> elevatorDoor "Elevator Door"
with
name 'elevator' 'door',
Expand Down Expand Up @@ -1357,6 +1395,10 @@ with
give ellieComputer open;
return true;
}
else if (second==flathead) {
print "You try to unscrew the screws with your flathead screwdriver, but it does not fit.";
return false;
}
else {
print "You should specify a tool you are turning the screws with.";
return true;
Expand All @@ -1368,6 +1410,10 @@ with
give ellieComputer open;
return true;
}
else if (second==flathead) {
print "You try to unscrew the screws with your flathead screwdriver, but it does not fit.";
return false;
}
else {
print "You should specify a tool you are unscrewing the screws with.";
return true;
Expand Down
7 changes: 7 additions & 0 deletions untitledHeistGame.test
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@

The Lobby

* scan fob twice consecutively

> scan fob
> scan fob
(first taking the Security Key Fob)
You insert the fob into the scanner.

* get/drop key from receptionist area

> insert fob into scanner
Expand Down

0 comments on commit 82ad358

Please sign in to comment.