So, I wanted to get the game to work out “Lockpick Skill” on all people at game start (so most values can also be changed from “Everything” to “Every person”).
[code]Maltese Falcon is a room. The description of the Maltese Falcon is “The sign outside says ‘We have blackjack and hookers!’ Which was enough to convince you to come in. It also reminds you of a book you once had.”
The Roulette Dealer is a male person in the Maltese Falcon. The description of the Roulette Dealer is “A large, intimidating black man in armour. You really wouldn’t want to mess with him. Unless you want to be beaten (or shot) to a nice red paste.”
Kane is a male person in the Maltese Falcon. The description of Kane is “A large, tough and shady-looking man with armour and a holstered gun. You think he might be part of the management.”
Kane’s Safe is a locked container in the Maltese Falcon. The description of Kane’s Safe is “A safe, built into the wall. It’s probably owned by Kane, provided he is part of the management. Probably also has lots of caps. And guns. And blackjack cards. Mmm, blackjack…”
The Roulette Dealer’s Safe is a locked container in the Maltese Falcon. The Lockpick Chance Number of The Roulette Dealer’s Safe is 50.
Everything has a number called Perception. Perception is usually 5.
Everything has a number called Agility. Agility is usually 5.
When play begins:
Let L be given by Initial Lockpick;
Now the Lockpick Skill of the player is L.
Equation - Initial Lockpick
L = 20+C
Where L is a number, and C is the AveragePA of the player.
Let C be given by APA;
Now the AveragePA of the player is C.
Everything has a number called AveragePA. AveragePA is usually 5.
Equation - APA
C = (P+A)/2
Where C is a number, P is the Perception of the player, and A is the Agility of the player.
Everything has a number called RAPA. The RAPA is usually 1.
Now the RAPA of the player is a random number from 0 to AveragePA of the player;
Say “[RAPA of the player] [Lockpick Skill of the player].”
Everything has a number called Lockpick Skill. The Lockpick Skill is usually 20.
Everything has a number called Lockpick Chance Number. The Lockpick Chance Number is usually 25.
The Lockpick Chance Number of Kane’s Safe is 25.
Equation - Successful Lockpick Equation
S = (L+C)/C+R
Where S is a number, L is the Lockpick Skill of the player, C is the Lockpick Chance number of a noun, and R is the RAPA of the player.
Understand “lockpick [something]” as lockpicking. Lockpicking is an action applying to one thing.
If the noun is not something lockable, say “[The noun][s] is hardly something you can lockpick.” instead;
If the noun is unlocked, say “[The noun][s] is already unlocked. Idiot.” instead.
Carry out lockpicking:
Let S be given by the Successful Lockpick Equation;
If S is greater than 7, say “[The noun] unlocks.”;
If S is less than 7, say “You fail to unlock [the noun].”[/code]
So, I tried replacing “the player” with “the noun” in all instances, that doesn’t work. Is there any easy way, without 1,000 lines of code, to get it to work out the lockpick skill of every person at game start?