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

View File

@ -1430,7 +1430,7 @@ Functioncc8d3: ; cc8d3
ld e, [hl]
inc hl
ld d, [hl]
ld hl, $506f
ld hl, BattleAnimations
add hl, de
add hl, de
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 [$c689], a
call Function0x37e01
call AnimateCurrentMove
ld a, $2
call Function0x36532
call Function36532
call SwitchTurn
call BattleCommand8d
call ResetMiss
@ -71,17 +71,17 @@ BattleCommand54: ; 37588
jr nz, .failed
set 1, [hl]
call Function0x37e01
call AnimateCurrentMove
ld hl, GetHalfMaxHP
call CallBankF
call CallBattleCore
ld hl, Function3cc3f
call CallBankF
call CallBattleCore
call UpdateUserInParty
ld hl, PutACurseText
jp StdBattleTextBox
.failed
call Function0x37e77
call AnimateFailedMove
jp PrintButItFailed
@ -91,7 +91,7 @@ BattleCommand54: ; 37588
ld b, $8 ; ABILITY
call GetStatName
call Function0x37e77
call AnimateFailedMove
ld hl, WontRiseAnymoreText
jp StdBattleTextBox
; 37618

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,6 +12,7 @@ INCLUDE "hram.asm"
INCLUDE "constants/wram_constants.asm"
INCLUDE "constants/pokemon_constants.asm"
INCLUDE "constants/type_constants.asm"
INCLUDE "constants/move_constants.asm"
INCLUDE "constants/battle_constants.asm"
INCLUDE "constants/map_constants.asm"
@ -31,25 +32,6 @@ INCLUDE "constants/gfx_constants.asm"
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
MONSTER EQU $01

View File

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

View File

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