Covering 2: Electric... well you know

Yesterday @DeusIrae killed it with the tidy code for covering. Thank you.

In the interests of inclusivity, I’d also like to allow people to “Use poster to cover hole” and “Cover hole with poster”. I’m happy to add in reference to sticky tack or let the code take care of it.

Will that require another rule or can I, in the interests of efficient code, tie into the code they helped me with yesterday?

use scoring.

The office is a room.

the poster is in the office.

the stickytack is in the office.

the hole is in the office.

the scratch is in the office.

Understand the command "cover" as something new.
Understand "cover [something]" as covering.

covering is an action applying to one visible thing.

an object can be covered or uncovered.

an object is usually uncovered.

Check covering:
	If the noun is covered, say "That's already covered up!" instead;
	If the noun is not the hole, say "There's no need to cover this." instead; 
	If the noun is the scratch, say "Really?! This needs to be polished out!" instead;
	If the player does not enclose the poster, say "What you really need is something large and papery to get this job done." instead;
	If the player does not enclose the stickytack, say "You know gravity's a thing, right?  What are you attaching it with?" instead.
		
Carry out covering when the hole is uncovered:
	say "[quotation mark]Stay Gold Pony Boy[quotation mark] you say to yourself as you cover the hole in the wall.[paragraph break] ";
	now the hole is covered;
	now the hole is scenery;
	now the hole is undescribed;
	increase the score by 1;
	say "[line break]Your score is [score] out of 10.[paragraph break]You are carrying [the list of things enclosed by the player]."
5 Likes

I don’t know how anyone else feels about this, but I would never use this command. USE is a horrible command to implement, because then people will try to USE everything. I would stick to PUT POSTER ON HOLE and COVER HOLE WITH POSTER.

6 Likes

Without the benefit of seeing yesterday’s post, I’d absolutely agree for an IntFiction savvy audience. This little puzzle is part of a Greetings card in the form of a short game and is not for an InntFiction audience. I’m trying to keep the ball rolling as much as possible.

As a result, wherever possible, if someone solves the puzzle, I’d like it to be accepted. So if someone wrote “use the poster to cover the hole” I’d like it to work.

2 Likes

Could you get away with something like…

ow, Inform rusty My right bracket key isn’t working for some reason…so switch out my right parentheses ) with right brackets.

Using is an action applying to one thing. 
Understand "use [something)" as using. [CLOSE THAT BRACKET!)

Check using: say "Be more specific how you want to use [the noun), please!" instead. [CLOSE BRACKET)

Instead of using the poster, try putting the noun on the hole.

That might auto solve if the person just says “use poster” but that’s how posters are used, and you said you wanted it on the easy side?

2 Likes

Thank you again @HanonO that bracket situation must be a challenge.

The prompt for when someone writes use poster works great. I was imagining a scenario where someone would write “use poster to cover hole” as a command.

2 Likes

You could similarly make a “using it on” command applying to two touchable things and redirect it the same way. The slight bump might be the infinitive “use poster to cover hole” instead of “use poster on hole”. You might be able to synonymize it. Understand "use [something) to cover [something)" as using it on when the first noun is the poster.

This is kind of the implementor’s dilemma - you end up needing to work out myriad ways to account for non-standard input if you don’t hold a certain level of “the player needs to learn how to play a parser game…” :slight_smile: Usually it’s easier to re-direct toward a standard more simpler command and throw some hint-y error messages than write fifty rules about how the parser needs to figure out how to actually “use something on something” or “use something to something”. As @AmandaB said, you gotta be careful opening up a universal command like “use” and setting expectation the player can use it.

I also want to note the “(Something) 2: Electric…” joke did not go misunderstood because I still use that in live conversation on occasion and increasingly few people have the frame of reference for it!

2 Likes

OK, here’s a fairly worked-out implementation allowing the two-word solution, including Hanon’s good idea about warning folks off using but allowing USE POSTER ON HOLE to work (I also added a commented-out line that would allow USE POSTER to fire the covering action – I wasn’t sure whether you wanted that our if it would be too easy; if you want it, just remove the square brackets and my little aside).

I share folks’ hesitation about using use too profligately, but I think this is a reasonable middle ground – NB I created separate using actions for one object and two, since I assume elsewhere in the game there might be puzzles where that’d be useful.

Note that doing things this way means that if the player just types COVER HOLE the parser will prompt them to say what they want to cover it with; that last “does the player mean” line tells the parser to assume to assume they’re using the poster if they’re carrying it, which largely mirrors how you previously had it implemented. Also, the way you ordered the conditions in the check covering rule meant that the condition for trying to cover the scratch would never fire (since it came after the “if the noun is not the hole” condition, and of course the scratch is not the hole") so I moved it up, which should be working now!

Lab is a room.  The poster is in the lab.  The stickytack is in the lab.  The hole is in the lab.  The scratch is in the lab.

an object can be covered or uncovered.

an object is usually uncovered.

Covering it with is an action applying to one touchable thing and one carried thing.

Understand the command "cover" as something new.  Understand "cover [something] with [something]" as covering it with.  Instead of putting something on the hole, try covering the hole with the noun.  

Understand "use [something]" as use-oneing.  use-oneing is an action applying to one thing.

Carry out use-oneing:
	Say "This game is sometimes able to understand what you mean when you type USE, but in this case I couldn't figure it out.  Try using a more specific verb, please!"

[Instead of use-oneing the poster, try covering the hole with the poster. <--Uncomment this line if you want USE POSTER to work]

Understand "use [something] on/with/by/to [something]" as use-twoing it with.  use-twoing it with is an action applying to two things.

Carry out use-twoing it with:
	Say "This game is sometimes able to understand what you mean when you type USE, but in this case I couldn't figure it out.  Try using a more specific verb, please!"

Instead of use-twoing the poster with the hole, try covering the hole with the poster.

Check covering it with:
	If the noun is covered, say "That's already covered up!" instead;
	If the noun is the scratch, say "Really?!  This needs to be polished out!" instead;
	If the noun is not the hole, say "There's no need to cover this." instead;
	If the second noun is not the poster, say "What you really need is something large and papery to get this job done." instead;
	If the player does not enclose the stickytack, say "You know gravity's a thing, right?  You're not holding anything to attach the poster with." instead.
		
Carry out covering it with:
	say "What hole. I don't see a hole";
	now the hole is covered;
	move the hole to the player;
	increase the score by 1;
	say "[line break]Your score is [score] out of 10.[paragraph break]You are carrying [the list of things enclosed by the player]."
	
Does the player mean covering the hole with the poster when the player encloses the poster: it is very likely.
5 Likes

Excellent @DeusIrae I will digest this.

2 Likes

Late again, but did nobody else notice the Outsiders reference?

1 Like