pokecrystal-board/maps/TrainerHouseB1F.asm
Rangi 32ed487a47 Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts:
#	audio/engine.asm
#	constants/gfx_constants.asm
#	constants/map_data_constants.asm
#	constants/pokemon_data_constants.asm
#	constants/sprite_constants.asm
#	constants/wram_constants.asm
#	data/maps/data.asm
#	engine/battle/ai/scoring.asm
#	engine/battle/core.asm
#	engine/battle/effect_commands.asm
#	engine/battle/misc.asm
#	engine/battle_anims/getpokeballwobble.asm
#	engine/breeding.asm
#	engine/buy_sell_toss.asm
#	engine/decorations.asm
#	engine/events/battle_tower/battle_tower.asm
#	engine/events/battle_tower/rules.asm
#	engine/events/buena.asm
#	engine/events/bug_contest/contest_2.asm
#	engine/events/daycare.asm
#	engine/events/dratini.asm
#	engine/events/halloffame.asm
#	engine/events/happiness_egg.asm
#	engine/events/kurt.asm
#	engine/events/lucky_number.asm
#	engine/events/magnet_train.asm
#	engine/events/overworld.asm
#	engine/events/pokerus/pokerus.asm
#	engine/events/print_unown.asm
#	engine/events/print_unown_2.asm
#	engine/events/unown_walls.asm
#	engine/item_effects.asm
#	engine/link.asm
#	engine/mon_menu.asm
#	engine/player_object.asm
#	engine/routines/playslowcry.asm
#	engine/scripting.asm
#	engine/search.asm
#	engine/search2.asm
#	engine/specials.asm
#	engine/start_menu.asm
#	engine/timeset.asm
#	home/battle_vars.asm
#	home/map.asm
#	maps/GoldenrodUndergroundSwitchRoomEntrances.asm
#	maps/IlexForest.asm
#	maps/KrissHouse2F.asm
#	maps/Route39Barn.asm
#	mobile/mobile_12_2.asm
#	mobile/mobile_40.asm
#	mobile/mobile_5f.asm
#	wram.asm
2018-02-03 19:42:56 -05:00

184 lines
3.5 KiB
NASM

const_def 2 ; object constants
const TRAINERHOUSEB1F_RECEPTIONIST
const TRAINERHOUSEB1F_CHRIS
TrainerHouseB1F_MapScripts:
db 1 ; scene scripts
scene_script .DummyScene ; SCENE_DEFAULT
db 0 ; callbacks
.DummyScene:
end
TrainerHouseReceptionistScript:
objectface PLAYER, UP
opentext
checkflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
iftrue .FoughtTooManyTimes
writetext TrainerHouseB1FIntroText
buttonsound
special TrainerHouse
iffalse .GetCal3Name
trainertotext CAL, CAL2, MEM_BUFFER_0
jump .GotName
.GetCal3Name:
trainertotext CAL, CAL3, MEM_BUFFER_0
.GotName:
writetext TrainerHouseB1FYourOpponentIsText
buttonsound
writetext TrainerHouseB1FAskWantToBattleText
yesorno
iffalse .Declined
setflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
writetext TrainerHouseB1FGoRightInText
waitbutton
closetext
applymovement PLAYER, Movement_EnterTrainerHouseBattleRoom
opentext
writetext TrainerHouseB1FCalBeforeText
waitbutton
closetext
special TrainerHouse
iffalse .NoSpecialBattle
winlosstext TrainerHouseB1FCalBeatenText, 0
setlasttalked TRAINERHOUSEB1F_CHRIS
loadtrainer CAL, CAL2
startbattle
reloadmapafterbattle
iffalse .End
.NoSpecialBattle:
winlosstext TrainerHouseB1FCalBeatenText, 0
setlasttalked TRAINERHOUSEB1F_CHRIS
loadtrainer CAL, CAL3
startbattle
reloadmapafterbattle
.End:
applymovement PLAYER, Movement_ExitTrainerHouseBattleRoom
end
.Declined:
writetext TrainerHouseB1FPleaseComeAgainText
waitbutton
closetext
applymovement PLAYER, Movement_TrainerHouseTurnBack
end
.FoughtTooManyTimes:
writetext TrainerHouseB1FSecondChallengeDeniedText
waitbutton
closetext
applymovement PLAYER, Movement_TrainerHouseTurnBack
end
Movement_EnterTrainerHouseBattleRoom:
step LEFT
step LEFT
step LEFT
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step LEFT
turn_head RIGHT
step_end
Movement_ExitTrainerHouseBattleRoom:
step UP
step UP
step UP
step RIGHT
step UP
step UP
step UP
step UP
step UP
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step_end
Movement_TrainerHouseTurnBack:
step RIGHT
turn_head LEFT
step_end
TrainerHouseB1FIntroText:
text "Hi. Welcome to our"
line "TRAINING HALL."
para "You may battle a"
line "trainer once per"
cont "day."
done
TrainerHouseB1FYourOpponentIsText:
text_from_ram wStringBuffer3
text " is your"
line "opponent today."
done
TrainerHouseB1FAskWantToBattleText:
text "Would you like to"
line "battle?"
done
TrainerHouseB1FGoRightInText:
text "Please go right"
line "through."
para "You may begin"
line "right away."
done
TrainerHouseB1FPleaseComeAgainText:
text "Sorry. Only those"
line "trainers who will"
para "be battling are"
line "allowed to go in."
done
TrainerHouseB1FSecondChallengeDeniedText:
text "I'm sorry."
line "This would be your"
para "second time today."
line "You're permitted"
para "to enter just once"
line "a day."
done
TrainerHouseB1FCalBeatenText:
text "I lost…"
line "Darn…"
done
TrainerHouseB1FCalBeforeText:
text "I traveled out"
line "here just so I"
cont "could battle you."
done
TrainerHouseB1F_MapEvents:
db 0, 0 ; filler
db 1 ; warp events
warp_event 9, 4, TRAINER_HOUSE_1F, 3
db 1 ; coord events
coord_event 7, 3, SCENE_DEFAULT, TrainerHouseReceptionistScript
db 0 ; bg events
db 2 ; object events
object_event 7, 1, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
object_event 6, 11, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1