mirror of
https://github.com/pret/pmd-sky.git
synced 2026-10-01 06:37:50 -05:00
Merge pull request #144 from AnonymousRandomPerson/main
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
Decomped more AI functions
This commit is contained in:
@@ -2,118 +2,35 @@
|
||||
.public AreItemsEquivalent
|
||||
.public BAG_ITEMS_PTR_MIRROR
|
||||
.public BulkItemToItem
|
||||
.public CALCIUM_STAT_BOOST
|
||||
.public CopyBitsFrom
|
||||
.public CopyBitsTo
|
||||
.public DUNGEON_MOVE_TABLES
|
||||
.public Debug_Print0
|
||||
.public EXCLUSIVE_ITEM_ATTACK_BOOSTS
|
||||
.public EXCLUSIVE_ITEM_DEFENSE_BOOSTS
|
||||
.public EXCLUSIVE_ITEM_EFFECT_DATA
|
||||
.public EXCLUSIVE_ITEM_SPECIAL_ATTACK_BOOSTS
|
||||
.public EXCLUSIVE_ITEM_SPECIAL_DEFENSE_BOOSTS
|
||||
.public EXCLUSIVE_ITEM_STAT_BOOST_DATA_INDEXES
|
||||
.public FemaleToMaleForm
|
||||
.public GINSENG_CHANCE_3
|
||||
.public GUMMI_STAT_BOOST
|
||||
.public GetBagCapacity
|
||||
.public GetBagCapacitySpecialEpisode
|
||||
.public GetBaseFormCastformDeoxysCherrim
|
||||
.public GetDungeonResultString
|
||||
.public GetExclusiveItem
|
||||
.public GetExclusiveItemParameter
|
||||
.public GetExclusiveItemType
|
||||
.public GetExecuteSpecialEpisodeType
|
||||
.public GetFamilyIndex
|
||||
.public GetItemCategory
|
||||
.public GetItemCategoryVeneer
|
||||
.public GetItemIdFromList
|
||||
.public GetMaxPp
|
||||
.public GetMoveBasePowerGround
|
||||
.public GetMoveMaxGinsengBoostGround
|
||||
.public GetPartyMembers
|
||||
.public GetPerformanceFlagWithChecks
|
||||
.public GetRank
|
||||
.public GetRankStorageSize
|
||||
.public GetScenarioBalance
|
||||
.public GetTeamMember
|
||||
.public GetType
|
||||
.public HasMonsterBeenAttackedInDungeons
|
||||
.public IQ_GUMMI_GAIN_TABLE
|
||||
.public IRON_STAT_BOOST
|
||||
.public InitBulkItem
|
||||
.public Is2TurnsMove
|
||||
.public IsGummi
|
||||
.public IsItemInTimeDarkness
|
||||
.public IsItemValidVeneer
|
||||
.public IsMonsterValid
|
||||
.public IsStorableItem
|
||||
.public IsThrownItem
|
||||
.public IsTicketItem
|
||||
.public IsTreasureBox
|
||||
.public ItemZInit
|
||||
.public KECLEON_SHOP_ITEM_TABLE_LISTS_1
|
||||
.public KECLEON_SHOP_ITEM_TABLE_LISTS_2
|
||||
.public LIFE_SEED_HP_BOOST
|
||||
.public LoadFileFromRom
|
||||
.public LoadScriptVariableValue
|
||||
.public MemAlloc
|
||||
.public MemFree
|
||||
.public MemZero
|
||||
.public OpenWaza
|
||||
.public PROTEIN_STAT_BOOST
|
||||
.public RECYCLE_SHOP_ITEM_LIST
|
||||
.public Rand16Bit
|
||||
.public RandInt
|
||||
.public RandIntSafe
|
||||
.public RandRange
|
||||
.public RemoveEmptyItems
|
||||
.public SITRUS_BERRY_FULL_HP_BOOST
|
||||
.public SaveScriptVariableValue
|
||||
.public SelectWaza
|
||||
.public SetItemAcquired
|
||||
.public SetNbRecycled
|
||||
.public SortItemList
|
||||
.public StringFromId
|
||||
.public TYPE_SPECIFIC_EXCLUSIVE_ITEMS
|
||||
.public UnloadFile
|
||||
.public WONDER_GUMMI_IQ_GAIN
|
||||
.public WONDER_GUMMI_STAT_BOOST
|
||||
.public ZINC_STAT_BOOST
|
||||
.public ZInit8
|
||||
.public _0209889C
|
||||
.public _020988A4
|
||||
.public _020988A8
|
||||
.public _020988D0
|
||||
.public _020988D4
|
||||
.public _020988D8
|
||||
.public _02098CB4
|
||||
.public _02098CCC
|
||||
.public _02098D24
|
||||
.public _02098D48
|
||||
.public _02098D68
|
||||
.public _02098DE4
|
||||
.public _02098DF4
|
||||
.public _02098E04
|
||||
.public _02098E0C
|
||||
.public _02098E14
|
||||
.public _02098E58
|
||||
.public _02098E9C
|
||||
.public _020A1878
|
||||
.public _020AF6D0
|
||||
.public _020AF6D4
|
||||
.public _020AF700
|
||||
.public _022A4BD8
|
||||
.public _s32_div_f
|
||||
.public sub_0200D1F0
|
||||
.public sub_0200D8AC
|
||||
.public sub_0200EB90
|
||||
.public sub_02050974
|
||||
.public sub_02050990
|
||||
.public sub_020509BC
|
||||
.public sub_02054FB8
|
||||
.public sub_02054FEC
|
||||
.public sub_02055020
|
||||
.public sub_02055054
|
||||
.public sub_020582E0
|
||||
.public vsprintf
|
||||
|
||||
111
asm/include/main_02010FC4.inc
Normal file
111
asm/include/main_02010FC4.inc
Normal file
@@ -0,0 +1,111 @@
|
||||
#pragma once
|
||||
.public ApplyExclusiveItemStatBoosts
|
||||
.public BAG_ITEMS_PTR_MIRROR
|
||||
.public CALCIUM_STAT_BOOST
|
||||
.public ConvertStorageItemAtIdxToBulkItem
|
||||
.public CopyBitsFrom
|
||||
.public CopyBitsTo
|
||||
.public CountNbItemsOfTypeInBag
|
||||
.public CountNbItemsOfTypeInStorage
|
||||
.public CountNbOfItemsInStorage
|
||||
.public DUNGEON_MOVE_TABLES
|
||||
.public Debug_Print0
|
||||
.public EXCLUSIVE_ITEM_EFFECT_DATA
|
||||
.public ExclusiveItemEffectFlagTest
|
||||
.public FemaleToMaleForm
|
||||
.public GINSENG_CHANCE_3
|
||||
.public GUMMI_STAT_BOOST
|
||||
.public GetBaseFormCastformDeoxysCherrim
|
||||
.public GetCurrentBagCapacity
|
||||
.public GetDungeonResultString
|
||||
.public GetEquivBulkItemIdxInStorage
|
||||
.public GetExclusiveItem
|
||||
.public GetExclusiveItemOffset
|
||||
.public GetExclusiveItemParameter
|
||||
.public GetExclusiveItemType
|
||||
.public GetFamilyIndex
|
||||
.public GetFirstUnequippedItemOfType
|
||||
.public GetItemAtIdx
|
||||
.public GetItemCategory
|
||||
.public GetItemCategoryVeneer
|
||||
.public GetMaxPp
|
||||
.public GetMoveBasePowerGround
|
||||
.public GetMoveMaxGinsengBoostGround
|
||||
.public GetNbItemsInBag
|
||||
.public GetPartyMembers
|
||||
.public GetRank
|
||||
.public GetScenarioBalance
|
||||
.public GetTeamMember
|
||||
.public GetType
|
||||
.public HasMonsterBeenAttackedInDungeons
|
||||
.public IQ_GUMMI_GAIN_TABLE
|
||||
.public IRON_STAT_BOOST
|
||||
.public InitBulkItem
|
||||
.public Is2TurnsMove
|
||||
.public IsGummi
|
||||
.public IsMonsterValid
|
||||
.public IsTicketItem
|
||||
.public LIFE_SEED_HP_BOOST
|
||||
.public LoadFileFromRom
|
||||
.public LoadScriptVariableValue
|
||||
.public MemAlloc
|
||||
.public MemFree
|
||||
.public MemZero
|
||||
.public OpenWaza
|
||||
.public PROTEIN_STAT_BOOST
|
||||
.public RECYCLE_SHOP_ITEM_LIST
|
||||
.public Rand16Bit
|
||||
.public RandInt
|
||||
.public RandIntSafe
|
||||
.public RandRange
|
||||
.public RemoveEmptyItemsInBag
|
||||
.public RemoveItem
|
||||
.public RemoveItemAtIdxInStorage
|
||||
.public SITRUS_BERRY_FULL_HP_BOOST
|
||||
.public SaveScriptVariableValue
|
||||
.public SelectWaza
|
||||
.public SetExclusiveItemEffect
|
||||
.public SetNbRecycled
|
||||
.public StringFromId
|
||||
.public TYPE_SPECIFIC_EXCLUSIVE_ITEMS
|
||||
.public UnloadFile
|
||||
.public WONDER_GUMMI_IQ_GAIN
|
||||
.public WONDER_GUMMI_STAT_BOOST
|
||||
.public ZINC_STAT_BOOST
|
||||
.public ZInit8
|
||||
.public _0209889C
|
||||
.public _020988A4
|
||||
.public _020988A8
|
||||
.public _020988D0
|
||||
.public _020988D4
|
||||
.public _020988D8
|
||||
.public _02098CB4
|
||||
.public _02098CCC
|
||||
.public _02098D24
|
||||
.public _02098D48
|
||||
.public _02098D68
|
||||
.public _02098DE4
|
||||
.public _02098DF4
|
||||
.public _02098E04
|
||||
.public _02098E0C
|
||||
.public _02098E14
|
||||
.public _02098E58
|
||||
.public _02098E9C
|
||||
.public _020A1878
|
||||
.public _020AF6D0
|
||||
.public _020AF6D4
|
||||
.public _020AF700
|
||||
.public _022A4BD8
|
||||
.public _s32_div_f
|
||||
.public sub_0200D1F0
|
||||
.public sub_0200EB90
|
||||
.public sub_02010044
|
||||
.public sub_0201007C
|
||||
.public sub_02050974
|
||||
.public sub_02050990
|
||||
.public sub_020509BC
|
||||
.public sub_02054FB8
|
||||
.public sub_02054FEC
|
||||
.public sub_02055020
|
||||
.public sub_02055054
|
||||
.public vsprintf
|
||||
@@ -1,3 +1,2 @@
|
||||
#pragma once
|
||||
.public DUNGEON_MOVE_TABLES
|
||||
.public _s32_div_f
|
||||
|
||||
3
asm/include/main_02013B70.inc
Normal file
3
asm/include/main_02013B70.inc
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
.public DUNGEON_MOVE_TABLES
|
||||
.public _s32_div_f
|
||||
@@ -68,7 +68,7 @@
|
||||
.public ov29_022FB718
|
||||
.public ov29_02307BDC
|
||||
.public ov29_02322374
|
||||
.public ov29_02337E2C
|
||||
.public IsTileGround
|
||||
.public ov29_02344B9C
|
||||
.public ov29_023460DC
|
||||
.public ov29_02347184
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
.public GetMoveTypeForMonster
|
||||
.public GetTile
|
||||
.public IqSkillIsEnabled
|
||||
.public IsAffectedByTaunt
|
||||
.public IsUsableWhileTaunted
|
||||
.public IsAiTargetEligible
|
||||
.public IsBlinded
|
||||
.public IsTargetInRange
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
.public GetNaturePowerVariant
|
||||
.public GetSpriteIndex__02052708
|
||||
.public Is2TurnsMove
|
||||
.public IsAffectedByTaunt
|
||||
.public IsUsableWhileTaunted
|
||||
.public IsCopyingMove
|
||||
.public IsFloorOver
|
||||
.public LogMessageByIdWithPopupCheckUser
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
.public ov29_02318D58
|
||||
.public ov29_02318D98
|
||||
.public ov29_02332F18
|
||||
.public ov29_02337E2C
|
||||
.public IsTileGround
|
||||
.public ov29_0234B034
|
||||
.public ov29_0234BA54
|
||||
.public ov29_02352AD8
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
.public ov29_02318BBC
|
||||
.public ov29_02318D58
|
||||
.public ov29_0232A834
|
||||
.public ov29_02337E2C
|
||||
.public IsTileGround
|
||||
.public ov29_0234B034
|
||||
.public ov29_0234B084
|
||||
.public ov29_0234C738
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
.public abs
|
||||
.public ov10_022C6322
|
||||
.public ov29_022E576C
|
||||
.public ov29_022EDC30
|
||||
.public CanLayTrap
|
||||
.public ov29_0230040C
|
||||
.public ov29_023007DC
|
||||
.public ov29_02304A48
|
||||
.public ov29_0230D088
|
||||
.public ov29_02337E2C
|
||||
.public IsTileGround
|
||||
.public ov29_0234B034
|
||||
|
||||
3160
asm/main_0200ED1C.s
3160
asm/main_0200ED1C.s
File diff suppressed because it is too large
Load Diff
3152
asm/main_02010FC4.s
Normal file
3152
asm/main_02010FC4.s
Normal file
File diff suppressed because it is too large
Load Diff
@@ -54,69 +54,3 @@ IsThawingMove: ; 0x02013B30
|
||||
.align 2, 0
|
||||
_02013B4C: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end IsThawingMove
|
||||
|
||||
arm_func_start IsAffectedByTaunt
|
||||
IsAffectedByTaunt: ; 0x02013B50
|
||||
ldr r1, _02013B6C ; =DUNGEON_MOVE_TABLES
|
||||
ldrh r2, [r0, #4]
|
||||
ldr r1, [r1, #8]
|
||||
mov r0, #0x1a
|
||||
mla r0, r2, r0, r1
|
||||
ldrb r0, [r0, #0x14]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_02013B6C: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end IsAffectedByTaunt
|
||||
|
||||
arm_func_start GetMoveRangeId
|
||||
GetMoveRangeId: ; 0x02013B70
|
||||
ldr r1, _02013B8C ; =DUNGEON_MOVE_TABLES
|
||||
ldrh r2, [r0, #4]
|
||||
ldr r1, [r1, #8]
|
||||
mov r0, #0x1a
|
||||
mla r0, r2, r0, r1
|
||||
ldrb r0, [r0, #0x15]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_02013B8C: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveRangeId
|
||||
|
||||
arm_func_start GetMoveActualAccuracy
|
||||
GetMoveActualAccuracy: ; 0x02013B90
|
||||
stmdb sp!, {r3, lr}
|
||||
ldr r2, _02013BE4 ; =DUNGEON_MOVE_TABLES
|
||||
mov r1, #0x1a
|
||||
ldr r2, [r2, #8]
|
||||
mla r1, r0, r1, r2
|
||||
ldrb r0, [r1, #0xe]
|
||||
cmp r0, #0
|
||||
ldreqb r0, [r1, #0xa]
|
||||
ldmeqia sp!, {r3, pc}
|
||||
cmp r0, #0x63
|
||||
bne _02013BDC
|
||||
ldrb r2, [r1, #0xa]
|
||||
ldrb r0, [r1, #0xb]
|
||||
cmp r2, #0x7d
|
||||
ldmeqia sp!, {r3, pc}
|
||||
mul r0, r2, r0
|
||||
mov r1, #0x64
|
||||
bl _s32_div_f
|
||||
ldmia sp!, {r3, pc}
|
||||
_02013BDC:
|
||||
mov r0, #0
|
||||
ldmia sp!, {r3, pc}
|
||||
.align 2, 0
|
||||
_02013BE4: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveActualAccuracy
|
||||
|
||||
arm_func_start GetMoveBasePowerFromId
|
||||
GetMoveBasePowerFromId: ; 0x02013BE8
|
||||
mov r1, #0x1a
|
||||
mul r1, r0, r1
|
||||
ldr r0, _02013C00 ; =DUNGEON_MOVE_TABLES
|
||||
ldr r0, [r0, #8]
|
||||
ldrsh r0, [r0, r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_02013C00: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveBasePowerFromId
|
||||
|
||||
57
asm/main_02013B70.s
Normal file
57
asm/main_02013B70.s
Normal file
@@ -0,0 +1,57 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "main_02013B70.inc"
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start GetMoveRangeId
|
||||
GetMoveRangeId: ; 0x02013B70
|
||||
ldr r1, _02013B8C ; =DUNGEON_MOVE_TABLES
|
||||
ldrh r2, [r0, #4]
|
||||
ldr r1, [r1, #8]
|
||||
mov r0, #0x1a
|
||||
mla r0, r2, r0, r1
|
||||
ldrb r0, [r0, #0x15]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_02013B8C: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveRangeId
|
||||
|
||||
arm_func_start GetMoveActualAccuracy
|
||||
GetMoveActualAccuracy: ; 0x02013B90
|
||||
stmdb sp!, {r3, lr}
|
||||
ldr r2, _02013BE4 ; =DUNGEON_MOVE_TABLES
|
||||
mov r1, #0x1a
|
||||
ldr r2, [r2, #8]
|
||||
mla r1, r0, r1, r2
|
||||
ldrb r0, [r1, #0xe]
|
||||
cmp r0, #0
|
||||
ldreqb r0, [r1, #0xa]
|
||||
ldmeqia sp!, {r3, pc}
|
||||
cmp r0, #0x63
|
||||
bne _02013BDC
|
||||
ldrb r2, [r1, #0xa]
|
||||
ldrb r0, [r1, #0xb]
|
||||
cmp r2, #0x7d
|
||||
ldmeqia sp!, {r3, pc}
|
||||
mul r0, r2, r0
|
||||
mov r1, #0x64
|
||||
bl _s32_div_f
|
||||
ldmia sp!, {r3, pc}
|
||||
_02013BDC:
|
||||
mov r0, #0
|
||||
ldmia sp!, {r3, pc}
|
||||
.align 2, 0
|
||||
_02013BE4: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveActualAccuracy
|
||||
|
||||
arm_func_start GetMoveBasePowerFromId
|
||||
GetMoveBasePowerFromId: ; 0x02013BE8
|
||||
mov r1, #0x1a
|
||||
mul r1, r0, r1
|
||||
ldr r0, _02013C00 ; =DUNGEON_MOVE_TABLES
|
||||
ldr r0, [r0, #8]
|
||||
ldrsh r0, [r0, r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_02013C00: .word DUNGEON_MOVE_TABLES
|
||||
arm_func_end GetMoveBasePowerFromId
|
||||
@@ -1095,8 +1095,8 @@ _022EDC28: .word DUNGEON_PTR
|
||||
_022EDC2C: .word 0x00012AAA + PREPARE_TRAPPER_TRAP_OFFSET
|
||||
arm_func_end PrepareTrapperTrap
|
||||
|
||||
arm_func_start ov29_022EDC30
|
||||
ov29_022EDC30: ; 0x022EDC30
|
||||
arm_func_start CanLayTrap
|
||||
CanLayTrap: ; 0x022EDC30
|
||||
stmdb sp!, {r3, lr}
|
||||
mov r1, r0
|
||||
ldrsh r0, [r1]
|
||||
@@ -1133,7 +1133,7 @@ ov29_022EDC30: ; 0x022EDC30
|
||||
_022EDCB4:
|
||||
mov r0, #1
|
||||
ldmia sp!, {r3, pc}
|
||||
arm_func_end ov29_022EDC30
|
||||
arm_func_end CanLayTrap
|
||||
|
||||
arm_func_start TrySpawnTrap
|
||||
TrySpawnTrap: ; 0x022EDCBC
|
||||
|
||||
@@ -876,7 +876,7 @@ _023105DC:
|
||||
_02310614:
|
||||
mov r0, r5
|
||||
bl GetTileAtEntity
|
||||
bl ov29_02337E2C
|
||||
bl IsTileGround
|
||||
cmp r0, #0
|
||||
bne _023106A4
|
||||
ldrsh r2, [r4, #0x12]
|
||||
|
||||
@@ -38,7 +38,7 @@ AiConsiderMove: ; 0x02319880
|
||||
cmp r0, #5
|
||||
bne _023198F8
|
||||
mov r0, sb
|
||||
bl IsAffectedByTaunt
|
||||
bl IsUsableWhileTaunted
|
||||
cmp r0, #0
|
||||
moveq r0, #1
|
||||
beq _02319F64
|
||||
|
||||
@@ -409,7 +409,7 @@ CanMonsterUseMove: ; 0x02324B24
|
||||
cmp r0, #5
|
||||
bne _02324BA0
|
||||
mov r0, r5
|
||||
bl IsAffectedByTaunt
|
||||
bl IsUsableWhileTaunted
|
||||
cmp r0, #0
|
||||
moveq r0, #0
|
||||
ldmeqia sp!, {r3, r4, r5, pc}
|
||||
@@ -466,7 +466,7 @@ ov29_02324BE8: ; 0x02324BE8
|
||||
cmp r0, #5
|
||||
bne _02324C54
|
||||
mov r0, r5
|
||||
bl IsAffectedByTaunt
|
||||
bl IsUsableWhileTaunted
|
||||
cmp r0, #0
|
||||
moveq r0, #0
|
||||
ldmeqia sp!, {r3, r4, r5, pc}
|
||||
|
||||
@@ -514,7 +514,7 @@ ov29_02325D20: ; 0x02325D20
|
||||
cmp r1, #0x9c
|
||||
bne _02325D4C
|
||||
bl GetTileAtEntity
|
||||
bl ov29_02337E2C
|
||||
bl IsTileGround
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
ldmneia sp!, {r3, r4, r5, pc}
|
||||
@@ -733,7 +733,7 @@ DoMoveDig: ; 0x02325FC4
|
||||
mov r4, #0
|
||||
bl GetTileAtEntity
|
||||
mov sb, r0
|
||||
bl ov29_02337E2C
|
||||
bl IsTileGround
|
||||
cmp r0, #0
|
||||
beq _02326000
|
||||
ldrh r0, [sb]
|
||||
|
||||
@@ -1219,7 +1219,7 @@ DoMoveDive: ; 0x02328ECC
|
||||
mov r5, r3
|
||||
mov r4, #0
|
||||
bl GetTileAtEntity
|
||||
bl ov29_02337E2C
|
||||
bl IsTileGround
|
||||
cmp r0, #0
|
||||
beq _02328F0C
|
||||
ldr r2, _02328F88 ; =0x00000ED8
|
||||
|
||||
@@ -1204,7 +1204,7 @@ _023339B0:
|
||||
ldmia sp!, {r3, r4, r5, r6, r7, pc}
|
||||
_023339D8:
|
||||
bl GetTileAtEntity
|
||||
bl ov29_02337E2C
|
||||
bl IsTileGround
|
||||
cmp r0, #0
|
||||
beq _02333F90
|
||||
mov r0, #0
|
||||
@@ -1212,7 +1212,7 @@ _023339D8:
|
||||
_023339F0:
|
||||
bl GetTileAtEntity
|
||||
mov r4, r0
|
||||
bl ov29_02337E2C
|
||||
bl IsTileGround
|
||||
cmp r0, #0
|
||||
beq _02333A14
|
||||
ldrh r0, [r4]
|
||||
@@ -1326,7 +1326,7 @@ _02333B60:
|
||||
ldmia sp!, {r3, r4, r5, r6, r7, pc}
|
||||
_02333B84:
|
||||
add r0, r4, #4
|
||||
bl ov29_022EDC30
|
||||
bl CanLayTrap
|
||||
cmp r0, #0
|
||||
bne _02333F90
|
||||
mov r0, #0
|
||||
|
||||
@@ -111,8 +111,8 @@ _02337E0C:
|
||||
_02337E28: .word DUNGEON_PTR
|
||||
arm_func_end ov29_02337D68
|
||||
|
||||
arm_func_start ov29_02337E2C
|
||||
ov29_02337E2C: ; 0x02337E2C
|
||||
arm_func_start IsTileGround
|
||||
IsTileGround: ; 0x02337E2C
|
||||
stmdb sp!, {r3, r4, r5, lr}
|
||||
mov r5, r0
|
||||
mov r4, #0
|
||||
@@ -147,7 +147,7 @@ _02337E84:
|
||||
.align 2, 0
|
||||
_02337E8C: .word DUNGEON_PTR
|
||||
_02337E90: .word SECONDARY_TERRAIN_TYPES
|
||||
arm_func_end ov29_02337E2C
|
||||
arm_func_end IsTileGround
|
||||
|
||||
arm_func_start IsWaterTileset
|
||||
IsWaterTileset: ; 0x02337E94
|
||||
|
||||
@@ -6,16 +6,18 @@
|
||||
#include "item.h"
|
||||
|
||||
#define MAX_TEAM_MEMBERS 4
|
||||
#define DUNGEON_MAX_WILD_POKEMON 16
|
||||
#define DUNGEON_MAX_POKEMON 20
|
||||
#define DUNGEON_MAX_SIZE_X 56
|
||||
#define DUNGEON_MAX_SIZE_Y 32
|
||||
|
||||
enum TerrainType
|
||||
enum terrain_type
|
||||
{
|
||||
// These 3 seem to indicate the 'main' type of the terrain. See helper functions for how they're set.
|
||||
TERRAIN_TYPE_WALL = 0, // x0 When neither TERRAIN_TYPE_NORMAL nor TERRAIN_TYPE_SECONDARY are set
|
||||
TERRAIN_TYPE_NORMAL = 1 << 0, // x1
|
||||
TERRAIN_TYPE_SECONDARY = 1 << 1, // Water or lava depending on the dungeon. x2
|
||||
TERRAIN_TYPE_CHASM = 3,
|
||||
TERRAIN_TYPE_IMPASSABLE_WALL = 1 << 4, // x10
|
||||
};
|
||||
|
||||
|
||||
@@ -10,8 +10,17 @@
|
||||
|
||||
#define NUM_PICKED_IQ_SKILLS 3
|
||||
#define MAX_MON_MOVES 4
|
||||
#define MAX_STAT_STAGE 20
|
||||
#define MAX_SPEED_STAGE 4
|
||||
#define NUM_SPEED_COUNTERS 5
|
||||
#define MAX_STOCKPILE_STAGE 3
|
||||
|
||||
#define STAT_STAGE_ATK 0
|
||||
#define STAT_STAGE_SP_ATK 1
|
||||
#define STAT_STAGE_DEF 0
|
||||
#define STAT_STAGE_SP_DEF 1
|
||||
#define STAT_STAGE_ACCURACY 0
|
||||
#define STAT_STAGE_EVASION 1
|
||||
|
||||
// Used in various contexts, like with entity positions in the dungeon
|
||||
struct position {
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
#ifndef PMDSKY_ENUMS_H
|
||||
#define PMDSKY_ENUMS_H
|
||||
|
||||
// Terrain type for a tile
|
||||
enum terrain_type {
|
||||
TERRAIN_WALL = 0,
|
||||
TERRAIN_NORMAL = 1,
|
||||
TERRAIN_SECONDARY = 2, // Water or lava
|
||||
TERRAIN_CHASM = 3,
|
||||
};
|
||||
|
||||
// Tactic ID. These are usually encoded as bitvectors.
|
||||
enum tactic_id {
|
||||
TACTIC_LETS_GO_TOGETHER = 0,
|
||||
|
||||
9
include/exclusive_item.h
Normal file
9
include/exclusive_item.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PMDSKY_EXCLUSIVE_ITEM_H
|
||||
#define PMDSKY_EXCLUSIVE_ITEM_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
// Tests the exclusive item bitvector for a specific exclusive item effect.
|
||||
bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, u32 effect_id);
|
||||
|
||||
#endif //PMDSKY_EXCLUSIVE_ITEM_H
|
||||
10
include/moves_3.h
Normal file
10
include/moves_3.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef PMDSKY_MOVES_3_H
|
||||
#define PMDSKY_MOVES_3_H
|
||||
|
||||
#include "move.h"
|
||||
#include "util.h"
|
||||
|
||||
// Returns true if the given move can be used while the user is affected by Taunt, or false if the move cannot be used while taunted.
|
||||
bool8 IsUsableWhileTaunted(struct move *move);
|
||||
|
||||
#endif //PMDSKY_MOVES_3_H
|
||||
4
main.lsf
4
main.lsf
@@ -33,12 +33,16 @@ Static main
|
||||
Object asm/main_0200EB30.o
|
||||
Object src/main_0200ECFC.o
|
||||
Object asm/main_0200ED1C.o
|
||||
Object src/exclusive_item.o
|
||||
Object asm/main_02010FC4.o
|
||||
Object src/moves_1.o
|
||||
Object asm/main_020137E8.o
|
||||
Object src/moves_2.o
|
||||
Object asm/main_02013864.o
|
||||
Object src/moves.o
|
||||
Object asm/main_02013AD0.o
|
||||
Object src/moves_3.o
|
||||
Object asm/main_02013B70.o
|
||||
Object src/main_02013C04.o
|
||||
Object asm/main_02013C30.o
|
||||
Object src/main_020251AC.o
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "main_0208655C.h"
|
||||
#include "move_data.h"
|
||||
#include "moves_2.h"
|
||||
#include "moves_3.h"
|
||||
#include "overlay_29_0231ACAC.h"
|
||||
#include "position_util.h"
|
||||
|
||||
@@ -20,7 +21,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 bool8 IsAffectedByTaunt(struct move *move);
|
||||
extern bool8 StatusCheckerCheck(struct entity *attacker, struct move *move);
|
||||
extern bool8 CanAttackInDirection(struct entity *monster, s32 direction);
|
||||
extern s32 TryAddTargetToAiTargetList(s32 current_num_targets, s32 move_ai_range, struct entity *user, struct entity *target, struct move *move, bool8 check_all_conditions);
|
||||
@@ -41,7 +41,7 @@ u32 AiConsiderMove(struct ai_possible_move *ai_possible_move, struct entity *mon
|
||||
s32 move_target_and_range = GetEntityMoveTargetAndRange(monster, move, TRUE);
|
||||
has_status_checker = IqSkillIsEnabled(monster, IQ_STATUS_CHECKER);
|
||||
ai_possible_move->can_be_used = FALSE;
|
||||
if (pokemon_info->cringe_class_status.cringe == STATUS_CRINGE_TAUNTED && !IsAffectedByTaunt(move))
|
||||
if (pokemon_info->cringe_class_status.cringe == STATUS_CRINGE_TAUNTED && !IsUsableWhileTaunted(move))
|
||||
return move_weight;
|
||||
|
||||
if (has_status_checker && !StatusCheckerCheck(monster, move))
|
||||
|
||||
@@ -305,7 +305,7 @@ u32 GetAiUseItemProbability(struct entity *item_consumer, struct item *item, u32
|
||||
item_weight = 0;
|
||||
break;
|
||||
case ITEM_VIOLENT_SEED:
|
||||
if (pokemon_info->stat_modifiers.offensive_stages[1] >= 20)
|
||||
if (pokemon_info->stat_modifiers.offensive_stages[STAT_STAGE_SP_ATK] >= 20)
|
||||
item_weight = 0;
|
||||
else
|
||||
item_weight = 80;
|
||||
|
||||
9
src/exclusive_item.c
Normal file
9
src/exclusive_item.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, u32 effect_id)
|
||||
{
|
||||
u32 effect_bit = effect_id >> 5;
|
||||
if (effect_flags[effect_bit] & 1 << effect_id - (effect_bit << 5))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
9
src/moves_3.c
Normal file
9
src/moves_3.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "moves_3.h"
|
||||
#include "move_data.h"
|
||||
|
||||
extern struct move_data_table_outer DUNGEON_MOVE_TABLES;
|
||||
|
||||
bool8 IsUsableWhileTaunted(struct move *move)
|
||||
{
|
||||
return DUNGEON_MOVE_TABLES.moves->moves[move->id].usable_while_taunted;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_022FAC98.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__022FAC98(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_022FFF28.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__022FFF28(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_0230A994.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 IsMonster__0230A994(struct entity *entity)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_0230F8AC.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__0230F8AC(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 EntityIsValid__02311010(struct entity *entity)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_023147EC.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__023147EC(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_023197A8.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__023197A8(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_0231A87C.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__0231A87C(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_02323918.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__02323918(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "overlay_29_023329E8.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ExclusiveItemEffectIsActive__023329E8(struct entity *entity, enum exclusive_item_effect_id effect_id)
|
||||
{
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "dungeon_items.h"
|
||||
#include "dungeon_pokemon_attributes.h"
|
||||
#include "dungeon_util_static.h"
|
||||
|
||||
extern bool8 ExclusiveItemEffectFlagTest(u32 *effect_flags, enum exclusive_item_effect_id effect_id);
|
||||
#include "exclusive_item.h"
|
||||
|
||||
bool8 ItemIsActive__02347B50(struct entity *entity, enum item_id item_id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user