Prev: 42165 Up: Map Next: 42220
42185: Handle Money Bag
Type 24: a money bag put in the street by CreateMoneyBag to help a player who has run out of money. It disappears if the sheriff moves away from it. When the sheriff touches it, it adds $100 to the bounty.
Remove the bag if the sheriff has moved away.
HandleMoneyBag 42185 LD C,2 Set the distance at which the bag stays alive to two cells.
42187 CALL CheckDistance Check how close the sheriff is.
42190 JP NC,HandleBody_Remove Remove the bag if the sheriff has moved away.
Add $100 when the sheriff touches the bag.
42193 CALL CheckSheriffTouch Check whether the sheriff is touching the bag.
42196 RET NC Return if not.
42197 LD BC,256 Set the $100 added to the bounty in BC.
42200 CALL AddToBounty Add it to the bounty.
42203 CALL DrawBountyDigits Print the new bounty.
42206 LD A,8 Write 8 to SoundNotesLeft so that the pick-up sound lasts eight notes.
42208 LD (41532),A
42211 LD HL,44743 Point SoundNoteAddress at the notes of the pick-up sound.
42214 LD (41533),HL
42217 JP HandleBody_Remove Remove the bag.
Prev: 42165 Up: Map Next: 42220