Fire: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 49:
|}
 
== {{Pseudocode ==header}}
 
main() {
{{RAM name|$7E:00DE}} += 8
this.init()
this.health = 5
{{ROM name|$80:8475}}(this.collisionHandler)
while (this.collidedSpriteType == 0 or|| (this.collidedSpriteType != OFF_SCREEN and&& this.health >= 0)) {
this.collidedSpriteType = 0
{{ROM name|$80:8353}}(2)
Line 64 ⟶ 63:
if (this.cyclesUntilAnimUpdate < 0) {
this.cyclesUntilAnimUpdate = 2
this.animationFrame = (this.animationFrame + 1) % 4
this.sprite.tileData.lowBytes = this.animation[this.animationFrame]
this.sprite.tileData.bank = 0x8F
this.sprite.type = this.spriteTypes[this.animationFrame &% 34]
}
}
Line 104 ⟶ 103:
weaponType = spriteType & 0x7FFF
if (weaponType == FIRE_EXTINGUISHER or||
weaponType == SODA_POP_CANS or||
weaponType == SQUIRT_GUN or||
weaponType == 0x65) {
this.health -= 1
Line 116 ⟶ 115:
return false
}
{{Pseudocode footer}}
 
[[Category:One-shot monster]]