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
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
ReadTrainerParty: ; 39771
|
||||
ld a, [InBattleTowerBattle]
|
||||
ld a, [wInBattleTowerBattle]
|
||||
bit 0, a
|
||||
ret nz
|
||||
|
||||
@@ -7,24 +7,24 @@ ReadTrainerParty: ; 39771
|
||||
and a
|
||||
ret nz
|
||||
|
||||
ld hl, OTPartyCount
|
||||
ld hl, wOTPartyCount
|
||||
xor a
|
||||
ld [hli], a
|
||||
dec a
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OTPartyMons
|
||||
ld bc, OTPartyMonsEnd - OTPartyMons
|
||||
ld hl, wOTPartyMons
|
||||
ld bc, wOTPartyMonsEnd - wOTPartyMons
|
||||
xor a
|
||||
call ByteFill
|
||||
|
||||
ld a, [OtherTrainerClass]
|
||||
ld a, [wOtherTrainerClass]
|
||||
cp CAL
|
||||
jr nz, .not_cal2
|
||||
ld a, [OtherTrainerID]
|
||||
ld a, [wOtherTrainerID]
|
||||
cp CAL2
|
||||
jr z, .cal2
|
||||
ld a, [OtherTrainerClass]
|
||||
ld a, [wOtherTrainerClass]
|
||||
.not_cal2
|
||||
|
||||
dec a
|
||||
@@ -37,7 +37,7 @@ ReadTrainerParty: ; 39771
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
ld a, [OtherTrainerID]
|
||||
ld a, [wOtherTrainerID]
|
||||
ld b, a
|
||||
.skip_trainer
|
||||
dec b
|
||||
@@ -98,11 +98,11 @@ TrainerType1: ; 397eb
|
||||
cp $ff
|
||||
ret z
|
||||
|
||||
ld [CurPartyLevel], a
|
||||
ld [wCurPartyLevel], a
|
||||
ld a, [hli]
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, OTPARTYMON
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
push hl
|
||||
predef TryAddMonToParty
|
||||
pop hl
|
||||
@@ -118,17 +118,17 @@ TrainerType2: ; 39806
|
||||
cp $ff
|
||||
ret z
|
||||
|
||||
ld [CurPartyLevel], a
|
||||
ld [wCurPartyLevel], a
|
||||
ld a, [hli]
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, OTPARTYMON
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
|
||||
push hl
|
||||
predef TryAddMonToParty
|
||||
ld a, [OTPartyCount]
|
||||
ld a, [wOTPartyCount]
|
||||
dec a
|
||||
ld hl, OTPartyMon1Moves
|
||||
ld hl, wOTPartyMon1Moves
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
@@ -145,9 +145,9 @@ TrainerType2: ; 39806
|
||||
|
||||
push hl
|
||||
|
||||
ld a, [OTPartyCount]
|
||||
ld a, [wOTPartyCount]
|
||||
dec a
|
||||
ld hl, OTPartyMon1Species
|
||||
ld hl, wOTPartyMon1Species
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
@@ -195,16 +195,16 @@ TrainerType3: ; 39871
|
||||
cp $ff
|
||||
ret z
|
||||
|
||||
ld [CurPartyLevel], a
|
||||
ld [wCurPartyLevel], a
|
||||
ld a, [hli]
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, OTPARTYMON
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
push hl
|
||||
predef TryAddMonToParty
|
||||
ld a, [OTPartyCount]
|
||||
ld a, [wOTPartyCount]
|
||||
dec a
|
||||
ld hl, OTPartyMon1Item
|
||||
ld hl, wOTPartyMon1Item
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
@@ -224,18 +224,18 @@ TrainerType4: ; 3989d
|
||||
cp $ff
|
||||
ret z
|
||||
|
||||
ld [CurPartyLevel], a
|
||||
ld [wCurPartyLevel], a
|
||||
ld a, [hli]
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
|
||||
ld a, OTPARTYMON
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
|
||||
push hl
|
||||
predef TryAddMonToParty
|
||||
ld a, [OTPartyCount]
|
||||
ld a, [wOTPartyCount]
|
||||
dec a
|
||||
ld hl, OTPartyMon1Item
|
||||
ld hl, wOTPartyMon1Item
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
@@ -246,9 +246,9 @@ TrainerType4: ; 3989d
|
||||
ld [de], a
|
||||
|
||||
push hl
|
||||
ld a, [OTPartyCount]
|
||||
ld a, [wOTPartyCount]
|
||||
dec a
|
||||
ld hl, OTPartyMon1Moves
|
||||
ld hl, wOTPartyMon1Moves
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
@@ -265,9 +265,9 @@ TrainerType4: ; 3989d
|
||||
|
||||
push hl
|
||||
|
||||
ld a, [OTPartyCount]
|
||||
ld a, [wOTPartyCount]
|
||||
dec a
|
||||
ld hl, OTPartyMon1
|
||||
ld hl, wOTPartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
@@ -315,7 +315,7 @@ ComputeTrainerReward: ; 3991b (e:591b)
|
||||
ld [hli], a
|
||||
ld a, [wEnemyTrainerBaseReward]
|
||||
ld [hli], a
|
||||
ld a, [CurPartyLevel]
|
||||
ld a, [wCurPartyLevel]
|
||||
ld [hl], a
|
||||
call Multiply
|
||||
ld hl, wBattleReward
|
||||
@@ -329,14 +329,14 @@ ComputeTrainerReward: ; 3991b (e:591b)
|
||||
|
||||
|
||||
Battle_GetTrainerName:: ; 39939
|
||||
ld a, [InBattleTowerBattle]
|
||||
ld a, [wInBattleTowerBattle]
|
||||
bit 0, a
|
||||
ld hl, OTPlayerName
|
||||
ld hl, wOTPlayerName
|
||||
jp nz, CopyTrainerName
|
||||
|
||||
ld a, [OtherTrainerID]
|
||||
ld a, [wOtherTrainerID]
|
||||
ld b, a
|
||||
ld a, [OtherTrainerClass]
|
||||
ld a, [wOtherTrainerClass]
|
||||
ld c, a
|
||||
|
||||
GetTrainerName:: ; 3994c
|
||||
@@ -380,7 +380,7 @@ GetTrainerName:: ; 3994c
|
||||
jr .loop
|
||||
|
||||
CopyTrainerName: ; 39984
|
||||
ld de, StringBuffer1
|
||||
ld de, wStringBuffer1
|
||||
push de
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
@@ -390,7 +390,7 @@ CopyTrainerName: ; 39984
|
||||
|
||||
Function39990: ; 39990
|
||||
; This function is useless.
|
||||
ld de, StringBuffer1
|
||||
ld de, wStringBuffer1
|
||||
push de
|
||||
ld bc, NAME_LENGTH
|
||||
pop de
|
||||
|
Reference in New Issue
Block a user