![]() |
The Reliques of Tolti-AphAn interactive fiction by Graham Nelson (2005) - the Inform 7 source text | ||||||||||||
| Home page Contents Previous Next Complete text | Section 1(e) - Experience and levels
A person has a number called level. The level of a person is usually 1.[1] Table of Level Advancement
Every turn: let the current level be the level of the player; if the current level is 5, stop; let the target be the experience points to progress corresponding to a level number of the current level in the Table of Level Advancement; if the score is greater than the target begin; say "You progress to level [current level plus 1]!"; increase the level of the player by 1; end if. Procedural rule: ignore the announce the score rule.[2] Carry out requesting the score: say "You are a level [level of the player] magic-user, with [score] experience point[s]. "; let the current level be the level of the player; let the target be the experience points to progress corresponding to a level number of the current level in the Table of Level Advancement; let the target be the target minus the score; if the current level is 5, say "It is not possible to progress further." instead; if the target <= 0, say "You will soon progress to the next level." instead; say "You need [target] [if the score > 0]more [end if]point[s] to progress to the next level." instead. When play begins, change the right hand status line to "LVL: [level of the player] STR: [strength of the player]".[3] Notes
[1]. RPGs seem to like the idea of numbered levels, with a level 3 magic-user that bit more puissant than a level 2 one. I suppose this may derive from the vague sense of mystery swirling around the "degrees" of masonic lodges, the Benevolent and Protective Order of the Elks, and such. |