Defines the Cast class.
The control centre from which the entire cast of characters is monitored.
Parameters: |
---|
Add the bike to the cast.
Parameters: |
|
---|
Add a blackboard message to a character’s collection.
Parameters: |
|
---|
Add a character (other than Eric) to the cast.
Parameters: |
|
---|
Add a command to a command list.
Parameters: |
|
---|
Add a command list to a character’s personal timetable.
Parameters: |
|
---|
Add the conker to the cast.
Parameters: |
|
---|
Add the desk lid to the cast.
Parameters: |
|
---|
Add Eric to the cast.
Parameters: |
|
---|
Add a frog to the cast.
Parameters: |
|
---|
Add a lesson message to a character’s collection. A lesson message is something like ‘START READING AT THE NEXT CHAPTER IN YOUR BOOKS’, which will be used by a teacher during class if he’s not teaching Eric, or he has decided not to have a question-and-answer session with the swot.
Parameters: |
|
---|
Add a lines message to a character’s collection.
Parameters: |
|
---|
Add a mouse to the cast.
Parameters: |
|
---|
Add a location at which a new immortal mouse may appear after Eric catches one.
Parameters: |
|
---|
Add a pellet to the cast.
Parameters: |
|
---|
Add a plant to the cast.
Parameters: |
|
---|---|
Returns: | The plant. |
Add the sherry drop to the cast.
Parameters: |
|
---|
Add a sit-down message for a character.
Parameters: |
|
---|
Add a sprite (an animatory state image) to the cast.
Parameters: |
|
---|
Add a stinkbomb to the cast.
Parameters: |
|
---|
Add a jet of water or sherry to the cast.
Parameters: |
|
---|
Add the water drop to the cast.
Parameters: |
|
---|
Return whether any member of the cast can give a specific lines message.
Parameters: | message_id – The ID of the lines message. |
---|
Take appropriate action when a mouse is caught. If the mouse is immortal (defined in the [Mice] section of the ini file), it will be relocated (so that Eric can catch it again). If it is not immortal (Eric previously released it), it is removed from the game.
Parameters: | mouse – The captured mouse. |
---|
Switch a character to a new command list.
Parameters: |
|
---|
Check whether a frog has hit the head of anyone who holds a safe key, and hand the safe key to Eric if so.
Parameters: |
|
---|---|
Returns: | True if the frog hit someone’s head, False otherwise. |
Return whether a conker is currently falling.
Drop any character at a given location. This is used by plants when they die.
Parameters: |
|
---|
Return whether Eric understood the message just delivered to him.
Replace occurrences of $BLAH in a message with the name of the character whose unique ID is ‘BLAH’.
Parameters: | message – The message. |
---|
Replace any title macros in a message with the title of a character.
Parameters: |
|
---|
Mark Eric as expelled and set somebody on their way to expel him.
Parameters: |
|
---|
Attempt to freeze Eric. The attempt will fail if Eric is writing on a blackboard.
Returns: | True if Eric was frozen, False otherwise. |
---|
Return a member of the cast.
Parameters: | character_id – The ID of the cast member. |
---|
Return a tale about Eric being absent for the swot to tell a teacher.
Parameters: | teacher – The teacher. |
---|
Return any animal that is on the floor at a given location.
Parameters: |
|
---|---|
Returns: | The animal, or None if there is none. |
Return a suitable character to hit with a conker at a given location, or None if there is none. A character is considered suitable if he can be knocked over by a conker.
Parameters: |
|
---|
Return any character who is currently standing in Eric’s way (as Albert does when trying to prevent him from escaping), or None if there is none.
Return a tale about hitting for the swot to tell a teacher.
Parameters: | teacher – The teacher. |
---|---|
Returns: | A 2-tuple containing the ID of the character blamed by the swot, and the tale. |
Return a list of images for every member of the cast.
Return the non-staircase location closest to Eric.
Return a list of adults who are close to and facing a target character.
Parameters: | character (Character) – The target character. |
---|
Return a list of lines-givers who are close to and facing a target character, and are able to give lines now.
Parameters: | character (Character) – The target character. |
---|
Return the potential lines recipient who is nearest to a target character, or None if there is none.
Parameters: | character (Character) – The target character. |
---|
Return the most suitable character to hit with a catapult pellet at a given location, or None if there is none.
Parameters: |
|
---|
Return the first punchable character who is facing a target character at a given distance.
Parameters: |
|
---|---|
Returns: | A punchable character, or None if there is none at the given distance. |
Return a suitable character to hit with a drop of sherry at a given location, or None if there is none. A character is considered suitable if he holds a storeroom combination letter.
Parameters: |
|
---|
Return a list of speech bubbles currently in use by the cast.
Return a suitable character to hit with a drop of water at a given location, or None if there is none. A character is considered suitable if he holds a bike combination digit.
Parameters: |
|
---|
Return a tale about writing on the blackboard for the swot to tell a teacher.
Parameters: |
|
---|---|
Returns: | A 2-tuple containing writer_id and the tale, or (None, None) if the character who wrote on the board is not in the list of scapegoats favoured by the swot. |
Return whether anyone in the cast can kiss Eric.
Check whether a catapult pellet has hit a conker. If it has, the conker will start falling.
Parameters: | pellet – The catapult pellet. |
---|---|
Returns: | True if a conker was hit, False otherwise. |
Initialise every member of the cast.
Parameters: |
---|
Initialise the bike combination.
Returns: | The combination. |
---|
Initialise the safe combination.
Returns: | The combination. |
---|
Initialise the storeroom combination.
Returns: | The combination. |
---|
Insert any frogs that have been caught by Eric into a cup.
Parameters: | cup – The cup. |
---|
Return whether a character is next to the bike.
Parameters: | character (Character) – The character to check. |
---|
Return whether a character is beside Eric (and so need go no further to find him).
Parameters: | character (Character) – The character to check. |
---|
Return whether the bike is in the play area at the moment.
Return whether Eric is playing truant.
Return whether Eric is due to be or is in the process of being expelled.
Return whether every character is on the ‘home’ side of a given x-coordinate.
Parameters: | x – The x-coordinate. |
---|
Return whether a character is standing on a kid who’s been knocked out.
Parameters: | character (Character) – The character to check. |
---|
Return whether a character is in the same location as Eric.
Parameters: | character (Character) – The character to check. |
---|
Remove a mouse from the game.
Parameters: | mouse – The mouse to remove. |
---|
Return the first kissable candidate in front of Eric, or None if there is none.
Make a cup spill its contents (as when hit by a catapult pellet). A cup may contain water, sherry, a frog, or nothing.
Parameters: | cup – The cup. |
---|
Lift any character at a given location. This is used by plants when growing.
Parameters: |
|
---|
Move the members of the cast.
Returns: | -1 if the screen should scroll right, 1 if it should scroll left, or 0 if it should not scroll (after moving Eric). |
---|
Move the bike away from a door if necessary (so that it may be closed).
Parameters: | door – The door. |
---|
Make a character open a desk. The desk lid will be raised.
Parameters: |
|
---|
Return the plant that a character is standing on, or None if he’s not standing on one.
Parameters: | character (Character) – The character to check. |
---|
Reinitialise every member of the cast.
Release some mice at a given location.
Parameters: |
|
---|
Relocate a mouse at a randomly chosen location.
Perform tasks required immediately after restoring a saved game. The tasks are:
Make any characters near a mouse respond appropriately.
Parameters: | mouse – The mouse. |
---|
Set the lesson (as after the bell rings). Everybody except Eric collects a new command list from their personal timetable.
Parameters: | lesson_id – The ID of the lesson. |
---|
Set the location of a character.
Parameters: |
|
---|
Set the collection of random locations for a character.
Parameters: |
|
---|
Return a character who can smell a stinkbomb, or None if there is none.
Parameters: | stinkbomb – The stinkbomb. |
---|
Return whether somebody is standing near a door.
Parameters: | door – The door to check. |
---|
Make a character trip people up at a given location.
Parameters: |
|
---|
Bring the bike into the play area (as after being unchained).
Unfreeze Eric.
Water (or sherry) a plant. If the liquid is water, the plant will start growing.
Parameters: |
|
---|