Prev: 7CD0 Up: Map Next: 7CF1
7CE0: Make a teacher decide whether to give EINSTEIN lines for telling tales
Used by the routine at F300.
Input
H Teacher's character number (0xA3-0xA6)
7CE0 LD A,H L=0x00 (MR WACKER), 0x10 (MR ROCKITT), 0x20 (MR WITHIT), or 0x30 (MR CREAK)
7CE1 SUB $A3
7CE3 ADD A,A
7CE4 ADD A,A
7CE5 ADD A,A
7CE6 ADD A,A
7CE7 LD L,A
The number in L determines how often the teacher will give lines to EINSTEIN for telling tales:
Teacher Frequency
MR WACKER Never
MR ROCKITT 1 in 16
MR WITHIT 1 in 8
MR CREAK 3 in 16
7CE8 CALL $61A1 A=random number
7CEB CP L Set the carry flag if the teacher is going to give lines to EINSTEIN
7CEC LD L,$FF Return with L=0xFF if the teacher's not in the mood to give lines to EINSTEIN
7CEE RET NC
7CEF JR $7CA0 Make the teacher give EINSTEIN lines for telling tales
Prev: 7CD0 Up: Map Next: 7CF1