Hello. I hope somebody can help me.
I am writing a small Halloween themed game for fun and practice, in Inform 7. I am very new at it.
What I want to achieve: A person has a scaredness value, this changes over time based on how many frights they get (scared points). Eventually this will affect how a character acts and responds (witless characters run away whereas brave ones engage).
I am following Phrases to decide other things (inform7.com/learn/man/WI_11_17.html) as my reference.
This is what I have so far:
[code]“scared wits” by Special Agent
[ http://inform7.com/learn/man/WI_11_17.html Phrases to decide other things ]
Scaredness is a kind of value. The scarednesses are brave, wary, afraid, witless.
A friend is a kind of woman.
A friend has a scaredness.
A friend has a number called scared points.
To decide which scaredness is a friend:
if the scared points of the noun is greater than 4, decide on witless;
if the scared points of the noun is greater than 3, decide on afraid;
if the scared points of the noun is greater than 2, decide on wary;
decide on brave.
To scare (frightee - a friend):
increase the scared points of the frightee by 1;
say “[the noun] gets a scare.”
Every turn:
scare Ash; [ for testing ]
Instead of examining someone who is friend:
say “[ash] is [scaredness of noun] ([scared points of the noun] scared points)”;
The Haunted House is a room. A friend called Ash is here. A friend called Jill is here.
test boo with “x ash/x ash/x ash/x ash/showme ash”.
[/code]
With this output:
Haunted House
You can see Ash and Jill here.
>test boo
(Testing.)
>[1] x ash
Ash is brave (0 scared points)
Ash gets a scare.
>[2] x ash
Ash is brave (1 scared points)
Ash gets a scare.
>[3] x ash
Ash is brave (2 scared points)
Ash gets a scare.
>[4] x ash
Ash is brave (3 scared points)
Ash gets a scare.
>[5] showme ash
Ash - friend
location: in the Haunted House
singular-named, proper-named; unlit, inedible, portable; female
list grouping key: none
printed name: "Ash"
printed plural name: "friends"
indefinite article: none
description: none
initial appearance: none
carrying capacity: 100
scared points: 4
scaredness: brave
My problem: even though Ash has scared points: 4, her scaredness is still listed as brave. It should be afraid.
Any pointers as to how I can fix this will be welcomed.