Hyperlink Combat System

version 1 by Philip Black

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - HEALTH
    Potion is a kind of thing. [If this line causes a bug just delete it!]
    When play begins (this is the set permanent health to initial health rule):
        repeat with the patient running through people:
            now the permanent health of the patient is the health of the patient;
    [We set the permanent health of each individual to the health it has at the beginning of the game. If we wish any character to start the game wounded or super-healthy, we will have to manually override this process.]
    To restore the health of (patient - a person):
        now the health of the patient is the permanent health of the patient.
    To fully heal (patient - a person):
        if the permanent health of the patient is greater than the health of the patient:
            restore the health of the patient.
    [The healed amount is a number that varies. The healed amount is usually 0.]
    To heal (patient - a person) for (health - a number) health:
        let the health dummy be the permanent health of the patient minus the health of the patient;
        if health is less than the health dummy:
            now the health dummy is health;
        if the health dummy is less than 0:
            now the health dummy is 0;
        increase the health of the patient by the health dummy;
        [now the healed amount is the health dummy.] [For storage.]
    [ Once health drops to zero, you are Subdued. This holds true for both the player and his enemies. ]
    Definition: A person is alive rather than Subdued if its health is greater than 0.
    [ This printing Subdued property is used to ensure that statements like "You were killed by the ogre" won't be broken if the ogre died at the same time. ]
    The printing Subdued property is a truth state variable. The printing Subdued property is true.