Defines the Eric class.
This class represents our hero.
Parameters: |
|
---|
Make Eric aim his catapult (raise it to eye level). Also alert any lines-givers in the vicinity, and play a sound effect.
Look for a lines-giver in the vicinity of Eric; if one is found, make him give lines to Eric.
Parameters: |
|
---|
Make Eric bend over (as when catching or releasing mice).
Return whether Eric can bend over. This will be True if and only if he has a BENDING_OVER sprite defined.
Return whether Eric can drop a stinkbomb. This will be True if can_drop_stinkbomb() (on Character) returns True and Eric has a stinkbomb and is standing on a floor (as opposed to a staircase).
Return whether Eric can throw away the water pistol. This will be True if Eric has the water pistol and has a BENDING_OVER sprite defined.
Return whether Eric can fire a catapult. This will be True if and only if can_fire_catapult() (on Character) returns True and the conker is not falling from the tree.
Return whether Eric can fire a water pistol. This will be True if Character.can_fire_water_pistol returns True and Eric actually has the water pistol.
Return whether anyone in the cast can kiss Eric.
Return whether Eric can mount the bike at the moment. This will be True if Eric has the RIDING_BIKE0 sprite defined and is standing next to the bike.
Return whether Eric can open a specific door. This will be False unless the door in question is the storeroom door and Eric has the key to it.
Parameters: | door – The door to check. |
---|
Return whether Eric can release mice at the moment. This will be True if Eric is standing on a floor (as opposed to a staircase), has at least one mouse, and can bend over.
Return whether Eric can sit on the stairs. This will be True if and only if the relevant lines message is defined.
Make Eric catch any animal that is close at hand. If Eric catches something, a sound effect is played.
Check whether any key related to bike movement has been pressed. Any bike key pressed is stored and acted upon later by another bike-related method.
Check whether the bike or storeroom combination has been written on any of the blackboards. If the bike combination has been written on a blackboard, unchain the bike and play a sound effect. If the storeroom combination has been written on a blackboard, give Eric the key to that room and play a sound effect.
Check whether Eric managed to reach a cup while in possession of the frog. If so, the frog is placed in the cup and a sound effect is played.
Check whether Eric indicated understanding of the message just delivered to him.
Place the contents (if any) of a desk in Eric’s inventory. Also play a sound effect if the desk is not empty.
Knock Eric out and play a suitable sound effect.
Make Eric finish a jump. If Eric jumped up to the safe, or a shield, or an open drinks cabinet while carrying a water pistol, appropriate action is taken. Eric will descend to the floor unless the jump placed him on a knocked out kid or a plant pot.
Push Eric out of his seat and play a suitable sound effect.
Make Eric dismount from the bike.
Return whether Eric dismounted from the bike. This will be True if Eric was sitting on the saddle and ‘down’ was pressed.
Make Eric drop a stinkbomb. Also alert any lines-givers in the vicinity.
Make Eric throw away the water pistol. The water pistol will be filled with water and placed in a desk chosen at random.
Play a sound effect if Eric did not land on his feet after flying out of a window or over the skool gate.
Make Eric fall off a plant that has just died.
Make Eric land on the floor in the sitting position, and play a sound effect.
Make Eric fire the water pistol. Also alert any lines-givers in the vicinity, and play a sound effect.
Move Eric to the next spot in his flight out of a window or over the skool gate.
Parameters: |
|
---|
Attempt to freeze Eric. The attempt will fail if Eric is writing on a blackboard, or is already frozen.
Returns: | True if Eric was frozen, False otherwise. |
---|
Make Eric get back on the saddle of the bike.
Check whether Eric is up to anything that merits being given lines, and make any nearby teacher who can see him give the lines.
Return the on-floor location that is closest to Eric.
Return the location above Eric’s hand. This location will be used to check for the presence of a shield, the safe, or a cup.
Return whether Eric got back on the saddle of the bike. This will be True if Eric was standing on the saddle and ‘down’ was pressed.
Return whether Eric has at least one stinkbomb.
Return whether Eric has a water pistol (containing either water or sherry).
Hide Eric. This is used when Eric is kissing someone, and two sprites become one.
Return the wall, door or Eric-stopping character that Eric rode the bike into (if any).
Parameters: | bike – The bike Eric is riding. |
---|---|
Returns: | The barrier that was hit, or None if none was hit. |
Return whether Eric is playing truant.
Return whether this character is Eric.
Returns: | True. |
---|
Return whether Eric is standing on something that prevents him from falling. The things that can prevent Eric from falling are:
Make Eric jump. Also alert any lines-givers in the vicinity.
Return whether Eric jumped off the saddle of the bike. This will be True if Eric was standing on the saddle and ‘up’ or ‘jump’ was pressed.
Decrease Eric’s lines total and play the kissing sound effect.
Return the first kissable candidate in front of Eric, or None if there is none.
Return whether Eric has landed after jumping from the saddle of the bike.
Play a sitting sound effect. This will be a walking sound effect, chosen at random from those available.
Make a walking sound effect.
Parameters: | index – The index of the walking sound effect. |
---|
Make Eric mount the bike.
Move Eric. This entails checking the keyboard for relevant keypresses and moving Eric accordingly, and dealing with Eric if he’s currently engaged in an action such as firing the catapult or water pistol (during which keypresses are ignored).
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 (while Eric’s on it).
Make Eric raise a desk lid.
Parameters: | desk – The desk to open. |
---|
Open the door that Eric is facing.
Returns: | 0 (to indicate that the screen should not scroll). |
---|
Signal that Eric is paralysed (as after falling from the top-floor window). Mr Wacker will be alerted.
Parameters: | command_list_id – The ID of the command list Mr Wacker should switch to. |
---|
Make Eric pedal the bike. The Eric-on-a-bike sprite is moved to the next phase of animation.
Return whether Eric pedalled the bike since the last time he was moved. This will be True if and only if:
Play a sound effect.
Parameters: |
|
---|
Print Eric’s inventory.
Print Eric’s mouse inventory.
Make Eric throw a punch. Also alert any lines-givers in the vicinity.
Perform generic reinitialisation of Eric.
Make Eric release some mice.
Return whether Eric is somewhere other than he should be.
Make Eric stand on the saddle of the bike.
Make Eric stand up (after sitting down or bending over).
Return whether Eric stood on the saddle of the bike. This will be True if Eric was sitting on the saddle and ‘up’ was pressed.
Make Eric collect the safe key. A celebratory sound effect will be played.
Return whether Eric understood the message just delivered to him.
Unfreeze Eric.
Unhide Eric. Eric’s pre-kiss coordinates are restored.
Move Eric one step in the direction he is facing. If Eric moves close enough to the left or right edge of the screen, it will scroll.
Control Eric when he’s writing on a blackboard.
Returns: | True if Eric has finished writing, False otherwise. |
---|