Skip to content

Commit

Permalink
Merge pull request #176 from suloku/master
Browse files Browse the repository at this point in the history
Merge from Suloku fork
  • Loading branch information
PiaCarrot authored Apr 12, 2024
2 parents 2599226 + ff3a3c2 commit 496039a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
5 changes: 3 additions & 2 deletions constants/event_flags.asm
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,15 @@
const EVENT_AIRSHIP_BIRDS
;Adding new events here to mantain savegame compatibility
const EVENT_MANDARIN_CAVE_KECLEON_FOUGHT
const EVENT_MANDARIN_CAVE_KECLEON_FOUGHT ;01:d998 bit 3
const EVENT_SUNRAY_CAVE_1F_MARSHADOW_FOUGHT
const EVENT_SUNRAY_CAVE_1F_CROSS_FOUGHT
const EVENT_SUNRAY_CAVE_1F_CROSS_HS
const EVENT_CROSS_CORRUPTED_SUNRAY
const EVENT_CROSS_CORRUPTED_FOUGHT
const EVENT_ROUTE51_HO_OH_FOUGHT
const EVENT_TANGELO_JUNGLE_MEW_FOUGHT
const EVENT_VICTORY_ROAD_MEWTWO_FOUGHT
const EVENT_TARROCO_CELEBI_FOUGHT
const EVENT_SUNRAY_CAVE_1F_MARSHADOW_HS

NUM_EVENTS EQU const_value
2 changes: 1 addition & 1 deletion engine/healmachineanim.asm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ HealMachineAnim: ; 12324
ld de, SFX_SECOND_PART_OF_ITEMFINDER
call PlaySFX
pop de
ld c, 30
ld c, 5
call DelayFrames
dec b
jr nz, .party_loop
Expand Down
22 changes: 19 additions & 3 deletions maps/SunrayCaveMandarinDesert1F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ SunrayCaveMandarinDesert1F_MapScriptHeader::

SunrayHideCrossCallback:
disappear SUNRAY_CROSS
appear MARSHADOW_MANDARIN_DESERT_CAVE
checkevent EVENT_CROSS_CORRUPTED_SUNRAY ;If this cave's event is done, hide Marshadow, unless already fought Cross at route 51
iftrue .checkRoute51Cross
return ;if the event isn't done, we are done
.checkRoute51Cross:
checkevent EVENT_CROSS_CORRUPTED_FOUGHT ;if we haven't beat Cross at route 51, hide Marshadow
iffalse .hideMarshadow

checkevent EVENT_SUNRAY_CAVE_1F_MARSHADOW_FOUGHT ;if we already battled him, hide Marshadow
iftrue .hideMarshadow
return
.hideMarshadow:
disappear MARSHADOW_MANDARIN_DESERT_CAVE
return

InvisibleForceScript:
Expand Down Expand Up @@ -78,7 +94,7 @@ SunrayCaveCrossScript:
takeitem RAINBOW_WING
setevent EVENT_CROSS_CORRUPTED_SUNRAY
spriteface PLAYER, UP
jump MandarinCaveMarshadowScript
disappear MARSHADOW_MANDARIN_DESERT_CAVE
.corruptedCross:
end

Expand Down Expand Up @@ -128,5 +144,5 @@ SunrayCaveMandarinDesert1F_MapEventHeader::

.ObjectEvents: db 3
person_event SPRITE_INVISIBLE, 3, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, InvisibleForceScript, EVENT_MANDARIN_CAVE_KECLEON_FOUGHT
person_event SPRITE_ROCKER, 8, 30, SPRITEMOVEDATA_STANDING_UP, 1, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_SUNRAY_CAVE_1F_CROSS_FOUGHT
person_event SPRITE_MARSHADOW, 2, 30, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_GRAY, 0, 0, MandarinCaveMarshadowScript, EVENT_SUNRAY_CAVE_1F_MARSHADOW_FOUGHT
person_event SPRITE_ROCKER, 8, 30, SPRITEMOVEDATA_STANDING_UP, 1, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_SUNRAY_CAVE_1F_CROSS_HS
person_event SPRITE_MARSHADOW, 2, 30, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_GRAY, 0, 0, MandarinCaveMarshadowScript, EVENT_SUNRAY_CAVE_1F_MARSHADOW_HS

0 comments on commit 496039a

Please sign in to comment.