Merge pull request #224 from yenatch/moves

Clean up the battle core and specify type categories
This commit is contained in:
Bryan Bishop 2014-01-27 06:51:01 -08:00
commit 94c9f59f45
20 changed files with 1167 additions and 1072 deletions

View File

@ -162,7 +162,7 @@ AIScoring_RedSuperEffective: ; 38635
push de push de
ld a, 1 ld a, 1
ld [hBattleTurn], a ld [hBattleTurn], a
callab Function0x347c8 callab Function347c8
pop de pop de
pop bc pop bc
pop hl pop hl
@ -412,7 +412,7 @@ AIScoring_LeechHit: ; 387f7
push hl push hl
ld a, 1 ld a, 1
ld [hBattleTurn], a ld [hBattleTurn], a
callab Function0x347c8 callab Function347c8
pop hl pop hl
ld a, [$d265] ld a, [$d265]
@ -559,7 +559,7 @@ AIScoring_LockOn: ; 3881d
AIScoring_Explosion: ; 388a6 AIScoring_Explosion: ; 388a6
push hl push hl
callba Function0x349f4 callba Function349f4
pop hl pop hl
jr nc, .asm_388b7 jr nc, .asm_388b7
@ -904,7 +904,7 @@ AIScoring_Bide: ; 38a1e
AIScoring_Whirlwind: ; 38a2a AIScoring_Whirlwind: ; 38a2a
push hl push hl
callab Function0x3484e callab Function3484e
ld a, [$c716] ld a, [$c716]
cp $a cp $a
pop hl pop hl
@ -1760,7 +1760,7 @@ AIScoring_MeanLook: ; 38dfb
jr nz, .asm_38e26 jr nz, .asm_38e26
push hl push hl
callab Function0x3484e callab Function3484e
ld a, [$c716] ld a, [$c716]
cp $b cp $b
pop hl pop hl
@ -1874,7 +1874,7 @@ AIScoring_Curse: ; 38e5c
jp nz, AIDiscourageMove jp nz, AIDiscourageMove
push hl push hl
callba Function0x349f4 callba Function349f4
pop hl pop hl
jr nc, .asm_38eb0 jr nc, .asm_38eb0
@ -2003,7 +2003,7 @@ AIScoring_Foresight: ; 38f1d
AIScoring_PerishSong: ; 38f4a AIScoring_PerishSong: ; 38f4a
push hl push hl
callab Function0x349f4 callab Function349f4
pop hl pop hl
jr c, .asm_38f75 jr c, .asm_38f75
@ -2012,7 +2012,7 @@ AIScoring_PerishSong: ; 38f4a
jr nz, .asm_38f6f jr nz, .asm_38f6f
push hl push hl
callab Function0x3484e callab Function3484e
ld a, [$c716] ld a, [$c716]
cp 10 ; 1.0 cp 10 ; 1.0
pop hl pop hl
@ -2242,7 +2242,7 @@ AIScoring_Earthquake: ; 39044
AIScoring_BatonPass: ; 39062 AIScoring_BatonPass: ; 39062
push hl push hl
callab Function0x3484e callab Function3484e
ld a, [$c716] ld a, [$c716]
cp 10 ; 1.0 cp 10 ; 1.0
pop hl pop hl
@ -2299,7 +2299,7 @@ AIScoring_HiddenPower: ; 3909e
ld hl, $7ced ld hl, $7ced
ld a, $3e ld a, $3e
rst FarCall rst FarCall
callab Function0x347c8 callab Function347c8
pop hl pop hl
ld a, [$d265] ld a, [$d265]
@ -3223,7 +3223,7 @@ AIScoring_StatusImmunity: ; 39453
push de push de
ld a, 1 ld a, 1
ld [hBattleTurn], a ld [hBattleTurn], a
callab Function0x347c8 callab Function347c8
pop de pop de
pop bc pop bc
pop hl pop hl

View File

@ -1430,7 +1430,7 @@ Functioncc8d3: ; cc8d3
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
ld hl, $506f ld hl, BattleAnimations
add hl, de add hl, de
add hl, de add hl, de
call Function3ae1 call Function3ae1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -41,9 +41,9 @@ BattleCommand54: ; 37588
ld a, $1 ld a, $1
ld [$c689], a ld [$c689], a
call Function0x37e01 call AnimateCurrentMove
ld a, $2 ld a, $2
call Function0x36532 call Function36532
call SwitchTurn call SwitchTurn
call BattleCommand8d call BattleCommand8d
call ResetMiss call ResetMiss
@ -71,17 +71,17 @@ BattleCommand54: ; 37588
jr nz, .failed jr nz, .failed
set 1, [hl] set 1, [hl]
call Function0x37e01 call AnimateCurrentMove
ld hl, GetHalfMaxHP ld hl, GetHalfMaxHP
call CallBankF call CallBattleCore
ld hl, Function3cc3f ld hl, Function3cc3f
call CallBankF call CallBattleCore
call UpdateUserInParty call UpdateUserInParty
ld hl, PutACurseText ld hl, PutACurseText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function0x37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
@ -91,7 +91,7 @@ BattleCommand54: ; 37588
ld b, $8 ; ABILITY ld b, $8 ; ABILITY
call GetStatName call GetStatName
call Function0x37e77 call AnimateFailedMove
ld hl, WontRiseAnymoreText ld hl, WontRiseAnymoreText
jp StdBattleTextBox jp StdBattleTextBox
; 37618 ; 37618

View File

@ -10,7 +10,7 @@ BattleCommand5a: ; 3766f
call _GetBattleVar call _GetBattleVar
set SUBSTATUS_ENDURE, [hl] set SUBSTATUS_ENDURE, [hl]
call Function0x37e01 call AnimateCurrentMove
ld hl, BracedItselfText ld hl, BracedItselfText
jp StdBattleTextBox jp StdBattleTextBox

View File

@ -14,11 +14,11 @@ BattleCommand57: ; 376a0
jr nz, .failed jr nz, .failed
set SUBSTATUS_IDENTIFIED, [hl] set SUBSTATUS_IDENTIFIED, [hl]
call Function0x37e01 call AnimateCurrentMove
ld hl, IdentifiedText ld hl, IdentifiedText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
jp Function0x37354 jp Function37354
; 376c2 ; 376c2

View File

@ -1,8 +1,8 @@
BattleCommand34: ; 37418 BattleCommand34: ; 37418
; metronome ; metronome
call Function0x372d8 call Function372d8
call Function0x34548 call Function34548
jr nz, .asm_3742b jr nz, .asm_3742b
ld a, [$c689] ld a, [$c689]
@ -12,7 +12,7 @@ BattleCommand34: ; 37418
ld [$c689], a ld [$c689], a
.asm_3742b .asm_3742b
call Function0x37e36 call Function37e36
.GetMove .GetMove
call BattleRandom call BattleRandom

View File

@ -1,7 +1,7 @@
BattleCommand1b: ; 373c9 BattleCommand1b: ; 373c9
; mirrormove ; mirrormove
call Function0x372d8 call Function372d8
ld a, BATTLE_VARS_MOVE ld a, BATTLE_VARS_MOVE
call _GetBattleVar call _GetBattleVar
@ -15,7 +15,7 @@ BattleCommand1b: ; 373c9
jr nz, .use jr nz, .use
.failed .failed
call Function0x37e77 call AnimateFailedMove
ld hl, MirrorMoveFailedText ld hl, MirrorMoveFailedText
call StdBattleTextBox call StdBattleTextBox
@ -37,7 +37,7 @@ BattleCommand1b: ; 373c9
call GetMoveData call GetMoveData
call GetMoveName call GetMoveName
call CopyName1 call CopyName1
call Function0x34548 call Function34548
jr nz, .done jr nz, .done
ld a, [$c689] ld a, [$c689]

View File

@ -28,12 +28,12 @@ BattleCommand52: ; 37536
; Otherwise give the opponent a nightmare. ; Otherwise give the opponent a nightmare.
set SUBSTATUS_NIGHTMARE, [hl] set SUBSTATUS_NIGHTMARE, [hl]
call Function0x37e01 call AnimateCurrentMove
ld hl, StartedNightmareText ld hl, StartedNightmareText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function0x37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37563 ; 37563

View File

@ -30,12 +30,12 @@ BattleCommand58: ; 376c2
ld [EnemyPerishCount], a ld [EnemyPerishCount], a
.done .done
call Function0x37e01 call AnimateCurrentMove
ld hl, StartPerishText ld hl, StartPerishText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function0x37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 376f8 ; 376f8

View File

@ -7,7 +7,7 @@ BattleCommand55: ; 37618
call _GetBattleVar call _GetBattleVar
set SUBSTATUS_PROTECT, [hl] set SUBSTATUS_PROTECT, [hl]
call Function0x37e01 call AnimateCurrentMove
ld hl, ProtectedItselfText ld hl, ProtectedItselfText
jp StdBattleTextBox jp StdBattleTextBox
@ -23,7 +23,7 @@ ProtectChance: ; 3762c
ld de, EnemyProtectCount ld de, EnemyProtectCount
.asm_37637 .asm_37637
call Function0x36abf call Function36abf
jr nz, .failed jr nz, .failed
; Can't have a substitute. ; Can't have a substitute.
@ -73,7 +73,7 @@ ProtectChance: ; 3762c
.failed .failed
xor a xor a
ld [de], a ld [de], a
call Function0x37e77 call AnimateFailedMove
call PrintButItFailed call PrintButItFailed
scf scf
ret ret

View File

@ -9,12 +9,12 @@ BattleCommand59: ; 376f8
ld [Weather], a ld [Weather], a
ld a, 5 ld a, 5
ld [WeatherCount], a ld [WeatherCount], a
call Function0x37e01 call AnimateCurrentMove
ld hl, SandstormBrewedText ld hl, SandstormBrewedText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
call Function0x37e77 call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed
; 37718 ; 37718

View File

@ -17,12 +17,12 @@ BattleCommand56: ; 37683
set SCREENS_SPIKES, [hl] set SCREENS_SPIKES, [hl]
call Function0x37e01 call AnimateCurrentMove
ld hl, SpikesText ld hl, SpikesText
jp StdBattleTextBox jp StdBattleTextBox
.failed .failed
jp Function0x37354 jp Function37354
; 376a0 ; 376a0

View File

@ -1,75 +1,76 @@
GetHiddenPower: ; fbced HiddenPowerDamage: ; fbced
; Override Hidden Power's type and power based on the actor's DVs. ; Override Hidden Power's type and power based on the user's DVs.
ld hl, BattleMonDVs ld hl, BattleMonDVs
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .GotDVs jr z, .got_dvs
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
.GotDVs .got_dvs
; Power: ; Power:
; Take the top bit from... ; Take the top bit from each stat
; Atk ; Attack
ld a, [hl] ld a, [hl]
swap a swap a
and 8 and 8
; Defense
ld b, a ld b, a
; Def
ld a, [hli] ld a, [hli]
and 8 and 8
srl a srl a
or b or b
; Speed
ld b, a ld b, a
; Spd
ld a, [hl] ld a, [hl]
swap a swap a
and 8 and 8
srl a srl a
srl a srl a
or b or b
; Special
ld b, a ld b, a
; Spc
ld a, [hl] ld a, [hl]
and 8 and 8
srl a srl a
srl a srl a
srl a srl a
or b or b
ld b, a
; * 5 ; Multiply by 5
ld b, a
add a add a
add a add a
add b add b
ld b, a
; + (Spc & 3) ; Add Special & 3
ld b, a
ld a, [hld] ld a, [hld]
and 3 and 3
add b add b
; / 2 ; Divide by 2 and add 30 + 1
srl a srl a
; + 30
add 30 add 30
; + 1
inc a inc a
ld d, a ld d, a
; Type: ; Type:
; Def & 3 ; Def & 3
ld a, [hl] ld a, [hl]
and 3 and 3
ld b, a ld b, a
; + (Atk & 3) << 2 ; + (Atk & 3) << 2
ld a, [hl] ld a, [hl]
and 3 << 4 and 3 << 4
swap a swap a
@ -80,27 +81,30 @@ GetHiddenPower: ; fbced
; Skip Normal ; Skip Normal
inc a inc a
; Skip type 6 (unused) ; Skip Bird
cp 6 cp BIRD
jr c, .GotType jr c, .done
inc a inc a
; Skip unused types between Steel and Fire ; Skip unused types
cp STEEL + 1 cp UNUSED_TYPES
jr c, .GotType jr c, .done
add FIRE - (STEEL + 1) add SPECIAL - UNUSED_TYPES
.done
.GotType ; Overwrite the current move type.
push af push af
ld a, BATTLE_VARS_MOVE_TYPE ld a, BATTLE_VARS_MOVE_TYPE
call _GetBattleVar call _GetBattleVar
pop af pop af
ld [hl], a ld [hl], a
; Get the rest of the damage formula variables
; based on the new type, but keep base power.
ld a, d ld a, d
push af push af
callba BattleCommand06 callba BattleCommand06 ; damagestats
pop af pop af
ld d, a ld d, a
ret ret

View File

@ -12,6 +12,7 @@ INCLUDE "hram.asm"
INCLUDE "constants/wram_constants.asm" INCLUDE "constants/wram_constants.asm"
INCLUDE "constants/pokemon_constants.asm" INCLUDE "constants/pokemon_constants.asm"
INCLUDE "constants/type_constants.asm"
INCLUDE "constants/move_constants.asm" INCLUDE "constants/move_constants.asm"
INCLUDE "constants/battle_constants.asm" INCLUDE "constants/battle_constants.asm"
INCLUDE "constants/map_constants.asm" INCLUDE "constants/map_constants.asm"
@ -31,25 +32,6 @@ INCLUDE "constants/gfx_constants.asm"
NONE EQU 0 NONE EQU 0
; types
NORMAL EQU $00
FIGHTING EQU $01
FLYING EQU $02
POISON EQU $03
GROUND EQU $04
ROCK EQU $05
BUG EQU $07
GHOST EQU $08
STEEL EQU $09
CURSE_T EQU $13
FIRE EQU $14
WATER EQU $15
GRASS EQU $16
ELECTRIC EQU $17
PSYCHIC EQU $18
ICE EQU $19
DRAGON EQU $1A
DARK EQU $1B
; egg group constants ; egg group constants
MONSTER EQU $01 MONSTER EQU $01

View File

@ -1,259 +1,259 @@
const_def const_def
const NO_MOVE const NO_MOVE ; $00
const POUND const POUND ; $01
const KARATE_CHOP const KARATE_CHOP ; $02
const DOUBLESLAP const DOUBLESLAP ; $03
const COMET_PUNCH const COMET_PUNCH ; $04
const MEGA_PUNCH const MEGA_PUNCH ; $05
const PAY_DAY const PAY_DAY ; $06
const FIRE_PUNCH const FIRE_PUNCH ; $07
const ICE_PUNCH const ICE_PUNCH ; $08
const THUNDERPUNCH const THUNDERPUNCH ; $09
const SCRATCH const SCRATCH ; $0a
const VICEGRIP const VICEGRIP ; $0b
const GUILLOTINE const GUILLOTINE ; $0c
const RAZOR_WIND const RAZOR_WIND ; $0d
const SWORDS_DANCE const SWORDS_DANCE ; $0e
const CUT const CUT ; $0f
const GUST const GUST ; $10
const WING_ATTACK const WING_ATTACK ; $11
const WHIRLWIND const WHIRLWIND ; $12
const FLY const FLY ; $13
const BIND const BIND ; $14
const SLAM const SLAM ; $15
const VINE_WHIP const VINE_WHIP ; $16
const STOMP const STOMP ; $17
const DOUBLE_KICK const DOUBLE_KICK ; $18
const MEGA_KICK const MEGA_KICK ; $19
const JUMP_KICK const JUMP_KICK ; $1a
const ROLLING_KICK const ROLLING_KICK ; $1b
const SAND_ATTACK const SAND_ATTACK ; $1c
const HEADBUTT const HEADBUTT ; $1d
const HORN_ATTACK const HORN_ATTACK ; $1e
const FURY_ATTACK const FURY_ATTACK ; $1f
const HORN_DRILL const HORN_DRILL ; $20
const TACKLE const TACKLE ; $21
const BODY_SLAM const BODY_SLAM ; $22
const WRAP const WRAP ; $23
const TAKE_DOWN const TAKE_DOWN ; $24
const THRASH const THRASH ; $25
const DOUBLE_EDGE const DOUBLE_EDGE ; $26
const TAIL_WHIP const TAIL_WHIP ; $27
const POISON_STING const POISON_STING ; $28
const TWINEEDLE const TWINEEDLE ; $29
const PIN_MISSILE const PIN_MISSILE ; $2a
const LEER const LEER ; $2b
const BITE const BITE ; $2c
const GROWL const GROWL ; $2d
const ROAR const ROAR ; $2e
const SING const SING ; $2f
const SUPERSONIC const SUPERSONIC ; $30
const SONICBOOM const SONICBOOM ; $31
const DISABLE const DISABLE ; $32
const ACID const ACID ; $33
const EMBER const EMBER ; $34
const FLAMETHROWER const FLAMETHROWER ; $35
const MIST const MIST ; $36
const WATER_GUN const WATER_GUN ; $37
const HYDRO_PUMP const HYDRO_PUMP ; $38
const SURF const SURF ; $39
const ICE_BEAM const ICE_BEAM ; $3a
const BLIZZARD const BLIZZARD ; $3b
const PSYBEAM const PSYBEAM ; $3c
const BUBBLEBEAM const BUBBLEBEAM ; $3d
const AURORA_BEAM const AURORA_BEAM ; $3e
const HYPER_BEAM const HYPER_BEAM ; $3f
const PECK const PECK ; $40
const DRILL_PECK const DRILL_PECK ; $41
const SUBMISSION const SUBMISSION ; $42
const LOW_KICK const LOW_KICK ; $43
const COUNTER const COUNTER ; $44
const SEISMIC_TOSS const SEISMIC_TOSS ; $45
const STRENGTH const STRENGTH ; $46
const ABSORB const ABSORB ; $47
const MEGA_DRAIN const MEGA_DRAIN ; $48
const LEECH_SEED const LEECH_SEED ; $49
const GROWTH const GROWTH ; $4a
const RAZOR_LEAF const RAZOR_LEAF ; $4b
const SOLARBEAM const SOLARBEAM ; $4c
const POISONPOWDER const POISONPOWDER ; $4d
const STUN_SPORE const STUN_SPORE ; $4e
const SLEEP_POWDER const SLEEP_POWDER ; $4f
const PETAL_DANCE const PETAL_DANCE ; $50
const STRING_SHOT const STRING_SHOT ; $51
const DRAGON_RAGE const DRAGON_RAGE ; $52
const FIRE_SPIN const FIRE_SPIN ; $53
const THUNDERSHOCK const THUNDERSHOCK ; $54
const THUNDERBOLT const THUNDERBOLT ; $55
const THUNDER_WAVE const THUNDER_WAVE ; $56
const THUNDER const THUNDER ; $57
const ROCK_THROW const ROCK_THROW ; $58
const EARTHQUAKE const EARTHQUAKE ; $59
const FISSURE const FISSURE ; $5a
const DIG const DIG ; $5b
const TOXIC const TOXIC ; $5c
const CONFUSION const CONFUSION ; $5d
const PSYCHIC_M const PSYCHIC_M ; $5e
const HYPNOSIS const HYPNOSIS ; $5f
const MEDITATE const MEDITATE ; $60
const AGILITY const AGILITY ; $61
const QUICK_ATTACK const QUICK_ATTACK ; $62
const RAGE const RAGE ; $63
const TELEPORT const TELEPORT ; $64
const NIGHT_SHADE const NIGHT_SHADE ; $65
const MIMIC const MIMIC ; $66
const SCREECH const SCREECH ; $67
const DOUBLE_TEAM const DOUBLE_TEAM ; $68
const RECOVER const RECOVER ; $69
const HARDEN const HARDEN ; $6a
const MINIMIZE const MINIMIZE ; $6b
const SMOKESCREEN const SMOKESCREEN ; $6c
const CONFUSE_RAY const CONFUSE_RAY ; $6d
const WITHDRAW const WITHDRAW ; $6e
const DEFENSE_CURL const DEFENSE_CURL ; $6f
const BARRIER const BARRIER ; $70
const LIGHT_SCREEN const LIGHT_SCREEN ; $71
const HAZE const HAZE ; $72
const REFLECT const REFLECT ; $73
const FOCUS_ENERGY const FOCUS_ENERGY ; $74
const BIDE const BIDE ; $75
const METRONOME const METRONOME ; $76
const MIRROR_MOVE const MIRROR_MOVE ; $77
const SELFDESTRUCT const SELFDESTRUCT ; $78
const EGG_BOMB const EGG_BOMB ; $79
const LICK const LICK ; $7a
const SMOG const SMOG ; $7b
const SLUDGE const SLUDGE ; $7c
const BONE_CLUB const BONE_CLUB ; $7d
const FIRE_BLAST const FIRE_BLAST ; $7e
const WATERFALL const WATERFALL ; $7f
const CLAMP const CLAMP ; $80
const SWIFT const SWIFT ; $81
const SKULL_BASH const SKULL_BASH ; $82
const SPIKE_CANNON const SPIKE_CANNON ; $83
const CONSTRICT const CONSTRICT ; $84
const AMNESIA const AMNESIA ; $85
const KINESIS const KINESIS ; $86
const SOFTBOILED const SOFTBOILED ; $87
const HI_JUMP_KICK const HI_JUMP_KICK ; $88
const GLARE const GLARE ; $89
const DREAM_EATER const DREAM_EATER ; $8a
const POISON_GAS const POISON_GAS ; $8b
const BARRAGE const BARRAGE ; $8c
const LEECH_LIFE const LEECH_LIFE ; $8d
const LOVELY_KISS const LOVELY_KISS ; $8e
const SKY_ATTACK const SKY_ATTACK ; $8f
const TRANSFORM const TRANSFORM ; $90
const BUBBLE const BUBBLE ; $91
const DIZZY_PUNCH const DIZZY_PUNCH ; $92
const SPORE const SPORE ; $93
const FLASH const FLASH ; $94
const PSYWAVE const PSYWAVE ; $95
const SPLASH const SPLASH ; $96
const ACID_ARMOR const ACID_ARMOR ; $97
const CRABHAMMER const CRABHAMMER ; $98
const EXPLOSION const EXPLOSION ; $99
const FURY_SWIPES const FURY_SWIPES ; $9a
const BONEMERANG const BONEMERANG ; $9b
const REST const REST ; $9c
const ROCK_SLIDE const ROCK_SLIDE ; $9d
const HYPER_FANG const HYPER_FANG ; $9e
const SHARPEN const SHARPEN ; $9f
const CONVERSION const CONVERSION ; $a0
const TRI_ATTACK const TRI_ATTACK ; $a1
const SUPER_FANG const SUPER_FANG ; $a2
const SLASH const SLASH ; $a3
const SUBSTITUTE const SUBSTITUTE ; $a4
const STRUGGLE const STRUGGLE ; $a5
const SKETCH const SKETCH ; $a6
const TRIPLE_KICK const TRIPLE_KICK ; $a7
const THIEF const THIEF ; $a8
const SPIDER_WEB const SPIDER_WEB ; $a9
const MIND_READER const MIND_READER ; $aa
const NIGHTMARE const NIGHTMARE ; $ab
const FLAME_WHEEL const FLAME_WHEEL ; $ac
const SNORE const SNORE ; $ad
const CURSE const CURSE ; $ae
const FLAIL const FLAIL ; $af
const CONVERSION2 const CONVERSION2 ; $b0
const AEROBLAST const AEROBLAST ; $b1
const COTTON_SPORE const COTTON_SPORE ; $b2
const REVERSAL const REVERSAL ; $b3
const SPITE const SPITE ; $b4
const POWDER_SNOW const POWDER_SNOW ; $b5
const PROTECT const PROTECT ; $b6
const MACH_PUNCH const MACH_PUNCH ; $b7
const SCARY_FACE const SCARY_FACE ; $b8
const FAINT_ATTACK const FAINT_ATTACK ; $b9
const SWEET_KISS const SWEET_KISS ; $ba
const BELLY_DRUM const BELLY_DRUM ; $bb
const SLUDGE_BOMB const SLUDGE_BOMB ; $bc
const MUD_SLAP const MUD_SLAP ; $bd
const OCTAZOOKA const OCTAZOOKA ; $be
const SPIKES const SPIKES ; $bf
const ZAP_CANNON const ZAP_CANNON ; $c0
const FORESIGHT const FORESIGHT ; $c1
const DESTINY_BOND const DESTINY_BOND ; $c2
const PERISH_SONG const PERISH_SONG ; $c3
const ICY_WIND const ICY_WIND ; $c4
const DETECT const DETECT ; $c5
const BONE_RUSH const BONE_RUSH ; $c6
const LOCK_ON const LOCK_ON ; $c7
const OUTRAGE const OUTRAGE ; $c8
const SANDSTORM const SANDSTORM ; $c9
const GIGA_DRAIN const GIGA_DRAIN ; $ca
const ENDURE const ENDURE ; $cb
const CHARM const CHARM ; $cc
const ROLLOUT const ROLLOUT ; $cd
const FALSE_SWIPE const FALSE_SWIPE ; $ce
const SWAGGER const SWAGGER ; $cf
const MILK_DRINK const MILK_DRINK ; $d0
const SPARK const SPARK ; $d1
const FURY_CUTTER const FURY_CUTTER ; $d2
const STEEL_WING const STEEL_WING ; $d3
const MEAN_LOOK const MEAN_LOOK ; $d4
const ATTRACT const ATTRACT ; $d5
const SLEEP_TALK const SLEEP_TALK ; $d6
const HEAL_BELL const HEAL_BELL ; $d7
const RETURN const RETURN ; $d8
const PRESENT const PRESENT ; $d9
const FRUSTRATION const FRUSTRATION ; $da
const SAFEGUARD const SAFEGUARD ; $db
const PAIN_SPLIT const PAIN_SPLIT ; $dc
const SACRED_FIRE const SACRED_FIRE ; $dd
const MAGNITUDE const MAGNITUDE ; $de
const DYNAMICPUNCH const DYNAMICPUNCH ; $df
const MEGAHORN const MEGAHORN ; $e0
const DRAGONBREATH const DRAGONBREATH ; $e1
const BATON_PASS const BATON_PASS ; $e2
const ENCORE const ENCORE ; $e3
const PURSUIT const PURSUIT ; $e4
const RAPID_SPIN const RAPID_SPIN ; $e5
const SWEET_SCENT const SWEET_SCENT ; $e6
const IRON_TAIL const IRON_TAIL ; $e7
const METAL_CLAW const METAL_CLAW ; $e8
const VITAL_THROW const VITAL_THROW ; $e9
const MORNING_SUN const MORNING_SUN ; $ea
const SYNTHESIS const SYNTHESIS ; $eb
const MOONLIGHT const MOONLIGHT ; $ec
const HIDDEN_POWER const HIDDEN_POWER ; $ed
const CROSS_CHOP const CROSS_CHOP ; $ee
const TWISTER const TWISTER ; $ef
const RAIN_DANCE const RAIN_DANCE ; $f0
const SUNNY_DAY const SUNNY_DAY ; $f1
const CRUNCH const CRUNCH ; $f2
const MIRROR_COAT const MIRROR_COAT ; $f3
const PSYCH_UP const PSYCH_UP ; $f4
const EXTREMESPEED const EXTREMESPEED ; $f5
const ANCIENTPOWER const ANCIENTPOWER ; $f6
const SHADOW_BALL const SHADOW_BALL ; $f7
const FUTURE_SIGHT const FUTURE_SIGHT ; $f8
const ROCK_SMASH const ROCK_SMASH ; $f9
const WHIRLPOOL const WHIRLPOOL ; $fa
const BEAT_UP const BEAT_UP ; $fb
const_value SET const_value + -1 const_value SET const_value + -1
const NUM_ATTACKS const NUM_ATTACKS ; $fb

View File

@ -0,0 +1,39 @@
const_def
PHYSICAL EQU const_value
const NORMAL
const FIGHTING
const FLYING
const POISON
const GROUND
const ROCK
const BIRD
const BUG
const GHOST
const STEEL
UNUSED_TYPES EQU const_value
const TYPE_10
const TYPE_11
const TYPE_12
const TYPE_13
const TYPE_14
const TYPE_15
const TYPE_16
const TYPE_17
const TYPE_18
const CURSE_T
SPECIAL EQU const_value
const FIRE
const WATER
const GRASS
const ELECTRIC
const PSYCHIC
const ICE
const DRAGON
const DARK

View File

@ -1542,7 +1542,7 @@ Functionf030: ; f030 (3:7030)
res 7, [hl] res 7, [hl]
.asm_f04f .asm_f04f
push bc push bc
callba Function0x365d7 callba Function365d7
pop bc pop bc
ret ret
@ -2343,7 +2343,7 @@ XSpecial: ; f4c5
ld [hBattleTurn], a ld [hBattleTurn], a
ld [AttackMissed], a ld [AttackMissed], a
ld [$c70d], a ld [$c70d], a
callba Function0x361ef callba Function361ef
call WaitSFX call WaitSFX
callba BattleCommand8c callba BattleCommand8c

View File

@ -5271,10 +5271,10 @@ Function6520: ; 6520
push hl push hl
push de push de
dec a dec a
ld hl, $5b00 ld hl, Moves + MOVE_PP
ld bc, $0007 ld bc, Move2 - Move1
call AddNTimes call AddNTimes
ld a, $10 ld a, BANK(Moves)
call GetFarByte call GetFarByte
pop de pop de
pop hl pop hl
@ -7793,7 +7793,7 @@ PredefPointers: ; 856b
dwb Function5108b, BANK(Function5108b) dwb Function5108b, BANK(Function5108b)
dwb Function5120d, BANK(Function5120d) dwb Function5120d, BANK(Function5120d)
dwb DecompressPredef, BANK(DecompressPredef) ; $40 dwb DecompressPredef, BANK(DecompressPredef) ; $40
dwb Function0x347d3, BANK(Function0x347d3) dwb Function347d3, BANK(Function347d3)
dwb Functionfb908, BANK(Functionfb908) dwb Functionfb908, BANK(Functionfb908)
dwb Functionfb877, BANK(Functionfb877) dwb Functionfb877, BANK(Functionfb877)
dwb Functiond0000, BANK(Functiond0000) dwb Functiond0000, BANK(Functiond0000)
@ -11050,7 +11050,7 @@ _CheckTossableItem: ; d427
ld a, 4 ld a, 4
call GetItemAttr call GetItemAttr
bit 7, a bit 7, a
jr nz, Function0xd47f jr nz, Functiond47f
and a and a
ret ret
; d432 ; d432
@ -11060,7 +11060,7 @@ CheckSelectableItem: ; d432
ld a, 4 ld a, 4
call GetItemAttr call GetItemAttr
bit 6, a bit 6, a
jr nz, Function0xd47f jr nz, Functiond47f
and a and a
ret ret
; d43d ; d43d
@ -11120,7 +11120,7 @@ GetItemAttr: ; d460
ret ret
; d47f ; d47f
Function0xd47f: ; d47f Functiond47f: ; d47f
ld a, 1 ld a, 1
ld [$d142], a ld [$d142], a
scf scf
@ -35591,7 +35591,7 @@ INCBIN "baserom.gbc",$2c4d7,$2c4e3 - $2c4d7
cp $3 cp $3
jr z, .asm_2c541 jr z, .asm_2c541
jr Function2c545 jr Function2c545
callba Function0x377f5 callba Function377f5
jr c, .asm_2c541 jr c, .asm_2c541
ld a, [PlayerSubStatus1] ; $c668 ld a, [PlayerSubStatus1] ; $c668
bit 7, a bit 7, a
@ -36789,7 +36789,7 @@ ClearBattleRAM: ; 2ef18
xor a xor a
call ByteFill call ByteFill
callab Function3d867 callab ResetEnemyStatLevels
call Function1fbf call Function1fbf
@ -36913,7 +36913,7 @@ Function38041: ; 38041
; 38045 ; 38045
Function38045: ; 38045 Function38045: ; 38045
callab Function0x34941 callab Function34941
ld a, [$c717] ld a, [$c717]
and $f0 and $f0
jp z, Function38041 jp z, Function38041
@ -36946,7 +36946,7 @@ Function38045: ; 38045
; 38083 ; 38083
Function38083: ; 38083 Function38083: ; 38083
callab Function0x34941 callab Function34941
ld a, [$c717] ld a, [$c717]
and $f0 and $f0
jp z, Function38041 jp z, Function38041
@ -36979,7 +36979,7 @@ Function38083: ; 38083
; 380c1 ; 380c1
Function380c1: ; 380c1 Function380c1: ; 380c1
callab Function0x34941 callab Function34941
ld a, [$c717] ld a, [$c717]
and $f0 and $f0
jp z, Function38041 jp z, Function38041
@ -37438,8 +37438,8 @@ Function3846c: ; 3846c
.asm_384a3 .asm_384a3
ld a, $1 ld a, $1
ld [$d264], a ld [$d264], a
callab Function3d834 callab NewEnemyMonStatus
callab Function3d867 callab ResetEnemyStatLevels
ld hl, PlayerSubStatus1 ld hl, PlayerSubStatus1
res 7, [hl] res 7, [hl]
callba Function3d4e1 callba Function3d4e1
@ -37555,7 +37555,7 @@ Function38557
push bc push bc
call Function38571 call Function38571
pop bc pop bc
callba Function0x361ef callba Function361ef
jp Function38387 jp Function38387
; 38568 ; 38568
@ -37807,10 +37807,10 @@ Function39806: ; 39806
push hl push hl
push bc push bc
dec a dec a
ld hl, $5b00 ld hl, Moves + MOVE_PP
ld bc, $0007 ld bc, Move2 - Move1
call AddNTimes call AddNTimes
ld a, $10 ld a, BANK(Moves)
call GetFarByte call GetFarByte
pop bc pop bc
pop hl pop hl
@ -83077,11 +83077,11 @@ Function100bc2: ; 100bc2
ret ret
.asm_100c63 .asm_100c63
ld hl, $4c5b ld hl, BattleText_0x80c5b
jr .asm_100c6b jr .asm_100c6b
.asm_100c68 .asm_100c68
ld hl, $4c39 ld hl, BattleText_0x80c39
.asm_100c6b .asm_100c6b
call StdBattleTextBox call StdBattleTextBox
@ -86704,7 +86704,7 @@ UsedMoveText: ; 105db9
; check actor ???? ; check actor ????
push hl push hl
callba Function0x34548 callba Function34548
pop hl pop hl
jr nz, .grammar jr nz, .grammar