AnssiR66 / AlanStdLib

The Standard Library for ALAN Interactive Fiction Language
Other
5 stars 2 forks source link

Actors IN Hero? #46

Closed tajmone closed 5 years ago

tajmone commented 5 years ago

Ciao Anssi,

I need to ask you about this verb check in throw_to:

SYNTAX throw_to = throw (projectile) 'to' (recipient)
  WHERE projectile ISA OBJECT
    ELSE SAY illegal_parameter_obj OF my_game.
  AND recipient ISA ACTOR
    ELSE SAY illegal_parameter2_there OF my_game.

ADD TO EVERY OBJECT
  VERB throw_to
    WHEN projectile
      CHECK my_game CAN throw_to
      ...
      AND recipient NOT IN hero
        ELSE SAY check_obj2_not_in_hero1 OF my_game.

... where the check_obj2_not_in_hero1 response attribute for the last CHECK prints "You are carrying $+2.":

  HAS check_obj2_not_in_hero1 "You are carrying $+2.". -- throw_at, throw_in, throw_to

Could you give me a few examples of actors being IN the hero? so I can work out how to render the response in Italian, because probably a literal translation won't work without knowing the exact context.

Also, I guess this check is for non-standard situations, as the library prevents by default taking actors ("XXX would probably object to that."), so it would require the author to override the default take-like verbs for this to happen.

AnssiR66 commented 5 years ago

I guess what I had in mind here was not so much actors but objects, so seems like the syntax should say "Where recipient isa Thing", good that you caught this one as well. Because the hero might throw something to the trash, to the basket, etc. and I probably forgot the restriction at the time that actors cannot be in the hero, I was maybe thinking about a case when the hero tries to throw something to a dog and he's carrying the dog. So this must be adjusted a bit. Either change the parameter to 'thing' or maybe omit the check altogether. Probably it is easier to change the parameter? -Anssi


From: Tristano Ajmone notifications@github.com Sent: Thursday, November 22, 2018 7:52 PM To: AnssiR66/AlanStdLib Cc: Subscribed Subject: [AnssiR66/AlanStdLib] Actors IN Hero? (#46)

Ciao Anssi,

I need to ask you about this verb check in throw_to:

SYNTAX throw_to = throw (projectile) 'to' (recipient) WHERE projectile ISA OBJECT ELSE SAY illegal_parameter_obj OF my_game. AND recipient ISA ACTOR ELSE SAY illegal_parameter2_there OF my_game.

ADD TO EVERY OBJECT VERB throw_to WHEN projectile CHECK my_game CAN throw_to ... AND recipient NOT IN hero ELSE SAY check_obj2_not_in_hero1 OF my_game.

... where the check_obj2_not_in_hero1 response attribute for the last CHECK prints "You are carrying $+2.":

HAS check_obj2_not_in_hero1 "You are carrying $+2.". -- throw_at, throw_in, throw_to

Could you give me a few examples of actors being IN the hero? so I can work out how to render the response in Italian, because probably a literal translation won't work without knowing the exact context.

Also, I guess this check is for non-standard situations, as the library prevents by default taking actors ("XXX would probably object to that."), so it would require the author to override the default take-like verbs for this to happen.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/AnssiR66/AlanStdLib/issues/46, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AF2lHsgsWwSNa4GriUF2A4x_izLnnLYUks5uxuRHgaJpZM4Yvvs1.

tajmone commented 5 years ago

Probably it is easier to change the parameter?

It depends largely on how we'd like to keep the verb scope. After all, "throw stone to ACTOR" makes sense as a verb — bu so does "throw stone at ACTOR"!

Let's consider all the verbs in this group:

verb 2nd param name 2nd param class
throw_at target THING
throw_to recipient ACTOR
throw_in cont OBJECT + CONTAINER

I would imagine that:

For references, see:

So, I would actually restrict throw_to to actors only, because I'd expect the recipient to be able to grab what is being thrown to him/her/it. It could be a PERSON, but also an animal ("throw bone/ball to dog"), but not an inanimate object.

The problem with verbs that rely on preposition is that in UK and US English there is always a difference in terms of which preositions a given verb might take in one or the other English flavour — US English tends to use more preposition than UK, and often the meanings are not the same.

As for the checks that test if the projectile is IN the hero, they don't pose a problem as they will simply never evaluate to true for ACTORS, so wherever the projectile can be also an OBJECT it should be fine to keep them.

and I probably forgot the restriction at the time that actors cannot be in the hero, I was maybe thinking about a case when the hero tries to throw something to a dog and he's carrying the dog.

I wasn't sure about wether the restriction was for object containers only or if it also applied to actors being in other actors. But your reasoning is sound: there is no reason why the hero shouldn't be allowed to carry a small animal, or a child (eg., holding the child in his/her arms, or the child sitting on his/her shoulders).

So ... I wonder if this type of ACTOR in hero containment should be simulated, just like it's done for ACTORS inside containers.

tajmone commented 5 years ago

NOTE — The above CHECK was fixed in the dev-clothing branch.