the-infocom-files / amfv

A Mind Forever Voyaging
5 stars 2 forks source link

You can buy the vest multiple times (but you still only get one) #82

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

In the 2051 simulation (technically also the 2061 one, but you don't have enough money there):

>SE
Dunbar's
You have entered a swank department store, an elegant boutique with a wealthy
clientele. Racks all around you are stocked with the latest fashions. The exit
to the street is northwest.

>BUY CLOTHES
After wincing at the prices, you pick out a thin, imitation wool vest. A clerk
removes the anti-theft tag from the garment. After a moment, the clerk returns
your card, informing you that your account has been debited for $120 and that
your new balance is $380.

>BUY CLOTHES
After wincing at the prices, you pick out a thin, imitation wool vest. A clerk
removes the anti-theft tag from the garment. After a moment, the clerk returns
your card, informing you that your account has been debited for $120 and that
your new balance is $260.

>INVENTORY
You are carrying:
   a vest
   a credit card
   a key
   a wallet

In the 2041 simulation you get this instead:

>BUY CLOTHES
You look through many racks, finding nothing you like, and finally select a
brightly colored myalon sweater that fits you perfectly. A clerk removes the
anti-theft tag from the garment. After a moment, the clerk returns your card,
informing you that your account has been debited for $120 and that your new
balance is $480.

>BUY CLOTHES
You've already strained your clothes budget; Jill would have your hide if you
spent more.

That's because CLOTHES-F only checks if you've bought the sweater or scarf, not the vest:

     <COND (<VERB? BUY>
        <COND (<EQUAL? ,HERE ,DUNBARS>
               <COND (<OR <NOT <FSET? ,SWEATER ,TRYTAKEBIT>>
                  <NOT <IN? ,SCARF ,LOCAL-GLOBALS>>>
                  <CLOTHES-BUDGET>)

Interestingly there is a proper check later in the same routine:

              (<EQUAL? ,HERE ,HEIMAN-VILLAGE ,ROCKVIL-MALL>
               <COND (<OR <L? ,STIME 480>
                  <G? ,STIME 1380>>
                  <TELL "Every store is closed for the night." CR>
                  <RTRUE>)
                 (<OR <NOT <FSET? ,SWEATER ,TRYTAKEBIT>>
                  <NOT <FSET? ,VEST ,TRYTAKEBIT>>
                  <NOT <IN? ,SCARF ,LOCAL-GLOBALS>>>
                  <CLOTHES-BUDGET>
                  <RTRUE>)>