Routines
| Prev: F15A | Up: Map | Next: F1A8 |
F198: Script helper: succeed by chance (n in 100)
|
||||||||||||
| F198 | DEFB $07,$00 | Action record header: flags $07; byte 1 $00 | ||||||||||
| F19A | CALL $D29D | Call the routine "A random number from 1 to 100" (D29D) - A random number, 1-99 | ||||||||||
| F19D | LD B,A | Copy A into B | ||||||||||
| F19E | LD A,($A034) | n | ||||||||||
| F1A1 | CP B | Is n below it? | ||||||||||
| F1A2 | JP C,$DC15 | Yes: refuse | ||||||||||
| F1A5 | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller - No: succeed | ||||||||||
| F1A7 | RET | Return to the caller | ||||||||||
| Prev: F15A | Up: Map | Next: F1A8 |