Merge pull request #181 from AnonymousRandomPerson/main
Some checks failed
build / build (push) Has been cancelled

Decomped more AI functions
This commit is contained in:
AnonymousRandomPerson
2025-09-21 02:57:53 -04:00
committed by GitHub
47 changed files with 5448 additions and 5621 deletions

View File

@@ -2,24 +2,24 @@
.public AbilityIsActiveVeneer
.public CASTFORM_WEATHER_ATTRIBUTE_TABLE
.public DUNGEON_PTR
.public DefenderAbilityIsActive__022F96CC
.public DungeonRandInt
.public EntityIsValid__022F7364
.public GetAbility
.public GetApparentWeather
.public GetMoveTypeForMonster
.public GetType
.public IsMonster__022F9720
.public IsSecretBazaarNpcBehavior
.public IsSecretFloor
.public LogMessageByIdWithPopupCheckUser
.public LogMessageByIdWithPopupCheckUserTarget
.public LowerSpeed
.public MonsterIsType
.public ov10_022C4C6E
.public ov10_022C4C70
.public ov29_022E6260
.public ov29_022E647C
.public SetPreprocessorArgsIdVal
.public SubstitutePlaceholderStringTags
.public TryEndStatusWithAbility
.public WEATHER_BALL_TYPE_TABLE
.public ov10_022C4C6E
.public ov10_022C4C70
.public ov29_022E6260
.public ov29_022E647C

View File

@@ -1,7 +1,6 @@
#pragma once
.public AbilityIsActive
.public DefenderAbilityIsActive__02301A0C
.public GetApparentWeather
.public IsExperienceLocked
.public IsMonster__02301A60
.public LogMessageByIdWithPopupCheckUserTarget
.public SubstitutePlaceholderStringTags

View File

@@ -1,6 +1,5 @@
#pragma once
.public AbilityIsActiveVeneer
.public abs
.public ActivateMotorDrive
.public AddExpSpecial
.public AdvanceFrame
@@ -11,14 +10,15 @@
.public ChangeDungeonMusic
.public ChangeMonsterAnimation
.public DAMAGE_STRING_IDS
.public DisplayAnimatedNumbers
.public DUNGEON_PTR
.public DefenderAbilityIsActive__0230A940
.public DisplayAnimatedNumbers
.public DungeonRandOutcome__022EAB20
.public EndCurseClassStatus
.public EndInvisibleClassStatus
.public EntityIsValid__02308FBC
.public ExclusiveItemEffectIsActive__0230A9B8
.public ExclusiveItemEffectIsActiveWithLogging
.public ExclusiveItemEffectIsActive__0230A9B8
.public FreeOtherWrappedMonsters
.public GetActiveTeamMember
.public GetDirectionTowardsPosition
@@ -30,7 +30,6 @@
.public IsBlinded
.public IsCurrentMissionType
.public IsExperienceLocked
.public IsMonster__0230A994
.public IsMonsterIdInNormalRangeVeneer
.public IsSecretBazaarNpcBehavior
.public IsSpecialStoryAlly
@@ -42,6 +41,30 @@
.public LogMessageByIdWithPopupCheckUserTarget
.public MoveMonsterToPos
.public MusicTableIdxToMusicId
.public PlayEffectAnimationEntity
.public RecruitCheck
.public RemoveHolderForItemInBag
.public RestorePpAllMovesSetFlags
.public RestoreRandomMovePP
.public SET_DAMAGE_STATUS_DAMAGE
.public SetMessageLogPreprocessorArgsNumberVal
.public SetMonsterFlag2
.public SetPokemonBattled
.public ShouldDisplayEntityWrapper
.public SpawnDroppedItemWrapper
.public SubInitMonster
.public SubstitutePlaceholderStringTags
.public TYPE_DAMAGE_NEGATING_EXCLUSIVE_ITEM_EFFECTS
.public TryEndPetrifiedOrSleepStatus
.public TryIncreaseHp
.public TryRecruit
.public TrySpawnEnemyItemDrop
.public UpdateAiTargetPos
.public UpdateEntityPixelPos
.public UpdateShopkeeperModeAfterAttack
.public UpdateStatusIconFlags
.public UpdateTrapsVisibility
.public abs
.public ov10_022BDC68
.public ov10_022BDE50
.public ov10_022BF964
@@ -95,27 +118,4 @@
.public ov29_02353234
.public ov29_023535D4
.public ov29_0237CA6C
.public PlayEffectAnimationEntity
.public RecruitCheck
.public RemoveHolderForItemInBag
.public RestorePpAllMovesSetFlags
.public RestoreRandomMovePP
.public SET_DAMAGE_STATUS_DAMAGE
.public SetMessageLogPreprocessorArgsNumberVal
.public SetMonsterFlag2
.public SetPokemonBattled
.public ShouldDisplayEntityWrapper
.public SpawnDroppedItemWrapper
.public sub_0204AF00
.public SubInitMonster
.public SubstitutePlaceholderStringTags
.public TryEndPetrifiedOrSleepStatus
.public TryIncreaseHp
.public TryRecruit
.public TrySpawnEnemyItemDrop
.public TYPE_DAMAGE_NEGATING_EXCLUSIVE_ITEM_EFFECTS
.public UpdateAiTargetPos
.public UpdateEntityPixelPos
.public UpdateShopkeeperModeAfterAttack
.public UpdateStatusIconFlags
.public UpdateTrapsVisibility

View File

@@ -1,188 +1,11 @@
#pragma once
.public _s32_div_f
.public AbilityIsActiveVeneer
.public abs
.public AddFixedPoint64
.public AdvanceFrame
.public AFTERMATH_CHANCE
.public AIR_BLADE_DAMAGE_MULTIPLIER
.public ApplyDamageAndEffects
.public AURA_BOW_STAT_BOOST
.public AuraBowIsActive
.public BURN_DAMAGE_MULTIPLIER
.public CanSeeTarget
.public CeilFixedPoint
.public ClampedLn
.public CLOUDY_DAMAGE_MULTIPLIER
.public DAMAGE_FORMULA_AT_PREFACTOR
.public DAMAGE_FORMULA_CONSTANT_SHIFT
.public DAMAGE_FORMULA_DEF_PREFACTOR
.public DAMAGE_FORMULA_FLV_DEFICIT_DIVISOR
.public DAMAGE_FORMULA_FLV_SHIFT
.public DAMAGE_FORMULA_LN_ARG_PREFACTOR
.public DAMAGE_FORMULA_LN_PREFACTOR
.public DAMAGE_FORMULA_MAX_BASE
.public DAMAGE_FORMULA_MIN_BASE
.public DAMAGE_FORMULA_NON_TEAM_MEMBER_MODIFIER
.public DAMAGE_MULTIPLIER_0_5
.public DAMAGE_MULTIPLIER_1_5
.public DAMAGE_MULTIPLIER_2
.public Debug_Print0
.public DebugRecruitingEnabled
.public DEF_SCARF_STAT_BOOST
.public DefenderAbilityIsActive__0230A940
.public DEFENSIVE_STAT_STAGE_MULTIPLIERS
.public DivideFixedPoint64
.public AbilityIsActiveVeneer
.public DUNGEON_PTR
.public DungeonModeSetupAndShowNameKeyboard
.public DungeonRandInt
.public DefenderAbilityIsActive__0230A940
.public DungeonRandOutcome__022EAB20
.public EnableAllLearnableIqSkills
.public EnsureCanStandCurrentTile
.public EntityIsValid__02308FBC
.public ExclusiveItemDefenseBoost
.public ExclusiveItemEffectIsActive__0230A9B8
.public ExclusiveItemEffectIsActiveWithLogging
.public ExclusiveItemOffenseBoost
.public FixedPoint32To64
.public FixedPoint64CmpLt
.public FixedPoint64IsZero
.public FixedPoint64ToInt
.public FixedRoomIsSubstituteRoom
.public FlashFireShouldActivate
.public GendersEqualNotGenderless
.public GendersNotEqualNotGenderless
.public GenerateStandardItem
.public GetActiveTeamMember
.public GetApparentWeather
.public GetDirectionTowardsPosition
.public GetEquivItemIndex
.public GetFirstEmptyMemberIdx
.public GetItemAtIdx
.public GetMessageLogPreprocessorArgs
.public GetMonsterGenderVeneer
.public GetMoveCategory
.public GetNameString
.public GetRecruitRate1
.public GetRecruitRate2
.public GravityIsActive
.public HandleFaint
.public HasPlayedOldGame
.public InitTeamMember
.public IntToFixedPoint64
.public IqSkillIsEnabled
.public IsCurrentMissionTypeExact
.public IsFloating
.public IsFullFloorFixedRoom
.public IsLegendaryChallengeFloor
.public IsMonster__0230A994
.public IsMonsterOnTeam
.public IsPunchMove
.public IsRecoilMove
.public IsRecruitingAllowed
.public IsRegularAttackOrProjectile
.public ItemIsActive__0230A9DC
.public ItemIsActive__0230E578
.public LevitateIsActive
.public LogMessageByIdWithPopupCheckParticipants
.public LogMessageByIdWithPopupCheckUser
.public LogMessageByIdWithPopupCheckUserTarget
.public MATCHUP_IMMUNE_MULTIPLIER
.public MATCHUP_IMMUNE_MULTIPLIER_ERRATIC_PLAYER
.public MATCHUP_NEUTRAL_MULTIPLIER
.public MATCHUP_NEUTRAL_MULTIPLIER_ERRATIC_PLAYER
.public MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER
.public MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
.public MATCHUP_SUPER_EFFECTIVE_MULTIPLIER
.public MATCHUP_SUPER_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
.public ME_FIRST_MULTIPLIER
.public MemZero
.public MonsterHasNegativeStatus
.public MonsterIsType
.public MoveIsNotPhysical
.public MultiplyByFixedPoint
.public MultiplyFixedPoint64
.public MUNCH_BELT_STAT_BOOST
.public NearbyAllyIqSkillIsEnabled
.public OFFENSIVE_STAT_STAGE_MULTIPLIERS
.public OtherMonsterAbilityIsActive
.public ov10_022BDE50
.public ov10_022BF964
.public ov10_022C4410
.public ov10_022C441C
.public ov10_022C443C
.public ov10_022C447C
.public ov10_022C44FC
.public ov10_022C45B4
.public ov10_022C46FC
.public ov10_022C4700
.public ov10_022C4704
.public ov10_022C4708
.public ov10_022C470C
.public ov29_022E1B28
.public ov29_022E2470
.public ov29_022E68BC
.public ov29_022E8104
.public ov29_022E81F8
.public ov29_022EACAC
.public ov29_022FBDE0
.public ov29_02304A48
.public ov29_02305F60
.public ov29_0230E5A8
.public ov29_0230E5FC
.public ov29_0230E658
.public ov29_02337EC0
.public ov29_0234B1A4
.public ov29_0234BA54
.public ov29_0234D630
.public ov29_0234D7C0
.public ov29_0234D838
.public ov29_0234D8A0
.public ov29_0234EE10
.public ov29_02352838
.public WEAK_TYPE_PICKER_MATCHUP_MULTIPLIERS
.public ov29_02352894
.public ov29_02352984
.public ov29_02352990
.public ov29_0235299C
.public ov29_023535D4
.public PlayEffectAnimation0x171
.public PlayEffectAnimation0x171Full
.public PlayEffectAnimation0x18E
.public PlayEffectAnimation0x1A9__022E6130
.public PlayEffectAnimation0x1A9__022E617C
.public PlayEffectAnimation0x1A9__022E61C8
.public PlayEffectAnimation0x1A9__022E6214
.public PlayEffectAnimation0x1A9__022E64C4
.public PlayEffectAnimation0x1A9__022E6510
.public PlayEffectAnimationEntity
.public PointCameraToMonster
.public POWER_BAND_STAT_BOOST
.public POWER_PITCHER_DAMAGE_MULTIPLIER
.public RECRUITMENT_LEVEL_BOOST_TABLE
.public ResetDamageData
.public RoundUpDiv256
.public SCOPE_LENS_CRIT_RATE_BOOST
.public SetItemAcquired
.public SetMessageLogPreprocessorArgsString
.public SetPokemonJoined
.public SetPreprocessorArgsIdVal
.public SetPreprocessorArgsStringToName
.public SOLID_ROCK_MULTIPLIER
.public SPECIAL_BAND_STAT_BOOST
.public StrcpySimple
.public StrncpyName
.public StrncpySimpleNoPad
.public sub_02056698
.public sub_020584FC
.public sub_020585B4
.public SubstitutePlaceholderStringTags
.public SUPER_LUCK_CRIT_RATE_BOOST
.public TECHNICIAN_MOVE_POWER_THRESHOLD
.public TINTED_LENS_MULTIPLIER
.public TryAftermathExplosion
.public TYPE_ADVANTAGE_MASTER_CRIT_RATE
.public GetTypeMatchup
.public TYPE_MATCHUP_COMBINATOR_TABLE
.public TYPE_MATCHUP_TABLE
.public UpdateStateFlags
.public ZINC_BAND_STAT_BOOST
.public TryAftermathExplosion
.public ov29_02352838

View File

@@ -0,0 +1,45 @@
#pragma once
.public AbilityIsActiveVeneer
.public BURN_DAMAGE_MULTIPLIER
.public CLOUDY_DAMAGE_MULTIPLIER
.public DAMAGE_MULTIPLIER_0_5
.public DAMAGE_MULTIPLIER_1_5
.public DAMAGE_MULTIPLIER_2
.public DUNGEON_PTR
.public DefenderAbilityIsActive__0230A940
.public EntityIsValid__02308FBC
.public ExclusiveItemEffectIsActive__0230A9B8
.public FixedPoint32To64
.public FixedPoint64IsZero
.public FlashFireShouldActivate
.public GetApparentWeather
.public GetTypeMatchup
.public GhostImmunityIsActive
.public IntToFixedPoint64
.public IqSkillIsEnabled
.public IsFloating
.public IsTypeIneffectiveAgainstGhost
.public LevitateIsActive
.public LogMessageByIdWithPopupCheckParticipants
.public LogMessageByIdWithPopupCheckUserTarget
.public MATCHUP_IMMUNE_MULTIPLIER
.public MATCHUP_IMMUNE_MULTIPLIER_ERRATIC_PLAYER
.public MATCHUP_NEUTRAL_MULTIPLIER
.public MATCHUP_NEUTRAL_MULTIPLIER_ERRATIC_PLAYER
.public MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER
.public MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
.public MATCHUP_SUPER_EFFECTIVE_MULTIPLIER
.public MATCHUP_SUPER_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
.public MonsterIsType
.public MultiplyFixedPoint64
.public PlayEffectAnimation0x1A9__022E61C8
.public PlayEffectAnimation0x1A9__022E6214
.public PlayEffectAnimation0x1A9__022E64C4
.public PlayEffectAnimation0x1A9__022E6510
.public SOLID_ROCK_MULTIPLIER
.public ScrappyShouldActivate
.public TECHNICIAN_MOVE_POWER_THRESHOLD
.public TINTED_LENS_MULTIPLIER
.public TYPE_MATCHUP_COMBINATOR_TABLE
.public UpdateStateFlags
.public ov29_02352838

View File

@@ -0,0 +1,163 @@
#pragma once
.public AIR_BLADE_DAMAGE_MULTIPLIER
.public AURA_BOW_STAT_BOOST
.public AbilityIsActiveVeneer
.public AddFixedPoint64
.public AdvanceFrame
.public ApplyDamageAndEffects
.public AuraBowIsActive
.public CalcTypeBasedDamageEffects
.public CanSeeTarget
.public CeilFixedPoint
.public ClampedLn
.public DAMAGE_FORMULA_AT_PREFACTOR
.public DAMAGE_FORMULA_CONSTANT_SHIFT
.public DAMAGE_FORMULA_DEF_PREFACTOR
.public DAMAGE_FORMULA_FLV_DEFICIT_DIVISOR
.public DAMAGE_FORMULA_FLV_SHIFT
.public DAMAGE_FORMULA_LN_ARG_PREFACTOR
.public DAMAGE_FORMULA_LN_PREFACTOR
.public DAMAGE_FORMULA_MAX_BASE
.public DAMAGE_FORMULA_MIN_BASE
.public DAMAGE_FORMULA_NON_TEAM_MEMBER_MODIFIER
.public DAMAGE_MULTIPLIER_0_5
.public DAMAGE_MULTIPLIER_1_5
.public DAMAGE_MULTIPLIER_2
.public DEFENSIVE_STAT_STAGE_MULTIPLIERS
.public DEF_SCARF_STAT_BOOST
.public DUNGEON_PTR
.public DebugRecruitingEnabled
.public Debug_Print0
.public DefenderAbilityIsActive__0230A940
.public DivideFixedPoint64
.public DungeonModeSetupAndShowNameKeyboard
.public DungeonRandInt
.public EnableAllLearnableIqSkills
.public EnsureCanStandCurrentTile
.public EntityIsValid__02308FBC
.public ExclusiveItemDefenseBoost
.public ExclusiveItemEffectIsActiveWithLogging
.public ExclusiveItemEffectIsActive__0230A9B8
.public ExclusiveItemOffenseBoost
.public FixedPoint32To64
.public FixedPoint64CmpLt
.public FixedPoint64ToInt
.public FixedRoomIsSubstituteRoom
.public FlashFireShouldActivate
.public GendersEqualNotGenderless
.public GendersNotEqualNotGenderless
.public GenerateStandardItem
.public GetActiveTeamMember
.public GetApparentWeather
.public GetDirectionTowardsPosition
.public GetEquivItemIndex
.public GetFirstEmptyMemberIdx
.public GetItemAtIdx
.public GetMessageLogPreprocessorArgs
.public GetMonsterGenderVeneer
.public GetMoveCategory
.public GetNameString
.public GetRecruitRate1
.public GetRecruitRate2
.public GetTypeMatchup
.public HandleFaint
.public HasPlayedOldGame
.public InitTeamMember
.public IntToFixedPoint64
.public IqSkillIsEnabled
.public IsCurrentMissionTypeExact
.public IsFullFloorFixedRoom
.public IsLegendaryChallengeFloor
.public IsMonsterOnTeam
.public IsMonster__0230A994
.public IsPunchMove
.public IsRecoilMove
.public IsRecruitingAllowed
.public IsRegularAttackOrProjectile
.public ItemIsActive__0230A9DC
.public ItemIsActive__0230E578
.public LogMessageByIdWithPopupCheckUser
.public LogMessageByIdWithPopupCheckUserTarget
.public ME_FIRST_MULTIPLIER
.public MUNCH_BELT_STAT_BOOST
.public MemZero
.public MonsterHasNegativeStatus
.public MonsterIsType
.public MoveIsNotPhysical
.public MultiplyByFixedPoint
.public MultiplyFixedPoint64
.public NearbyAllyIqSkillIsEnabled
.public OFFENSIVE_STAT_STAGE_MULTIPLIERS
.public OtherMonsterAbilityIsActive
.public POWER_BAND_STAT_BOOST
.public POWER_PITCHER_DAMAGE_MULTIPLIER
.public PlayEffectAnimation0x171
.public PlayEffectAnimation0x171Full
.public PlayEffectAnimation0x18E
.public PlayEffectAnimation0x1A9__022E6130
.public PlayEffectAnimation0x1A9__022E617C
.public PlayEffectAnimationEntity
.public PointCameraToMonster
.public RECRUITMENT_LEVEL_BOOST_TABLE
.public ResetDamageData
.public RoundUpDiv256
.public SCOPE_LENS_CRIT_RATE_BOOST
.public SPECIAL_BAND_STAT_BOOST
.public SUPER_LUCK_CRIT_RATE_BOOST
.public SetItemAcquired
.public SetMessageLogPreprocessorArgsString
.public SetPokemonJoined
.public SetPreprocessorArgsIdVal
.public SetPreprocessorArgsStringToName
.public StrcpySimple
.public StrncpyName
.public StrncpySimpleNoPad
.public SubstitutePlaceholderStringTags
.public TYPE_ADVANTAGE_MASTER_CRIT_RATE
.public TYPE_MATCHUP_COMBINATOR_TABLE
.public UpdateStateFlags
.public ZINC_BAND_STAT_BOOST
.public _s32_div_f
.public abs
.public ov10_022BDE50
.public ov10_022BF964
.public ov10_022C4410
.public ov10_022C441C
.public ov10_022C443C
.public ov10_022C447C
.public ov10_022C44FC
.public ov10_022C45B4
.public ov10_022C46FC
.public ov10_022C4700
.public ov10_022C4704
.public ov10_022C4708
.public ov10_022C470C
.public ov29_022E1B28
.public ov29_022E2470
.public ov29_022E68BC
.public ov29_022E8104
.public ov29_022E81F8
.public ov29_022EACAC
.public ov29_022FBDE0
.public ov29_02304A48
.public ov29_02305F60
.public ov29_0230E5A8
.public ov29_0230E5FC
.public ov29_0230E658
.public ov29_02337EC0
.public ov29_0234B1A4
.public ov29_0234BA54
.public ov29_0234D630
.public ov29_0234D7C0
.public ov29_0234D838
.public ov29_0234D8A0
.public ov29_0234EE10
.public ov29_02352838
.public ov29_02352894
.public ov29_02352984
.public ov29_02352990
.public ov29_0235299C
.public ov29_023535D4
.public sub_02056698
.public sub_020584FC
.public sub_020585B4

View File

@@ -1,5 +1,5 @@
#pragma once
.public AbilityIsActiveVeneer
.public DefenderAbilityIsActive__02311B94
.public EntityIsValid__023118B4
.public ExclusiveItemEffectIsActiveWithLogging
.public InflictSleepStatusSingle
@@ -7,8 +7,8 @@
.public IsProtectedFromNegativeStatus
.public ItemIsActive__02311BF8
.public LogMessageByIdWithPopupCheckUserTarget
.public ov29_022E3E74
.public ov29_02304A48
.public SafeguardIsActive
.public SubstitutePlaceholderStringTags
.public TryActivateQuickFeet
.public ov29_022E3E74
.public ov29_02304A48

View File

@@ -1,17 +1,14 @@
#pragma once
.public AbilityIsActiveVeneer
.public AllocateTemp1024ByteBufferFromPool
.public CalcSpeedStageWrapper
.public CalcStatusDuration
.public ChangeShayminForme
.public CopyStringFromId
.public DefenderAbilityIsActive__02311B94
.public DIRECTIONS_XY
.public DUNGEON_PTR
.public DefenderAbilityIsActive__02311B94
.public EntityIsValid__023118B4
.public ExclusiveItemEffectIsActive__023147EC
.public ExclusiveItemEffectIsActiveWithLogging
.public GetExclusiveItemWithEffectFromBag
.public GetMessageLogPreprocessorArgs
.public GetTile
.public GetTileAtEntity
@@ -21,7 +18,14 @@
.public ItemIsActive__02311BF8
.public LogMessageByIdWithPopupCheckUserTarget
.public MonsterIsType
.public MultiplyByFixedPoint
.public SECONDARY_TERRAIN_TYPES
.public SafeguardIsActive
.public SetMessageLogPreprocessorArgsString
.public SetPreprocessorArgsIdVal
.public SetPreprocessorArgsStringToName
.public SubstitutePlaceholderStringTags
.public TryActivateQuickFeet
.public UpdateStatusIconFlags
.public ov10_022C4728
.public ov10_022C479C
.public ov10_022C47A0
@@ -30,19 +34,15 @@
.public ov10_022C4874
.public ov10_022C4878
.public ov10_022C4880
.public ov10_022C4884
.public ov10_022C4894
.public ov10_022C4898
.public ov10_022C48A0
.public ov10_022C48AC
.public ov10_022C48B8
.public ov29_022E41F0
.public ov29_022E4240
.public ov29_022E4290
.public ov29_022E4294
.public ov29_022E42E0
.public ov29_022E42E4
.public ov29_022E4338
.public ov29_022E4388
.public ov29_022E43D8
.public ov29_022E4428
@@ -56,24 +56,7 @@
.public ov29_022E4DCC
.public ov29_022E4E74
.public ov29_022E4F1C
.public ov29_022E4FC0
.public ov29_022E5068
.public ov29_022E510C
.public ov29_022E51B0
.public ov29_022E5258
.public ov29_022E52F8
.public ov29_022E53EC
.public ov29_023018AC
.public ov29_02304A48
.public ov29_02304A84
.public PlayExclamationPointEffect__022E5D4C
.public PrepareItemForPrinting__02345728
.public SafeguardIsActive
.public SECONDARY_TERRAIN_TYPES
.public SetMessageLogPreprocessorArgsString
.public SetPreprocessorArgsIdVal
.public SetPreprocessorArgsStringToName
.public SubstitutePlaceholderStringTags
.public TryActivateQuickFeet
.public TryActivateSteadfast
.public UpdateStatusIconFlags

View File

@@ -0,0 +1,38 @@
#pragma once
.public AbilityIsActiveVeneer
.public AllocateTemp1024ByteBufferFromPool
.public CalcSpeedStageWrapper
.public CalcStatusDuration
.public CopyStringFromId
.public DIRECTIONS_XY
.public DefenderAbilityIsActive__02311B94
.public EntityIsValid__023118B4
.public ExclusiveItemEffectIsActive__023147EC
.public GetExclusiveItemWithEffectFromBag
.public GetMessageLogPreprocessorArgs
.public GetTile
.public IsProtectedFromNegativeStatus
.public IsProtectedFromStatDrops
.public ItemIsActive__02311BF8
.public LogMessageByIdWithPopupCheckUserTarget
.public MultiplyByFixedPoint
.public PlayExclamationPointEffect__022E5D4C
.public PrepareItemForPrinting__02345728
.public SafeguardIsActive
.public SetMessageLogPreprocessorArgsString
.public SetPreprocessorArgsStringToName
.public SubstitutePlaceholderStringTags
.public TryActivateQuickFeet
.public TryActivateSteadfast
.public UpdateStatusIconFlags
.public ov10_022C4884
.public ov10_022C4894
.public ov29_022E4240
.public ov29_022E4338
.public ov29_022E4FC0
.public ov29_022E5068
.public ov29_022E510C
.public ov29_022E51B0
.public ov29_022E5258
.public ov29_022E52F8
.public ov29_023018AC

View File

@@ -9,6 +9,7 @@
.public BuildMoveTargetList
.public CalcStatusDuration
.public CanMonsterUseMove
.public DefenderAbilityIsActive__02322D64
.public DungeonRandInt
.public EndFrozenClassStatus
.public EndLeechSeedClassStatus
@@ -24,15 +25,15 @@
.public GetMoveNbStrikes
.public GetNaturePowerVariant
.public GravityIsActive
.public INTIMIDATOR_ACTIVATION_CHANCE
.public InitMove
.public InitMoveCheckId
.public INTIMIDATOR_ACTIVATION_CHANCE
.public IqSkillIsEnabled
.public Is2TurnsMove
.public IsChargingTwoTurnMove
.public IsFloorOver
.public IsMonster__02322DB8
.public IsMonsterSleeping
.public IsMonster__02322DB8
.public IsTrappingMove
.public LogMessageByIdWithPopupCheckUser
.public LogMessageWithPopupCheckUser
@@ -42,6 +43,30 @@
.public MonsterCannotAttack
.public NATURE_POWER_TABLE
.public NIGHTMARE_TURN_RANGE
.public ResetTriggerFlags
.public SLEEP_TURN_RANGE
.public SetPreprocessorArgsIdVal
.public SetPreprocessorArgsStringToName
.public StringFromId
.public SubstitutePlaceholderStringTags
.public TryInflictBlinkerStatus
.public TryInflictBurnStatus
.public TryInflictConfusedStatus
.public TryInflictConstrictionStatus
.public TryInflictCringeStatus
.public TryInflictFrozenStatus
.public TryInflictInfatuatedStatus
.public TryInflictInvisibleStatus
.public TryInflictNightmareStatus
.public TryInflictParalysisStatus
.public TryInflictPausedStatus
.public TryInflictPerishSongStatus
.public TryInflictPoisonedStatus
.public TryInflictShadowHoldStatus
.public TryInflictSleepStatus
.public TrySealMove
.public TryWarp
.public UpdateAiTargetPos
.public ov10_022BFD6C
.public ov10_022C4584
.public ov10_022C4714
@@ -62,28 +87,4 @@
.public ov29_02344B9C
.public ov29_0235370C
.public ov29_0237CA68
.public ResetTriggerFlags
.public SetPreprocessorArgsIdVal
.public SetPreprocessorArgsStringToName
.public SLEEP_TURN_RANGE
.public StringFromId
.public sub_0201D1B0
.public SubstitutePlaceholderStringTags
.public TryInflictBlinkerStatus
.public TryInflictBurnStatus
.public TryInflictConfusedStatus
.public TryInflictConstrictionStatus
.public TryInflictCringeStatus
.public TryInflictFrozenStatus
.public TryInflictInfatuatedStatus
.public TryInflictInvisibleStatus
.public TryInflictNightmareStatus
.public TryInflictParalysisStatus
.public TryInflictPausedStatus
.public TryInflictPerishSongStatus
.public TryInflictPoisonedStatus
.public TryInflictShadowHoldStatus
.public TryInflictSleepStatus
.public TrySealMove
.public TryWarp
.public UpdateAiTargetPos

View File

@@ -1,18 +1,11 @@
#pragma once
.public AbilityIsActiveVeneer
.public abs
.public ApplyDamageAndEffects
.public CalcDamage
.public CanAttackInDirection
.public CanLayTrap
.public CanSeeTarget
.public CeilFixedPoint
.public Conversion2IsActive
.public DisplayAnimatedNumbers
.public DUNGEON_PTR
.public DefenderAbilityIsActive__02332A0C
.public DisplayAnimatedNumbers
.public EntityIsValid__0232E840
.public EntityIsValid__02333FAC
.public GetApparentWeather
.public GetDamageSourceWrapper
.public GetDirectionTowardsPosition
.public GetMessageLogPreprocessorArgs
@@ -20,20 +13,12 @@
.public GetMoveCritChance
.public GetMovePower
.public GetMoveTypeForMonster
.public GetTileAtEntity
.public IsCurrentFixedRoomBossFight
.public IsTileGround
.public LogMessageByIdQuietCheckUserTarget
.public LogMessageByIdWithPopupCheckUserTarget
.public MirrorMoveIsActive
.public MistIsActive
.public MonsterHasNegativeStatus
.public MonsterHasQuarterHp
.public MonsterIsType
.public MoveHitCheck
.public ov10_022C6322
.public SetPreprocessorArgsStringToName
.public ShouldDisplayEntityWrapper
.public abs
.public ov29_022E576C
.public ov29_02304A48
.public ov29_0230D088
.public SetPreprocessorArgsStringToName
.public ShouldDisplayEntityWrapper

View File

@@ -1,3 +1 @@
#pragma once
.public ov29_023529C4
.public ov29_023529EC

View File

@@ -0,0 +1,3 @@
#pragma once
.public ov29_023529C4
.public ov29_023529EC

View File

@@ -428,51 +428,3 @@ _022F96C4: .word WEATHER_BALL_TYPE_TABLE
_022F96C8: .word 0x00000C19
#endif
arm_func_end TryActivateTraceAndColorChange
arm_func_start DefenderAbilityIsActive__022F96CC
DefenderAbilityIsActive__022F96CC: ; 0x022F96CC
#ifdef JAPAN
stmdb sp!, {r4, r5, r6, lr}
mov r6, r0
mov r5, r1
mov r4, r2
cmp r6, r5
#else
stmdb sp!, {r3, r4, r5, r6, r7, lr}
mov r7, r0
mov r6, r1
mov r5, r2
mov r4, r3
cmp r7, r6
#endif
beq _022F9710
bl IsMonster__022F9720
cmp r0, #0
#ifdef JAPAN
beq _022F9710
mov r0, r6
#else
cmpne r4, #0
beq _022F9710
mov r0, r7
#endif
mov r1, #0x53
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, #0
#ifdef JAPAN
ldmneia sp!, {r4, r5, r6, pc}
_022F9710:
mov r0, r5
mov r1, r4
bl AbilityIsActiveVeneer
ldmia sp!, {r4, r5, r6, pc}
#else
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
_022F9710:
mov r0, r6
mov r1, r5
bl AbilityIsActiveVeneer
ldmia sp!, {r3, r4, r5, r6, r7, pc}
#endif
arm_func_end DefenderAbilityIsActive__022F96CC

View File

@@ -125,51 +125,3 @@ _02301A08: .word 0x00000976
_02301A08: .word 0x00000C37
#endif
arm_func_end LeafGuardIsActive
arm_func_start DefenderAbilityIsActive__02301A0C
DefenderAbilityIsActive__02301A0C: ; 0x02301A0C
#ifdef JAPAN
stmdb sp!, {r4, r5, r6, lr}
mov r6, r0
mov r5, r1
mov r4, r2
cmp r6, r5
#else
stmdb sp!, {r3, r4, r5, r6, r7, lr}
mov r7, r0
mov r6, r1
mov r5, r2
mov r4, r3
cmp r7, r6
#endif
beq _02301A50
bl IsMonster__02301A60
cmp r0, #0
#ifdef JAPAN
beq _02301A50
mov r0, r6
#else
cmpne r4, #0
beq _02301A50
mov r0, r7
#endif
mov r1, #0x53
bl AbilityIsActive
cmp r0, #0
movne r0, #0
#ifdef JAPAN
ldmneia sp!, {r4, r5, r6, pc}
_02301A50:
mov r0, r5
mov r1, r4
bl AbilityIsActive
ldmia sp!, {r4, r5, r6, pc}
#else
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
_02301A50:
mov r0, r6
mov r1, r5
bl AbilityIsActive
ldmia sp!, {r3, r4, r5, r6, r7, pc}
#endif
arm_func_end DefenderAbilityIsActive__02301A0C

View File

@@ -3514,51 +3514,3 @@ _0230B3A8: .word 0x02353E40
_0230A938: .word ov10_022C593C
_0230A93C: .word ov29_0237CA6C
arm_func_end ApplyDamage
arm_func_start DefenderAbilityIsActive__0230A940
DefenderAbilityIsActive__0230A940: ; 0x0230A940
#ifdef JAPAN
stmdb sp!, {r4, r5, r6, lr}
mov r6, r0
mov r5, r1
mov r4, r2
cmp r6, r5
#else
stmdb sp!, {r3, r4, r5, r6, r7, lr}
mov r7, r0
mov r6, r1
mov r5, r2
mov r4, r3
cmp r7, r6
#endif
beq _0230A984
bl IsMonster__0230A994
cmp r0, #0
#ifdef JAPAN
beq _0230A984
mov r0, r6
#else
cmpne r4, #0
beq _0230A984
mov r0, r7
#endif
mov r1, #0x53
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, #0
#ifdef JAPAN
ldmneia sp!, {r4, r5, r6, pc}
_0230A984:
mov r0, r5
mov r1, r4
bl AbilityIsActiveVeneer
ldmia sp!, {r4, r5, r6, pc}
#else
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
_0230A984:
mov r0, r6
mov r1, r5
bl AbilityIsActiveVeneer
ldmia sp!, {r3, r4, r5, r6, r7, pc}
#endif
arm_func_end DefenderAbilityIsActive__0230A940

File diff suppressed because it is too large Load Diff

786
asm/overlay_29_0230AD04.s Normal file
View File

@@ -0,0 +1,786 @@
.include "asm/macros.inc"
.include "overlay_29_0230AD04.inc"
.text
arm_func_start CalcTypeBasedDamageEffects
CalcTypeBasedDamageEffects: ; 0x0230AD04
stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr}
sub sp, sp, #0x64
ldr r5, _0230B774 ; =ov29_02352838
mov sl, r1
ldr r4, [r5, #0x1c]
ldr r5, [r5, #0x20]
ldr r8, [sp, #0x88]
ldr r1, [sp, #0x90]
ldr r7, [sp, #0x8c]
str r1, [sp, #0x90]
ldr r6, [sl, #0xb4]
mov r1, #1
mov fp, r0
mov sb, r2
str r3, [sp, #4]
str r4, [sp, #0x34]
str r5, [sp, #0x38]
bl IntToFixedPoint64
mov r0, #0
str r0, [sp, #0x30]
strb r0, [r7, #0xe]
ldr r1, [sp, #0x30]
mov r0, sb
strb r1, [r7, #0xf]
bl EntityIsValid__02308FBC
cmp r0, #0
moveq r0, #1
beq _0230B76C
mov r0, r8
bl IsTypeIneffectiveAgainstGhost
str r0, [sp, #0x2c]
mov r0, sl
mov r1, sb
mov r2, #0x35
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__0230A940
cmp r0, #0
cmpne r8, #0
movne r0, #1
strne r0, [sp, #0x30]
mov r3, #2
mov r0, sl
mov r1, sb
mov r2, r8
str r3, [r7, #8]
bl ScrappyShouldActivate
ldr r3, _0230B778 ; =MATCHUP_IMMUNE_MULTIPLIER_ERRATIC_PLAYER
str r0, [sp, #0x28]
ldr r0, [r3]
ldr r2, _0230B77C ; =MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
str r0, [sp, #0x24]
ldr r0, [r2]
ldr r1, _0230B780 ; =MATCHUP_NEUTRAL_MULTIPLIER_ERRATIC_PLAYER
str r0, [sp, #0x20]
ldr r0, [r1]
ldr r1, _0230B784 ; =MATCHUP_IMMUNE_MULTIPLIER
str r0, [sp, #0x1c]
ldr r0, _0230B788 ; =MATCHUP_SUPER_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
mov r4, #0
ldr r0, [r0]
str r0, [sp, #0x18]
ldr r0, [r1]
ldr r1, _0230B78C ; =MATCHUP_NEUTRAL_MULTIPLIER
str r0, [sp, #0x14]
ldr r0, _0230B790 ; =MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER
ldr r0, [r0]
str r0, [sp, #0x10]
ldr r0, [r1]
str r0, [sp, #0xc]
ldr r0, _0230B794 ; =MATCHUP_SUPER_EFFECTIVE_MULTIPLIER
ldr r0, [r0]
str r0, [sp, #8]
b _0230AF8C
_0230AE28:
ldr r0, [sp, #0x90]
cmp r0, #0
bne _0230AE90
mov r0, sl
mov r1, #0x3b
bl IqSkillIsEnabled
cmp r0, #0
bne _0230AE5C
mov r0, sb
mov r1, #0x3b
bl IqSkillIsEnabled
cmp r0, #0
beq _0230AE90
_0230AE5C:
ldr r1, [sp, #0x24]
add r0, sp, #0x44
bl FixedPoint32To64
ldr r1, [sp, #0x20]
add r0, sp, #0x4c
bl FixedPoint32To64
ldr r1, [sp, #0x1c]
add r0, sp, #0x54
bl FixedPoint32To64
ldr r1, [sp, #0x18]
add r0, sp, #0x5c
bl FixedPoint32To64
b _0230AEC0
_0230AE90:
ldr r1, [sp, #0x14]
add r0, sp, #0x44
bl FixedPoint32To64
ldr r1, [sp, #0x10]
add r0, sp, #0x4c
bl FixedPoint32To64
ldr r1, [sp, #0xc]
add r0, sp, #0x54
bl FixedPoint32To64
ldr r1, [sp, #8]
add r0, sp, #0x5c
bl FixedPoint32To64
_0230AEC0:
mov r0, fp
bl FixedPoint64IsZero
cmp r0, #0
bne _0230AF94
ldr r0, [sp, #0x28]
cmp r0, #0
bne _0230AF1C
ldr r0, [sp, #0x2c]
cmp r0, #0
beq _0230AF1C
mov r0, sl
mov r1, sb
mov r2, r4, lsl #0x10
mov r2, r2, asr #0x10
bl GhostImmunityIsActive
cmp r0, #0
beq _0230AF1C
ldr r0, _0230B798 ; =DUNGEON_PTR
mov r5, #0
ldr r1, [r0]
mov r0, #1
strb r0, [r1, #0x1d4]
b _0230AF38
_0230AF1C:
mov r0, sl
mov r1, sb
mov r2, r4, lsl #0x10
mov r2, r2, asr #0x10
mov r3, r8
bl GetTypeMatchup
mov r5, r0
_0230AF38:
mov r0, sl
mov r1, #0x3b
bl IqSkillIsEnabled
cmp r0, #0
beq _0230AF64
add r2, sp, #0x44
mov r0, fp
mov r1, fp
add r2, r2, r5, lsl #3
bl MultiplyFixedPoint64
b _0230AF80
_0230AF64:
cmp r5, #2
beq _0230AF80
add r2, sp, #0x44
mov r0, fp
mov r1, fp
add r2, r2, r5, lsl #3
bl MultiplyFixedPoint64
_0230AF80:
add r0, sp, #0x34
str r5, [r0, r4, lsl #2]
add r4, r4, #1
_0230AF8C:
cmp r4, #2
blt _0230AE28
_0230AF94:
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r4, [sp, #0x34]
ldr r2, [r0]
ldr r1, _0230B79C ; =TYPE_MATCHUP_COMBINATOR_TABLE
strb r4, [r2, #0x18c]
ldr r3, [sp, #0x38]
ldr r2, [r0]
add r1, r1, r4, lsl #4
ldr r0, [r1, r3, lsl #2]
strb r3, [r2, #0x18d]
cmp r0, #3
str r0, [r7, #8]
moveq r4, #1
beq _0230AFEC
ldr r0, [sp, #0x30]
mov r4, #0
cmp r0, #0
ldrne r0, _0230B774 ; =ov29_02352838
ldrne r1, [r0, #0x3c]
ldrne r0, [r0, #0x40]
strne r1, [fp]
strne r0, [fp, #4]
_0230AFEC:
mov r0, sl
mov r1, #0x50
bl AbilityIsActiveVeneer
cmp r0, #0
beq _0230B02C
ldr r0, [r7, #8]
cmp r0, #1
bne _0230B02C
ldr r1, _0230B7A0 ; =TINTED_LENS_MULTIPLIER
add r0, sp, #0x3c
ldr r1, [r1]
bl FixedPoint32To64
add r2, sp, #0x3c
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
_0230B02C:
mov r0, sl
mov r1, sb
mov r2, #0x6c
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__0230A940
cmp r0, #0
bne _0230B064
mov r0, sl
mov r1, sb
mov r2, #0x6e
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__0230A940
cmp r0, #0
beq _0230B080
_0230B064:
ldr r0, [r7, #8]
cmp r0, #3
bne _0230B080
ldr r2, _0230B7A4 ; =SOLID_ROCK_MULTIPLIER
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
_0230B080:
mov r0, sb
mov r1, #0x5a
bl ExclusiveItemEffectIsActive__0230A9B8
cmp r0, #0
beq _0230B0A4
ldr r2, _0230B7A8 ; =DAMAGE_MULTIPLIER_0_5
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
_0230B0A4:
ldr r0, [sp, #0x90]
cmp r0, #0
bne _0230B104
mov r0, sl
mov r1, #0x64
bl AbilityIsActiveVeneer
cmp r0, #0
beq _0230B104
ldr r0, _0230B7AC ; =TECHNICIAN_MOVE_POWER_THRESHOLD
ldrsh r1, [r0]
ldr r0, [sp, #4]
cmp r0, r1
bgt _0230B104
ldr r2, _0230B7B0 ; =DAMAGE_MULTIPLIER_1_5
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
mov r1, #0x64
ldr r2, _0230B7B4 ; =0x00000C3E
mov r0, sl
str r1, [sp]
mov r1, sb
mov r3, #2
bl LogMessageByIdWithPopupCheckParticipants
_0230B104:
cmp r8, #2
cmpne r8, #6
bne _0230B14C
mov r0, sl
mov r1, sb
mov r2, #2
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__0230A940
cmp r0, #0
beq _0230B14C
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7A8 ; =DAMAGE_MULTIPLIER_0_5
ldr r3, [r0]
mov r5, #1
mov r0, fp
mov r1, fp
strb r5, [r3, #0x1c5]
bl MultiplyFixedPoint64
_0230B14C:
cmp r8, #2
bne _0230B198
mov r0, sl
mov r1, sb
bl FlashFireShouldActivate
cmp r0, #0
beq _0230B198
ldr r1, _0230B798 ; =DUNGEON_PTR
mov r0, fp
ldr r2, [r1]
mov r3, #1
mov r1, #0
strb r3, [r2, #0x1c6]
bl IntToFixedPoint64
mov r4, #0
str r4, [r7, #8]
strb r4, [r7, #0xe]
mov r0, #1
strb r0, [r7, #0xf]
_0230B198:
cmp r8, #2
bne _0230B1DC
mov r0, sl
mov r1, sb
mov r2, #0x5f
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__0230A940
cmp r0, #0
beq _0230B1DC
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7A8 ; =DAMAGE_MULTIPLIER_0_5
ldr r3, [r0]
mov r5, #1
mov r0, fp
mov r1, fp
strb r5, [r3, #0x1c5]
bl MultiplyFixedPoint64
_0230B1DC:
cmp r8, #9
bne _0230B248
mov r0, sl
mov r1, #0x53
bl AbilityIsActiveVeneer
cmp r0, #0
bne _0230B208
mov r0, sb
bl LevitateIsActive
cmp r0, #0
bne _0230B218
_0230B208:
mov r0, sb
bl IsFloating
cmp r0, #0
beq _0230B248
_0230B218:
ldr r1, _0230B798 ; =DUNGEON_PTR
mov r0, fp
ldr r2, [r1]
mov r3, #1
mov r1, #0
strb r3, [r2, #0x1c7]
bl IntToFixedPoint64
mov r4, #0
str r4, [r7, #8]
strb r4, [r7, #0xe]
mov r0, #1
strb r0, [r7, #0xf]
_0230B248:
cmp r8, #3
bne _0230B2F4
mov r0, sl
mov r1, #0x10
bl AbilityIsActiveVeneer
cmp r0, #0
beq _0230B2F4
ldrsh r2, [r6, #0x12]
ldrsh r1, [r6, #0x16]
ldr r0, _0230B7B8 ; =0x000003E7
add r2, r2, r1
cmp r2, r0
movgt r2, r0
mov r0, r2, asr #1
ldrsh r1, [r6, #0x10]
add r0, r2, r0, lsr #30
cmp r1, r0, asr #2
movle r0, #1
movgt r0, #0
and r7, r0, #0xff
mov r0, r6
mov r2, r7
mov r1, #0x80
bl UpdateStateFlags
mov r5, r0
cmp r7, #0
beq _0230B2D4
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7BC ; =DAMAGE_MULTIPLIER_2
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1c8]
bl MultiplyFixedPoint64
_0230B2D4:
cmp r5, #0
beq _0230B2F4
mov r0, sl
bl PlayEffectAnimation0x1A9__022E6214
ldr r2, _0230B7C0 ; =0x00000C4F
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0230B2F4:
cmp r8, #4
bne _0230B3A0
mov r0, sl
mov r1, #0x1a
bl AbilityIsActiveVeneer
cmp r0, #0
beq _0230B3A0
ldrsh r2, [r6, #0x12]
ldrsh r1, [r6, #0x16]
ldr r0, _0230B7B8 ; =0x000003E7
add r2, r2, r1
cmp r2, r0
movgt r2, r0
mov r0, r2, asr #1
ldrsh r1, [r6, #0x10]
add r0, r2, r0, lsr #30
cmp r1, r0, asr #2
movle r0, #1
movgt r0, #0
and r7, r0, #0xff
mov r0, r6
mov r2, r7
mov r1, #2
bl UpdateStateFlags
mov r5, r0
cmp r7, #0
beq _0230B380
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7BC ; =DAMAGE_MULTIPLIER_2
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1c9]
bl MultiplyFixedPoint64
_0230B380:
cmp r5, #0
beq _0230B3A0
mov r0, sl
bl PlayEffectAnimation0x1A9__022E61C8
#ifdef JAPAN
ldr r2, _0230CD24 ; =0x0000098F
mov r0, sl
mov r1, sb
#else
mov r0, sl
mov r1, sb
mov r2, #0xc50
#endif
bl LogMessageByIdWithPopupCheckUserTarget
_0230B3A0:
cmp r8, #0xc
bne _0230B44C
mov r0, sl
mov r1, #0x43
bl AbilityIsActiveVeneer
cmp r0, #0
beq _0230B44C
ldrsh r2, [r6, #0x12]
ldrsh r1, [r6, #0x16]
ldr r0, _0230B7B8 ; =0x000003E7
add r2, r2, r1
cmp r2, r0
movgt r2, r0
mov r0, r2, asr #1
ldrsh r1, [r6, #0x10]
add r0, r2, r0, lsr #30
cmp r1, r0, asr #2
movle r0, #1
movgt r0, #0
and r7, r0, #0xff
mov r0, r6
mov r2, r7
mov r1, #0x10
bl UpdateStateFlags
mov r5, r0
cmp r7, #0
beq _0230B42C
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7BC ; =DAMAGE_MULTIPLIER_2
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1ca]
bl MultiplyFixedPoint64
_0230B42C:
cmp r5, #0
beq _0230B44C
mov r0, sl
bl PlayEffectAnimation0x1A9__022E64C4
#ifdef JAPAN
mov r0, sl
mov r1, sb
mov r2, #0x990
#else
ldr r2, _0230B7C4 ; =0x00000C51
mov r0, sl
mov r1, sb
#endif
bl LogMessageByIdWithPopupCheckUserTarget
_0230B44C:
cmp r8, #2
bne _0230B534
mov r0, sl
mov r1, #0x46
bl AbilityIsActiveVeneer
cmp r0, #0
beq _0230B4F8
ldrsh r2, [r6, #0x12]
ldrsh r1, [r6, #0x16]
ldr r0, _0230B7B8 ; =0x000003E7
add r2, r2, r1
cmp r2, r0
movgt r2, r0
mov r0, r2, asr #1
ldrsh r1, [r6, #0x10]
add r0, r2, r0, lsr #30
cmp r1, r0, asr #2
movle r0, #1
movgt r0, #0
and r7, r0, #0xff
mov r0, r6
mov r2, r7
mov r1, #0x20
bl UpdateStateFlags
mov r5, r0
cmp r7, #0
beq _0230B4D8
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7BC ; =DAMAGE_MULTIPLIER_2
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1cb]
bl MultiplyFixedPoint64
_0230B4D8:
cmp r5, #0
beq _0230B4F8
mov r0, sl
bl PlayEffectAnimation0x1A9__022E6510
ldr r2, _0230B7C8 ; =0x00000C52
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0230B4F8:
mov r0, sl
mov r1, sb
mov r2, #0x55
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__0230A940
cmp r0, #0
beq _0230B534
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7B0 ; =DAMAGE_MULTIPLIER_1_5
ldr r3, [r0]
mov r5, #1
mov r0, fp
mov r1, fp
strb r5, [r3, #0x1cb]
bl MultiplyFixedPoint64
_0230B534:
ldrb r0, [r6, #0xbf]
cmp r0, #1
bne _0230B560
ldr r1, _0230B7CC ; =BURN_DAMAGE_MULTIPLIER
add r0, sp, #0x3c
ldr r1, [r1]
bl FixedPoint32To64
add r2, sp, #0x3c
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
_0230B560:
mov r0, fp
bl FixedPoint64IsZero
cmp r0, #0
bne _0230B5CC
mov r0, sl
mov r1, r8
bl MonsterIsType
cmp r0, #0
beq _0230B5CC
ldr r1, _0230B798 ; =DUNGEON_PTR
mov r0, sl
ldr r2, [r1]
mov r3, #1
mov r1, #0x63
strb r3, [r2, #0x1cf]
bl AbilityIsActiveVeneer
cmp r0, #0
beq _0230B5BC
ldr r2, _0230B7BC ; =DAMAGE_MULTIPLIER_2
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
b _0230B5CC
_0230B5BC:
ldr r2, _0230B7B0 ; =DAMAGE_MULTIPLIER_1_5
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
_0230B5CC:
mov r0, sl
bl GetApparentWeather
mov r5, r0
cmp r5, #1
bne _0230B634
cmp r8, #2
bne _0230B60C
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7B0 ; =DAMAGE_MULTIPLIER_1_5
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1c4]
bl MultiplyFixedPoint64
b _0230B634
_0230B60C:
cmp r8, #3
bne _0230B634
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7A8 ; =DAMAGE_MULTIPLIER_0_5
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1c4]
bl MultiplyFixedPoint64
_0230B634:
cmp r5, #4
bne _0230B690
cmp r8, #2
bne _0230B668
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7A8 ; =DAMAGE_MULTIPLIER_0_5
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1c3]
bl MultiplyFixedPoint64
b _0230B690
_0230B668:
cmp r8, #3
bne _0230B690
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7B0 ; =DAMAGE_MULTIPLIER_1_5
ldr r3, [r0]
mov r7, #1
mov r0, fp
mov r1, fp
strb r7, [r3, #0x1c3]
bl MultiplyFixedPoint64
_0230B690:
cmp r5, #3
bne _0230B6C0
cmp r8, #1
beq _0230B6C0
ldr r2, _0230B7D0 ; =CLOUDY_DAMAGE_MULTIPLIER
mov r0, fp
mov r1, fp
bl MultiplyFixedPoint64
ldr r0, _0230B798 ; =DUNGEON_PTR
mov r1, #1
ldr r0, [r0]
strb r1, [r0, #0x1c2]
_0230B6C0:
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r7, [r0]
add r0, r7, #0xc000
#ifdef JAPAN
ldrb r0, [r0, #0xcb7]
#else
ldrb r0, [r0, #0xd5b]
#endif
cmp r0, #0
bne _0230B6E0
cmp r5, #6
bne _0230B700
_0230B6E0:
cmp r8, #5
bne _0230B700
ldr r2, _0230B7A8 ; =DAMAGE_MULTIPLIER_0_5
mov r3, #1
mov r0, fp
mov r1, fp
strb r3, [r7, #0x1d0]
bl MultiplyFixedPoint64
_0230B700:
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r5, [r0]
add r0, r5, #0xc000
#ifdef JAPAN
ldrb r0, [r0, #0xcb8]
#else
ldrb r0, [r0, #0xd5c]
#endif
cmp r0, #0
beq _0230B738
cmp r8, #2
bne _0230B738
ldr r2, _0230B7A8 ; =DAMAGE_MULTIPLIER_0_5
mov r3, #1
mov r0, fp
mov r1, fp
strb r3, [r5, #0x1d1]
bl MultiplyFixedPoint64
_0230B738:
cmp r8, #5
ldreqb r0, [r6, #0xd2]
cmpeq r0, #0xb
bne _0230B768
ldr r0, _0230B798 ; =DUNGEON_PTR
ldr r2, _0230B7BC ; =DAMAGE_MULTIPLIER_2
ldr r3, [r0]
mov r5, #1
mov r0, fp
mov r1, fp
strb r5, [r3, #0x1d2]
bl MultiplyFixedPoint64
_0230B768:
mov r0, r4
_0230B76C:
add sp, sp, #0x64
ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
#ifdef JAPAN
#define CALC_TYPE_BASED_DAMAGE_EFFECTS_OFFSET -0x2C1
#else
#define CALC_TYPE_BASED_DAMAGE_EFFECTS_OFFSET 0
#endif
_0230B774: .word ov29_02352838
_0230B778: .word MATCHUP_IMMUNE_MULTIPLIER_ERRATIC_PLAYER
_0230B77C: .word MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
_0230B780: .word MATCHUP_NEUTRAL_MULTIPLIER_ERRATIC_PLAYER
_0230B784: .word MATCHUP_IMMUNE_MULTIPLIER
_0230B788: .word MATCHUP_SUPER_EFFECTIVE_MULTIPLIER_ERRATIC_PLAYER
_0230B78C: .word MATCHUP_NEUTRAL_MULTIPLIER
_0230B790: .word MATCHUP_NOT_VERY_EFFECTIVE_MULTIPLIER
_0230B794: .word MATCHUP_SUPER_EFFECTIVE_MULTIPLIER
_0230B798: .word DUNGEON_PTR
_0230B79C: .word TYPE_MATCHUP_COMBINATOR_TABLE
_0230B7A0: .word TINTED_LENS_MULTIPLIER
_0230B7A4: .word SOLID_ROCK_MULTIPLIER
_0230B7A8: .word DAMAGE_MULTIPLIER_0_5
_0230B7AC: .word TECHNICIAN_MOVE_POWER_THRESHOLD
_0230B7B0: .word DAMAGE_MULTIPLIER_1_5
_0230B7B4: .word 0x00000C3E + CALC_TYPE_BASED_DAMAGE_EFFECTS_OFFSET
_0230B7B8: .word 0x000003E7
_0230B7BC: .word DAMAGE_MULTIPLIER_2
_0230B7C0: .word 0x00000C4F + CALC_TYPE_BASED_DAMAGE_EFFECTS_OFFSET
#ifdef JAPAN
_0230CD24: .word 0x0000098F
#else
_0230B7C4: .word 0x00000C51
#endif
_0230B7C8: .word 0x00000C52 + CALC_TYPE_BASED_DAMAGE_EFFECTS_OFFSET
_0230B7CC: .word BURN_DAMAGE_MULTIPLIER
_0230B7D0: .word CLOUDY_DAMAGE_MULTIPLIER
arm_func_end CalcTypeBasedDamageEffects

3023
asm/overlay_29_0230BBAC.s Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -216,36 +216,3 @@ _02311B88: .word 0x00000DA6 + IS_PROTECTED_FROM_SLEEP_CLASS_STATUS_OFFSET
_02311B8C: .word 0x00000DB1 + IS_PROTECTED_FROM_SLEEP_CLASS_STATUS_OFFSET
_02311B90: .word 0x00000DC2 + IS_PROTECTED_FROM_SLEEP_CLASS_STATUS_OFFSET
arm_func_end IsProtectedFromSleepClassStatus
arm_func_start DefenderAbilityIsActive__02311B94
DefenderAbilityIsActive__02311B94: ; 0x02311B94
stmdb sp!, {r3, r4, r5, lr}
mov r5, r1
mov r4, r2
cmp r0, r5
beq _02311BE8
cmp r0, #0
moveq r1, #0
beq _02311BC8
ldr r1, [r0]
cmp r1, #1
moveq r1, #1
movne r1, #0
and r1, r1, #0xff
_02311BC8:
cmp r1, #0
#ifndef JAPAN
cmpne r3, #0
#endif
beq _02311BE8
mov r1, #0x53
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, #0
ldmneia sp!, {r3, r4, r5, pc}
_02311BE8:
mov r0, r5
mov r1, r4
bl AbilityIsActiveVeneer
ldmia sp!, {r3, r4, r5, pc}
arm_func_end DefenderAbilityIsActive__02311B94

View File

@@ -2468,864 +2468,3 @@ _02313C68: .word 0x00000DCC + BOOST_DEFENSIVE_STAT_OFFSET
_02313C6C: .word 0x00000D8E + BOOST_DEFENSIVE_STAT_OFFSET
_02313C70: .word 0x00000DD6 + BOOST_DEFENSIVE_STAT_OFFSET
arm_func_end BoostDefensiveStat
arm_func_start FlashFireShouldActivate
FlashFireShouldActivate: ; 0x02313C74
stmdb sp!, {r3, r4, r5, lr}
mov r4, r1
mov r5, r0
mov r0, r4
bl EntityIsValid__023118B4
cmp r0, #0
moveq r0, #0
ldmeqia sp!, {r3, r4, r5, pc}
mov r0, r5
mov r1, #0x6b
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, #0
ldmneia sp!, {r3, r4, r5, pc}
mov r0, r5
mov r1, r4
mov r2, #0x48
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
moveq r0, #0
ldmeqia sp!, {r3, r4, r5, pc}
ldr r0, [r4, #0xb4]
ldrsh r0, [r0, #0x30]
cmp r0, #2
movge r0, #1
movlt r0, #2
ldmia sp!, {r3, r4, r5, pc}
arm_func_end FlashFireShouldActivate
arm_func_start ActivateFlashFire
ActivateFlashFire: ; 0x02313CE4
stmdb sp!, {r3, r4, r5, lr}
mov r5, r1
mov r0, r5
bl EntityIsValid__023118B4
cmp r0, #0
ldmeqia sp!, {r3, r4, r5, pc}
mov r0, #0
ldr r4, [r5, #0xb4]
mov r1, r5
mov r2, r0
bl SubstitutePlaceholderStringTags
ldrsh r0, [r4, #0x30]
add r1, r0, #1
cmp r1, #2
movge r1, #2
cmp r0, r1
beq _02313D34
mov r0, r5
strh r1, [r4, #0x30]
bl ov29_022E4338
_02313D34:
mov r0, r5
bl UpdateStatusIconFlags
ldmia sp!, {r3, r4, r5, pc}
arm_func_end ActivateFlashFire
arm_func_start ApplyOffensiveStatMultiplier
ApplyOffensiveStatMultiplier: ; 0x02313D40
#ifdef JAPAN
#define APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET -0x2C0
#else
#define APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET 0
#endif
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
mov r8, r1
mov sb, r0
mov r7, r3
bl AllocateTemp1024ByteBufferFromPool
mov r4, r0
mov r0, r8
bl EntityIsValid__023118B4
cmp r0, #0
beq _02313F3C
ldr r0, [sp, #0x28]
cmp r0, #0
beq _02313D94
ldr r1, _02313F48 ; =0x00000DCB
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
b _02313DAC
_02313D94:
ldr r1, _02313F4C ; =0x00000DCA
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
_02313DAC:
cmp r7, #0x100
bge _02313DCC
ldrb r2, [sp, #0x30]
mov r0, sb
mov r1, r8
bl IsProtectedFromStatDrops
cmp r0, #0
bne _02313F3C
_02313DCC:
mov r0, r8
mov r1, #0x12
bl ItemIsActive__02311BF8
cmp r0, #0
beq _02313E0C
cmp r7, #0x100
bge _02313E0C
mov r0, #0
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _02313F50 ; =0x00000DB2
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F3C
_02313E0C:
mov r0, sb
mov r1, r8
mov r2, #9
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _02313E6C
ldr r0, [sp, #0x28]
cmp r0, #0
bne _02313E6C
cmp r7, #0x100
bge _02313E6C
ldrb r0, [sp, #0x30]
cmp r0, #0
beq _02313F3C
mov r0, #0
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _02313F54 ; =0x00000D9E
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F3C
_02313E6C:
mov r0, #0
mov r1, r8
mov r2, r0
ldr r5, [r8, #0xb4]
bl SubstitutePlaceholderStringTags
ldr r6, [sp, #0x28]
cmp r7, #0x100
add r0, r5, r6, lsl #2
ldr r4, [r0, #0x34]
add r1, sp, #0x28
mov r0, r8
bge _02313EA8
ldr r1, [r1]
bl ov29_022E5068
b _02313EB0
_02313EA8:
ldr r1, [r1]
bl ov29_022E4FC0
_02313EB0:
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x34]
mov r1, r7
bl MultiplyByFixedPoint
add r1, r5, r6, lsl #2
str r0, [r1, #0x34]
cmp r0, #2
movlt r0, #2
strlt r0, [r1, #0x34]
add r2, r5, r6, lsl #2
ldr r1, [r2, #0x34]
ldr r0, _02313F58 ; =0x000063FD
cmp r1, r0
strgt r0, [r2, #0x34]
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x34]
cmp r4, r0
ble _02313F0C
ldr r2, _02313F5C ; =0x00000DD1
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F34
_02313F0C:
bge _02313F24
mov r0, sb
mov r1, r8
mov r2, #0xdd0 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F34
_02313F24:
ldr r2, _02313F60 ; =0x00000DD3
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
_02313F34:
mov r0, r8
bl UpdateStatusIconFlags
_02313F3C:
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
_02313F48: .word 0x00000DCB + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F4C: .word 0x00000DCA + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F50: .word 0x00000DB2 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F54: .word 0x00000D9E + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F58: .word 0x000063FD
_02313F5C: .word 0x00000DD1 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F60: .word 0x00000DD3 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
arm_func_end ApplyOffensiveStatMultiplier
arm_func_start ApplyDefensiveStatMultiplier
ApplyDefensiveStatMultiplier: ; 0x02313F64
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
mov r8, r1
mov sb, r0
mov r7, r3
bl AllocateTemp1024ByteBufferFromPool
mov r4, r0
mov r0, r8
bl EntityIsValid__023118B4
cmp r0, #0
beq _023140C0
ldr r0, [sp, #0x28]
cmp r0, #0
beq _02313FB8
ldr r1, _023140CC ; =0x00000DC9
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
b _02313FD0
_02313FB8:
ldr r1, _023140D0 ; =0x00000DC8
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
_02313FD0:
cmp r7, #0x100
bge _02313FF0
ldrb r2, [sp, #0x30]
mov r0, sb
mov r1, r8
bl IsProtectedFromStatDrops
cmp r0, #0
bne _023140C0
_02313FF0:
mov r0, #0
mov r1, r8
mov r2, r0
ldr r5, [r8, #0xb4]
bl SubstitutePlaceholderStringTags
ldr r6, [sp, #0x28]
cmp r7, #0x100
add r0, r5, r6, lsl #2
ldr r4, [r0, #0x3c]
add r1, sp, #0x28
mov r0, r8
bge _0231402C
ldr r1, [r1]
bl ov29_022E51B0
b _02314034
_0231402C:
ldr r1, [r1]
bl ov29_022E510C
_02314034:
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x3c]
mov r1, r7
bl MultiplyByFixedPoint
add r1, r5, r6, lsl #2
str r0, [r1, #0x3c]
cmp r0, #2
movlt r0, #2
strlt r0, [r1, #0x3c]
add r2, r5, r6, lsl #2
ldr r1, [r2, #0x3c]
ldr r0, _023140D4 ; =0x000063FD
cmp r1, r0
strgt r0, [r2, #0x3c]
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x3c]
cmp r4, r0
ble _02314090
ldr r2, _023140D8 ; =0x00000DCF
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _023140B8
_02314090:
bge _023140A8
ldr r2, _023140DC ; =0x00000DCE
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _023140B8
_023140A8:
ldr r2, _023140E0 ; =0x00000DD2
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
_023140B8:
mov r0, r8
bl UpdateStatusIconFlags
_023140C0:
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
#ifdef JAPAN
#define APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET -0x2C0
#else
#define APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET 0
#endif
_023140CC: .word 0x00000DC9 + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140D0: .word 0x00000DC8 + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140D4: .word 0x000063FD
_023140D8: .word 0x00000DCF + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140DC: .word 0x00000DCE + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140E0: .word 0x00000DD2 + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
arm_func_end ApplyDefensiveStatMultiplier
arm_func_start BoostHitChanceStat
BoostHitChanceStat: ; 0x023140E4
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r4, r5, r6, r7, r8, lr}
mov r6, r1
mov r7, r0
bl AllocateTemp1024ByteBufferFromPool
mov r8, r0
mov r0, r6
mov r4, #1
bl EntityIsValid__023118B4
cmp r0, #0
beq _0231420C
mov r0, #0
mov r1, r6
mov r2, r0
ldr r5, [r6, #0xb4]
bl SubstitutePlaceholderStringTags
add r1, sp, #0x20
ldr r1, [r1]
mov r0, r6
bl ov29_022E5258
ldr r0, [sp, #0x20]
cmp r0, #0
beq _0231415C
ldr r1, _02314218 ; =0x00000DC7
mov r0, r8
bl CopyStringFromId
mov r1, r8
mov r0, r4
bl SetMessageLogPreprocessorArgsString
b _02314174
_0231415C:
ldr r1, _0231421C ; =0x00000DC6
mov r0, r8
bl CopyStringFromId
mov r1, r8
mov r0, r4
bl SetMessageLogPreprocessorArgsString
_02314174:
mov r0, r6
mov r1, #0x61
bl AbilityIsActiveVeneer
ldr r1, [sp, #0x20]
cmp r0, #0
movne r0, r4, lsl #0x11
add r2, r5, r1, lsl #1
movne r4, r0, asr #0x10
ldrsh r0, [r2, #0x2c]
mov r3, r1, lsl #1
cmp r0, #0x14
bge _023141F4
add r1, r5, #0x2c
ldrsh r0, [r1, r3]
add r0, r0, r4
strh r0, [r1, r3]
ldrsh r0, [r2, #0x2c]
cmp r0, #0x14
movgt r0, #0x14
strgth r0, [r2, #0x2c]
cmp r4, #2
blt _023141E0
ldr r2, _02314220 ; =0x00000D95
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _02314204
_023141E0:
ldr r2, _02314224 ; =0x00000D93
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _02314204
_023141F4:
ldr r2, _02314228 ; =0x00000DD5
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_02314204:
mov r0, r6
bl UpdateStatusIconFlags
_0231420C:
ldmia sp!, {r4, r5, r6, r7, r8, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
#ifdef JAPAN
#define BOOST_HIT_CHANCE_STAT_OFFSET -0x2C0
#else
#define BOOST_HIT_CHANCE_STAT_OFFSET 0
#endif
_02314218: .word 0x00000DC7 + BOOST_HIT_CHANCE_STAT_OFFSET
_0231421C: .word 0x00000DC6 + BOOST_HIT_CHANCE_STAT_OFFSET
_02314220: .word 0x00000D95 + BOOST_HIT_CHANCE_STAT_OFFSET
_02314224: .word 0x00000D93 + BOOST_HIT_CHANCE_STAT_OFFSET
_02314228: .word 0x00000DD5 + BOOST_HIT_CHANCE_STAT_OFFSET
arm_func_end BoostHitChanceStat
arm_func_start LowerHitChanceStat
LowerHitChanceStat: ; 0x0231422C
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r4, r5, r6, r7, r8, lr}
mov r6, r1
mov r7, r0
mov r8, r3
bl AllocateTemp1024ByteBufferFromPool
mov r5, r0
mov r0, r6
mov r4, #1
bl EntityIsValid__023118B4
cmp r0, #0
beq _023143C4
ldr r0, [sp, #0x20]
cmp r0, #0
beq _02314284
ldr r1, _023143D0 ; =0x00000DC7
mov r0, r5
bl CopyStringFromId
mov r1, r5
mov r0, r4
bl SetMessageLogPreprocessorArgsString
b _0231429C
_02314284:
ldr r1, _023143D4 ; =0x00000DC6
mov r0, r5
bl CopyStringFromId
mov r1, r5
mov r0, r4
bl SetMessageLogPreprocessorArgsString
_0231429C:
mov r0, r7
mov r1, r6
mov r2, r8
bl IsProtectedFromStatDrops
cmp r0, #0
bne _023143C4
mov r0, r7
mov r1, r6
mov r2, #0x1e
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _02314308
ldr r0, [sp, #0x20]
cmp r0, #0
bne _02314308
cmp r8, #0
beq _023143C4
mov r0, #0
mov r1, r6
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _023143D8 ; =0x00000D9F
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _023143C4
_02314308:
mov r0, r6
mov r1, #0x61
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, r4, lsl #0x11
movne r4, r0, asr #0x10
mov r0, #0
mov r1, r6
mov r2, r0
ldr r5, [r6, #0xb4]
bl SubstitutePlaceholderStringTags
add r1, sp, #0x20
ldr r1, [r1]
mov r0, r6
bl ov29_022E52F8
ldr r1, [sp, #0x20]
add r2, r5, r1, lsl #1
ldrsh r0, [r2, #0x2c]
mov r3, r1, lsl #1
cmp r0, #0
ble _023143AC
add r1, r5, #0x2c
ldrsh r0, [r1, r3]
sub r0, r0, r4
strh r0, [r1, r3]
ldrsh r0, [r2, #0x2c]
cmp r0, #0
movlt r0, #0
strlth r0, [r2, #0x2c]
cmp r4, #2
blt _02314398
ldr r2, _023143DC ; =0x00000D94
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _023143BC
_02314398:
ldr r2, _023143E0 ; =0x00000D92
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _023143BC
_023143AC:
ldr r2, _023143E4 ; =0x00000DD4
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_023143BC:
mov r0, r6
bl UpdateStatusIconFlags
_023143C4:
ldmia sp!, {r4, r5, r6, r7, r8, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
#ifdef JAPAN
#define LOWER_HIT_CHANCE_STAT_OFFSET -0x2C0
#else
#define LOWER_HIT_CHANCE_STAT_OFFSET 0
#endif
_023143D0: .word 0x00000DC7 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143D4: .word 0x00000DC6 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143D8: .word 0x00000D9F + LOWER_HIT_CHANCE_STAT_OFFSET
_023143DC: .word 0x00000D94 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143E0: .word 0x00000D92 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143E4: .word 0x00000DD4 + LOWER_HIT_CHANCE_STAT_OFFSET
arm_func_end LowerHitChanceStat
arm_func_start TryInflictCringeStatus
TryInflictCringeStatus: ; 0x023143E8
stmdb sp!, {r3, r4, r5, r6, r7, lr}
mov r6, r1
mov r7, r0
mov r5, r2
mov r4, r3
bl AllocateTemp1024ByteBufferFromPool
mov r0, r6
bl EntityIsValid__023118B4
cmp r0, #0
moveq r0, #0
ldmeqia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, r7
mov r1, r6
mov r2, r5
bl SafeguardIsActive
cmp r0, #0
movne r0, #0
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, r7
mov r1, r6
mov r2, r5
bl IsProtectedFromNegativeStatus
cmp r0, #0
movne r0, #0
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, r7
mov r1, r6
mov r2, #0x1f
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _02314498
mov r0, #0
mov r1, r6
mov r2, r0
bl SubstitutePlaceholderStringTags
cmp r5, #0
beq _02314490
ldr r2, _02314534 ; =0x00000DA2
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_02314490:
mov r0, #0
ldmia sp!, {r3, r4, r5, r6, r7, pc}
_02314498:
cmp r4, #0
movne r0, #1
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, #0
ldr r4, [r6, #0xb4]
mov r1, r6
mov r2, r0
bl SubstitutePlaceholderStringTags
ldrb r0, [r4, #0xd0]
cmp r0, #1
beq _02314514
ldr r1, _02314538 ; =ov10_022C4884
mov r2, #1
mov r0, r6
strb r2, [r4, #0xd0]
bl CalcStatusDuration
add r1, r0, #1
mov r0, r6
strb r1, [r4, #0xd1]
bl PlayExclamationPointEffect__022E5D4C
ldr r2, _0231453C ; =0x00000D02
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, r7
mov r1, r6
bl TryActivateSteadfast
mov r0, r7
mov r1, r6
bl TryActivateQuickFeet
b _02314524
_02314514:
ldr r2, _02314540 ; =0x00000D03
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_02314524:
mov r0, r6
bl UpdateStatusIconFlags
mov r0, #1
ldmia sp!, {r3, r4, r5, r6, r7, pc}
.align 2, 0
#ifdef JAPAN
#define TRY_INFLICT_CRINGE_STATUS_OFFSET -0x2C0
#else
#define TRY_INFLICT_CRINGE_STATUS_OFFSET 0
#endif
_02314534: .word 0x00000DA2 + TRY_INFLICT_CRINGE_STATUS_OFFSET
_02314538: .word ov10_022C4884
_0231453C: .word 0x00000D02 + TRY_INFLICT_CRINGE_STATUS_OFFSET
_02314540: .word 0x00000D03 + TRY_INFLICT_CRINGE_STATUS_OFFSET
arm_func_end TryInflictCringeStatus
arm_func_start TryInflictParalysisStatus
TryInflictParalysisStatus: ; 0x02314544
#ifdef JAPAN
#define TRY_INFLICT_PARALYSIS_STATUS_OFFSET -0x2C0
#else
#define TRY_INFLICT_PARALYSIS_STATUS_OFFSET 0
#endif
stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr}
sub sp, sp, #0xc
mov sb, r1
mov sl, r0
mov r0, sb
mov r8, r2
mov r4, r3
bl EntityIsValid__023118B4
cmp r0, #0
moveq r0, #0
beq _023147D0
mov r0, sl
mov r1, sb
mov r2, r8
bl SafeguardIsActive
cmp r0, #0
movne r0, #0
bne _023147D0
mov r0, sl
mov r1, sb
mov r2, r8
bl IsProtectedFromNegativeStatus
cmp r0, #0
movne r0, #0
bne _023147D0
mov r0, sl
mov r1, sb
mov r2, #0x16
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _023145F4
mov r0, #0
mov r1, sb
mov r2, r0
bl SubstitutePlaceholderStringTags
cmp r8, #0
beq _023145EC
mov r0, sl
mov r1, sb
mov r2, #0xda0 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
bl LogMessageByIdWithPopupCheckUserTarget
_023145EC:
mov r0, #0
b _023147D0
_023145F4:
mov r0, sb
mov r1, #1
bl ExclusiveItemEffectIsActive__023147EC
cmp r0, #0
beq _02314654
cmp r8, #0
beq _0231464C
mov r0, #0
mov r1, sb
mov r2, r0
bl SubstitutePlaceholderStringTags
add r2, sp, #4
mov r0, sb
mov r1, #1
bl GetExclusiveItemWithEffectFromBag
add r1, sp, #4
mov r0, #1
bl PrepareItemForPrinting__02345728
ldr r2, _023147D8 ; =0x00000DA1
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0231464C:
mov r0, #0
b _023147D0
_02314654:
cmp r4, #0
movne r0, #1
bne _023147D0
mov r0, #0
ldr r7, [sb, #0xb4]
mov r1, sb
mov r2, r0
mov r4, #1
bl SubstitutePlaceholderStringTags
ldrb r0, [r7, #0xbf]
cmp r0, #4
beq _023146E0
ldr r1, _023147DC ; =ov10_022C4894
mov r3, #4
mov r0, sb
mov r2, r4
strb r3, [r7, #0xbf]
bl CalcStatusDuration
add r0, r0, #1
strb r0, [r7, #0xc0]
mov r4, #0
strb r4, [r7, #0xc1]
mov r0, sl
mov r1, sb
mov r2, #0xd00 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
strb r4, [r7, #0xc2]
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, sb
bl ov29_022E4240
mov r0, sb
bl CalcSpeedStageWrapper
mov r0, sl
mov r1, sb
bl TryActivateQuickFeet
b _023146F0
_023146E0:
ldr r2, _023147E0 ; =0x00000D01
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_023146F0:
mov r0, sb
mov r1, #0x19
bl AbilityIsActiveVeneer
cmp r0, #0
beq _023147C4
cmp r4, #0
bne _023147C4
mov r5, #0
ldr fp, _023147E4 ; =DIRECTIONS_XY
mov r4, r5
_02314718:
mov r1, r4, lsl #2
add r0, fp, r4, lsl #2
ldrsh r6, [sb, #4]
ldrsh r3, [fp, r1]
ldrsh r1, [r0, #2]
ldrsh r2, [sb, #6]
add r0, r6, r3
add r1, r2, r1
bl GetTile
ldr r6, [r0, #0xc]
mov r0, r6
bl EntityIsValid__023118B4
cmp r0, #0
beq _023147B8
ldr r0, [r6]
cmp r0, #1
bne _023147B8
cmp r5, #0
bne _02314790
mov r5, #1
bl GetMessageLogPreprocessorArgs
mov r1, #0
mov r2, r7
mov r3, r1
str r1, [sp]
bl SetPreprocessorArgsStringToName
ldr r2, _023147E8 ; =0x00000DC5
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_02314790:
mov r0, sb
mov r1, r6
bl ov29_023018AC
cmp r0, #1
bne _023147B8
mov r0, sl
mov r1, r6
mov r2, r8
mov r3, #0
bl TryInflictParalysisStatus
_023147B8:
add r4, r4, #1
cmp r4, #8
blt _02314718
_023147C4:
mov r0, sb
bl UpdateStatusIconFlags
mov r0, #1
_023147D0:
add sp, sp, #0xc
ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
_023147D8: .word 0x00000DA1 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
_023147DC: .word ov10_022C4894
_023147E0: .word 0x00000D01 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
_023147E4: .word DIRECTIONS_XY
_023147E8: .word 0x00000DC5 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
arm_func_end TryInflictParalysisStatus

831
asm/overlay_29_02313CE4.s Normal file
View File

@@ -0,0 +1,831 @@
.include "asm/macros.inc"
.include "overlay_29_02313CE4.inc"
.text
arm_func_start ActivateFlashFire
ActivateFlashFire: ; 0x02313CE4
stmdb sp!, {r3, r4, r5, lr}
mov r5, r1
mov r0, r5
bl EntityIsValid__023118B4
cmp r0, #0
ldmeqia sp!, {r3, r4, r5, pc}
mov r0, #0
ldr r4, [r5, #0xb4]
mov r1, r5
mov r2, r0
bl SubstitutePlaceholderStringTags
ldrsh r0, [r4, #0x30]
add r1, r0, #1
cmp r1, #2
movge r1, #2
cmp r0, r1
beq _02313D34
mov r0, r5
strh r1, [r4, #0x30]
bl ov29_022E4338
_02313D34:
mov r0, r5
bl UpdateStatusIconFlags
ldmia sp!, {r3, r4, r5, pc}
arm_func_end ActivateFlashFire
arm_func_start ApplyOffensiveStatMultiplier
ApplyOffensiveStatMultiplier: ; 0x02313D40
#ifdef JAPAN
#define APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET -0x2C0
#else
#define APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET 0
#endif
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
mov r8, r1
mov sb, r0
mov r7, r3
bl AllocateTemp1024ByteBufferFromPool
mov r4, r0
mov r0, r8
bl EntityIsValid__023118B4
cmp r0, #0
beq _02313F3C
ldr r0, [sp, #0x28]
cmp r0, #0
beq _02313D94
ldr r1, _02313F48 ; =0x00000DCB
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
b _02313DAC
_02313D94:
ldr r1, _02313F4C ; =0x00000DCA
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
_02313DAC:
cmp r7, #0x100
bge _02313DCC
ldrb r2, [sp, #0x30]
mov r0, sb
mov r1, r8
bl IsProtectedFromStatDrops
cmp r0, #0
bne _02313F3C
_02313DCC:
mov r0, r8
mov r1, #0x12
bl ItemIsActive__02311BF8
cmp r0, #0
beq _02313E0C
cmp r7, #0x100
bge _02313E0C
mov r0, #0
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _02313F50 ; =0x00000DB2
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F3C
_02313E0C:
mov r0, sb
mov r1, r8
mov r2, #9
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _02313E6C
ldr r0, [sp, #0x28]
cmp r0, #0
bne _02313E6C
cmp r7, #0x100
bge _02313E6C
ldrb r0, [sp, #0x30]
cmp r0, #0
beq _02313F3C
mov r0, #0
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _02313F54 ; =0x00000D9E
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F3C
_02313E6C:
mov r0, #0
mov r1, r8
mov r2, r0
ldr r5, [r8, #0xb4]
bl SubstitutePlaceholderStringTags
ldr r6, [sp, #0x28]
cmp r7, #0x100
add r0, r5, r6, lsl #2
ldr r4, [r0, #0x34]
add r1, sp, #0x28
mov r0, r8
bge _02313EA8
ldr r1, [r1]
bl ov29_022E5068
b _02313EB0
_02313EA8:
ldr r1, [r1]
bl ov29_022E4FC0
_02313EB0:
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x34]
mov r1, r7
bl MultiplyByFixedPoint
add r1, r5, r6, lsl #2
str r0, [r1, #0x34]
cmp r0, #2
movlt r0, #2
strlt r0, [r1, #0x34]
add r2, r5, r6, lsl #2
ldr r1, [r2, #0x34]
ldr r0, _02313F58 ; =0x000063FD
cmp r1, r0
strgt r0, [r2, #0x34]
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x34]
cmp r4, r0
ble _02313F0C
ldr r2, _02313F5C ; =0x00000DD1
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F34
_02313F0C:
bge _02313F24
mov r0, sb
mov r1, r8
mov r2, #0xdd0 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
bl LogMessageByIdWithPopupCheckUserTarget
b _02313F34
_02313F24:
ldr r2, _02313F60 ; =0x00000DD3
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
_02313F34:
mov r0, r8
bl UpdateStatusIconFlags
_02313F3C:
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
_02313F48: .word 0x00000DCB + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F4C: .word 0x00000DCA + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F50: .word 0x00000DB2 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F54: .word 0x00000D9E + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F58: .word 0x000063FD
_02313F5C: .word 0x00000DD1 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
_02313F60: .word 0x00000DD3 + APPLY_OFFENSIVE_STAT_MULTIPLIER_OFFSET
arm_func_end ApplyOffensiveStatMultiplier
arm_func_start ApplyDefensiveStatMultiplier
ApplyDefensiveStatMultiplier: ; 0x02313F64
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
mov r8, r1
mov sb, r0
mov r7, r3
bl AllocateTemp1024ByteBufferFromPool
mov r4, r0
mov r0, r8
bl EntityIsValid__023118B4
cmp r0, #0
beq _023140C0
ldr r0, [sp, #0x28]
cmp r0, #0
beq _02313FB8
ldr r1, _023140CC ; =0x00000DC9
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
b _02313FD0
_02313FB8:
ldr r1, _023140D0 ; =0x00000DC8
mov r0, r4
bl CopyStringFromId
mov r1, r4
mov r0, #1
bl SetMessageLogPreprocessorArgsString
_02313FD0:
cmp r7, #0x100
bge _02313FF0
ldrb r2, [sp, #0x30]
mov r0, sb
mov r1, r8
bl IsProtectedFromStatDrops
cmp r0, #0
bne _023140C0
_02313FF0:
mov r0, #0
mov r1, r8
mov r2, r0
ldr r5, [r8, #0xb4]
bl SubstitutePlaceholderStringTags
ldr r6, [sp, #0x28]
cmp r7, #0x100
add r0, r5, r6, lsl #2
ldr r4, [r0, #0x3c]
add r1, sp, #0x28
mov r0, r8
bge _0231402C
ldr r1, [r1]
bl ov29_022E51B0
b _02314034
_0231402C:
ldr r1, [r1]
bl ov29_022E510C
_02314034:
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x3c]
mov r1, r7
bl MultiplyByFixedPoint
add r1, r5, r6, lsl #2
str r0, [r1, #0x3c]
cmp r0, #2
movlt r0, #2
strlt r0, [r1, #0x3c]
add r2, r5, r6, lsl #2
ldr r1, [r2, #0x3c]
ldr r0, _023140D4 ; =0x000063FD
cmp r1, r0
strgt r0, [r2, #0x3c]
add r0, r5, r6, lsl #2
ldr r0, [r0, #0x3c]
cmp r4, r0
ble _02314090
ldr r2, _023140D8 ; =0x00000DCF
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _023140B8
_02314090:
bge _023140A8
ldr r2, _023140DC ; =0x00000DCE
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _023140B8
_023140A8:
ldr r2, _023140E0 ; =0x00000DD2
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
_023140B8:
mov r0, r8
bl UpdateStatusIconFlags
_023140C0:
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
#ifdef JAPAN
#define APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET -0x2C0
#else
#define APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET 0
#endif
_023140CC: .word 0x00000DC9 + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140D0: .word 0x00000DC8 + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140D4: .word 0x000063FD
_023140D8: .word 0x00000DCF + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140DC: .word 0x00000DCE + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
_023140E0: .word 0x00000DD2 + APPLY_DEFENSIVE_STAT_MULTIPLIER_OFFSET
arm_func_end ApplyDefensiveStatMultiplier
arm_func_start BoostHitChanceStat
BoostHitChanceStat: ; 0x023140E4
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r4, r5, r6, r7, r8, lr}
mov r6, r1
mov r7, r0
bl AllocateTemp1024ByteBufferFromPool
mov r8, r0
mov r0, r6
mov r4, #1
bl EntityIsValid__023118B4
cmp r0, #0
beq _0231420C
mov r0, #0
mov r1, r6
mov r2, r0
ldr r5, [r6, #0xb4]
bl SubstitutePlaceholderStringTags
add r1, sp, #0x20
ldr r1, [r1]
mov r0, r6
bl ov29_022E5258
ldr r0, [sp, #0x20]
cmp r0, #0
beq _0231415C
ldr r1, _02314218 ; =0x00000DC7
mov r0, r8
bl CopyStringFromId
mov r1, r8
mov r0, r4
bl SetMessageLogPreprocessorArgsString
b _02314174
_0231415C:
ldr r1, _0231421C ; =0x00000DC6
mov r0, r8
bl CopyStringFromId
mov r1, r8
mov r0, r4
bl SetMessageLogPreprocessorArgsString
_02314174:
mov r0, r6
mov r1, #0x61
bl AbilityIsActiveVeneer
ldr r1, [sp, #0x20]
cmp r0, #0
movne r0, r4, lsl #0x11
add r2, r5, r1, lsl #1
movne r4, r0, asr #0x10
ldrsh r0, [r2, #0x2c]
mov r3, r1, lsl #1
cmp r0, #0x14
bge _023141F4
add r1, r5, #0x2c
ldrsh r0, [r1, r3]
add r0, r0, r4
strh r0, [r1, r3]
ldrsh r0, [r2, #0x2c]
cmp r0, #0x14
movgt r0, #0x14
strgth r0, [r2, #0x2c]
cmp r4, #2
blt _023141E0
ldr r2, _02314220 ; =0x00000D95
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _02314204
_023141E0:
ldr r2, _02314224 ; =0x00000D93
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _02314204
_023141F4:
ldr r2, _02314228 ; =0x00000DD5
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_02314204:
mov r0, r6
bl UpdateStatusIconFlags
_0231420C:
ldmia sp!, {r4, r5, r6, r7, r8, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
#ifdef JAPAN
#define BOOST_HIT_CHANCE_STAT_OFFSET -0x2C0
#else
#define BOOST_HIT_CHANCE_STAT_OFFSET 0
#endif
_02314218: .word 0x00000DC7 + BOOST_HIT_CHANCE_STAT_OFFSET
_0231421C: .word 0x00000DC6 + BOOST_HIT_CHANCE_STAT_OFFSET
_02314220: .word 0x00000D95 + BOOST_HIT_CHANCE_STAT_OFFSET
_02314224: .word 0x00000D93 + BOOST_HIT_CHANCE_STAT_OFFSET
_02314228: .word 0x00000DD5 + BOOST_HIT_CHANCE_STAT_OFFSET
arm_func_end BoostHitChanceStat
arm_func_start LowerHitChanceStat
LowerHitChanceStat: ; 0x0231422C
stmdb sp!, {r0, r1, r2, r3}
stmdb sp!, {r4, r5, r6, r7, r8, lr}
mov r6, r1
mov r7, r0
mov r8, r3
bl AllocateTemp1024ByteBufferFromPool
mov r5, r0
mov r0, r6
mov r4, #1
bl EntityIsValid__023118B4
cmp r0, #0
beq _023143C4
ldr r0, [sp, #0x20]
cmp r0, #0
beq _02314284
ldr r1, _023143D0 ; =0x00000DC7
mov r0, r5
bl CopyStringFromId
mov r1, r5
mov r0, r4
bl SetMessageLogPreprocessorArgsString
b _0231429C
_02314284:
ldr r1, _023143D4 ; =0x00000DC6
mov r0, r5
bl CopyStringFromId
mov r1, r5
mov r0, r4
bl SetMessageLogPreprocessorArgsString
_0231429C:
mov r0, r7
mov r1, r6
mov r2, r8
bl IsProtectedFromStatDrops
cmp r0, #0
bne _023143C4
mov r0, r7
mov r1, r6
mov r2, #0x1e
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _02314308
ldr r0, [sp, #0x20]
cmp r0, #0
bne _02314308
cmp r8, #0
beq _023143C4
mov r0, #0
mov r1, r6
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _023143D8 ; =0x00000D9F
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _023143C4
_02314308:
mov r0, r6
mov r1, #0x61
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, r4, lsl #0x11
movne r4, r0, asr #0x10
mov r0, #0
mov r1, r6
mov r2, r0
ldr r5, [r6, #0xb4]
bl SubstitutePlaceholderStringTags
add r1, sp, #0x20
ldr r1, [r1]
mov r0, r6
bl ov29_022E52F8
ldr r1, [sp, #0x20]
add r2, r5, r1, lsl #1
ldrsh r0, [r2, #0x2c]
mov r3, r1, lsl #1
cmp r0, #0
ble _023143AC
add r1, r5, #0x2c
ldrsh r0, [r1, r3]
sub r0, r0, r4
strh r0, [r1, r3]
ldrsh r0, [r2, #0x2c]
cmp r0, #0
movlt r0, #0
strlth r0, [r2, #0x2c]
cmp r4, #2
blt _02314398
ldr r2, _023143DC ; =0x00000D94
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _023143BC
_02314398:
ldr r2, _023143E0 ; =0x00000D92
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
b _023143BC
_023143AC:
ldr r2, _023143E4 ; =0x00000DD4
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_023143BC:
mov r0, r6
bl UpdateStatusIconFlags
_023143C4:
ldmia sp!, {r4, r5, r6, r7, r8, lr}
add sp, sp, #0x10
bx lr
.align 2, 0
#ifdef JAPAN
#define LOWER_HIT_CHANCE_STAT_OFFSET -0x2C0
#else
#define LOWER_HIT_CHANCE_STAT_OFFSET 0
#endif
_023143D0: .word 0x00000DC7 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143D4: .word 0x00000DC6 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143D8: .word 0x00000D9F + LOWER_HIT_CHANCE_STAT_OFFSET
_023143DC: .word 0x00000D94 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143E0: .word 0x00000D92 + LOWER_HIT_CHANCE_STAT_OFFSET
_023143E4: .word 0x00000DD4 + LOWER_HIT_CHANCE_STAT_OFFSET
arm_func_end LowerHitChanceStat
arm_func_start TryInflictCringeStatus
TryInflictCringeStatus: ; 0x023143E8
stmdb sp!, {r3, r4, r5, r6, r7, lr}
mov r6, r1
mov r7, r0
mov r5, r2
mov r4, r3
bl AllocateTemp1024ByteBufferFromPool
mov r0, r6
bl EntityIsValid__023118B4
cmp r0, #0
moveq r0, #0
ldmeqia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, r7
mov r1, r6
mov r2, r5
bl SafeguardIsActive
cmp r0, #0
movne r0, #0
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, r7
mov r1, r6
mov r2, r5
bl IsProtectedFromNegativeStatus
cmp r0, #0
movne r0, #0
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, r7
mov r1, r6
mov r2, #0x1f
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _02314498
mov r0, #0
mov r1, r6
mov r2, r0
bl SubstitutePlaceholderStringTags
cmp r5, #0
beq _02314490
ldr r2, _02314534 ; =0x00000DA2
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_02314490:
mov r0, #0
ldmia sp!, {r3, r4, r5, r6, r7, pc}
_02314498:
cmp r4, #0
movne r0, #1
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
mov r0, #0
ldr r4, [r6, #0xb4]
mov r1, r6
mov r2, r0
bl SubstitutePlaceholderStringTags
ldrb r0, [r4, #0xd0]
cmp r0, #1
beq _02314514
ldr r1, _02314538 ; =ov10_022C4884
mov r2, #1
mov r0, r6
strb r2, [r4, #0xd0]
bl CalcStatusDuration
add r1, r0, #1
mov r0, r6
strb r1, [r4, #0xd1]
bl PlayExclamationPointEffect__022E5D4C
ldr r2, _0231453C ; =0x00000D02
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, r7
mov r1, r6
bl TryActivateSteadfast
mov r0, r7
mov r1, r6
bl TryActivateQuickFeet
b _02314524
_02314514:
ldr r2, _02314540 ; =0x00000D03
mov r0, r7
mov r1, r6
bl LogMessageByIdWithPopupCheckUserTarget
_02314524:
mov r0, r6
bl UpdateStatusIconFlags
mov r0, #1
ldmia sp!, {r3, r4, r5, r6, r7, pc}
.align 2, 0
#ifdef JAPAN
#define TRY_INFLICT_CRINGE_STATUS_OFFSET -0x2C0
#else
#define TRY_INFLICT_CRINGE_STATUS_OFFSET 0
#endif
_02314534: .word 0x00000DA2 + TRY_INFLICT_CRINGE_STATUS_OFFSET
_02314538: .word ov10_022C4884
_0231453C: .word 0x00000D02 + TRY_INFLICT_CRINGE_STATUS_OFFSET
_02314540: .word 0x00000D03 + TRY_INFLICT_CRINGE_STATUS_OFFSET
arm_func_end TryInflictCringeStatus
arm_func_start TryInflictParalysisStatus
TryInflictParalysisStatus: ; 0x02314544
#ifdef JAPAN
#define TRY_INFLICT_PARALYSIS_STATUS_OFFSET -0x2C0
#else
#define TRY_INFLICT_PARALYSIS_STATUS_OFFSET 0
#endif
stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr}
sub sp, sp, #0xc
mov sb, r1
mov sl, r0
mov r0, sb
mov r8, r2
mov r4, r3
bl EntityIsValid__023118B4
cmp r0, #0
moveq r0, #0
beq _023147D0
mov r0, sl
mov r1, sb
mov r2, r8
bl SafeguardIsActive
cmp r0, #0
movne r0, #0
bne _023147D0
mov r0, sl
mov r1, sb
mov r2, r8
bl IsProtectedFromNegativeStatus
cmp r0, #0
movne r0, #0
bne _023147D0
mov r0, sl
mov r1, sb
mov r2, #0x16
#ifndef JAPAN
mov r3, #1
#endif
bl DefenderAbilityIsActive__02311B94
cmp r0, #0
beq _023145F4
mov r0, #0
mov r1, sb
mov r2, r0
bl SubstitutePlaceholderStringTags
cmp r8, #0
beq _023145EC
mov r0, sl
mov r1, sb
mov r2, #0xda0 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
bl LogMessageByIdWithPopupCheckUserTarget
_023145EC:
mov r0, #0
b _023147D0
_023145F4:
mov r0, sb
mov r1, #1
bl ExclusiveItemEffectIsActive__023147EC
cmp r0, #0
beq _02314654
cmp r8, #0
beq _0231464C
mov r0, #0
mov r1, sb
mov r2, r0
bl SubstitutePlaceholderStringTags
add r2, sp, #4
mov r0, sb
mov r1, #1
bl GetExclusiveItemWithEffectFromBag
add r1, sp, #4
mov r0, #1
bl PrepareItemForPrinting__02345728
ldr r2, _023147D8 ; =0x00000DA1
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0231464C:
mov r0, #0
b _023147D0
_02314654:
cmp r4, #0
movne r0, #1
bne _023147D0
mov r0, #0
ldr r7, [sb, #0xb4]
mov r1, sb
mov r2, r0
mov r4, #1
bl SubstitutePlaceholderStringTags
ldrb r0, [r7, #0xbf]
cmp r0, #4
beq _023146E0
ldr r1, _023147DC ; =ov10_022C4894
mov r3, #4
mov r0, sb
mov r2, r4
strb r3, [r7, #0xbf]
bl CalcStatusDuration
add r0, r0, #1
strb r0, [r7, #0xc0]
mov r4, #0
strb r4, [r7, #0xc1]
mov r0, sl
mov r1, sb
mov r2, #0xd00 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
strb r4, [r7, #0xc2]
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, sb
bl ov29_022E4240
mov r0, sb
bl CalcSpeedStageWrapper
mov r0, sl
mov r1, sb
bl TryActivateQuickFeet
b _023146F0
_023146E0:
ldr r2, _023147E0 ; =0x00000D01
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_023146F0:
mov r0, sb
mov r1, #0x19
bl AbilityIsActiveVeneer
cmp r0, #0
beq _023147C4
cmp r4, #0
bne _023147C4
mov r5, #0
ldr fp, _023147E4 ; =DIRECTIONS_XY
mov r4, r5
_02314718:
mov r1, r4, lsl #2
add r0, fp, r4, lsl #2
ldrsh r6, [sb, #4]
ldrsh r3, [fp, r1]
ldrsh r1, [r0, #2]
ldrsh r2, [sb, #6]
add r0, r6, r3
add r1, r2, r1
bl GetTile
ldr r6, [r0, #0xc]
mov r0, r6
bl EntityIsValid__023118B4
cmp r0, #0
beq _023147B8
ldr r0, [r6]
cmp r0, #1
bne _023147B8
cmp r5, #0
bne _02314790
mov r5, #1
bl GetMessageLogPreprocessorArgs
mov r1, #0
mov r2, r7
mov r3, r1
str r1, [sp]
bl SetPreprocessorArgsStringToName
ldr r2, _023147E8 ; =0x00000DC5
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_02314790:
mov r0, sb
mov r1, r6
bl ov29_023018AC
cmp r0, #1
bne _023147B8
mov r0, sl
mov r1, r6
mov r2, r8
mov r3, #0
bl TryInflictParalysisStatus
_023147B8:
add r4, r4, #1
cmp r4, #8
blt _02314718
_023147C4:
mov r0, sb
bl UpdateStatusIconFlags
mov r0, #1
_023147D0:
add sp, sp, #0xc
ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
_023147D8: .word 0x00000DA1 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
_023147DC: .word ov10_022C4894
_023147E0: .word 0x00000D01 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
_023147E4: .word DIRECTIONS_XY
_023147E8: .word 0x00000DC5 + TRY_INFLICT_PARALYSIS_STATUS_OFFSET
arm_func_end TryInflictParalysisStatus

View File

@@ -1845,51 +1845,3 @@ _02322D58: .word ov29_0235370C
_02322D5C: .word 0x00000EA9 + OV29_02322374_DATA_OFFSET
_02322D60: .word 0x000001F6
arm_func_end ov29_02322374
arm_func_start DefenderAbilityIsActive__02322D64
DefenderAbilityIsActive__02322D64: ; 0x02322D64
#ifdef JAPAN
stmdb sp!, {r4, r5, r6, lr}
mov r6, r0
mov r5, r1
mov r4, r2
cmp r6, r5
#else
stmdb sp!, {r3, r4, r5, r6, r7, lr}
mov r7, r0
mov r6, r1
mov r5, r2
mov r4, r3
cmp r7, r6
#endif
beq _02322DA8
bl IsMonster__02322DB8
cmp r0, #0
#ifdef JAPAN
beq _02322DA8
mov r0, r6
#else
cmpne r4, #0
beq _02322DA8
mov r0, r7
#endif
mov r1, #0x53
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, #0
#ifdef JAPAN
ldmneia sp!, {r4, r5, r6, pc}
_02322DA8:
mov r0, r5
mov r1, r4
bl AbilityIsActiveVeneer
ldmia sp!, {r4, r5, r6, pc}
#else
ldmneia sp!, {r3, r4, r5, r6, r7, pc}
_02322DA8:
mov r0, r6
mov r1, r5
bl AbilityIsActiveVeneer
ldmia sp!, {r3, r4, r5, r6, r7, pc}
#endif
arm_func_end DefenderAbilityIsActive__02322D64

View File

@@ -1,41 +1,8 @@
.include "asm/macros.inc"
.include "overlay_29_02332A0C.inc"
.include "overlay_29_02332A70.inc"
.text
arm_func_start DefenderAbilityIsActive__02332A0C
DefenderAbilityIsActive__02332A0C: ; 0x02332A0C
stmdb sp!, {r3, r4, r5, lr}
mov r5, r1
mov r4, r2
cmp r0, r5
beq _02332A60
cmp r0, #0
moveq r1, #0
beq _02332A40
ldr r1, [r0]
cmp r1, #1
moveq r1, #1
movne r1, #0
and r1, r1, #0xff
_02332A40:
cmp r1, #0
#ifndef JAPAN
cmpne r3, #0
#endif
beq _02332A60
mov r1, #0x53
bl AbilityIsActiveVeneer
cmp r0, #0
movne r0, #0
ldmneia sp!, {r3, r4, r5, pc}
_02332A60:
mov r0, r5
mov r1, r4
bl AbilityIsActiveVeneer
ldmia sp!, {r3, r4, r5, pc}
arm_func_end DefenderAbilityIsActive__02332A0C
arm_func_start DoMoveDamageInlined
DoMoveDamageInlined: ; 0x02332A70
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, lr}

View File

@@ -62,70 +62,3 @@ DAMAGE_FORMULA_MAX_BASE:
.global DAMAGE_FORMULA_MIN_BASE
DAMAGE_FORMULA_MIN_BASE:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00
.global WEAK_TYPE_PICKER_MATCHUP_MULTIPLIERS
WEAK_TYPE_PICKER_MATCHUP_MULTIPLIERS:
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
.global ov29_02352894
ov29_02352894:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.global TYPE_DAMAGE_NEGATING_EXCLUSIVE_ITEM_EFFECTS
TYPE_DAMAGE_NEGATING_EXCLUSIVE_ITEM_EFFECTS:
.byte 0x02, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00
.byte 0x05, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6A, 0x00, 0x00, 0x00
.byte 0x09, 0x00, 0x00, 0x00, 0x6B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00
.byte 0x0B, 0x00, 0x00, 0x00, 0x6D, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x6E, 0x00, 0x00, 0x00
.byte 0x0F, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00
.byte 0x11, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00
.byte 0x05, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00
.byte 0x07, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00
.byte 0x0A, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00
.byte 0x0C, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00
.byte 0x0E, 0x00, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00
.byte 0x10, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00
.byte 0x12, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00
.global ov29_02352984
ov29_02352984:
.byte 0x46, 0x4C, 0x56, 0x20, 0x3A, 0x20, 0x25, 0x64
.byte 0x0A, 0x00, 0x00, 0x00
.global ov29_02352990
ov29_02352990:
.byte 0x41, 0x54, 0x20, 0x3A, 0x20, 0x25, 0x64, 0x0A, 0x00, 0x00, 0x00, 0x00
.global ov29_0235299C
ov29_0235299C:
.byte 0x44, 0x45, 0x46, 0x20, 0x3A, 0x20, 0x25, 0x64, 0x0A, 0x00, 0x00, 0x00
.global ov29_023529A8
ov29_023529A8:
.byte 0x0D, 0x00, 0x00, 0x00
.global ov29_023529AC
ov29_023529AC:
.byte 0x00, 0x00, 0x00, 0x00
.global ov29_023529B0
ov29_023529B0:
.byte 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00
.global ov29_023529B8
ov29_023529B8:
.word ov29_023529C4
.word ov29_023529C4
.word ov29_023529EC
.global ov29_023529C4
ov29_023529C4:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00
.byte 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF
.byte 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x01, 0x00, 0x63, 0x00, 0x63, 0x00
.global ov29_023529EC
ov29_023529EC:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00
.byte 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00
.byte 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0x02, 0x00, 0xFE, 0xFF
.byte 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF
.byte 0xFE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x02, 0x00
.byte 0xFF, 0xFF, 0x02, 0x00, 0x63, 0x00, 0x63, 0x00
.global ov29_02352A54
ov29_02352A54:
.byte 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF
.byte 0xFF, 0xFF, 0xFF, 0xFF

View File

@@ -0,0 +1,67 @@
.include "asm/macros.inc"
.include "overlay_29_rodata_02352894.inc"
.rodata
.global ov29_02352894
ov29_02352894:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
.global TYPE_DAMAGE_NEGATING_EXCLUSIVE_ITEM_EFFECTS
TYPE_DAMAGE_NEGATING_EXCLUSIVE_ITEM_EFFECTS:
.byte 0x02, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00
.byte 0x05, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6A, 0x00, 0x00, 0x00
.byte 0x09, 0x00, 0x00, 0x00, 0x6B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00
.byte 0x0B, 0x00, 0x00, 0x00, 0x6D, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x6E, 0x00, 0x00, 0x00
.byte 0x0F, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00
.byte 0x11, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00
.byte 0x05, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00
.byte 0x07, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00
.byte 0x0A, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00
.byte 0x0C, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00
.byte 0x0E, 0x00, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00
.byte 0x10, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00
.byte 0x12, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00
.global ov29_02352984
ov29_02352984:
.byte 0x46, 0x4C, 0x56, 0x20, 0x3A, 0x20, 0x25, 0x64
.byte 0x0A, 0x00, 0x00, 0x00
.global ov29_02352990
ov29_02352990:
.byte 0x41, 0x54, 0x20, 0x3A, 0x20, 0x25, 0x64, 0x0A, 0x00, 0x00, 0x00, 0x00
.global ov29_0235299C
ov29_0235299C:
.byte 0x44, 0x45, 0x46, 0x20, 0x3A, 0x20, 0x25, 0x64, 0x0A, 0x00, 0x00, 0x00
.global ov29_023529A8
ov29_023529A8:
.byte 0x0D, 0x00, 0x00, 0x00
.global ov29_023529AC
ov29_023529AC:
.byte 0x00, 0x00, 0x00, 0x00
.global ov29_023529B0
ov29_023529B0:
.byte 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, 0x00
.global ov29_023529B8
ov29_023529B8:
.word ov29_023529C4
.word ov29_023529C4
.word ov29_023529EC
.global ov29_023529C4
ov29_023529C4:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00
.byte 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF
.byte 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x01, 0x00, 0x63, 0x00, 0x63, 0x00
.global ov29_023529EC
ov29_023529EC:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00
.byte 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00
.byte 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0xFF, 0xFF, 0x02, 0x00, 0xFE, 0xFF
.byte 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF
.byte 0xFE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x02, 0x00
.byte 0xFF, 0xFF, 0x02, 0x00, 0x63, 0x00, 0x63, 0x00
.global ov29_02352A54
ov29_02352A54:
.byte 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF
.byte 0xFF, 0xFF, 0xFF, 0xFF

8
include/dungeon_damage.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef PMDSKY_DUNGEON_DAMAGE_H
#define PMDSKY_DUNGEON_DAMAGE_H
#include "dungeon_mode.h"
s32 WeightWeakTypePicker(struct entity *user, struct entity *target, enum type_id move_type);
#endif //PMDSKY_DUNGEON_DAMAGE_H

View File

@@ -1164,6 +1164,8 @@ enum type_id {
TYPE_NEUTRAL = 18,
};
#define NUM_TYPES TYPE_NEUTRAL
// Modes related to shopkeeper behavior
enum shopkeeper_mode {
SHOPKEEPER_MODE_NORMAL = 0,

View File

@@ -0,0 +1,16 @@
#ifndef PMDSKY_MOVE_ORB_EFFECTS_H
#define PMDSKY_MOVE_ORB_EFFECTS_H
#include "dungeon_mode.h"
enum flash_fire_status {
FLASH_FIRE_STATUS_NONE = 0,
FLASH_FIRE_STATUS_MAXED = 1,
FLASH_FIRE_STATUS_NOT_MAXED = 2
};
// Checks whether Flash Fire should activate, assuming the defender is being hit by a Fire-type move.
// This checks that the defender is valid and Flash Fire is active, and that Normalize isn't active on the attacker.
enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender);
#endif //PMDSKY_MOVE_ORB_EFFECTS_H

View File

@@ -3,6 +3,12 @@
#include "dungeon_mode.h"
// Checks if a defender has an active ability that isn't disabled by an attacker's Mold Breaker.
#ifdef JAPAN
bool8 DefenderAbilityIsActive__022F96CC(struct entity *attacker, struct entity *defender, enum ability_id ability_id);
#else
bool8 DefenderAbilityIsActive__022F96CC(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled);
#endif
// Checks if an entity is a monster (entity type 1).
bool8 IsMonster__022F9720(struct entity *entity);

View File

@@ -3,6 +3,12 @@
#include "dungeon_mode.h"
// Checks if a defender has an active ability that isn't disabled by an attacker's Mold Breaker.
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02301A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id);
#else
bool8 DefenderAbilityIsActive__02301A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled);
#endif
// Checks if an entity is a monster (entity type 1).
bool8 IsMonster__02301A60(struct entity *entity);

View File

@@ -3,6 +3,12 @@
#include "dungeon_mode.h"
// Checks if a defender has an active ability that isn't disabled by an attacker's Mold Breaker.
#ifdef JAPAN
bool8 DefenderAbilityIsActive__0230A940(struct entity *attacker, struct entity *defender, enum ability_id ability_id);
#else
bool8 DefenderAbilityIsActive__0230A940(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled);
#endif
// Checks if an entity is a monster (entity type 1).
bool8 IsMonster__0230A994(struct entity *entity);
// Checks if a monster is a team member under the effects of a certain exclusive item effect.

View File

@@ -3,6 +3,12 @@
#include "dungeon_mode.h"
// Checks if a defender has an active ability that isn't disabled by an attacker's Mold Breaker.
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02311B94(struct entity *attacker, struct entity *defender, enum ability_id ability_id);
#else
bool8 DefenderAbilityIsActive__02311B94(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled);
#endif
// Checks if a monster is holding a certain item that isn't disabled by Klutz.
bool8 ItemIsActive__02311BF8(struct entity *entity, enum item_id item_id);

View File

@@ -3,6 +3,12 @@
#include "dungeon_mode.h"
// Checks if a defender has an active ability that isn't disabled by an attacker's Mold Breaker.
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02322D64(struct entity *attacker, struct entity *defender, enum ability_id ability_id);
#else
bool8 DefenderAbilityIsActive__02322D64(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled);
#endif
// Checks if an entity is a monster (entity type 1).
bool8 IsMonster__02322DB8(struct entity *entity);

View File

@@ -5,5 +5,11 @@
// Checks if a monster is a team member under the effects of a certain exclusive item effect.
bool8 ExclusiveItemEffectIsActive__023329E8(struct entity *entity, enum exclusive_item_effect_id effect_id);
// Checks if a defender has an active ability that isn't disabled by an attacker's Mold Breaker.
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02332A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id);
#else
bool8 DefenderAbilityIsActive__02332A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled);
#endif
#endif //PMDSKY_OVERLAY_29_023329E8_H

View File

@@ -0,0 +1,19 @@
#ifndef PMDSKY_TYPE_EFFECTIVENESS_H
#define PMDSKY_TYPE_EFFECTIVENESS_H
#include "dungeon_mode.h"
// Type matchup table, not including TYPE_NEUTRAL.
// Note that Ghost's immunities seem to be hard-coded elsewhere. In this table, both Normal and
// Fighting are encoded as neutral against Ghost.
//
// Row index corresponds to the attack type and the column index corresponds to the defender type.
// C-style access: type_matchup_table[attack_type][target_type] or
// *(&type_matchup_table[0][0] + attack_type*18 + target_type)
struct type_matchup_table {
s16 matchups[NUM_TYPES][NUM_TYPES];
};
s16 GetTypeMatchup(struct entity *attacker, struct entity *defender, s16 target_type_idx, enum type_id attack_type);
#endif //PMDSKY_TYPE_EFFECTIVENESS_H

View File

@@ -474,6 +474,11 @@ Overlay OVY_29
Object src/overlay_29_0230A994.o
Object src/overlay_29_0230A9DC.o
Object asm/overlay_29_0230AA0C.o
Object src/type_effectiveness.o
Object asm/overlay_29_0230AD04.o
Object src/dungeon_damage.o
Object asm/overlay_29_rodata_02352894.o
Object asm/overlay_29_0230BBAC.o
Object src/overlay_29_0230E578.o
Object asm/overlay_29_0230E5A8.o
Object src/dungeon_ai_items.o
@@ -493,6 +498,8 @@ Overlay OVY_29
Object asm/overlay_29_023118D8.o
Object src/overlay_29_02311BF8.o
Object asm/overlay_29_02311C28.o
Object src/move_orb_effects.o
Object asm/overlay_29_02313CE4.o
Object src/overlay_29_023147EC.o
Object asm/overlay_29_02314810.o
Object src/overlay_29_02315118.o
@@ -562,7 +569,7 @@ Overlay OVY_29
Object src/overlay_29_0232E840.o
Object asm/overlay_29_0232E864.o
Object src/overlay_29_023329E8.o
Object asm/overlay_29_02332A0C.o
Object asm/overlay_29_02332A70.o
Object src/move_checks.o
Object src/weather.o
Object asm/overlay_29_02334D58.o

View File

@@ -4,6 +4,7 @@
#include "dungeon_ai_targeting_1.h"
#include "dungeon_capabilities.h"
#include "dungeon_capabilities_4.h"
#include "dungeon_damage.h"
#include "dungeon_items.h"
#include "dungeon_logic.h"
#include "dungeon_logic_4.h"
@@ -29,8 +30,6 @@ extern u8 AI_POTENTIAL_ATTACK_TARGET_DIRECTIONS[NUM_DIRECTIONS];
extern s32 AI_POTENTIAL_ATTACK_TARGET_WEIGHTS[NUM_DIRECTIONS];
extern struct entity *AI_POTENTIAL_ATTACK_TARGETS[NUM_DIRECTIONS];
extern s32 WeightWeakTypePicker(struct entity *user, struct entity *target, enum type_id move_type);
void ResetAiCanAttackInDirection()
{
for (s32 i = 0; i < NUM_DIRECTIONS; i++)

144
src/dungeon_damage.c Normal file
View File

@@ -0,0 +1,144 @@
#include "dungeon_damage.h"
#include "dungeon_logic_3.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util_static.h"
#include "move_orb_effects.h"
#include "overlay_29_02308FBC.h"
#include "overlay_29_0230A994.h"
#include "overlay_29_02318A4C.h"
#include "weather.h"
#define NUM_EFFECTIVENESS 4
extern enum type_matchup GetTypeMatchup(struct entity *attacker, struct entity *defender, s16 target_type_idx, enum type_id attack_type);
extern bool8 LevitateIsActive(struct entity* entity);
extern bool8 ScrappyShouldActivate(struct entity *attacker, struct entity *defender, enum type_id attack_type);
// https://decomp.me/scratch/j2xpy
// https://decomp.me/scratch/fk1Fo
s32 WeightWeakTypePicker(struct entity *user, struct entity *target, enum type_id move_type)
{
s32 weight = 1;
bool8 check_exposed = FALSE;
s32 i;
if (!EntityIsValid__02308FBC(target))
return 1;
struct monster *user_data = GetEntInfo(user);
struct monster *target_data = GetEntInfo(target);
if (AbilityIsActiveVeneer(user, ABILITY_NORMALIZE))
move_type = TYPE_NORMAL;
if (move_type == TYPE_NORMAL || move_type == TYPE_FIGHTING)
check_exposed = TRUE;
if (move_type == TYPE_FIRE && FlashFireShouldActivate(user, target) != FLASH_FIRE_STATUS_NONE)
return 0;
#ifdef JAPAN
if (move_type == TYPE_ELECTRIC && DefenderAbilityIsActive__0230A940(user, target, ABILITY_VOLT_ABSORB))
#else
if (move_type == TYPE_ELECTRIC && DefenderAbilityIsActive__0230A940(user, target, ABILITY_VOLT_ABSORB, TRUE))
#endif
return 0;
#ifdef JAPAN
if (move_type == TYPE_WATER && DefenderAbilityIsActive__0230A940(user, target, ABILITY_WATER_ABSORB))
#else
if (move_type == TYPE_WATER && DefenderAbilityIsActive__0230A940(user, target, ABILITY_WATER_ABSORB, TRUE))
#endif
return 0;
if (move_type == TYPE_GROUND &&
((!AbilityIsActiveVeneer(user, ABILITY_MOLD_BREAKER) && LevitateIsActive(target)) || IsFloating(target)))
return 1;
bool8 scrappy_active = ScrappyShouldActivate(user, target, move_type);
for (i = 0; i < 2; i++)
{
s32 effectiveness;
u32 type_effectiveness_multipliers[NUM_EFFECTIVENESS] = {0, 1, 2, 4};
if (!scrappy_active && check_exposed && target_data->types[i] == TYPE_GHOST && !target_data->exposed)
{
effectiveness = 0;
DUNGEON_PTR[0]->last_damage_calc.ghost_immunity_activated = TRUE;
}
else
effectiveness = GetTypeMatchup(user, target, i, move_type);
if (weight == 0)
break;
weight *= type_effectiveness_multipliers[effectiveness];
weight /= 2;
if (weight == 0)
// BUG: If the Pokémon's first type resists the move, the second type is ignored.
// This calculates type effectiveness incorrectly if the first type resists the move and the second type is weak to the move.
// For example, a Fire-type move is considered not very effective against a Rock/Bug-type like Anorith.
return 2;
}
#ifdef JAPAN
if ((move_type == TYPE_FIRE || move_type == TYPE_ICE) && DefenderAbilityIsActive__0230A940(user, target, ABILITY_THICK_FAT))
#else
if ((move_type == TYPE_FIRE || move_type == TYPE_ICE) && DefenderAbilityIsActive__0230A940(user, target, ABILITY_THICK_FAT, TRUE))
#endif
return 2;
if (move_type == TYPE_WATER && AbilityIsActiveVeneer(user, ABILITY_TORRENT))
{
s32 max_hp_stat = MIN(user_data->max_hp_stat + user_data->max_hp_boost, 999);
if (max_hp_stat / 4 >= user_data->hp)
weight *= 2;
}
if (move_type == TYPE_GRASS && AbilityIsActiveVeneer(user, ABILITY_OVERGROW))
{
s32 max_hp_stat = MIN(user_data->max_hp_stat + user_data->max_hp_boost, 999);
if (max_hp_stat / 4 >= user_data->hp)
weight *= 2;
}
if (move_type == TYPE_BUG && AbilityIsActiveVeneer(user, ABILITY_SWARM))
{
s32 max_hp_stat = MIN(user_data->max_hp_stat + user_data->max_hp_boost, 999);
if (max_hp_stat / 4 >= user_data->hp)
weight *= 2;
}
if (move_type == TYPE_FIRE && AbilityIsActiveVeneer(user, ABILITY_BLAZE))
{
s32 max_hp_stat = MIN(user_data->max_hp_stat + user_data->max_hp_boost, 999);
if (max_hp_stat / 4 >= user_data->hp)
weight *= 2;
}
if (weight == 0)
return 2;
if (MonsterIsType(user, move_type))
weight *= 2;
if (GetApparentWeather(user) == WEATHER_SUNNY)
{
if (move_type == TYPE_FIRE)
weight *= 2;
else if (move_type == TYPE_WATER)
return 2;
}
if (DUNGEON_PTR[0]->weather.mud_sport_turns != 0 && move_type == TYPE_ELECTRIC)
return 2;
if (DUNGEON_PTR[0]->weather.water_sport_turns != 0 && move_type == TYPE_FIRE)
return 2;
if (move_type == TYPE_ELECTRIC && user_data->bide_class_status.bide == STATUS_TWO_TURN_CHARGING)
weight *= 2;
if (weight >= 3)
weight = 3;
return weight + 2;
}

26
src/move_orb_effects.c Normal file
View File

@@ -0,0 +1,26 @@
#include "move_orb_effects.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util_static.h"
#include "overlay_29_023118B4.h"
#include "overlay_29_02311BF8.h"
enum flash_fire_status FlashFireShouldActivate(struct entity *attacker, struct entity *defender)
{
if (!EntityIsValid__023118B4(defender))
return FLASH_FIRE_STATUS_NONE;
if (AbilityIsActiveVeneer(attacker, ABILITY_NORMALIZE))
return FLASH_FIRE_STATUS_NONE;
#ifdef JAPAN
if (!DefenderAbilityIsActive__02311B94(attacker, defender, ABILITY_FLASH_FIRE))
#else
if (!DefenderAbilityIsActive__02311B94(attacker, defender, ABILITY_FLASH_FIRE, TRUE))
#endif
return FLASH_FIRE_STATUS_NONE;
if (GetEntInfo(defender)->stat_modifiers.flash_fire_boost >= 2)
return FLASH_FIRE_STATUS_MAXED;
return FLASH_FIRE_STATUS_NOT_MAXED;
}

View File

@@ -1,6 +1,24 @@
#include "overlay_29_022F9720.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util_static.h"
#ifdef JAPAN
bool8 DefenderAbilityIsActive__022F96CC(struct entity *attacker, struct entity *defender, enum ability_id ability_id)
#else
bool8 DefenderAbilityIsActive__022F96CC(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled)
#endif
{
if (attacker != defender &&
IsMonster__022F9720(attacker) &&
#ifndef JAPAN
attacker_ability_enabled &&
#endif
AbilityIsActiveVeneer(attacker, ABILITY_MOLD_BREAKER))
return FALSE;
return AbilityIsActiveVeneer(defender, ability_id);
}
bool8 IsMonster__022F9720(struct entity *entity)
{
if (entity == NULL)

View File

@@ -1,5 +1,23 @@
#include "overlay_29_02301A60.h"
#include "dungeon_util_static.h"
#include "dungeon_pokemon_attributes.h"
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02301A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id)
#else
bool8 DefenderAbilityIsActive__02301A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled)
#endif
{
if (attacker != defender &&
IsMonster__02301A60(attacker) &&
#ifndef JAPAN
attacker_ability_enabled &&
#endif
AbilityIsActive(attacker, ABILITY_MOLD_BREAKER))
return FALSE;
return AbilityIsActive(defender, ability_id);
}
bool8 IsMonster__02301A60(struct entity *entity)
{

View File

@@ -1,7 +1,25 @@
#include "overlay_29_0230A994.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util_static.h"
#include "exclusive_item.h"
#ifdef JAPAN
bool8 DefenderAbilityIsActive__0230A940(struct entity *attacker, struct entity *defender, enum ability_id ability_id)
#else
bool8 DefenderAbilityIsActive__0230A940(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled)
#endif
{
if (attacker != defender &&
IsMonster__0230A994(attacker) &&
#ifndef JAPAN
attacker_ability_enabled &&
#endif
AbilityIsActiveVeneer(attacker, ABILITY_MOLD_BREAKER))
return FALSE;
return AbilityIsActiveVeneer(defender, ability_id);
}
bool8 IsMonster__0230A994(struct entity *entity)
{
if (entity == NULL)

View File

@@ -1,6 +1,31 @@
#include "overlay_29_02311BF8.h"
#include "dungeon_items.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util_static.h"
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02311B94(struct entity *attacker, struct entity *defender, enum ability_id ability_id)
#else
bool8 DefenderAbilityIsActive__02311B94(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled)
#endif
{
if (attacker != defender)
{
bool8 is_monster;
if (attacker == NULL)
is_monster = FALSE;
else
is_monster = GetEntityType(attacker) == ENTITY_MONSTER;
if (is_monster &&
#ifndef JAPAN
attacker_ability_enabled &&
#endif
AbilityIsActiveVeneer(attacker, ABILITY_MOLD_BREAKER))
return FALSE;
}
return AbilityIsActiveVeneer(defender, ability_id);
}
bool8 ItemIsActive__02311BF8(struct entity *entity, enum item_id item_id)
{

View File

@@ -1,6 +1,24 @@
#include "overlay_29_02322DB8.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util_static.h"
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02322D64(struct entity *attacker, struct entity *defender, enum ability_id ability_id)
#else
bool8 DefenderAbilityIsActive__02322D64(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled)
#endif
{
if (attacker != defender &&
IsMonster__02322DB8(attacker) &&
#ifndef JAPAN
attacker_ability_enabled &&
#endif
AbilityIsActiveVeneer(attacker, ABILITY_MOLD_BREAKER))
return FALSE;
return AbilityIsActiveVeneer(defender, ability_id);
}
bool8 IsMonster__02322DB8(struct entity *entity)
{
if (entity == NULL)

View File

@@ -1,4 +1,5 @@
#include "overlay_29_023329E8.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_util_static.h"
#include "exclusive_item.h"
@@ -10,3 +11,27 @@ bool8 ExclusiveItemEffectIsActive__023329E8(struct entity *entity, enum exclusiv
return FALSE;
}
#ifdef JAPAN
bool8 DefenderAbilityIsActive__02332A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id)
#else
bool8 DefenderAbilityIsActive__02332A0C(struct entity *attacker, struct entity *defender, enum ability_id ability_id, bool8 attacker_ability_enabled)
#endif
{
if (attacker != defender)
{
bool8 is_monster;
if (attacker == NULL)
is_monster = FALSE;
else
is_monster = GetEntityType(attacker) == ENTITY_MONSTER;
if (is_monster &&
#ifndef JAPAN
attacker_ability_enabled &&
#endif
AbilityIsActiveVeneer(attacker, ABILITY_MOLD_BREAKER))
return FALSE;
}
return AbilityIsActiveVeneer(defender, ability_id);
}

27
src/type_effectiveness.c Normal file
View File

@@ -0,0 +1,27 @@
#include "type_effectiveness.h"
#include "dungeon_util_static.h"
#include "overlay_29_0230A994.h"
#include "overlay_29_02318A4C.h"
#include "overlay_29_02338390.h"
extern struct type_matchup_table TYPE_MATCHUP_TABLE;
s16 GetTypeMatchup(struct entity *attacker, struct entity *defender, s16 target_type_idx, enum type_id attack_type)
{
struct monster *defender_monster = GetEntInfo(defender);
if ((defender_monster->miracle_eye == 1 || ExclusiveItemEffectIsActive__0230A9B8(attacker, EXCLUSIVE_EFF_MIRACLE_EYE)) && attack_type == TYPE_PSYCHIC && defender_monster->types[target_type_idx] == TYPE_DARK)
return MATCHUP_NEUTRAL;
if (attack_type == TYPE_GROUND)
{
if (GravityIsActive())
{
if (defender_monster->types[target_type_idx] == TYPE_FLYING)
return MATCHUP_NEUTRAL;
}
else if (IsFloating(defender))
return MATCHUP_IMMUNE;
}
return TYPE_MATCHUP_TABLE.matchups[attack_type][defender_monster->types[target_type_idx]];
}