First Commit

Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
Zeta_Null 2023-09-10 12:35:35 -04:00
commit 2f8a41f833
4618 changed files with 480386 additions and 0 deletions

View file

@ -0,0 +1,17 @@
; Multiplier ratios for accuracy from modifier -6 to +6
; (for other stats, see data/battle/stat_multipliers.asm).
AccuracyLevelMultipliers:
db 33, 100 ; -6 = 33%
db 36, 100 ; -5 = 36%
db 43, 100 ; -4 = 43%
db 50, 100 ; -3 = 50%
db 60, 100 ; -2 = 60%
db 75, 100 ; -1 = 75%
db 1, 1 ; 0 = 100%
db 133, 100 ; +1 = 133%
db 166, 100 ; +2 = 166%
db 2, 1 ; +3 = 200%
db 233, 100 ; +4 = 233%
db 133, 50 ; +5 = 266%
db 3, 1 ; +6 = 300%

View file

@ -0,0 +1,10 @@
; AIDamageCalc uses BattleCommand_ConstantDamage
; to calculate damage for these instead of
; BattleCommand_DamageCalc and BattleCommand_Stab.
ConstantDamageEffects:
db EFFECT_SUPER_FANG
db EFFECT_STATIC_DAMAGE
db EFFECT_LEVEL_DAMAGE
db EFFECT_PSYWAVE
db -1 ; end

View file

@ -0,0 +1,34 @@
; AI_SMART encourages these moves with Encore.
EncoreMoves:
dw SWORDS_DANCE
dw WHIRLWIND
dw LEER
dw ROAR
dw DISABLE
dw MIST
dw LEECH_SEED
dw GROWTH
dw POISONPOWDER
dw STRING_SHOT
dw MEDITATE
dw AGILITY
dw TELEPORT
dw SCREECH
dw HAZE
dw FOCUS_ENERGY
dw DREAM_EATER
dw POISON_GAS
dw SPLASH
dw SHARPEN
dw CONVERSION
dw SUPER_FANG
dw SUBSTITUTE
dw TRIPLE_KICK
dw SPIDER_WEB
dw MIND_READER
dw FLAME_WHEEL
dw AEROBLAST
dw COTTON_SPORE
dw POWDER_SNOW
dw -1 ; end

View file

@ -0,0 +1,15 @@
; AI_SMART prefers these moves during rain.
RainDanceMoves:
dw WATER_GUN
dw HYDRO_PUMP
dw SURF
dw BUBBLEBEAM
dw THUNDER
dw WATERFALL
dw CLAMP
dw BUBBLE
dw CRABHAMMER
dw OCTAZOOKA
dw WHIRLPOOL
dw -1 ; end

View file

@ -0,0 +1,9 @@
; AI_AGGRESSIVE does not discourage these moves
; even if a stronger one is available.
RecklessMoves:
db EFFECT_SELFDESTRUCT
db EFFECT_RAMPAGE
db EFFECT_MULTI_HIT
db EFFECT_DOUBLE_HIT
db -1 ; end

View file

@ -0,0 +1,16 @@
; AI_CAUTIOUS discourages these moves after the first turn.
ResidualMoves:
dw MIST
dw LEECH_SEED
dw POISONPOWDER
dw STUN_SPORE
dw THUNDER_WAVE
dw FOCUS_ENERGY
dw BIDE
dw POISON_GAS
dw TRANSFORM
dw CONVERSION
dw SUBSTITUTE
dw SPIKES
dw -1 ; end

View file

@ -0,0 +1,7 @@
; AI_RISKY will not use these effects at max HP
; even if they would KO the player.
RiskyEffects:
db EFFECT_SELFDESTRUCT
db EFFECT_OHKO
db -1 ; end

View file

@ -0,0 +1,37 @@
; AI_OPPORTUNIST discourages these moves
; when the player's HP is low.
StallMoves:
dw SWORDS_DANCE
dw TAIL_WHIP
dw LEER
dw GROWL
dw DISABLE
dw MIST
dw COUNTER
dw LEECH_SEED
dw GROWTH
dw STRING_SHOT
dw MEDITATE
dw AGILITY
dw RAGE
dw MIMIC
dw SCREECH
dw HARDEN
dw WITHDRAW
dw DEFENSE_CURL
dw BARRIER
dw LIGHT_SCREEN
dw HAZE
dw REFLECT
dw FOCUS_ENERGY
dw BIDE
dw AMNESIA
dw TRANSFORM
dw SPLASH
dw ACID_ARMOR
dw SHARPEN
dw CONVERSION
dw SUBSTITUTE
dw FLAME_WHEEL
dw -1 ; end

View file

@ -0,0 +1,9 @@
; AI_BASIC discourages these effects if the player
; already has a status condition.
StatusOnlyEffects:
db EFFECT_SLEEP
db EFFECT_TOXIC
db EFFECT_POISON
db EFFECT_PARALYZE
db -1 ; end

View file

@ -0,0 +1,13 @@
; AI_SMART prefers these moves during harsh sunlight.
SunnyDayMoves:
; BUG: "Smart" AI does not encourage Solar Beam, Flame Wheel, or Moonlight during Sunny Day (see docs/bugs_and_glitches.md)
dw FIRE_PUNCH
dw EMBER
dw FLAMETHROWER
dw FIRE_SPIN
dw FIRE_BLAST
dw SACRED_FIRE
dw MORNING_SUN
dw SYNTHESIS
dw -1 ; end

View file

@ -0,0 +1,23 @@
; AI_SMART knows these moves are usable all-around.
UsefulMoves:
dw DOUBLE_EDGE
dw SING
dw FLAMETHROWER
dw HYDRO_PUMP
dw SURF
dw ICE_BEAM
dw BLIZZARD
dw HYPER_BEAM
dw SLEEP_POWDER
dw THUNDERBOLT
dw THUNDER
dw EARTHQUAKE
dw TOXIC
dw PSYCHIC_M
dw HYPNOSIS
dw RECOVER
dw FIRE_BLAST
dw SOFTBOILED
dw SUPER_FANG
dw -1 ; end

View file

@ -0,0 +1,8 @@
CriticalHitChances:
db 1 out_of 15 ; 0
db 1 out_of 8 ; +1
db 1 out_of 4 ; +2
db 1 out_of 3 ; +3
db 1 out_of 2 ; +4
db 1 out_of 2 ; +5
db 1 out_of 2 ; +6

View file

@ -0,0 +1,183 @@
; battle commands are defined in engine/battle/effect_commands.asm
dw 0 ; padding
BattleCommandPointers:
; entries correspond to macros/scripts/battle_commands.asm
table_width 2, BattleCommandPointers
dw BattleCommand_CheckTurn
dw BattleCommand_CheckObedience
dw BattleCommand_UsedMoveText
dw BattleCommand_DoTurn
dw BattleCommand_Critical
dw BattleCommand_DamageStats
dw BattleCommand_Stab
dw BattleCommand_DamageVariation
dw BattleCommand_CheckHit
dw BattleCommand_LowerSub
dw BattleCommand_MoveAnimNoSub
dw BattleCommand_RaiseSub
dw BattleCommand_FailureText
dw BattleCommand_ApplyDamage
dw BattleCommand_CriticalText
dw BattleCommand_SuperEffectiveText
dw BattleCommand_CheckFaint
dw BattleCommand_BuildOpponentRage
dw BattleCommand_PoisonTarget
dw BattleCommand_SleepTarget
dw BattleCommand_DrainTarget
dw BattleCommand_EatDream
dw BattleCommand_BurnTarget
dw BattleCommand_FreezeTarget
dw BattleCommand_ParalyzeTarget
dw BattleCommand_Selfdestruct
dw BattleCommand_MirrorMove
dw BattleCommand_StatUp
dw BattleCommand_StatDown
dw BattleCommand_PayDay
dw BattleCommand_Conversion
dw BattleCommand_ResetStats
dw BattleCommand_StoreEnergy
dw BattleCommand_UnleashEnergy
dw BattleCommand_ForceSwitch
dw BattleCommand_EndLoop
dw BattleCommand_FlinchTarget
dw BattleCommand_OHKO
dw BattleCommand_Recoil
dw BattleCommand_Mist
dw BattleCommand_FocusEnergy
dw BattleCommand_Confuse
dw BattleCommand_ConfuseTarget
dw BattleCommand_Heal
dw BattleCommand_Transform
dw BattleCommand_Screen
dw BattleCommand_Poison
dw BattleCommand_Paralyze
dw BattleCommand_Substitute
dw BattleCommand_RechargeNextTurn
dw BattleCommand_Mimic
dw BattleCommand_Metronome
dw BattleCommand_LeechSeed
dw BattleCommand_Splash
dw BattleCommand_Disable
dw BattleCommand_ClearText
dw BattleCommand_Charge
dw BattleCommand_CheckCharge
dw BattleCommand_TrapTarget
dw BattleCommand_Unused3C
dw BattleCommand_Rampage
dw BattleCommand_CheckRampage
dw BattleCommand_ConstantDamage
dw BattleCommand_Counter
dw BattleCommand_Encore
dw BattleCommand_PainSplit
dw BattleCommand_Snore
dw BattleCommand_Conversion2
dw BattleCommand_LockOn
dw BattleCommand_Sketch
dw BattleCommand_DefrostOpponent
dw BattleCommand_SleepTalk
dw BattleCommand_DestinyBond
dw BattleCommand_Spite
dw BattleCommand_FalseSwipe
dw BattleCommand_HealBell
dw BattleCommand_HeldFlinch
dw BattleCommand_TripleKick
dw BattleCommand_KickCounter
dw BattleCommand_Thief
dw BattleCommand_ArenaTrap
dw BattleCommand_Nightmare
dw BattleCommand_Defrost
dw BattleCommand_Curse
dw BattleCommand_Protect
dw BattleCommand_Spikes
dw BattleCommand_Foresight
dw BattleCommand_PerishSong
dw BattleCommand_StartSandstorm
dw BattleCommand_Endure
dw BattleCommand_CheckCurl
dw BattleCommand_RolloutPower
dw BattleCommand_Unused5D
dw BattleCommand_FuryCutter
dw BattleCommand_Attract
dw BattleCommand_HappinessPower
dw BattleCommand_Present
dw BattleCommand_DamageCalc
dw BattleCommand_FrustrationPower
dw BattleCommand_Safeguard
dw BattleCommand_CheckSafeguard
dw BattleCommand_GetMagnitude
dw BattleCommand_BatonPass
dw BattleCommand_Pursuit
dw BattleCommand_ClearHazards
dw BattleCommand_HealMorn
dw BattleCommand_HealDay
dw BattleCommand_HealNite
dw BattleCommand_HiddenPower
dw BattleCommand_StartRain
dw BattleCommand_StartSun
dw BattleCommand_AttackUp
dw BattleCommand_DefenseUp
dw BattleCommand_SpeedUp
dw BattleCommand_SpecialAttackUp
dw BattleCommand_SpecialDefenseUp
dw BattleCommand_AccuracyUp
dw BattleCommand_EvasionUp
dw BattleCommand_AttackUp2
dw BattleCommand_DefenseUp2
dw BattleCommand_SpeedUp2
dw BattleCommand_SpecialAttackUp2
dw BattleCommand_SpecialDefenseUp2
dw BattleCommand_AccuracyUp2
dw BattleCommand_EvasionUp2
dw BattleCommand_AttackDown
dw BattleCommand_DefenseDown
dw BattleCommand_SpeedDown
dw BattleCommand_SpecialAttackDown
dw BattleCommand_SpecialDefenseDown
dw BattleCommand_AccuracyDown
dw BattleCommand_EvasionDown
dw BattleCommand_AttackDown2
dw BattleCommand_DefenseDown2
dw BattleCommand_SpeedDown2
dw BattleCommand_SpecialAttackDown2
dw BattleCommand_SpecialDefenseDown2
dw BattleCommand_AccuracyDown2
dw BattleCommand_EvasionDown2
dw BattleCommand_StatUpMessage
dw BattleCommand_StatDownMessage
dw BattleCommand_StatUpFailText
dw BattleCommand_StatDownFailText
dw BattleCommand_EffectChance
dw BattleCommand_StatDownAnim
dw BattleCommand_StatUpAnim
dw BattleCommand_SwitchTurn
dw BattleCommand_FakeOut
dw BattleCommand_BellyDrum
dw BattleCommand_PsychUp
dw BattleCommand_Rage
dw BattleCommand_DoubleFlyingDamage
dw BattleCommand_DoubleUndergroundDamage
dw BattleCommand_MirrorCoat
dw BattleCommand_CheckFutureSight
dw BattleCommand_FutureSight
dw BattleCommand_DoubleMinimizeDamage
dw BattleCommand_SkipSunCharge
dw BattleCommand_ThunderAccuracy
dw BattleCommand_Teleport
dw BattleCommand_BeatUp
dw BattleCommand_RageDamage
dw BattleCommand_ResetTypeMatchup
dw BattleCommand_AllStatsUp
dw BattleCommand_BideFailText
dw BattleCommand_RaiseSubNoAnim
dw BattleCommand_LowerSubNoAnim
dw BattleCommand_BeatUpFailText
dw BattleCommand_ClearMissDamage
dw BattleCommand_MoveDelay
dw BattleCommand_MoveAnim
dw BattleCommand_TriStatusChance
dw BattleCommand_SuperEffectiveLoopText
dw BattleCommand_StartLoop
dw BattleCommand_Curl
assert_table_length NUM_EFFECT_COMMANDS

View file

@ -0,0 +1,25 @@
; Held item effects that are consumed on use
ConsumableEffects:
db HELD_BERRY
db HELD_2
db HELD_5
db HELD_HEAL_POISON
db HELD_HEAL_FREEZE
db HELD_HEAL_BURN
db HELD_HEAL_SLEEP
db HELD_HEAL_PARALYZE
db HELD_HEAL_STATUS
db HELD_30
db HELD_ATTACK_UP
db HELD_DEFENSE_UP
db HELD_SPEED_UP
db HELD_SP_ATTACK_UP
db HELD_SP_DEFENSE_UP
db HELD_ACCURACY_UP
db HELD_EVASION_UP
db HELD_38
db HELD_71
db HELD_ESCAPE
db HELD_CRITICAL_UP
db -1

View file

@ -0,0 +1,10 @@
; See also data/items/heal_status.asm
HeldStatusHealingEffects:
db HELD_HEAL_POISON, 1 << PSN
db HELD_HEAL_FREEZE, 1 << FRZ
db HELD_HEAL_BURN, 1 << BRN
db HELD_HEAL_SLEEP, SLP_MASK
db HELD_HEAL_PARALYZE, 1 << PAR
db HELD_HEAL_STATUS, ALL_STATUS
db -1 ; end

View file

@ -0,0 +1,9 @@
HeldStatUpItems:
dbw HELD_ATTACK_UP, BattleCommand_AttackUp
dbw HELD_DEFENSE_UP, BattleCommand_DefenseUp
dbw HELD_SPEED_UP, BattleCommand_SpeedUp
dbw HELD_SP_ATTACK_UP, BattleCommand_SpecialAttackUp
dbw HELD_SP_DEFENSE_UP, BattleCommand_SpecialDefenseUp
dbw HELD_ACCURACY_UP, BattleCommand_AccuracyUp
dbw HELD_EVASION_UP, BattleCommand_EvasionUp
db -1 ; end

View file

@ -0,0 +1,20 @@
; Multiplier ratios for all stats from modifier -6 to +6
; (except accuracy, see data/battle/accuracy_multipliers.asm).
; This table is identical to data/battle/stat_multipliers_2.asm.
; This one is used by CalcBattleStats.
StatLevelMultipliers:
db 25, 100 ; -6 = 25%
db 28, 100 ; -5 = 28%
db 33, 100 ; -4 = 33%
db 40, 100 ; -3 = 40%
db 50, 100 ; -2 = 50%
db 66, 100 ; -1 = 66%
db 1, 1 ; 0 = 100%
db 15, 10 ; +1 = 150%
db 2, 1 ; +2 = 200%
db 25, 10 ; +3 = 250%
db 3, 1 ; +4 = 300%
db 35, 10 ; +5 = 350%
db 4, 1 ; +6 = 400%

View file

@ -0,0 +1,20 @@
; Multiplier ratios for all stats from modifier -6 to +6
; (except accuracy, see data/battle/accuracy_multipliers.asm).
; This table is identical to data/battle/stat_multipliers.asm.
; This one is used by ApplyStatLevelMultiplier.
StatLevelMultipliers_Applied:
db 25, 100 ; -6 = 25%
db 28, 100 ; -5 = 28%
db 33, 100 ; -4 = 33%
db 40, 100 ; -3 = 40%
db 50, 100 ; -2 = 50%
db 66, 100 ; -1 = 66%
db 1, 1 ; 0 = 100%
db 15, 10 ; +1 = 150%
db 2, 1 ; +2 = 200%
db 25, 10 ; +3 = 250%
db 3, 1 ; +4 = 300%
db 35, 10 ; +5 = 350%
db 4, 1 ; +6 = 400%

View file

@ -0,0 +1,12 @@
StatNames:
; entries correspond to stat ids
list_start StatNames
li "ATTACK"
li "DEFENSE"
li "SPEED"
li "SPCL.ATK"
li "SPCL.DEF"
li "ACCURACY"
li "EVASION"
li "ABILITY" ; used for BattleCommand_Curse
assert_list_length NUM_LEVEL_STATS

View file

@ -0,0 +1,10 @@
WeatherTypeModifiers:
db WEATHER_RAIN, WATER, MORE_EFFECTIVE
db WEATHER_RAIN, FIRE, NOT_VERY_EFFECTIVE
db WEATHER_SUN, FIRE, MORE_EFFECTIVE
db WEATHER_SUN, WATER, NOT_VERY_EFFECTIVE
db -1 ; end
WeatherMoveModifiers:
db WEATHER_RAIN, EFFECT_SOLARBEAM, NOT_VERY_EFFECTIVE
db -1 ; end

View file

@ -0,0 +1,27 @@
WobbleProbabilities:
; catch rate, chance of wobbling / 255
; nLeft/255 = (nRight/255) ** 4
db 1, 63
db 2, 75
db 3, 84
db 4, 90
db 5, 95
db 7, 103
db 10, 113
db 15, 126
db 20, 134
db 30, 149
db 40, 160
db 50, 169
db 60, 177
db 80, 191
db 100, 201
db 120, 211
db 140, 220
db 160, 227
db 180, 234
db 200, 240
db 220, 246
db 240, 251
db 254, 253
db 255, 255