Merge pull request #289 from DizzyEggg/code_807E5AC
Some checks failed
GithubCI / build (push) Has been cancelled

code_807E5AC.s and data_80F4E2C.s (and other similar data files)
This commit is contained in:
Seth Barberee 2024-12-11 19:38:46 -08:00 committed by GitHub
commit 166c388734
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
47 changed files with 3387 additions and 5217 deletions

File diff suppressed because it is too large Load Diff

View File

@ -17,43 +17,3 @@ gUnknown_80F4D8C: @ 80F4D8C
@ replacing .incbin "baserom.gba", 0x000f4d8c, 0x14
.string "mapparam\0"
.align 2,0
.string "pksdir0\0"
.align 2,0
.global gUnknown_80F4DA0
gUnknown_80F4DA0: @ 80F4DA0
@ replacing .incbin "baserom.gba", 0x000f4da0, 0x2
.byte 0x07, 0x00
.global gUnknown_80F4DA2
gUnknown_80F4DA2: @ 80F4DA2
.byte 0x08, 0x00
.global gUnknown_80F4DA4
gUnknown_80F4DA4: @ 80F4DA4
.byte 0x0C, 0x00
.global gUnknown_80F4DA6
gUnknown_80F4DA6: @ 80F4DA6
.byte 0x0A, 0x00
.global gUnknown_80F4DA8
gUnknown_80F4DA8: @ 80F4DA8
.byte 0x04, 0x00
.global gUnknown_80F4DAA
gUnknown_80F4DAA: @ 80F4DAA
.byte 0x24, 0x00
.global gUnknown_80F4DAC
gUnknown_80F4DAC: @ 80F4DAC
.byte 0x05, 0x00
.global gUnknown_80F4DAE
gUnknown_80F4DAE: @ 80F4DAE
.byte 0x28, 0x00
.global gUnknown_80F4DB0
gUnknown_80F4DB0: @ 80F4DB0
@ replacing .incbin "baserom.gba", 0x000f4db0, 0x2
.byte 0x28, 0x00

View File

@ -1,272 +0,0 @@
.section .rodata
.global gUnknown_80F4DB4
gUnknown_80F4DB4: @ 80F4DB4
@ replacing .incbin "baserom.gba", 0x000f4db4, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4DB6
gUnknown_80F4DB6: @ 80F4DB6
@ replacing .incbin "baserom.gba", 0x000f4db6, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DB8
gUnknown_80F4DB8: @ 80F4DB8
@ replacing .incbin "baserom.gba", 0x000f4db8, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DBA
gUnknown_80F4DBA: @ 80F4DBA
@ replacing .incbin "baserom.gba", 0x000f4dba, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DBC
gUnknown_80F4DBC: @ 80F4DBC
@ replacing .incbin "baserom.gba", 0x000f4dbc, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DBE
gUnknown_80F4DBE: @ 80F4DBE
@ replacing .incbin "baserom.gba", 0x000f4dbe, 0x2
.byte 0x12, 0x00
.global gUnknown_80F4DC0
gUnknown_80F4DC0: @ 80F4DC0
@ replacing .incbin "baserom.gba", 0x000f4dc0, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DC2
gUnknown_80F4DC2: @ 80F4DC2
@ replacing .incbin "baserom.gba", 0x000f4dc2, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4DC4
gUnknown_80F4DC4: @ 80F4DC4
@ replacing .incbin "baserom.gba", 0x000f4dc4, 0x2
.byte 0x28, 0x00
.global gUnknown_80F4DC6
gUnknown_80F4DC6: @ 80F4DC6
@ replacing .incbin "baserom.gba", 0x000f4dc6, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DC8
gUnknown_80F4DC8: @ 80F4DC8
@ replacing .incbin "baserom.gba", 0x000f4dc8, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4DCA
gUnknown_80F4DCA: @ 80F4DCA
@ replacing .incbin "baserom.gba", 0x000f4dca, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4DCC
gUnknown_80F4DCC: @ 80F4DCC
@ replacing .incbin "baserom.gba", 0x000f4dcc, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4DCE
gUnknown_80F4DCE: @ 80F4DCE
@ replacing .incbin "baserom.gba", 0x000f4dce, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DD0
gUnknown_80F4DD0: @ 80F4DD0
@ replacing .incbin "baserom.gba", 0x000f4dd0, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4DD2
gUnknown_80F4DD2: @ 80F4DD2
@ replacing .incbin "baserom.gba", 0x000f4dd2, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DD4
gUnknown_80F4DD4: @ 80F4DD4
@ replacing .incbin "baserom.gba", 0x000f4dd4, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DD6
gUnknown_80F4DD6: @ 80F4DD6
@ replacing .incbin "baserom.gba", 0x000f4dd6, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DD8
gUnknown_80F4DD8: @ 80F4DD8
@ replacing .incbin "baserom.gba", 0x000f4dd8, 0x2
.byte 0x32, 0x00
.global gUnknown_80F4DDA
gUnknown_80F4DDA: @ 80F4DDA
@ replacing .incbin "baserom.gba", 0x000f4dda, 0x2
.byte 0x32, 0x00
.global gUnknown_80F4DDC
gUnknown_80F4DDC: @ 80F4DDC
@ replacing .incbin "baserom.gba", 0x000f4ddc, 0x4
.byte 0x32, 0x00
.byte 0x32, 0x00
.global gUnknown_80F4DE0
gUnknown_80F4DE0: @ 80F4DE0
@ replacing .incbin "baserom.gba", 0x000f4de0, 0x2
.byte 0x32, 0x00
.global gUnknown_80F4DE2
gUnknown_80F4DE2: @ 80F4DE2
@ replacing .incbin "baserom.gba", 0x000f4de2, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DE4
gUnknown_80F4DE4: @ 80F4DE4
@ replacing .incbin "baserom.gba", 0x000f4de4, 0x2
.byte 0x0f, 0x00
.global gUnknown_80F4DE6
gUnknown_80F4DE6: @ 80F4DE6
@ replacing .incbin "baserom.gba", 0x000f4de6, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4DE8
gUnknown_80F4DE8: @ 80F4DE8
@ replacing .incbin "baserom.gba", 0x000f4de8, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DEA
gUnknown_80F4DEA: @ 80F4DEA
@ replacing .incbin "baserom.gba", 0x000f4dea, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DEC
gUnknown_80F4DEC: @ 80F4DEC
@ replacing .incbin "baserom.gba", 0x000f4dec, 0x2
.byte 0x0f, 0x00
.global gUnknown_80F4DEE
gUnknown_80F4DEE: @ 80F4DEE
@ replacing .incbin "baserom.gba", 0x000f4dee, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4DF0
gUnknown_80F4DF0: @ 80F4DF0
@ replacing .incbin "baserom.gba", 0x000f4df0, 0x2
.byte 0x19, 0x00
.global gUnknown_80F4DF2
gUnknown_80F4DF2: @ 80F4DF2
@ replacing .incbin "baserom.gba", 0x000f4df2, 0x2
.byte 0x23, 0x00
.global gUnknown_80F4DF4
gUnknown_80F4DF4: @ 80F4DF4
@ replacing .incbin "baserom.gba", 0x000f4df4, 0x2
.byte 0x19, 0x00
.global gUnknown_80F4DF6
gUnknown_80F4DF6: @ 80F4DF6
@ replacing .incbin "baserom.gba", 0x000f4df6, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4DF8
gUnknown_80F4DF8: @ 80F4DF8
@ replacing .incbin "baserom.gba", 0x000f4df8, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4DFA
gUnknown_80F4DFA: @ 80F4DFA
@ replacing .incbin "baserom.gba", 0x000f4dfa, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4DFC
gUnknown_80F4DFC: @ 80F4DFC
@ replacing .incbin "baserom.gba", 0x000f4dfc, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4DFE
gUnknown_80F4DFE: @ 80F4DFE
@ replacing .incbin "baserom.gba", 0x000f4dfe, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4E00
gUnknown_80F4E00: @ 80F4E00
@ replacing .incbin "baserom.gba", 0x000f4e00, 0x2
.byte 0x28, 0x00
.global gUnknown_80F4E02
gUnknown_80F4E02: @ 80F4E02
@ replacing .incbin "baserom.gba", 0x000f4e02, 0x2
.byte 0x3c, 0x00
.global gUnknown_80F4E04
gUnknown_80F4E04: @ 80F4E04
@ replacing .incbin "baserom.gba", 0x000f4e04, 0x2
.byte 0x3c, 0x00
.global gUnknown_80F4E06
gUnknown_80F4E06: @ 80F4E06
@ replacing .incbin "baserom.gba", 0x000f4e06, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4E08
gUnknown_80F4E08: @ 80F4E08
@ replacing .incbin "baserom.gba", 0x000f4e08, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4E0A
gUnknown_80F4E0A: @ 80F4E0A
@ replacing .incbin "baserom.gba", 0x000f4e0a, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4E0C
gUnknown_80F4E0C: @ 80F4E0C
@ replacing .incbin "baserom.gba", 0x000f4e0c, 0x2
.byte 0x32, 0x00
.global gUnknown_80F4E0E
gUnknown_80F4E0E: @ 80F4E0E
@ replacing .incbin "baserom.gba", 0x000f4e0e, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4E10
gUnknown_80F4E10: @ 80F4E10
@ replacing .incbin "baserom.gba", 0x000f4e10, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E12
gUnknown_80F4E12: @ 80F4E12
@ replacing .incbin "baserom.gba", 0x000f4e12, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E14
gUnknown_80F4E14: @ 80F4E14
@ replacing .incbin "baserom.gba", 0x000f4e14, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E16
gUnknown_80F4E16: @ 80F4E16
@ replacing .incbin "baserom.gba", 0x000f4e16, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E18
gUnknown_80F4E18: @ 80F4E18
@ replacing .incbin "baserom.gba", 0x000f4e18, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E1A
gUnknown_80F4E1A: @ 80F4E1A
@ replacing .incbin "baserom.gba", 0x000f4e1a, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E1C
gUnknown_80F4E1C: @ 80F4E1C
@ replacing .incbin "baserom.gba", 0x000f4e1c, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E1E
gUnknown_80F4E1E: @ 80F4E1E
@ replacing .incbin "baserom.gba", 0x000f4e1e, 0x2
.byte 0x0c, 0x00
.global gUnknown_80F4E20
gUnknown_80F4E20: @ 80F4E20
@ replacing .incbin "baserom.gba", 0x000f4e20, 0x2
.byte 0x0c, 0x00

View File

@ -1,823 +0,0 @@
.section .rodata
.global gUnknown_80F4E2C
gUnknown_80F4E2C: @ 80F4E2C
@ replacing .incbin "baserom.gba", 0x000f4e2c, 0x4
.byte 0x03, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4E30
gUnknown_80F4E30: @ 80F4E30
@ replacing .incbin "baserom.gba", 0x000f4e30, 0x4
.byte 0x7f, 0x00
.byte 0x7f, 0x00
.global gUnknown_80F4E34
gUnknown_80F4E34: @ 80F4E34
@ replacing .incbin "baserom.gba", 0x000f4e34, 0x4
.byte 0x7f, 0x00
.byte 0x7f, 0x00
.global gUnknown_80F4E38
gUnknown_80F4E38: @ 80F4E38
@ replacing .incbin "baserom.gba", 0x000f4e38, 0x4
.byte 0x7f, 0x00
.byte 0x7f, 0x00
.global gUnknown_80F4E3C
gUnknown_80F4E3C: @ 80F4E3C
@ replacing .incbin "baserom.gba", 0x000f4e3c, 0x4
.byte 0x01, 0x00
.byte 0x01, 0x00
.global gUnknown_80F4E40
gUnknown_80F4E40: @ 80F4E40
@ replacing .incbin "baserom.gba", 0x000f4e40, 0x8
.byte 0x08, 0x00
.byte 0x0a, 0x00
.byte 0x03, 0x00
.byte 0x04, 0x00
.global gUnknown_80F4E48
gUnknown_80F4E48: @ 80F4E48
@ replacing .incbin "baserom.gba", 0x000f4e48, 0x4
.byte 0x06, 0x00
.byte 0x08, 0x00
.global gUnknown_80F4E4C
gUnknown_80F4E4C: @ 80F4E4C
@ replacing .incbin "baserom.gba", 0x000f4e4c, 0x4
.byte 0x06, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4E50
gUnknown_80F4E50: @ 80F4E50
@ replacing .incbin "baserom.gba", 0x000f4e50, 0x4
.byte 0x01, 0x00
.byte 0x02, 0x00
.global gUnknown_80F4E54
gUnknown_80F4E54: @ 80F4E54
@ replacing .incbin "baserom.gba", 0x000f4e54, 0x4
.byte 0x02, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4E58
gUnknown_80F4E58: @ 80F4E58
@ replacing .incbin "baserom.gba", 0x000f4e58, 0x4
.byte 0x03, 0x00
.byte 0x06, 0x00
.global gUnknown_80F4E5C
gUnknown_80F4E5C: @ 80F4E5C
@ replacing .incbin "baserom.gba", 0x000f4e5c, 0x4
.byte 0x02, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4E60
gUnknown_80F4E60: @ 80F4E60
@ replacing .incbin "baserom.gba", 0x000f4e60, 0x10
.byte 0x0f, 0x00
.byte 0x1e, 0x00
.byte 0x02, 0x00
.byte 0x03, 0x00
.byte 0x02, 0x00
.byte 0x06, 0x00
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4E70
gUnknown_80F4E70: @ 80F4E70
@ replacing .incbin "baserom.gba", 0x000f4e70, 0x4
.byte 0x01, 0x00
.byte 0x01, 0x00
.global gUnknown_80F4E74
gUnknown_80F4E74: @ 80F4E74
@ replacing .incbin "baserom.gba", 0x000f4e74, 0x4
.byte 0x03, 0x00
.byte 0x07, 0x00
.global gUnknown_80F4E78
gUnknown_80F4E78: @ 80F4E78
@ replacing .incbin "baserom.gba", 0x000f4e78, 0x4
.byte 0x04, 0x00
.byte 0x08, 0x00
.global gUnknown_80F4E7C
gUnknown_80F4E7C: @ 80F4E7C
@ replacing .incbin "baserom.gba", 0x000f4e7c, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4E80
gUnknown_80F4E80: @ 80F4E80
@ replacing .incbin "baserom.gba", 0x000f4e80, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4E84
gUnknown_80F4E84: @ 80F4E84
@ replacing .incbin "baserom.gba", 0x000f4e84, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4E88
gUnknown_80F4E88: @ 80F4E88
@ replacing .incbin "baserom.gba", 0x000f4e88, 0x4
.byte 0x0f, 0x00
.byte 0x14, 0x00
.global gUnknown_80F4E8C
gUnknown_80F4E8C: @ 80F4E8C
@ replacing .incbin "baserom.gba", 0x000f4e8c, 0x4
.byte 0x0a, 0x00
.byte 0x0e, 0x00
.global gUnknown_80F4E90
gUnknown_80F4E90: @ 80F4E90
@ replacing .incbin "baserom.gba", 0x000f4e90, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4E94
gUnknown_80F4E94: @ 80F4E94
@ replacing .incbin "baserom.gba", 0x000f4e94, 0x4
.byte 0x02, 0x00
.byte 0x04, 0x00
.global gUnknown_80F4E98
gUnknown_80F4E98: @ 80F4E98
@ replacing .incbin "baserom.gba", 0x000f4e98, 0x4
.byte 0x06, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4E9C
gUnknown_80F4E9C: @ 80F4E9C
@ replacing .incbin "baserom.gba", 0x000f4e9c, 0x4
.byte 0x03, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4EA0
gUnknown_80F4EA0: @ 80F4EA0
@ replacing .incbin "baserom.gba", 0x000f4ea0, 0x4
.byte 0x04, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4EA4
gUnknown_80F4EA4: @ 80F4EA4
@ replacing .incbin "baserom.gba", 0x000f4ea4, 0x4
.byte 0x03, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4EA8
gUnknown_80F4EA8: @ 80F4EA8
@ replacing .incbin "baserom.gba", 0x000f4ea8, 0x4
.byte 0x03, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4EAC
gUnknown_80F4EAC: @ 80F4EAC
@ replacing .incbin "baserom.gba", 0x000f4eac, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4EB0
gUnknown_80F4EB0: @ 80F4EB0
@ replacing .incbin "baserom.gba", 0x000f4eb0, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4EB4
gUnknown_80F4EB4: @ 80F4EB4
@ replacing .incbin "baserom.gba", 0x000f4eb4, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4EB8
gUnknown_80F4EB8: @ 80F4EB8
@ replacing .incbin "baserom.gba", 0x000f4eb8, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4EBC
gUnknown_80F4EBC: @ 80F4EBC
@ replacing .incbin "baserom.gba", 0x000f4ebc, 0x4
.byte 0x14, 0x00
.byte 0x1e, 0x00
.global gUnknown_80F4EC0
gUnknown_80F4EC0: @ 80F4EC0
@ replacing .incbin "baserom.gba", 0x000f4ec0, 0x4
.byte 0x7f, 0x00
.byte 0x7f, 0x00
.global gUnknown_80F4EC4
gUnknown_80F4EC4: @ 80F4EC4
@ replacing .incbin "baserom.gba", 0x000f4ec4, 0x4
.byte 0x02, 0x00
.byte 0x04, 0x00
.global gUnknown_80F4EC8
gUnknown_80F4EC8: @ 80F4EC8
@ replacing .incbin "baserom.gba", 0x000f4ec8, 0x4
.byte 0x02, 0x00
.byte 0x04, 0x00
.global gUnknown_80F4ECC
gUnknown_80F4ECC: @ 80F4ECC
@ replacing .incbin "baserom.gba", 0x000f4ecc, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4ED0
gUnknown_80F4ED0: @ 80F4ED0
@ replacing .incbin "baserom.gba", 0x000f4ed0, 0x4
.byte 0x14, 0x00
.byte 0x32, 0x00
.global gUnknown_80F4ED4
gUnknown_80F4ED4: @ 80F4ED4
@ replacing .incbin "baserom.gba", 0x000f4ed4, 0x4
.byte 0x02, 0x00
.byte 0x06, 0x00
.global gUnknown_80F4ED8
gUnknown_80F4ED8: @ 80F4ED8
@ replacing .incbin "baserom.gba", 0x000f4ed8, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4EDC
gUnknown_80F4EDC: @ 80F4EDC
@ replacing .incbin "baserom.gba", 0x000f4edc, 0x4
.byte 0x01, 0x00
.byte 0x06, 0x00
.global gUnknown_80F4EE0
gUnknown_80F4EE0: @ 80F4EE0
@ replacing .incbin "baserom.gba", 0x000f4ee0, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4EE4
gUnknown_80F4EE4: @ 80F4EE4
@ replacing .incbin "baserom.gba", 0x000f4ee4, 0x4
.byte 0x0a, 0x00
.byte 0x14, 0x00
.global gUnknown_80F4EE8
gUnknown_80F4EE8: @ 80F4EE8
@ replacing .incbin "baserom.gba", 0x000f4ee8, 0x4
.byte 0x0a, 0x00
.byte 0x0c, 0x00
.global gUnknown_80F4EEC
gUnknown_80F4EEC: @ 80F4EEC
@ replacing .incbin "baserom.gba", 0x000f4eec, 0x4
.byte 0x03, 0x00
.byte 0x03, 0x00
.global gUnknown_80F4EF0
gUnknown_80F4EF0: @ 80F4EF0
@ replacing .incbin "baserom.gba", 0x000f4ef0, 0x4
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4EF4
gUnknown_80F4EF4: @ 80F4EF4
@ replacing .incbin "baserom.gba", 0x000f4ef4, 0x4
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4EF8
gUnknown_80F4EF8: @ 80F4EF8
@ replacing .incbin "baserom.gba", 0x000f4ef8, 0x4
.byte 0x03, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4EFC
gUnknown_80F4EFC: @ 80F4EFC
@ replacing .incbin "baserom.gba", 0x000f4efc, 0x4
.byte 0x7f, 0x00
.byte 0x7f, 0x00
.global gUnknown_80F4F00
gUnknown_80F4F00: @ 80F4F00
@ replacing .incbin "baserom.gba", 0x000f4f00, 0x4
.byte 0x04, 0x00
.byte 0x06, 0x00
.global gUnknown_80F4F04
gUnknown_80F4F04: @ 80F4F04
@ replacing .incbin "baserom.gba", 0x000f4f04, 0x4
.byte 0x7f, 0x00
.byte 0x7f, 0x00
.global gUnknown_80F4F08
gUnknown_80F4F08: @ 80F4F08
@ replacing .incbin "baserom.gba", 0x000f4f08, 0x4
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4F0C
gUnknown_80F4F0C: @ 80F4F0C
@ replacing .incbin "baserom.gba", 0x000f4f0c, 0x4
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4F10
gUnknown_80F4F10: @ 80F4F10
@ replacing .incbin "baserom.gba", 0x000f4f10, 0x8
.byte 0x7f, 0x00
.byte 0x7f, 0x00
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4F18
gUnknown_80F4F18: @ 80F4F18
@ replacing .incbin "baserom.gba", 0x000f4f18, 0x4
.byte 0x02, 0x00
.byte 0x05, 0x00
.global gUnknown_80F4F1C
gUnknown_80F4F1C: @ 80F4F1C
@ replacing .incbin "baserom.gba", 0x000f4f1c, 0x4
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4F20
gUnknown_80F4F20: @ 80F4F20
@ replacing .incbin "baserom.gba", 0x000f4f20, 0x4
.byte 0x0a, 0x00
.byte 0x0a, 0x00
.global gUnknown_80F4F24
gUnknown_80F4F24: @ 80F4F24
@ replacing .incbin "baserom.gba", 0x000f4f24, 0x4
.byte 0x0f, 0x00
.byte 0x14, 0x00
.global gUnknown_80F4F28
gUnknown_80F4F28: @ 80F4F28
@ replacing .incbin "baserom.gba", 0x000f4f28, 0x4
.byte 0x02, 0x00
.byte 0x02, 0x00
.global gUnknown_80F4F2C
gUnknown_80F4F2C: @ 80F4F2C
@ replacing .incbin "baserom.gba", 0x000f4f2c, 0x4
.byte 0x04, 0x00
.byte 0x08, 0x00
.global gUnknown_80F4F30
gUnknown_80F4F30: @ 80F4F30
@ replacing .incbin "baserom.gba", 0x000f4f30, 0x2
.byte 0xfa, 0x00
.global gUnknown_80F4F32
gUnknown_80F4F32: @ 80F4F32
@ replacing .incbin "baserom.gba", 0x000f4f32, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4F34
gUnknown_80F4F34: @ 80F4F34
@ replacing .incbin "baserom.gba", 0x000f4f34, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4F36
gUnknown_80F4F36: @ 80F4F36
@ replacing .incbin "baserom.gba", 0x000f4f36, 0x2
.byte 0x02, 0x00
.global gUnknown_80F4F38
gUnknown_80F4F38: @ 80F4F38
@ replacing .incbin "baserom.gba", 0x000f4f38, 0x2
.byte 0x02, 0x00
.global gUnknown_80F4F3A
gUnknown_80F4F3A: @ 80F4F3A
@ replacing .incbin "baserom.gba", 0x000f4f3a, 0x2
.byte 0x02, 0x00
.global gUnknown_80F4F3C
gUnknown_80F4F3C: @ 80F4F3C
@ replacing .incbin "baserom.gba", 0x000f4f3c, 0x2
.byte 0x05, 0x00
.global gUnknown_80F4F3E
gUnknown_80F4F3E: @ 80F4F3E
@ replacing .incbin "baserom.gba", 0x000f4f3e, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4F40
gUnknown_80F4F40: @ 80F4F40
@ replacing .incbin "baserom.gba", 0x000f4f40, 0x2
.byte 0x02, 0x00
.global gUnknown_80F4F42
gUnknown_80F4F42: @ 80F4F42
@ replacing .incbin "baserom.gba", 0x000f4f42, 0x4
.byte 0x14, 0x00
.byte 0x5f, 0x00
.global gUnknown_80F4F46
gUnknown_80F4F46: @ 80F4F46
@ replacing .incbin "baserom.gba", 0x000f4f46, 0x2
.byte 0x0c, 0x00
.global gSolarBeamMovePower
gSolarBeamMovePower: @ 80F4F48
@ replacing .incbin "baserom.gba", 0x000f4f48, 0x4
.4byte 0x0200
.global gUnknown_80F4F4C
gUnknown_80F4F4C: @ 80F4F4C
@ replacing .incbin "baserom.gba", 0x000f4f4c, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F50
gUnknown_80F4F50: @ 80F4F50
@ replacing .incbin "baserom.gba", 0x000f4f50, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F54
gUnknown_80F4F54: @ 80F4F54
@ replacing .incbin "baserom.gba", 0x000f4f54, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F58
gUnknown_80F4F58: @ 80F4F58
@ replacing .incbin "baserom.gba", 0x000f4f58, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F5C
gUnknown_80F4F5C: @ 80F4F5C
@ replacing .incbin "baserom.gba", 0x000f4f5c, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F60
gUnknown_80F4F60: @ 80F4F60
@ replacing .incbin "baserom.gba", 0x000f4f60, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F64
gUnknown_80F4F64: @ 80F4F64
@ replacing .incbin "baserom.gba", 0x000f4f64, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F68
gUnknown_80F4F68: @ 80F4F68
@ replacing .incbin "baserom.gba", 0x000f4f68, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F6C
gUnknown_80F4F6C: @ 80F4F6C
@ replacing .incbin "baserom.gba", 0x000f4f6c, 0x4
.byte 0x00, 0x02
.byte 0x00, 0x00
.global gUnknown_80F4F70
gUnknown_80F4F70: @ 80F4F70
@ replacing .incbin "baserom.gba", 0x000f4f70, 0x2
.byte 0x05, 0x00
.global gUnknown_80F4F72
gUnknown_80F4F72: @ 80F4F72
@ replacing .incbin "baserom.gba", 0x000f4f72, 0x2
.byte 0x04, 0x00
.global gUnknown_80F4F74
gUnknown_80F4F74: @ 80F4F74
@ replacing .incbin "baserom.gba", 0x000f4f74, 0x2
.byte 0x05, 0x00
.global gUnknown_80F4F76
gUnknown_80F4F76: @ 80F4F76
@ replacing .incbin "baserom.gba", 0x000f4f76, 0x2
.byte 0x06, 0x00
.global gUnknown_80F4F78
gUnknown_80F4F78: @ 80F4F78
@ replacing .incbin "baserom.gba", 0x000f4f78, 0x2
.byte 0x08, 0x00
.global gUnknown_80F4F7A
gUnknown_80F4F7A: @ 80F4F7A
@ replacing .incbin "baserom.gba", 0x000f4f7a, 0x2
.byte 0xe7, 0x03
.global gUnknown_80F4F7C
gUnknown_80F4F7C: @ 80F4F7C
@ replacing .incbin "baserom.gba", 0x000f4f7c, 0x2
.byte 0x37, 0x00
.global gUnknown_80F4F7E
gUnknown_80F4F7E: @ 80F4F7E
@ replacing .incbin "baserom.gba", 0x000f4f7e, 0x2
.byte 0x41, 0x00
.global gUnknown_80F4F80
gUnknown_80F4F80: @ 80F4F80
@ replacing .incbin "baserom.gba", 0x000f4f80, 0x2
.byte 0x23, 0x00
.global gUnknown_80F4F82
gUnknown_80F4F82: @ 80F4F82
@ replacing .incbin "baserom.gba", 0x000f4f82, 0x2
.byte 0x05, 0x00
.global gUnknown_80F4F84
gUnknown_80F4F84: @ 80F4F84
@ replacing .incbin "baserom.gba", 0x000f4f84, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4F86
gUnknown_80F4F86: @ 80F4F86
@ replacing .incbin "baserom.gba", 0x000f4f86, 0x4
.byte 0x0a, 0x00
.byte 0x0f, 0x00
.global gUnknown_80F4F8A
gUnknown_80F4F8A: @ 80F4F8A
@ replacing .incbin "baserom.gba", 0x000f4f8a, 0x2
.byte 0x05, 0x00
.global gUnknown_80F4F8C
gUnknown_80F4F8C: @ 80F4F8C
@ replacing .incbin "baserom.gba", 0x000f4f8c, 0x2
.byte 0x23, 0x00
.global gUnknown_80F4F8E
gUnknown_80F4F8E: @ 80F4F8E
@ replacing .incbin "baserom.gba", 0x000f4f8e, 0x2
.byte 0x05, 0x00
.global gUnknown_80F4F90
gUnknown_80F4F90: @ 80F4F90
@ replacing .incbin "baserom.gba", 0x000f4f90, 0x2
.byte 0x05, 0x00
.global gUnknown_80F4F92
gUnknown_80F4F92: @ 80F4F92
@ replacing .incbin "baserom.gba", 0x000f4f92, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4F94
gUnknown_80F4F94: @ 80F4F94
@ replacing .incbin "baserom.gba", 0x000f4f94, 0xe
.byte 0x05, 0x00
.byte 0x0a, 0x00
.byte 0x0f, 0x00
.byte 0x19, 0x00
.byte 0x1e, 0x00
.byte 0x23, 0x00
.byte 0x28, 0x00
.global gUnknown_80F4FA2
gUnknown_80F4FA2: @ 80F4FA2
@ replacing .incbin "baserom.gba", 0x000f4fa2, 0x2
.byte 0x5a, 0x00
.global gUnknown_80F4FA4
gUnknown_80F4FA4: @ 80F4FA4
@ replacing .incbin "baserom.gba", 0x000f4fa4, 0x2
.byte 0x14, 0x00
.global gUnknown_80F4FA6
gUnknown_80F4FA6: @ 80F4FA6
@ replacing .incbin "baserom.gba", 0x000f4fa6, 0x2
.byte 0x2d, 0x00
.global gUnknown_80F4FA8
gUnknown_80F4FA8: @ 80F4FA8
@ replacing .incbin "baserom.gba", 0x000f4fa8, 0x2
.byte 0x0f, 0x00
.global gUnknown_80F4FAA
gUnknown_80F4FAA: @ 80F4FAA
@ replacing .incbin "baserom.gba", 0x000f4faa, 0x2
.byte 0x1e, 0x00
.global gUnknown_80F4FAC
gUnknown_80F4FAC: @ 80F4FAC
@ replacing .incbin "baserom.gba", 0x000f4fac, 0x2
.byte 0x01, 0x00
.global gUnknown_80F4FAE
gUnknown_80F4FAE: @ 80F4FAE
@ replacing .incbin "baserom.gba", 0x000f4fae, 0x4
.byte 0x02, 0x00
.byte 0x19, 0x00
.global gUnknown_80F4FB2
gUnknown_80F4FB2: @ 80F4FB2
@ replacing .incbin "baserom.gba", 0x000f4fb2, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4FB4
gUnknown_80F4FB4: @ 80F4FB4
@ replacing .incbin "baserom.gba", 0x000f4fb4, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4FB6
gUnknown_80F4FB6: @ 80F4FB6
@ replacing .incbin "baserom.gba", 0x000f4fb6, 0x2
.byte 0x64, 0x00
.global gUnknown_80F4FB8
gUnknown_80F4FB8: @ 80F4FB8
@ replacing .incbin "baserom.gba", 0x000f4fb8, 0x2
.byte 0x00, 0x00
.global gUnknown_80F4FBA
gUnknown_80F4FBA: @ 80F4FBA
@ replacing .incbin "baserom.gba", 0x000f4fba, 0x2
.byte 0x64, 0x00
.global gUnknown_80F4FBC
gUnknown_80F4FBC: @ 80F4FBC
@ replacing .incbin "baserom.gba", 0x000f4fbc, 0x2
.byte 0x02, 0x00
.global gUnknown_80F4FBE
gUnknown_80F4FBE: @ 80F4FBE
@ replacing .incbin "baserom.gba", 0x000f4fbe, 0x2
.byte 0x03, 0x00
.global gUnknown_80F4FC0
gUnknown_80F4FC0: @ 80F4FC0
@ replacing .incbin "baserom.gba", 0x000f4fc0, 0x2
.byte 0x24, 0xff
.global gUnknown_80F4FC2
gUnknown_80F4FC2: @ 80F4FC2
@ replacing .incbin "baserom.gba", 0x000f4fc2, 0x2
.byte 0x6a, 0xff
.global gUnknown_80F4FC4
gUnknown_80F4FC4: @ 80F4FC4
@ replacing .incbin "baserom.gba", 0x000f4fc4, 0x2
.byte 0x9c, 0xff
.global gUnknown_80F4FC6
gUnknown_80F4FC6: @ 80F4FC6
@ replacing .incbin "baserom.gba", 0x000f4fc6, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F4FC8
gUnknown_80F4FC8: @ 80F4FC8
.incbin "baserom.gba", 0xF4FC8, 0x3C
.global gUnknown_80F5004
gUnknown_80F5004: @ 80F5004
@ replacing .incbin "baserom.gba", 0x000f5004, 0x2
.byte 0x03, 0x00
.global gUnknown_80F5006
gUnknown_80F5006: @ 80F5006
@ replacing .incbin "baserom.gba", 0x000f5006, 0x2
.byte 0x02, 0x00
.global gUnknown_80F5008
gUnknown_80F5008: @ 80F5008
@ replacing .incbin "baserom.gba", 0x000f5008, 0x2
.byte 0x64, 0x00
.global gUnknown_80F500A
gUnknown_80F500A: @ 80F500A
@ replacing .incbin "baserom.gba", 0x000f500a, 0x10
.byte 0x32, 0x00, 0x50, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x01, 0x00
.global gUnknown_80F501A
gUnknown_80F501A: @ 80F501A
@ replacing .incbin "baserom.gba", 0x000f501a, 0x10
.byte 0x32, 0x00, 0x50, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x01, 0x00
.global gUnknown_80F502A
gUnknown_80F502A: @ 80F502A
@ replacing .incbin "baserom.gba", 0x000f502a, 0x10
.byte 0x32, 0x00, 0x50, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x01, 0x00
.global gUnknown_80F503A
gUnknown_80F503A: @ 80F503A
@ replacing .incbin "baserom.gba", 0x000f503a, 0x2
.byte 0x01, 0x00
.global gUnknown_80F503C
gUnknown_80F503C: @ 80F503C
@ replacing .incbin "baserom.gba", 0x000f503c, 0x2
.byte 0x05, 0x00
.global gUnknown_80F503E
gUnknown_80F503E: @ 80F503E
@ replacing .incbin "baserom.gba", 0x000f503e, 0x2
.byte 0x06, 0x00
.global gUnknown_80F5040
gUnknown_80F5040: @ 80F5040
@ replacing .incbin "baserom.gba", 0x000f5040, 0x2
.byte 0x07, 0x00
.global gUnknown_80F5042
gUnknown_80F5042: @ 80F5042
@ replacing .incbin "baserom.gba", 0x000f5042, 0x2
.byte 0x08, 0x00
.global gUnknown_80F5044
gUnknown_80F5044: @ 80F5044
@ replacing .incbin "baserom.gba", 0x000f5044, 0x2
.byte 0x09, 0x00
.global gUnknown_80F5046
gUnknown_80F5046: @ 80F5046
@ replacing .incbin "baserom.gba", 0x000f5046, 0x2
.byte 0x14, 0x00
.global gUnknown_80F5048
gUnknown_80F5048: @ 80F5048
@ replacing .incbin "baserom.gba", 0x000f5048, 0x4
.byte 0x0f, 0x00, 0x00, 0x00
.global gUnknown_80F504C
gUnknown_80F504C: @ 80F504C
.incbin "baserom.gba", 0xF504C, 0x54
.global gUnknown_80F50A0
gUnknown_80F50A0: @ 80F50A0
.incbin "baserom.gba", 0xF50A0, 0x54
.global gUnknown_80F50F4
gUnknown_80F50F4: @ 80F50F4
.incbin "baserom.gba", 0xF50F4, 0xA8
.global gUnknown_80F519C
gUnknown_80F519C: @ 80F519C
@ replacing .incbin "baserom.gba", 0x000f519c, 0x4
.byte 0x1e, 0x00, 0x00, 0x00
.global gUnknown_80F51A0
gUnknown_80F51A0: @ 80F51A0
@ replacing .incbin "baserom.gba", 0x000f51a0, 0x4
.byte 0x1e, 0x00, 0x00, 0x00
.global gUnknown_80F51A4
gUnknown_80F51A4: @ 80F51A4
@ replacing .incbin "baserom.gba", 0x000f51a4, 0x10
.byte 0x00, 0x08, 0x00, 0x00
.byte 0x00, 0x04, 0x00, 0x00
.byte 0x00, 0x02, 0x00, 0x00
.byte 0x00, 0x01, 0x00, 0x00
.global gUnknown_80F51B4
gUnknown_80F51B4: @ 80F51B4
@ replacing .incbin "baserom.gba", 0x000f51b4, 0x10
.byte 0x19, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00
.global gUnknown_80F51C4
gUnknown_80F51C4: @ 80F51C4
@ replacing .incbin "baserom.gba", 0x000f51c4, 0x10
.byte 0x19, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00
.global gUnknown_80F51D4
gUnknown_80F51D4: @ 80F51D4
@ replacing .incbin "baserom.gba", 0x000f51d4, 0x10
.byte 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00
.global gUnknown_80F51E4
gUnknown_80F51E4: @ 80F51E4
@ replacing .incbin "baserom.gba", 0x000f51e4, 0x8
.byte 0x01, 0x02, 0x0d, 0x01, 0x03, 0x06, 0x03, 0x06
.global gUnknown_80F51EC
gUnknown_80F51EC: @ 80F51EC
@ replacing .incbin "baserom.gba", 0x000f51ec, 0x20
.4byte 256
.4byte 512
.4byte 512
.4byte 256
.4byte 512
.4byte 512
.4byte 512
.4byte 512
.global gUnknown_80F520C
gUnknown_80F520C: @ 80F520C
@ replacing .incbin "baserom.gba", 0x000f520c, 0x20
.byte 0x01, 0x00, 0x78, 0x01
.byte 0x02, 0x00, 0x7a, 0x01
.byte 0x01, 0x00, 0x78, 0x01
.byte 0x01, 0x00, 0x78, 0x01
.byte 0x03, 0x00, 0x7b, 0x01
.byte 0x06, 0x00, 0x79, 0x01
.byte 0x03, 0x00, 0x7b, 0x01
.byte 0x06, 0x00, 0x79, 0x01

View File

@ -1,26 +0,0 @@
.section .rodata
.global gUnknown_80F54B4
gUnknown_80F54B4: @ 80F54B4
.4byte 0, 0, 0, 1
.4byte 0, 1, 1, 2
.4byte 0, 1, 2, 3
.4byte 1, 2, 3, 3
.global gUnknown_80F54F4
gUnknown_80F54F4: @ 80F54F4
.incbin "baserom.gba", 0xF54F4, 0xA0
.global gWarpScarfActivationChances
gWarpScarfActivationChances: @ 80F5594
@ replacing .incbin "baserom.gba", 0xF5594, 0x28
.2byte 0, 6, 12, 30, 50, 70, 90, 110, 130, 150, 170, 190, 210, 230, 250, 270, 290, 310, 999, 0
.global gUnknown_80F55BC
gUnknown_80F55BC: @ 80F55BC
.2byte 50, 5, 100, 10, 200, 15, 300, 20, 400, 25, 500, 30, 600, 35, 700, 40, 800, 45, 1000, 45, 10000, 9999, -1, 1
.global gUnknown_80F55EC
gUnknown_80F55EC: @ 80F55EC
.2byte 0, 9999, 50, 45, 100, 40, 200, 35, 300, 30, 400, 25, 500, 20, 600, 15, 700, 10, 1000, 5, 10000, 1, -1, 1

View File

@ -1,122 +0,0 @@
.section .rodata
.global gDungeonMusic
gDungeonMusic: @ 80F5668
.2byte 0x72, 0x7d, 0x0e, 0x78, 0x0f, 0x71, 0x6f, 0x14, 0x66, 0x19, 0x68, 0x73, 0x6c, 0x16, 0x7d, 0x7d, 0x7d, 0x7d, 0x0d, 0x15, 0x0f, 0x7e, 0x21, 0x27, 0x7b, 0x7c, 0x17, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x1a, 0x6e, 0x6e, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x1a, 0x7f, 0x23, 0x23, 0x23, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d
.global gUnknown_80F5700
gUnknown_80F5700: @ 80F5700
.incbin "baserom.gba", 0xF5700, 0xCA
.global gUnknown_80F57CA
gUnknown_80F57CA: @ 80F57CA
@ replacing .incbin "baserom.gba", 0x000f57ca, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F57CC
gUnknown_80F57CC: @ 80F57CC
@ replacing .incbin "baserom.gba", 0x000f57cc, 0x2
.byte 0x14, 0x00
.global gUnknown_80F57CE
gUnknown_80F57CE: @ 80F57CE
@ replacing .incbin "baserom.gba", 0x000f57ce, 0x2
.byte 0x14, 0x00
.global gUnknown_80F57D0
gUnknown_80F57D0: @ 80F57D0
@ replacing .incbin "baserom.gba", 0x000f57d0, 0x2
.byte 0x14, 0x00
.global gUnknown_80F57D2
gUnknown_80F57D2: @ 80F57D2
@ replacing .incbin "baserom.gba", 0x000f57d2, 0x2
.byte 0x0a, 0x00
.global gUnknown_80F57D4
gUnknown_80F57D4: @ 80F57D4
.incbin "baserom.gba", 0xF57D4, 0x120
.global gUnknown_80F58F4
gUnknown_80F58F4: @ 80F58F4
.incbin "baserom.gba", 0xF58F4, 0x84
.global gSecretPowerTable
gSecretPowerTable: @ 80F5978
.byte 0x03
.byte 0x00
.byte 0x06
.byte 0x07
.byte 0x07
.byte 0x06
.byte 0x06
.byte 0x07
.byte 0x08
.byte 0x06
.byte 0x00
.byte 0x05
.byte 0x08
.byte 0x08
.byte 0x00
.byte 0x08
.byte 0x08
.byte 0x07
.byte 0x07
.byte 0x07
.byte 0x00
.byte 0x05
.byte 0x06
.byte 0x08
.byte 0x06
.byte 0x00
.byte 0x00
.byte 0x08
.byte 0x06
.byte 0x01
.byte 0x07
.byte 0x07
.byte 0x01
.byte 0x01
.byte 0x06
.byte 0x08
.byte 0x08
.byte 0x07
.byte 0x06
.byte 0x06
.byte 0x06
.byte 0x00
.byte 0x06
.byte 0x06
.byte 0x05
.byte 0x08
.byte 0x06
.byte 0x06
.byte 0x06
.byte 0x03
.byte 0x00
.byte 0x00
.byte 0x05
.byte 0x02
.byte 0x07
.byte 0x06
.byte 0x00
.byte 0x08
.byte 0x08
.byte 0x06
.byte 0x00
.byte 0x07
.byte 0x00
.byte 0x00
.byte 0x06
.byte 0x01
.byte 0x06
.byte 0x06
.byte 0x08
.byte 0x08
.byte 0x06
.byte 0x08
.byte 0x08
.byte 0x03
.byte 0x03
.byte 0x06

View File

@ -1,18 +0,0 @@
#ifndef GUARD_CALLED_MOVE_DATA_H
#define GUARD_CALLED_MOVE_DATA_H
#include "structs/dungeon_entity.h"
#include "structs/str_moves.h"
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, Move *move, s32 param_4);
struct CalledMove
{
u16 moveID;
MoveCallback callback;
};
#define METRONOME_AVAILABLE_CALLED_MOVES 105
extern const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES];
extern const struct CalledMove gNaturePowerCalledMoves[];
#endif

View File

@ -9,6 +9,6 @@
#define WEATHER_HAIL 5
#define WEATHER_FOG 6
#define WEATHER_SNOW 7
#define WEATHER_RANDOM 8
#define WEATHER_COUNT 8
#endif // GUARD_CONSTANTS_WEATHER_H

291
include/dungeon_config.h Normal file
View File

@ -0,0 +1,291 @@
#ifndef GUARD_DUNGEON_CONFIG_H
#define GUARD_DUNGEON_CONFIG_H
#include "math.h"
#include "constants/weather.h"
#include "constants/type.h"
#include "constants/dungeon_action.h"
#include "structs/dungeon_entity.h"
#include "structs/str_moves.h"
extern const s16 gMonsterHouseMaxItemsTraps;
extern const s16 gMonsterHouseMinMons;
extern const s16 gMonsterHouseMaxMons;
extern const s16 gUnknown_80F4DA6;
extern const s16 gUnknown_80F4DA8;
extern const s16 gUnknown_80F4DAA;
extern const s16 gUnknown_80F4DAC;
extern const s16 gCritOddsScopeLensPatsyBand;
extern const s16 gCritOddsIqAdvantageMaster;
extern const s16 gAIConfusedAttackChance;
extern const s16 gIronTailSecondaryChance;
extern const s16 gBubbleSecondaryChance;
extern const s16 gFlameWheelSecondaryChance;
extern const s16 gFireMoveBurnSecondaryChance;
extern const s16 gIceMoveFreezeSecondaryChance;
extern const s16 gPoisonStingSecondaryChance;
extern const s16 gPsychicSecondaryChance;
extern const s16 gShadowBallSecondaryChance;
extern const s16 gSmogSecondaryChance;
extern const s16 gPoisonTailSecondaryChance;
extern const s16 gTwineedleSecondaryChance;
extern const s16 gPoisonFangSecondaryChance;
extern const s16 gBounceSecondaryChance;
extern const s16 gMetalClawSecondaryChance;
extern const s16 gMeteorMashSecondaryChance;
extern const s16 gSteelWingSecondaryChance;
extern const s16 gConstrictBubblebeamSecondaryChance;
extern const s16 gAncientPowerSecondaryChance;
extern const s16 gMistBallSecondaryChance;
extern const s16 gCrushClawSecondaryChance;
extern const s16 gLusterPurgeSecondaryChance;
extern const s16 gSacredFireSecondaryChance;
extern const s16 gThundershockSecondaryChance;
extern const s16 gLickSecondaryChance;
extern const s16 gThunderSecondaryChance;
extern const s16 gThunderboltSecondaryChance;
extern const s16 gExtrasensorySecondaryChance;
extern const s16 gTwisterSecondaryChance;
extern const s16 gBiteSecondaryChance;
extern const s16 gHeadbuttSecondaryChance;
extern const s16 gFakeOutSecondaryChance;
extern const s16 gSkyAttackSecondaryChance;
extern const s16 gRockSlideSecondaryChance;
extern const s16 gMovesConfusionSecondaryChance;
extern const s16 gDizzyPunchSecondaryChance;
extern const s16 gTriAttackSecondaryChance;
extern const s16 gBlazeKickSecondaryChance;
extern const s16 gMuddyWaterAccLowerChance;
extern const s16 gOctazookaAccLowerChance;
extern const s16 gAuroraBeamAtkLowerChance;
extern const s16 gSecretPowerSecondaryEffectChance;
extern const s16 gMovesConstrictionChance;
extern const s16 gSnoreSecondaryChance;
extern const s16 gShedSkinActivateChance;
extern const s16 gGrimyTrapActivateChance;
extern const s16 gArenaTrapActivateChance;
extern const s16 gShadowTagActivateChance;
extern const s16 gMagnetPullActivateChance;
extern const s16 gStaticActivateChance;
extern const s16 gPoisonPointActivateChance;
extern const s16 gEffectSproreActivateChance;
extern const s16 gFlameBodyActivateChance;
extern const s16 gCuteCharmActivateChance;
extern const s16 gStenchActivateChance;
extern const s16 gAiRegularAttackWeights[5];
extern const s16 gFreezeTurnRange[2];
extern const s16 gBurnTurnRange[2];
extern const s16 gPoisonTurnRange[2];
extern const s16 gBadPoisonTurnRange[2];
extern const s16 gCringeTurnRange[2];
extern const s16 gSpeedRaiseTurnRange[2];
extern const s16 gSpeedLowerTurnRange[2];
extern const s16 gConfusionTurnRange[2];
extern const s16 gParalysisTurnRange[2];
extern const s16 gShadowHoldTurnRange[2];
extern const s16 gConstrictionTurnRange[2];
extern const s16 gWrapTurnRange[2];
extern const s16 gIngrainTurnRange[2];
extern const s16 gPauseTurnRange[2];
extern const s16 gSleepTurnRange[2];
extern const s16 gNightmareTurnRange[2];
extern const s16 gSleeplessTurnRange[2];
extern const s16 gReflectTurnRange[2];
extern const s16 gLightScreenTurnRange[2];
extern const s16 gSafeguardTurnRange[2];
extern const s16 gMistTurnRange[2];
extern const s16 gMagicCoatTurnRange[2];
extern const s16 gNappingTurnRange[2];
extern const s16 gCounterTurnRange[2];
extern const s16 gBideTurnRange[2];
extern const s16 gEnragedTurnRange[2];
extern const s16 gCurseTurnRange[2];
extern const s16 gSnatchTurnRange[2];
extern const s16 gMudWaterSportTurnRange[2];
extern const s16 gLeechSeedTurnRange[2];
extern const s16 gWishTurnRange[2];
extern const s16 gSureShotTurnRange[2];
extern const s16 gPetrifiedLeaderTurnRange[2];
extern const s16 gPetrifiedTurnRange[2];
extern const s16 gSetDamageTurnRange[2];
extern const s16 gFocusEnergyTurnRange[2];
extern const s16 gCowerTurnRange[2];
extern const s16 gDecoyTurnRange[2];
extern const s16 gProtectTurnRange[2];
extern const s16 gTauntTurnRange[2];
extern const s16 gWhifferTurnRange[2];
extern const s16 gObserverOrbPausedTurnRange[2];
extern const s16 gInvisibleTurnRange[2];
extern const s16 gMirrorCoatTurnRange[2];
extern const s16 gPerishSongTurnRange[2];
extern const s16 gDestinyBondTurnRange[2];
extern const s16 gEncoreTurnRange[2];
extern const s16 gEnduringTurnRange[2];
extern const s16 gTransformedTurnRange[2];
extern const s16 gInfatuatedTurnRange[2];
extern const s16 gMobileTurnRange[2];
extern const s16 gBlinkerTurnRange[2];
extern const s16 gCrossEyedTurnRange[2];
extern const s16 gEyedropsTurnRange[2];
extern const s16 gMirrorMoveTurnRange[2];
extern const s16 gMuzzledTurnRange[2];
extern const s16 gConversion2TurnRange[2];
extern const s16 gVitalThrowTurnRange[2];
extern const s16 gYawnTurnRange[2];
extern const s16 gSleepFromYawnTurnRange[2];
extern const s16 gSpeedBoostActivationFrame;
extern const s16 gBurnDmgCountdown;
extern const s16 gPoisonDmgCountdown;
extern const s16 gBadPoisonDmgCountdown;
extern const s16 gConstrictionDmgCountdown;
extern const s16 gWrapDmgCountdown;
extern const s16 gIngrainHealCountdown;
extern const s16 gCurseDmgCountdown;
extern const s16 gLeechSeedDmgCountdown;
extern const s16 gMoveWeatherDuration;
extern const s16 gGinsengPlus3BoostChance;
extern const s24_8 gSolarBeamModifier;
extern const s24_8 gSkyAttackModifier;
extern const s24_8 gRazorWindModifier;
extern const s24_8 gFocusPunchModifier;
extern const s24_8 gSkullBashModifier;
extern const s24_8 gFlyModifier;
extern const s24_8 gBounceModifier;
extern const s24_8 gDiveModifier;
extern const s24_8 gDigModifier;
extern const s24_8 gFacadeModifier;
extern const s16 gBurnDmgValue;
extern const s16 gPoisonDmgValue;
extern const s16 gConstrictionDmgValue;
extern const s16 gWrapDmgValue;
extern const s16 gNightmareDmgValue;
extern const s16 gNappingHpHealValue;
extern const s16 gSonicboomDmgValue;
extern const s16 gDragonRageDmgValue;
extern const s16 gVacuumCutDmgValue;
extern const s16 gSplashDmgValue;
extern const s16 gSpikeTrapDmgValue;
extern const s16 gChestnutTrapDmgValue;
extern const s16 gPitfallTrapDmgValue;
extern const s16 gSetDamageDmgValue;
extern const s16 gHailSandstormDmgValue;
extern const s16 gBlowAwayDmgValue;
extern const s16 gHurlOrbDmgValue;
extern const s16 gMagnitudeDmgValues[7];
extern const s16 gUnknownDungeonChance;
extern const s16 gBlastSeedThrownDmgValue;
extern const s16 gBlastSeedEatenDmgValue;
extern const s16 gBlastSeedThrownBossDmgValue;
extern const s16 gBlastSeedEatenBossDmgValue;
extern const s16 gUnknown_80F4FAC;
extern const s16 gUnknown_80F4FAE;
extern const s16 gIngrainHealValue;
extern const s16 gLeechSeedHealValue;
extern const s16 gOranBerryHealValue;
extern const s16 gOranBerryMaxHpRiseValue;
extern const s16 gSitrusBerryHealValue;
extern const s16 gSitrusBerryMaxHpRiseValue;
extern const s16 gLifeSeedMaxHpRiseValue;
extern const s16 gWishRegenValue;
extern const s16 gRainDishRegenValue;
extern const s16 gHealRibbonRegenValue;
extern const s16 gFamishBellyDownValue;
#define BAD_POISON_DMG_TURN_VALUES_COUNT 30
extern const s16 gBadPoisonDmgValuesByTurn[BAD_POISON_DMG_TURN_VALUES_COUNT];
extern const s16 gStenchTerrifiedTurnsNo;
extern const s16 gPassScarfBellyDownValue;
extern const s16 gFriendBowRecruitRateUpValue;
extern const s16 gSynthesisHealValueByWeather[WEATHER_COUNT];
extern const s16 gMoonlightHealValueByWeather[WEATHER_COUNT];
extern const s16 gMorningSunHealValueByWeather[WEATHER_COUNT];
extern const s16 gStickPPValue;
extern const s16 gIronThornPPValue;
extern const s16 gSilverSpikePPValue;
extern const s16 gGoldFangPPValue;
extern const s16 gCacneaSpikePPValue;
extern const s16 gCorsolaTwigPPValue;
extern const s16 gGravelerockThrownDmgValue;
extern const s16 gGeoPebbleThrownDmgValue;
extern const s24_8 gAtkStatStageMultipliers[21];
extern const s24_8 gDefStatStageMultipliers[21];
extern const s24_8 gAccEvsStatStageMultipliers[2][21];
extern const s32 gDetectBandAccuracyDebuffValue;
extern const s32 gIqQuickDodgerAccuracyDebuffValue;
extern const s24_8 gReversalModifiers[4];
extern const s24_8 gWaterSpoutModifiers[4];
extern const s24_8 gEruptionModifiers[4];
extern const s32 gStockpileHealHpValues[4];
extern const u8 gWeatherBallTypes[WEATHER_COUNT];
extern const s24_8 gWeatherBallModifiers[WEATHER_COUNT];
struct CastformWeatherData
{
u8 type;
s16 monsterId;
};
extern const struct CastformWeatherData gCastformByWeather[WEATHER_COUNT];
#define NUM_EFFECTIVENESS 4
#define EFFECTIVENESS_IMMUNE 0
#define EFFECTIVENESS_RESIST 1
#define EFFECTIVENESS_NEUTRAL 2
#define EFFECTIVENESS_SUPER 3
extern const s16 gTypeEffectivenessChart[NUM_TYPES][NUM_TYPES];
extern const s32 gEffectivenessChart[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS];
#define BELLY_GO_DOWN_VALUES_COUNT 20
extern const s48_16 gBellyGoDownValues[BELLY_GO_DOWN_VALUES_COUNT];
#define WARP_SCARF_ACTIVATION_CHANCES_COUNT 20
extern const s16 gWarpScarfActivationChances[WARP_SCARF_ACTIVATION_CHANCES_COUNT];
struct ReturnDmgData
{
s16 minIq;
s16 dmgVal;
};
extern const struct ReturnDmgData gReturnDmgData[];
extern const struct ReturnDmgData gFrustrationDmgData[];
extern const u8 gDungeonCamouflageTypes[76];
extern const s16 gDungeonMusic[76];
extern const s16 gRecruitRateByLevel[101];
extern const s16 gRayquazaConfigLevel;
extern const s16 gZapdosConfigLevel;
extern const s16 gMoltresConfigLevel;
extern const s16 gArticunoConfigLevel;
extern const s16 gGroudonConfigLevel;
extern const s16 sKecleonShopItemSpawnChances[16][3][3];
extern const bool8 gUnknown_80F58F4[NUM_DUNGEON_ACTIONS][2];
extern const u8 gSecretPowerTable[76];
extern const s16 gIqItemMasterMinWildLevel;
typedef bool8 (*MoveCallback)(Entity *pokemon, Entity *target, Move *move, s32 param_4);
struct CalledMove
{
u16 moveID;
MoveCallback callback;
};
#define METRONOME_AVAILABLE_CALLED_MOVES 105
extern const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES];
extern const struct CalledMove gNaturePowerCalledMoves[];
#endif

View File

@ -38,7 +38,7 @@ s24_8 s24_8_mul(s24_8 x, s24_8 y);
bool8 F48_16_IsZero(s48_16 *a);
void F48_16_SDiv(s48_16 *dst, s48_16 *a, s48_16 *b);
void F48_16_SMul(s48_16 *dst, s48_16 *a, s48_16 *b);
void F48_16_SMul(s48_16 *dst, const s48_16 *a, const s48_16 *b);
s24_8 FP24_8_Hypot(s24_8 x, s24_8 y);
void FP48_16_FromS32(s48_16 *dst, s32 src);

View File

@ -284,7 +284,7 @@ typedef struct EntityInfo
/* 0x108 */ u8 speedUpCounters[NUM_SPEED_COUNTERS];
/* 0x10D */ u8 speedDownCounters[NUM_SPEED_COUNTERS];
/* 0x112 */ u8 stockpileStage;
/* 0x113 */ u8 unk113;
/* 0x113 */ u8 speedBoostFrames; // Frames counter, when it reaches the value in gSpeedBoostActivationFrame(250 by default), it resets to 0 and pokemon gets a speed boost.
// When non-zero, an AI Pokémon will move in a random direction every turn when it is a room.
// There is a chance of this flag being set when a wild Pokémon spawns. The chance depends on the dungeon's randomMovementChance.
/* 0x114 */ u32 moveRandomly;

View File

@ -20,7 +20,7 @@
#define DUNGEON_MAX_ITEMS 64
// size: 0x18
typedef struct Weather
typedef struct Weather // 0xE264
{
/* 0x0 */ u8 weather; // Uses the weather constants in weather.h.
/* 0x1 */ u8 unkE265; // Uses the weather constants in weather.h
@ -328,6 +328,8 @@ typedef struct unkDungeon57C
s32 unk40;
} unkDungeon57C;
#define COLOR_RAMP_COUNT 256
// size: 0x1CEDC
typedef struct Dungeon
{
@ -357,7 +359,7 @@ typedef struct Dungeon
Entity *unkBC;
u8 fillC0[0x134 - 0xC0];
struct unkStruct_Dungeon134_sub unk134;
/* 0x47C */ RGB colorRamp[0x100];
/* 0x17C */ RGB colorRamp[COLOR_RAMP_COUNT];
/* 0x57C */ unkDungeon57C unk57C;
/* 0x5C0 */ s32 unk5C0;
/* 0x5C4 */ struct unkStruct_Dungeon5C4_sub unk5C4[3];

View File

@ -1,16 +0,0 @@
#ifndef GUARD_TYPE_CHART_H
#define GUARD_TYPE_CHART_H
#include "constants/type.h"
#define NUM_EFFECTIVENESS 4
#define EFFECTIVENESS_IMMUNE 0
#define EFFECTIVENESS_RESIST 1
#define EFFECTIVENESS_NEUTRAL 2
#define EFFECTIVENESS_SUPER 3
// [Attacking type][Defending type]
extern const s16 gTypeEffectivenessChart[NUM_TYPES][NUM_TYPES];
#endif

View File

@ -264,7 +264,7 @@ SECTIONS {
src/code_807CD9C.o(.text);
src/code_807E1A0.o(.text);
src/weather.o(.text);
asm/code_807E5AC.o(.text);
src/code_807E5AC.o(.text);
src/trap.o(.text);
asm/code_807FCD4.o(.text);
src/trap_1.o(.text);
@ -534,16 +534,7 @@ SECTIONS {
data/data_80F4468.o(.rodata);
src/dungeon_ai_movement.o(.rodata);
data/data_80F4D44.o(.rodata);
src/status_checks.o(.rodata);
data/data_80F4DB4.o(.rodata);
src/dungeon_ai_attack.o(.rodata);
data/data_80F4E2C.o(.rodata);
src/type_chart.o(.rodata);
data/data_80F54B4.o(.rodata);
src/move_checks.o(.rodata);
data/data_80F5668.o(.rodata);
src/dungeon_pokemon_attributes.o(.rodata);
src/called_move_data.o(.rodata);
src/dungeon_config.o(.rodata);
data/data_80F59C8.o(.rodata);
src/dungeon_message.o(.rodata);
src/dungeon_move.o(.rodata);

View File

@ -1,306 +0,0 @@
#include "global.h"
#include "called_move_data.h"
#include "constants/move_id.h"
extern bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 YawnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 NightmareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 PainSplitMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 WhirlpoolMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FakeTearsMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SpiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ReturnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 GigaDrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ReversalMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SmellingSaltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 HandleRegularDamagingMove(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
// Todo: move this data to some better place once the file structure is better understood
// These are random
const struct CalledMove gMetronomeCalledMoves[METRONOME_AVAILABLE_CALLED_MOVES] =
{
{MOVE_IRON_TAIL, IronTailMoveAction},
{MOVE_YAWN, YawnMoveAction},
{MOVE_NIGHTMARE, NightmareMoveAction},
{MOVE_CHARM, CharmMoveAction},
{MOVE_ENCORE, EncoreMoveAction},
{MOVE_SUPER_FANG, SuperFangMoveAction},
{MOVE_PAIN_SPLIT, PainSplitMoveAction},
{MOVE_TORMENT, TormentMoveAction},
{MOVE_SWAGGER, SwaggerMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_WHIRLPOOL, WhirlpoolMoveAction},
{MOVE_FAKE_TEARS, FakeTearsMoveAction},
{MOVE_SPITE, SpiteMoveAction},
{MOVE_SMOKESCREEN, SmokescreenMoveAction},
{MOVE_FLATTER, FlatterMoveAction},
{MOVE_WILL_O_WISP, WillOWispMoveAction},
{MOVE_RETURN, ReturnMoveAction},
{MOVE_FLAME_WHEEL, FlameWheelMoveAction},
{MOVE_GUST, GustMoveAction},
{MOVE_DISABLE, DisableMoveAction},
{MOVE_CRUNCH, ShadowBallMoveAction},
{MOVE_BITE, BiteMoveAction},
{MOVE_THUNDER, ThunderMoveAction},
{MOVE_ENDEAVOR, EndeavorMoveAction},
{MOVE_FACADE, FacadeMoveAction},
{MOVE_CONSTRICT, sub_8058580},
{MOVE_BRICK_BREAK, BrickBreakMoveAction},
{MOVE_ROCK_TOMB, RockTombMoveAction},
{MOVE_GIGA_DRAIN, GigaDrainMoveAction},
{MOVE_REVERSAL, ReversalMoveAction},
{MOVE_SMELLINGSALT, SmellingSaltMoveAction},
{MOVE_METAL_SOUND, MetalSoundMoveAction},
{MOVE_TICKLE, TickleMoveAction},
{MOVE_OUTRAGE, OutrageMoveAction},
{MOVE_LOW_KICK, LowKickMoveAction},
{MOVE_ANCIENTPOWER, AncientPowerMoveAction},
{MOVE_RAPID_SPIN, RapidSpinMoveAction},
{MOVE_SCARY_FACE, ScaryFaceMoveAction},
{MOVE_SUBMISSION, sub_8058E5C},
{MOVE_LICK, LickMoveAction},
{MOVE_FISSURE, FissureMoveAction},
{MOVE_EXTRASENSORY, ExtrasensoryMoveAction},
{MOVE_ABSORB, AbsorbMoveAction},
{MOVE_SKILL_SWAP, SkillSwapMoveAction},
{MOVE_HEADBUTT, HeadbuttMoveAction},
{MOVE_DOUBLE_EDGE, DoubleEdgeMoveAction},
{MOVE_SAND_ATTACK, sub_8059528},
{MOVE_SMOG, SmogMoveAction},
{MOVE_SACRED_FIRE, SacredFireMoveAction},
{MOVE_SHEER_COLD, sub_80595EC},
{MOVE_MUDDY_WATER, MuddyWaterMoveAction},
{MOVE_TWISTER, TwisterMoveAction},
{MOVE_TWINEEDLE, TwineedleMoveAction},
{MOVE_SEISMIC_TOSS, sub_8059A2C},
{MOVE_SUPERSONIC, SupersonicMoveAction},
{MOVE_TAUNT, TauntMoveAction},
{MOVE_HORN_DRILL, HornDrillMoveAction},
{MOVE_THUNDERSHOCK, ThundershockMoveAction},
{MOVE_THUNDER_WAVE, ThunderWaveMoveAction},
{MOVE_BLOCK, BlockMoveAction},
{MOVE_POISON_GAS, PoisonGasMoveAction},
{MOVE_TOXIC, ToxicMoveAction},
{MOVE_POISON_FANG, PoisonFangMoveAction},
{MOVE_POISON_STING, PoisonStingMoveAction},
{MOVE_TRI_ATTACK, TriAttackMoveAction},
{MOVE_TRICK, TrickMoveAction},
{MOVE_TRIPLE_KICK, TripleKickMoveAction},
{MOVE_MUD_SLAP, MudSlapMoveAction},
{MOVE_THIEF, ThiefMoveAction},
{MOVE_ROLE_PLAY, RolePlayMoveAction},
{MOVE_LEER, LeerMoveAction},
{MOVE_PAY_DAY, PayDayMoveAction},
{MOVE_CURSE, CurseMoveAction},
{MOVE_FRENZY_PLANT, sub_805A568},
{MOVE_SUPERPOWER, SuperpowerMoveAction},
{MOVE_DYNAMICPUNCH, DynamicPunchMoveAction},
{MOVE_KNOCK_OFF, KnockOffMoveAction},
{MOVE_SECRET_POWER, SecretPowerMoveAction},
{MOVE_DIZZY_PUNCH, sub_805AC90},
{MOVE_IMPRISON, ObserverOrbAction},
{MOVE_FEATHERDANCE, FeatherDanceMoveAction},
{MOVE_BEAT_UP, BeatUpMoveAction},
{MOVE_BLAST_BURN, BlastBurnMoveAction},
{MOVE_CRUSH_CLAW, CrushClawMoveAction},
{MOVE_BLAZE_KICK, BlazeKickMoveAction},
{MOVE_PRESENT, PresentMoveAction},
{MOVE_ERUPTION, EruptionMoveAction},
{MOVE_GLARE, GlareMoveAction},
{MOVE_POISON_TAIL, PoisonTailMoveAction},
{MOVE_ROAR, RoarMoveAction},
{MOVE_FIRE_SPIN, sub_805B17C},
{MOVE_WRAP, WrapMoveAction},
{MOVE_MAGNITUDE, MagnitudeMoveAction},
{MOVE_MIST_BALL, MistBallMoveAction},
{MOVE_DESTINY_BOND, DestinyBondMoveAction},
{MOVE_FALSE_SWIPE, FalseSwipeMoveAction},
{MOVE_HIDDEN_POWER, HiddenPowerMoveAction},
{MOVE_ATTRACT, AttractMoveAction},
{MOVE_MIMIC, MimicMoveAction},
{MOVE_FRUSTRATION, FrustrationMoveAction},
{MOVE_LEECH_SEED, LeechSeedMoveAction},
{MOVE_DREAM_EATER, DreamEaterMoveAction},
{MOVE_LUSTER_PURGE, LusterPurgeMoveAction},
{MOVE_DRAGON_RAGE, DragonRageMoveAction},
{MOVE_FAKE_OUT, FakeOutMoveAction},
};
// These correspond to dungeon's tileset id
const struct CalledMove gNaturePowerCalledMoves[] =
{
{MOVE_SURF, HandleRegularDamagingMove},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_EARTHQUAKE, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_EARTHQUAKE, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_RAZOR_LEAF, HandleRegularDamagingMove},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_RAZOR_LEAF, HandleRegularDamagingMove},
{MOVE_RAZOR_LEAF, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_EARTHQUAKE, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_SURF, HandleRegularDamagingMove},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_EARTHQUAKE, HandleRegularDamagingMove},
{MOVE_BUBBLEBEAM, sub_8058580},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_SHADOW_BALL, ShadowBallMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_STUN_SPORE, StunSporeMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_RAZOR_LEAF, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, RockSlideMoveAction},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SWIFT, HandleRegularDamagingMove},
{MOVE_SURF, HandleRegularDamagingMove},
{MOVE_SURF, HandleRegularDamagingMove},
{MOVE_ROCK_SLIDE, HandleRegularDamagingMove},
};
//

View File

@ -7,7 +7,7 @@
#include "code_806CD90.h"
#include "code_8041AD0.h"
#include "code_800DAC0.h"
#include "type_chart.h"
#include "dungeon_config.h"
#include "constants/direction.h"
#include "constants/status.h"
#include "constants/type.h"

View File

@ -37,6 +37,7 @@
#include "constants/monster.h"
#include "constants/trap.h"
#include "dungeon_serializer.h"
#include "dungeon_config.h"
extern void sub_800EE5C(s32);
extern void sub_800EF64(void);
@ -390,7 +391,6 @@ extern const u8 *const gUnknown_80F89D4;
extern const u8 *const gUnknown_80F89D8;
extern const s16 gUnknown_80F6850[4];
extern const s16 gDungeonMusic[];
extern OpenedFile *gDungeonNameBannerPalette;

View File

@ -26,36 +26,14 @@
#include "structs/dungeon_entity.h"
#include "structs/str_dungeon.h"
#include "structs/str_position.h"
#include "dungeon_config.h"
extern s16 gTypeGummiIQBoost[NUM_TYPES][NUMBER_OF_GUMMIS];
extern u8 *gUnknown_80F89F4[];
extern u8 *gUnknown_80FB580[];
extern s16 gUnknown_80F4FB6;
extern s16 gUnknown_80F4FB8;
extern s16 gUnknown_80F4FBA;
extern s16 gUnknown_80F4FBC;
extern s16 gUnknown_80F4FBE;
extern s16 gUnknown_80F4F46; // 0xC
extern s16 gUnknown_80F4FA2;
extern s16 gUnknown_80F4FA4; // 0x14
extern s16 gUnknown_80F4FA6; // 0x2D
extern s16 gUnknown_80F4FA8; // 0xF
extern s16 gUnknown_80F4FAA; // 0x1E
extern u32 gUnknown_8106A4C;
extern u32 gUnknown_8106A50;
extern s16 gUnknown_80F4FAC;
extern s16 gUnknown_80F503A;
extern s16 gUnknown_80F503C;
extern s16 gUnknown_80F503E;
extern s16 gUnknown_80F5040;
extern s16 gUnknown_80F5042;
extern s16 gUnknown_80F5044;
extern s16 gUnknown_80F5046;
extern s16 gUnknown_80F5048;
extern s16 gUnknown_80F4FAE;
extern s16 gUnknown_80F4FAC;
extern s16 gUnknown_80F4E74[];
extern u8 *gUnknown_80FDBB8[];
extern u8 *gUnknown_80FE458[];
@ -167,7 +145,7 @@ bool8 sub_8047930(Entity *pokemon, Entity *target)
return FALSE;
}
else {
if(DungeonRandInt(100) < gUnknown_80F4FA2)
if(DungeonRandInt(100) < gUnknownDungeonChance)
flag = TRUE;
else
flag = FALSE;
@ -263,28 +241,28 @@ _jump:
}
switch(item->id) {
case ITEM_STICK:
sub_80482FC(pokemon,target,gUnknown_80F503A,1);
sub_80482FC(pokemon,target,gStickPPValue,ITEM_STICK);
break;
case ITEM_IRON_THORN:
sub_80482FC(pokemon,target,gUnknown_80F503C,2);
sub_80482FC(pokemon,target,gIronThornPPValue,ITEM_IRON_THORN);
break;
case ITEM_SILVER_SPIKE:
sub_80482FC(pokemon,target,gUnknown_80F503E,3);
sub_80482FC(pokemon,target,gSilverSpikePPValue,ITEM_SILVER_SPIKE);
break;
case ITEM_GOLD_FANG:
sub_80482FC(pokemon,target,gUnknown_80F5040,4);
sub_80482FC(pokemon,target,gGoldFangPPValue,ITEM_GOLD_FANG);
break;
case ITEM_CACNEA_SPIKE:
sub_80482FC(pokemon,target,gUnknown_80F5042,5);
sub_80482FC(pokemon,target,gCacneaSpikePPValue,ITEM_CACNEA_SPIKE);
break;
case ITEM_CORSOLA_TWIG:
sub_80482FC(pokemon,target,gUnknown_80F5044,6);
sub_80482FC(pokemon,target,gCorsolaTwigPPValue,ITEM_CORSOLA_TWIG);
break;
case ITEM_GEO_PEBBLE:
sub_8048340(pokemon,target,gUnknown_80F5048);
sub_8048340(pokemon,target,gGeoPebbleThrownDmgValue);
break;
case ITEM_GRAVELEROCK:
sub_8048340(pokemon,target,gUnknown_80F5046);
sub_8048340(pokemon,target,gGravelerockThrownDmgValue);
break;
case ITEM_HEAL_SEED:
HealSeedItemAction(pokemon,target,param_3);
@ -473,7 +451,7 @@ UNUSED void nullsub_205(void) { }
void SleepSeedItemAction(Entity *pokemon, Entity *target)
{
SleepStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE);
SleepStatusTarget(pokemon, target, CalculateStatusTurns(target, gSleepTurnRange, TRUE), TRUE);
}
void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4)
@ -497,12 +475,12 @@ void HealSeedItemAction(Entity *pokemon, Entity *target, u8 r2)
void OranBerryItemAction(Entity *pokemon, Entity *target)
{
HealTargetHP(pokemon, target, gUnknown_80F4FB6, gUnknown_80F4FB8, TRUE);
HealTargetHP(pokemon, target, gOranBerryHealValue, gOranBerryMaxHpRiseValue, TRUE);
}
void SitrusBerryItemAction(Entity *pokemon, Entity *target)
{
HealTargetHP(pokemon, target, gUnknown_80F4FBA, gUnknown_80F4FBC, TRUE);
HealTargetHP(pokemon, target, gSitrusBerryHealValue, gSitrusBerryMaxHpRiseValue, TRUE);
}
void MaxElixirAction(Entity *pokemon, Entity *target)
@ -512,7 +490,7 @@ void MaxElixirAction(Entity *pokemon, Entity *target)
void LifeSeedItemAction(Entity *pokemon, Entity *target)
{
HealTargetHP(pokemon, target, 0, gUnknown_80F4FBE, TRUE);
HealTargetHP(pokemon, target, 0, gLifeSeedMaxHpRiseValue, TRUE);
}
void BlinkerSeedItemAction(Entity *pokemon, Entity *target)
@ -631,7 +609,7 @@ void GinsengItemAction(Entity *pokemon, Entity * target)
s32 moveBoost = 1;
EntityInfo *entityInfo = GetEntInfo(target);
if (DungeonRandInt(100) < gUnknown_80F4F46) {
if (DungeonRandInt(100) < gGinsengPlus3BoostChance) {
moveBoost = 3;
}
@ -672,7 +650,7 @@ void GinsengItemAction(Entity *pokemon, Entity * target)
void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
{
s32 uVar1;
s32 dmg;
EntityInfo *entityInfo;
EntityInfo *entityInfo_1;
Entity *entity;
@ -682,16 +660,16 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
entityInfo = GetEntInfo(target);
entityInfo_1 = entityInfo;
if (gDungeon->unk644.unk31 != 0) {
uVar1 = gUnknown_80F4FA8;
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8);
dmg = gBlastSeedThrownBossDmgValue;
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); // It appears to be weak here...
}
else {
uVar1 = gUnknown_80F4FA4;
dmg = gBlastSeedThrownDmgValue;
}
if (entityInfo_1->frozenClassStatus.status == STATUS_FROZEN) {
EndFrozenClassStatus(pokemon, target);
}
sub_806F370(pokemon, target, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
sub_806F370(pokemon, target, dmg, 1, auStack28, 0, 0x216, 0, 0, 0);
}
else
{
@ -705,16 +683,16 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
{
entityInfo = GetEntInfo(entity);
if (gDungeon->unk644.unk31 != 0) {
uVar1 = gUnknown_80F4FAA;
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8);
dmg = gBlastSeedEatenBossDmgValue;
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); // It appears to be weak here...
}
else {
uVar1 = gUnknown_80F4FA6;
dmg = gBlastSeedEatenDmgValue;
}
if (entityInfo->frozenClassStatus.status == STATUS_FROZEN) {
EndFrozenClassStatus(pokemon, entity);
}
sub_806F370(pokemon, entity, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
sub_806F370(pokemon, entity, dmg, 1, auStack28, 0, 0x216, 0, 0, 0);
}
}
}

View File

@ -40,18 +40,8 @@
#include "constants/iq_skill.h"
#include "structs/str_806B7F8.h"
#include "structs/str_202ED28.h"
#include "dungeon_config.h"
struct unkStruct_80F520C
{
u8 unk0; // types0
u8 unk1; // Most likely just padding and should be removed
s16 unk2; // monsterID
};
// Castform Forecast ability data
extern const struct unkStruct_80F520C gUnknown_80F520C[WEATHER_RANDOM];
extern u8 gUnknown_80F51E4[];
extern u8 *gUnknown_80FCC7C[];
extern u8 *gUnknown_80FCCAC[];
extern u8 *gUnknown_80FDCC8[];
@ -109,7 +99,7 @@ void sub_8069E0C(Entity *pokemon)
entityInfo = GetEntInfo(pokemon);
if (AbilityIsActive(pokemon, ABILITY_FORECAST)) {
entityInfo->types[0] = gUnknown_80F520C[GetApparentWeather(pokemon)].unk0;
entityInfo->types[0] = gCastformByWeather[GetApparentWeather(pokemon)].type;
entityInfo->types[1] = TYPE_NONE;
}
else {
@ -156,7 +146,7 @@ s32 GetMonsterApparentID(Entity *pokemon, s32 _id)
s16 id = (s16)(_id);
if (id == MONSTER_CASTFORM || IS_CASTFORM_FORM_MONSTER(id)) {
if (AbilityIsActive(pokemon, ABILITY_FORECAST))
return gUnknown_80F520C[GetApparentWeather(pokemon)].unk2;
return gCastformByWeather[GetApparentWeather(pokemon)].monsterId;
return MONSTER_CASTFORM;
}
@ -224,7 +214,7 @@ void sub_8069F9C(Entity *pokemon, Entity *target, Move *move)
u8 type = GetMoveTypeForMonster(pokemon,move);
if (move->id == MOVE_WEATHER_BALL) {
u32 weather = GetApparentWeather(pokemon);
type = gUnknown_80F51E4[weather];
type = gWeatherBallTypes[weather];
}
if (type != TYPE_NONE && !MonsterIsType(target,type)) {
const u8 *str;
@ -1863,7 +1853,7 @@ void ResetMonEntityData(EntityInfo *entInfo, bool8 setStatsToOne)
}
if (hasForecast) {
entInfo->types[0] = gUnknown_80F520C[GetApparentWeather(NULL)].unk0;
entInfo->types[0] = gCastformByWeather[GetApparentWeather(NULL)].type;
entInfo->types[1] = TYPE_NONE;
}
else {
@ -1876,7 +1866,7 @@ void ResetMonEntityData(EntityInfo *entInfo, bool8 setStatsToOne)
entInfo->flashFireBoost = 0;
entInfo->stockpileStage = 0;
entInfo->perishSongTurns = 0;
entInfo->unk113 = 0;
entInfo->speedBoostFrames = 0;
entInfo->grudge = 0;
entInfo->expMultiplier = EXP_HALVED;
entInfo->exposed = FALSE;

View File

@ -33,9 +33,9 @@
#include "move_effects_target.h"
#include "dungeon_pokemon_attributes.h"
#include "code_8041AD0.h"
#include "type_chart.h"
#include "dungeon_message.h"
#include "dungeon_map_access.h"
#include "dungeon_config.h"
extern u8 gUnknown_202F221;
@ -291,16 +291,6 @@ extern void EntityUpdateStatusSprites(Entity *);
extern bool8 sub_8045888(Entity *r0);
extern const s32 gUnknown_8106A4C;
extern const s16 gUnknown_80F4E10;
extern const s16 gUnknown_80F4E12;
extern const s16 gUnknown_80F4E14;
extern const s16 gUnknown_80F4E16;
extern const s16 gUnknown_80F4E18;
extern const s16 gUnknown_80F4E1A;
extern const s16 gUnknown_80F4E1C;
extern const s16 gUnknown_80F4E1E;
extern const s16 gUnknown_80F4E20;
extern const s16 gUnknown_80F4F8C;
extern const u8 *const gUnknown_80FCFA4;
extern const u8 *const gUnknown_80FCA90;
extern const u8 *const gUnknown_80F9600;
@ -410,36 +400,36 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
if (AbilityIsActive(target, ABILITY_ARENA_TRAP)
&& !MonsterIsType(attacker, TYPE_FLYING)
&& !AbilityIsActive(attacker, ABILITY_LEVITATE)
&& DungeonRandInt(100) < gUnknown_80F4E10)
&& DungeonRandInt(100) < gArenaTrapActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_ARENA_TRAP;
}
if (AbilityIsActive(target, ABILITY_SHADOW_TAG)
&& DungeonRandInt(100) < gUnknown_80F4E12)
&& DungeonRandInt(100) < gShadowTagActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_SHADOW_TAG;
}
if (AbilityIsActive(target, ABILITY_MAGNET_PULL)
&& MonsterIsType(attacker, TYPE_STEEL)
&& DungeonRandInt(100) < gUnknown_80F4E14)
&& DungeonRandInt(100) < gMagnetPullActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_MAGNET_PULL;
}
if (AbilityIsActive(target, ABILITY_STATIC)
&& isPhysical
&& DungeonRandInt(100) < gUnknown_80F4E16)
&& DungeonRandInt(100) < gStaticActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_STATIC;
}
if (AbilityIsActive(target, ABILITY_POISON_POINT)
&& DungeonRandInt(100) < gUnknown_80F4E18)
&& DungeonRandInt(100) < gPoisonPointActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_POISON_POINT;
}
if (AbilityIsActive(target, ABILITY_EFFECT_SPORE)
&& isPhysical
&& DungeonRandInt(100) < gUnknown_80F4E1A)
&& DungeonRandInt(100) < gEffectSproreActivateChance)
{
s32 rnd = DungeonRandInt(3);
if (rnd < 1)
@ -450,18 +440,18 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_EFFECT_SPORE_SLP;
}
if (AbilityIsActive(target, ABILITY_FLAME_BODY)
&& DungeonRandInt(100) < gUnknown_80F4E1C)
&& DungeonRandInt(100) < gFlameBodyActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_FLAME_BODY;
}
if (AbilityIsActive(target, ABILITY_CUTE_CHARM)
&& isPhysical
&& DungeonRandInt(100) < gUnknown_80F4E1E)
&& DungeonRandInt(100) < gCuteCharmActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_CUTE_CHARM;
}
if (AbilityIsActive(target, ABILITY_STENCH)
&& DungeonRandInt(100) < gUnknown_80F4E20)
&& DungeonRandInt(100) < gStenchActivateChance)
{
attackerInfo->abilityEffectFlags |= ABILITY_FLAG_STENCH;
}
@ -516,7 +506,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
&& GetEntInfo(attacker)->sureShotClassStatus.status == STATUS_SET_DAMAGE
&& dmgStruct->unkE == 0)
{
dmgStruct->dmg = gUnknown_80F4F8C;
dmgStruct->dmg = gSetDamageDmgValue;
}
if (arg4 != 0x20E && AbilityIsActive(target, ABILITY_STURDY) && dmgStruct->dmg == 9999) {

View File

@ -15,13 +15,13 @@
#include "math.h"
#include "number_util.h"
#include "status.h"
#include "type_chart.h"
#include "dungeon_random.h"
#include "code_80450F8.h"
#include "code_8045A00.h"
#include "dungeon_items.h"
#include "structs/str_damage.h"
#include "dungeon_util.h"
#include "dungeon_config.h"
void sub_8042940(Entity *r0);
void sub_80428B0(Entity *r0);
@ -33,17 +33,12 @@ extern void sub_8041B74(Entity *pokemon);
extern void sub_8041B5C(Entity *pokemon);
extern void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 arg4, bool32 arg8, s32 argC);
extern const s32 gUnknown_80F54B4[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS];
extern const s24_8 gUnknown_80F504C[];
extern const s24_8 gUnknown_80F50A0[];
extern const s16 gUnknown_810AC60;
extern const s16 gUnknown_810AC68;
extern const s16 gUnknown_810AC64;
extern const s16 gUnknown_810AC66;
extern const s16 gUnknown_810AC68;
extern const s16 gUnknown_810AC62;
extern const s16 gUnknown_80F4DAE;
extern const s16 gUnknown_80F4DB0;
extern s48_16 gUnknown_8106F24;
extern s48_16 gUnknown_8106F04;
extern s48_16 gUnknown_8106F1C;
@ -210,7 +205,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
gDungeon->unk134.unk13E[0] = atkStatStage;
gDungeon->unk134.unk140[0] = attackerInfo->atk[splitIndex] + movePower;
statCalc = s24_8_mul(IntToF248(attackerInfo->atk[splitIndex] + movePower), gUnknown_80F504C[atkStatStage]);
statCalc = s24_8_mul(IntToF248(attackerInfo->atk[splitIndex] + movePower), gAtkStatStageMultipliers[atkStatStage]);
statCalc = s24_8_mul(statCalc, attackerInfo->offensiveMultipliers[splitIndex]);
atkStat = F248ToInt(statCalc);
@ -234,7 +229,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
gDungeon->unk134.unk13E[1] = defStatStage;
gDungeon->unk134.unk140[1] = targetInfo->def[splitIndex];
statCalc = s24_8_mul(IntToF248(targetInfo->def[splitIndex]), gUnknown_80F50A0[defStatStage]);
statCalc = s24_8_mul(IntToF248(targetInfo->def[splitIndex]), gDefStatStageMultipliers[defStatStage]);
statCalc = s24_8_mul(statCalc, targetInfo->defensiveMultipliers[splitIndex]);
defStat = F248ToInt(statCalc);
@ -362,15 +357,15 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
}
else {
if (HasHeldItem(attacker, ITEM_SCOPE_LENS)) {
critOdds += gUnknown_80F4DAE;
critOdds += gCritOddsScopeLensPatsyBand;
gDungeon->unk134.unk164 = 1;
}
if (HasHeldItem(target, ITEM_PATSY_BAND)) {
critOdds += gUnknown_80F4DAE;
critOdds += gCritOddsScopeLensPatsyBand;
gDungeon->unk134.unk165 = 1;
}
if (r5 && IQSkillIsEnabled(attacker, IQ_TYPE_ADVANTAGE_MASTER)) {
critOdds = gUnknown_80F4DB0;
critOdds = gCritOddsIqAdvantageMaster;
gDungeon->unk134.unk169 = 1;
}
}
@ -472,7 +467,7 @@ void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *t
typeEffectiveness[i] = effectiv;
}
if (AbilityIsActive(target, ABILITY_WONDER_GUARD)) {
if (gUnknown_80F54B4[typeEffectiveness[0]][typeEffectiveness[1]] != EFFECTIVENESS_SUPER) {
if (gEffectivenessChart[typeEffectiveness[0]][typeEffectiveness[1]] != EFFECTIVENESS_SUPER) {
dmgNew = 0;
}
}

View File

@ -22,13 +22,11 @@
#include "position_util.h"
#include "text_util.h"
#include "dungeon_util_1.h"
#include "type_chart.h"
#include "math.h"
#include "dungeon_config.h"
#include "string_format.h"
extern u8 gFormatBuffer_FriendArea[];
extern u8 gUnknown_202EE70[MAX_TEAM_BODY_SIZE];
extern s16 gUnknown_80F5008;
extern s16 gUnknown_80F5700[];
extern s32 gUnknown_8106F7C[];
extern u8 *gUnknown_80FA0F0[];
@ -245,9 +243,9 @@ bool8 sub_806F660(Entity *pokemon, Entity *target)
return FALSE;
if (HasHeldItem(pokemon, ITEM_FRIEND_BOW)) {
recruitRate += gUnknown_80F5008;
recruitRate += gFriendBowRecruitRateUpValue;
}
recruitRate += gUnknown_80F5700[pokemonInfo->level];
recruitRate += gRecruitRateByLevel[pokemonInfo->level];
if (rand >= recruitRate)
return FALSE;

View File

@ -1,6 +1,7 @@
#include "global.h"
#include "constants/tactic.h"
#include "dungeon_capabilities.h"
#include "dungeon_config.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_leader.h"
#include "dungeon_message.h"
@ -21,11 +22,6 @@
EWRAM_DATA s32 gUnknown_202F31C[2] = {0, 0};
EWRAM_DATA s32 gUnknown_202F324[2] = {0, 0};
extern s16 gUnknown_80F4DA6;
extern s16 gUnknown_80F4DA8;
extern s16 gUnknown_80F4DAA;
extern s16 gUnknown_80F4DAC;
extern u8 *gUnknown_80F9ACC[];
extern u8 *gUnknown_80F9AEC[];
extern u8 *gUnknown_80F9B10[];

View File

@ -33,6 +33,7 @@
#include "code_8077274_1.h"
#include "dungeon_pokemon_attributes.h"
#include "math.h"
#include "dungeon_config.h"
extern bool8 sub_8044B28(void);
extern void sub_8075708(Entity *entity);
@ -83,29 +84,6 @@ extern const u8 *gPtrProtectSavedItMessage;
extern const u8 *gPtrStenchWavedOffMessage;
extern const u8 *gUnknown_80FA124[];
extern const s16 gWarpScarfActivationChances[];
extern const s16 gUnknown_80F4FC8[];
extern const s16 gUnknown_80F4F8E;
extern const s16 gUnknown_80F4E0C;
extern const s16 gUnknown_80F4F32;
extern const s16 gUnknown_80F4F34;
extern const s16 gUnknown_80F4F70;
extern const s16 gUnknown_80F4F72;
extern const s16 gUnknown_80F4F30;
extern const s16 gUnknown_80F4F38;
extern const s16 gUnknown_80F4FC4;
extern const s16 gUnknown_80F4FC0;
extern const s16 gUnknown_80F4F3A;
extern const s16 gUnknown_80F4F3C;
extern const s16 gUnknown_80F4FB2;
extern const s16 gUnknown_80F4F3E;
extern const s16 gUnknown_80F4FB4;
extern const s16 gUnknown_80F4F40;
extern const s16 gUnknown_80F4F74;
extern const s16 gUnknown_80F4FC2;
extern const s16 gUnknown_80F4F76;
extern const s16 gUnknown_80F4F36;
extern s48_16 gUnknown_80F54F4[8];
extern const s32 gUnknown_80F60DC[];
extern const DungeonPos gUnknown_80F4D44[];
@ -292,8 +270,8 @@ void sub_8074094(Entity *entity)
sub_805229C();
sub_807E8F0(entity);
if (HasHeldItem(entity, ITEM_WARP_SCARF)) {
if (++entityInfo->turnsSinceWarpScarfActivation > 19)
entityInfo->turnsSinceWarpScarfActivation = 19;
if (++entityInfo->turnsSinceWarpScarfActivation >= WARP_SCARF_ACTIVATION_CHANCES_COUNT)
entityInfo->turnsSinceWarpScarfActivation = WARP_SCARF_ACTIVATION_CHANCES_COUNT - 1;
if (DungeonRandInt(100) < gWarpScarfActivationChances[entityInfo->turnsSinceWarpScarfActivation]) {
entityInfo->turnsSinceWarpScarfActivation = 0;
sub_80444F4(entity);
@ -315,28 +293,28 @@ void sub_8074094(Entity *entity)
bool8 sound;
const u8 *str = NULL;
s32 r4 = 10;
s32 arrIndex = 10;
if (HasHeldItem(entity, ITEM_TIGHT_BELT))
r4 = 0;
arrIndex = 0;
if (HasHeldItem(entity, ITEM_STAMINA_BAND))
r4--;
arrIndex--;
if (IQSkillIsEnabled(entity, IQ_ENERGY_SAVER))
r4--;
arrIndex--;
if (HasHeldItem(entity, ITEM_DIET_RIBBON))
r4++;
arrIndex++;
if (HasHeldItem(entity, ITEM_HEAL_RIBBON))
r4++;
arrIndex++;
if (HasHeldItem(entity, ITEM_MUNCH_BELT))
r4++;
arrIndex++;
if (r4 < 0)
r4 = 0;
if (r4 > 19)
r4 = 19;
if (arrIndex < 0)
arrIndex = 0;
if (arrIndex >= BELLY_GO_DOWN_VALUES_COUNT)
arrIndex = BELLY_GO_DOWN_VALUES_COUNT - 1;
sp8.hi = 0;
sp8.lo = 6554;
F48_16_SMul(&sp10, &sp8, &gUnknown_80F54F4[r4]);
F48_16_SMul(&sp10, &sp8, &gBellyGoDownValues[arrIndex]);
if (entityInfo->unk153 > 1)
sp10.lo += (gUnknown_80F60DC[entityInfo->unk153] << 0x10);
entityInfo->unk153 = 0;
@ -393,12 +371,12 @@ void sub_8074094(Entity *entity)
if (gDungeon->weather.weatherDamageCounter == 0) {
if (GetApparentWeather(entity) == WEATHER_HAIL) {
if (!MonsterIsType(entity, TYPE_ICE)) {
DealDamageToEntity(entity, gUnknown_80F4F8E, 0x12, 0x220);
DealDamageToEntity(entity, gHailSandstormDmgValue, 0x12, 0x220);
}
}
else if (GetApparentWeather(entity) == WEATHER_SANDSTORM) {
if (!MonsterIsType(entity, TYPE_GROUND) && !MonsterIsType(entity, TYPE_ROCK) && !MonsterIsType(entity, TYPE_STEEL)) {
DealDamageToEntity(entity, gUnknown_80F4F8E, 0x12, 0x220);
DealDamageToEntity(entity, gHailSandstormDmgValue, 0x12, 0x220);
}
}
if (!EntityExists(entity) || sub_8044B28())
@ -407,16 +385,16 @@ void sub_8074094(Entity *entity)
// Abilities check
rand = DungeonRandInt(100);
if (AbilityIsActive(entity, ABILITY_SHED_SKIN) && rand < gUnknown_80F4E0C && HasNegativeStatus(entity)) {
if (AbilityIsActive(entity, ABILITY_SHED_SKIN) && rand < gShedSkinActivateChance && HasNegativeStatus(entity)) {
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
sub_8079F20(entity, entity, 1, 0);
}
if (AbilityIsActive(entity, ABILITY_SPEED_BOOST)) {
entityInfo->unk113++;
if (entityInfo->unk113 >= gUnknown_80F4F30) {
entityInfo->unk113 = 0;
entityInfo->speedBoostFrames++;
if (entityInfo->speedBoostFrames >= gSpeedBoostActivationFrame) {
entityInfo->speedBoostFrames = 0;
RaiseMovementSpeedTarget(entity, entity, 0x7F, FALSE);
}
}
@ -434,9 +412,9 @@ void sub_8074094(Entity *entity)
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
entityInfo->burnClassStatus.damageCountdown = gUnknown_80F4F32;
entityInfo->burnClassStatus.damageCountdown = gBurnDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gUnknown_80F4F70, 1, 0x208);
DealDamageToEntity(entity, gBurnDmgValue, 1, 0x208);
}
if (!EntityExists(entity) || sub_8044B28())
return;
@ -447,9 +425,9 @@ void sub_8074094(Entity *entity)
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
entityInfo->burnClassStatus.damageCountdown = gUnknown_80F4F34;
entityInfo->burnClassStatus.damageCountdown = gPoisonDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gUnknown_80F4F72, 3, 0x20A);
DealDamageToEntity(entity, gPoisonDmgValue, 3, 0x20A);
}
if (!EntityExists(entity) || sub_8044B28())
return;
@ -457,18 +435,18 @@ void sub_8074094(Entity *entity)
else if (entityInfo->burnClassStatus.status == STATUS_BADLY_POISONED) {
if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) {
s32 turns = entityInfo->burnClassStatus.unk4;
if (entityInfo->burnClassStatus.unk4 < 29)
if (entityInfo->burnClassStatus.unk4 < BAD_POISON_DMG_TURN_VALUES_COUNT - 1)
entityInfo->burnClassStatus.unk4++;
entityInfo->burnClassStatus.damageCountdown = gUnknown_80F4F36;
if (turns >= 29)
turns = 29;
entityInfo->burnClassStatus.damageCountdown = gBadPoisonDmgCountdown;
if (turns >= BAD_POISON_DMG_TURN_VALUES_COUNT - 1)
turns = BAD_POISON_DMG_TURN_VALUES_COUNT - 1;
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gUnknown_80F4FC8[turns], 3, 0x20A);
DealDamageToEntity(entity, gBadPoisonDmgValuesByTurn[turns], 3, 0x20A);
}
if (!EntityExists(entity) || sub_8044B28())
return;
@ -479,10 +457,10 @@ void sub_8074094(Entity *entity)
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
entityInfo->frozenClassStatus.damageCountdown = gUnknown_80F4F38;
entityInfo->frozenClassStatus.damageCountdown = gConstrictionDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
sub_8041C4C(entity, entityInfo->frozenClassStatus.unk4);
DealDamageToEntity(entity, gUnknown_80F4F74, 2, 0x209);
DealDamageToEntity(entity, gConstrictionDmgValue, 2, 0x209);
}
if (!EntityExists(entity) || sub_8044B28())
return;
@ -492,9 +470,9 @@ void sub_8074094(Entity *entity)
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
entityInfo->frozenClassStatus.damageCountdown = gUnknown_80F4F3A;
entityInfo->frozenClassStatus.damageCountdown = gWrapDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gUnknown_80F4F76, 5, 0x20B);
DealDamageToEntity(entity, gWrapDmgValue, 5, 0x20B);
}
if (!EntityExists(entity) || sub_8044B28())
return;
@ -504,8 +482,8 @@ void sub_8074094(Entity *entity)
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
entityInfo->frozenClassStatus.damageCountdown = gUnknown_80F4F3C;
HealTargetHP(entity, entity, gUnknown_80F4FB2, 0, TRUE);
entityInfo->frozenClassStatus.damageCountdown = gIngrainHealCountdown;
HealTargetHP(entity, entity, gIngrainHealValue, 0, TRUE);
}
}
@ -514,7 +492,7 @@ void sub_8074094(Entity *entity)
s32 dmg = entityInfo->maxHPStat / 4;
if (dmg == 0)
dmg = 1;
entityInfo->curseClassStatus.damageCountdown = gUnknown_80F4F3E;
entityInfo->curseClassStatus.damageCountdown = gCurseDmgCountdown;
UseAttack(NULL);
if (!EntityExists(entity) || sub_8044B28())
return;
@ -528,10 +506,10 @@ void sub_8074094(Entity *entity)
if (entityInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED) {
if (entityInfo->leechSeedClassStatus.damageCountdown == 0 || --entityInfo->leechSeedClassStatus.damageCountdown == 0) {
s32 hp = gUnknown_80F4FB4;
s32 hp = gLeechSeedHealValue;
Entity *target = gDungeon->activePokemon[entityInfo->leechSeedClassStatus.unk8];
entityInfo->leechSeedClassStatus.damageCountdown = gUnknown_80F4F40;
entityInfo->leechSeedClassStatus.damageCountdown = gLeechSeedDmgCountdown;
if (target == NULL) {
entityInfo->leechSeedClassStatus.status = 0;
}
@ -636,28 +614,28 @@ void TickStatusHeal(Entity *entity)
// HP heal
if (entityInfo->unk146 == 0 && entityInfo->burnClassStatus.status != STATUS_POISONED && entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED) {
s32 r4 = 0;
s32 regenSpeed = 0;
if (!entityInfo->isNotTeamMember)
r4 = GetRegenSpeed(entityInfo->id);
regenSpeed = GetRegenSpeed(entityInfo->id);
if (r4 != 0) {
if (regenSpeed != 0) {
if (HasHeldItem(entity, ITEM_HEAL_RIBBON))
r4 += gUnknown_80F4FC4;
regenSpeed += gHealRibbonRegenValue;
if (entityInfo->reflectClassStatus.status == STATUS_WISH)
r4 += gUnknown_80F4FC0;
regenSpeed += gWishRegenValue;
if (AbilityIsActive(entity, ABILITY_RAIN_DISH) && GetApparentWeather(entity) == WEATHER_RAIN)
r4 += gUnknown_80F4FC2;
regenSpeed += gRainDishRegenValue;
if (r4 > 500)
r4 = 500;
if (r4 < 30)
r4 = 30;
if (regenSpeed > 500)
regenSpeed = 500;
if (regenSpeed < 30)
regenSpeed = 30;
entityInfo->unk1F8 += entityInfo->maxHPStat;
while (entityInfo->unk1F8 >= r4) {
while (entityInfo->unk1F8 >= regenSpeed) {
entityInfo->HP++;
entityInfo->unk1F8 -= r4;
entityInfo->unk1F8 -= regenSpeed;
}
if (entityInfo->HP >= entityInfo->maxHPStat)

View File

@ -27,6 +27,7 @@
#include "structs/str_dungeon.h"
#include "dungeon_map_access.h"
#include "structs/str_806B7F8.h"
#include "dungeon_config.h"
extern u8 *gUnknown_80FA8BC[];
extern u8 *gUnknown_80FA824[];
@ -72,9 +73,6 @@ extern u8 *gUnknown_80FABC0[];
extern u8 *gUnknown_80FA888[];
extern u8 *gUnknown_80FA8A8[];
extern u8 *gUnknown_80FA868[];
extern s16 gUnknown_80F4F78;
extern s16 gUnknown_80F4F2C[];
extern s32 gUnknown_80F4F7A;
extern u8 *gUnknown_80FA6E8[];
extern u8 *gUnknown_80FA708[];
extern u8 *gUnknown_80FA70C[];
@ -89,47 +87,32 @@ extern u8 *gUnknown_80FBD18[];
extern u8 *gUnknown_80FBD3C[];
extern u8 *gUnknown_80FBCF0[];
extern u8 *gUnknown_80FBCC8[];
extern s16 gUnknown_80F4F24[];
extern u8 *gUnknown_80FBCA4[];
extern u8 *gUnknown_80FBC7C[];
extern u8 *gPtrForecastPreventsConversion2Message[];
extern s16 gUnknown_80F4F20[];
extern u8 *gUnknown_80FBC5C[];
extern u8 *gUnknown_80FBC38[];
extern s16 gUnknown_80F4F18[];
extern u8 *gUnknown_80FBC14[];
extern u8 *gUnknown_80FBBF0[];
extern s16 gUnknown_80F4EF8[];
extern u8 *gUnknown_80FBAE4[];
extern u8 *gUnknown_80FBAC0[];
extern s16 gUnknown_80F4EE8[];
extern u8 *gUnknown_80FB9B0[];
extern u8 *gUnknown_80FB9D8[];
extern s16 gUnknown_80F4ED4[];
extern s16 gUnknown_80F4E80[];
extern u8 *gUnknown_80FB17C[];
extern u8 *gUnknown_80FB1A8[];
extern s16 gUnknown_80F4E84[];
extern u8 *gUnknown_80FB130[];
extern u8 *gUnknown_80FB160[];
extern s16 gUnknown_80F4E90[];
extern u8 *gUnknown_80FAF5C[];
extern u8 *gUnknown_80FAF8C[];
extern s16 gUnknown_80F4EB4[];
extern u8 *gUnknown_80FAE1C[];
extern u8 *gUnknown_80FAE3C[];
extern s16 gUnknown_80F4E8C[];
extern u8 *gUnknown_80FB09C[];
extern u8 *gUnknown_80FB0C4[];
extern s16 gUnknown_80F4E88[];
extern u8 *gUnknown_80FB048[];
extern u8 *gUnknown_80FB074[];
extern s16 gUnknown_80F4E98[];
extern u8 *gUnknown_80FB10C[];
extern u8 *gUnknown_80FB0E0[];
extern u8 *gUnknown_80FC074[];
extern s16 gUnknown_80F4E9C[];
extern s16 gUnknown_80F4EA0[];
extern u8 *gUnknown_80FD254[];
extern u8 *gUnknown_80FD27C[];
extern u8 *gUnknown_80FD22C[];
@ -146,11 +129,8 @@ extern u8 *gUnknown_80FDBD0[];
extern u8 *gUnknown_80FDBF0[];
extern u8 *gUnknown_80FB880[];
extern u8 *gUnknown_80FB89C[];
extern s16 gUnknown_80F4F10[];
extern u8 *gUnknown_80FB834[];
extern u8 *gUnknown_80FB85C[];
extern s16 gUnknown_80F4F0C[];
extern s16 gUnknown_80F4F08[];
extern u8 *gUnknown_80FB810[];
extern u8 *gUnknown_80FB7F4[];
extern u8 *gUnknown_80FC028[];
@ -161,12 +141,9 @@ extern u8 *gUnknown_80FBF9C[];
extern u8 *gUnknown_80FBFB8[];
extern u8 *gUnknown_80FBF04[];
extern u8 *gUnknown_80FBEC0[];
extern s16 gUnknown_80F4EFC[];
extern u8 *gUnknown_80FBEE4[];
extern s16 gUnknown_80F4F04[];
extern u8 *gUnknown_80FBF50[];
extern u8 *gUnknown_80FBF28[];
extern s16 gUnknown_80F4F1C[];
extern u8 *gUnknown_80FBF68[];
extern u8 *gUnknown_80FBF84[];
@ -222,7 +199,7 @@ void MuzzleTarget(Entity *pokemon, Entity *target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->muzzled.muzzled != TRUE) {
entityInfo->muzzled.muzzled = TRUE;
entityInfo->muzzled.turns = CalculateStatusTurns(target,gUnknown_80F4F1C, TRUE) + 1;
entityInfo->muzzled.turns = CalculateStatusTurns(target,gMuzzledTurnRange, TRUE) + 1;
nullsub_86(target);
TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FBF68);
}
@ -279,7 +256,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
entityInfo->apparentID = apparentID;
target->axObj.spriteFile = sprite;
entityInfo->invisibleClassStatus.status = STATUS_TRANSFORMED;
entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EFC, TRUE) + 1;
entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target, gTransformedTurnRange, TRUE) + 1;
sub_806CF98(target);
nullsub_87(target);
sub_806CCB4(target, sub_806CEBC(target));
@ -305,7 +282,7 @@ void MobileStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->invisibleClassStatus.status != STATUS_MOBILE) {
entityInfo->invisibleClassStatus.status = STATUS_MOBILE;
entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F04, FALSE) + 1;
entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gMobileTurnRange, FALSE) + 1;
nullsub_88(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBF28);
}
@ -390,7 +367,7 @@ void BlindTarget(Entity *pokemon, Entity *target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->blinkerClassStatus.status != STATUS_BLINKER) {
entityInfo->blinkerClassStatus.status = STATUS_BLINKER;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F08, TRUE) + 1;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gBlinkerTurnRange, TRUE) + 1;
sub_8041E0C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB7F4);
sub_803E46C(0x31);
@ -419,7 +396,7 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target)
sub_8041E1C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB834);
entityInfo->blinkerClassStatus.status = STATUS_CROSS_EYED;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F0C, TRUE) + 1;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gCrossEyedTurnRange, TRUE) + 1;
sub_803F580(0x1);
sub_8049ED4();
sub_8040A84();
@ -443,7 +420,7 @@ void RestoreVisionTarget(Entity *pokemon, Entity *target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->blinkerClassStatus.status != STATUS_EYEDROPS) {
entityInfo->blinkerClassStatus.status = STATUS_EYEDROPS;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F10, FALSE) + 1;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gEyedropsTurnRange, FALSE) + 1;
sub_8041E3C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB880);
sub_803E46C(0x31);
@ -685,19 +662,19 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
entityInfo->unk14A = 1;
uVar5 = FALSE;
if ((u8)(newStatus - 7) < 2) {
if (newStatus == STATUS_FLYING || newStatus == STATUS_BOUNCING) {
entityInfo->unkFF = 1;
uVar5 = TRUE;
}
else if ((u8)(newStatus - 9) < 2) {
else if (newStatus == STATUS_DIVING || newStatus == STATUS_DIGGING) {
entityInfo->unkFF = 2;
}
if (newStatus == STATUS_BIDE) {
entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E9C, FALSE) + 1;
entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gBideTurnRange, FALSE) + 1;
entityInfo->unkA0 = 0;
}
if (newStatus == STATUS_ENRAGED) {
entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EA0, FALSE) + 1;
entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gEnragedTurnRange, FALSE) + 1;
}
sub_8041BD0(target,uVar5);
TryDisplayDungeonLoggableMessage3(pokemon,target,message);
@ -748,7 +725,7 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus)
else {
nullsub_57(target);
if ((entityInfo->reflectClassStatus.status != STATUS_COUNTER) && (entityInfo->reflectClassStatus.status != STATUS_MINI_COUNTER)) {
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E98, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target,gCounterTurnRange, FALSE) + 1;
}
entityInfo->reflectClassStatus.status = newStatus;
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB0E0);
@ -766,7 +743,7 @@ void SafeguardStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_SAFEGUARD) {
entityInfo->reflectClassStatus.status = STATUS_SAFEGUARD;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gSafeguardTurnRange, FALSE) + 1;
nullsub_58(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB048);
}
@ -786,7 +763,7 @@ void MistStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_MIST) {
entityInfo->reflectClassStatus.status = STATUS_MIST;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMistTurnRange, FALSE) + 1;
nullsub_59(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB09C);
}
@ -806,7 +783,7 @@ void WishStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_WISH) {
entityInfo->reflectClassStatus.status = STATUS_WISH;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gWishTurnRange, FALSE) + 1;
sub_8041B34(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAE1C);
}
@ -826,7 +803,7 @@ void MagicCoatStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_MAGIC_COAT) {
entityInfo->reflectClassStatus.status = STATUS_MAGIC_COAT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMagicCoatTurnRange, FALSE) + 1;
nullsub_60(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAF5C);
}
@ -846,7 +823,7 @@ void LightScreenStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_LIGHT_SCREEN) {
entityInfo->reflectClassStatus.status = STATUS_LIGHT_SCREEN;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gLightScreenTurnRange, FALSE) + 1;
nullsub_61(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB130);
}
@ -866,7 +843,7 @@ void ReflectStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_REFLECT) {
entityInfo->reflectClassStatus.status = STATUS_REFLECT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gReflectTurnRange, FALSE) + 1;
nullsub_62(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB17C);
}
@ -886,7 +863,7 @@ void ProtectStatusTarget(Entity * pokemon, Entity * target)
entityInfo = GetEntInfo(target);
if (entityInfo->reflectClassStatus.status != STATUS_PROTECT) {
entityInfo->reflectClassStatus.status = STATUS_PROTECT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gProtectTurnRange, FALSE) + 1;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB9B0);
}
@ -907,7 +884,7 @@ void MirrorCoatStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_MIRROR_COAT) {
entityInfo->reflectClassStatus.status = STATUS_MIRROR_COAT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMirrorCoatTurnRange, FALSE) + 1;
nullsub_64(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBAC0);
}
@ -927,7 +904,7 @@ void EndureStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_ENDURING) {
entityInfo->reflectClassStatus.status = STATUS_ENDURING;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gEnduringTurnRange, FALSE) + 1;
nullsub_65(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBBF0);
}
@ -947,7 +924,7 @@ void MirrorMoveStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_MIRROR_MOVE) {
entityInfo->reflectClassStatus.status = STATUS_MIRROR_MOVE;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMirrorMoveTurnRange, FALSE) + 1;
nullsub_66(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBC38);
}
@ -972,7 +949,7 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_CONVERSION2) {
entityInfo->reflectClassStatus.status = STATUS_CONVERSION2;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gConversion2TurnRange, FALSE) + 1;
nullsub_67(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBC7C);
}
@ -993,7 +970,7 @@ void VitalThrowStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status != STATUS_VITAL_THROW) {
entityInfo->reflectClassStatus.status = STATUS_VITAL_THROW;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gVitalThrowTurnRange, FALSE) + 1;
nullsub_68(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBCC8);
}
@ -1176,20 +1153,20 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8
isAsleep = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA70C);
if (param_4) {
DealDamageToEntity(target,gUnknown_80F4F78,8,0x20f);
DealDamageToEntity(target,gNightmareDmgValue,8,0x20f);
}
break;
case STATUS_NAPPING:
isAsleep = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA710);
HealTargetHP(pokemon,target,gUnknown_80F4F7A, 0, FALSE);
HealTargetHP(pokemon,target,gNappingHpHealValue, 0, FALSE);
entityInfo->sleepClassStatus.status = 0;
sub_8079F20(pokemon,target,1,1);
break;
case STATUS_YAWNING:
if (param_3) {
entityInfo->sleepClassStatus.status = STATUS_NONE;
SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE);
SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gSleepFromYawnTurnRange, TRUE) + 1, TRUE);
return;
}
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA734);
@ -1661,8 +1638,6 @@ _WakeUp:
extern s16 sub_803D970(u32);
extern void sub_804178C(u32);
extern const s16 gUnknown_80F4DA2;
extern const s16 gUnknown_80F4DA4;
void sub_807AB38(Entity *entity, bool8 forcedMonsterHouse)
{
@ -1720,7 +1695,7 @@ void sub_807AB38(Entity *entity, bool8 forcedMonsterHouse)
}
}
randMonstersCount = DungeonRandRange(gUnknown_80F4DA2, gUnknown_80F4DA4);
randMonstersCount = DungeonRandRange(gMonsterHouseMinMons, gMonsterHouseMaxMons);
if (randMonstersCount >= count)
randMonstersCount = count;

View File

@ -1,5 +1,4 @@
#include "global.h"
#include "constants/ability.h"
#include "constants/weather.h"
#include "code_803E46C.h"
@ -24,11 +23,11 @@
#include "tile_types.h"
#include "code_803E668.h"
#include "weather.h"
#include "dungeon_config.h"
extern u32 gUnknown_202EDCC;
extern u32 gUnknown_203B444[];
extern s16 gUnknown_80F4F90;
extern u8 *gUnknown_80FCA10[];
extern u8 *gUnknown_80F8A0C[];
extern u8 *gUnknown_80FCBCC[];
@ -151,7 +150,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
_0807CF26:
sub_807D068(target,&target->pos);
sub_806F370(pokemon,target,gUnknown_80F4F90,0,0,0,0x219,0,0,0);
sub_806F370(pokemon,target,gBlowAwayDmgValue,0,0,0,0x219,0,0,0);
}
if (sub_8044B28()) {
return;
@ -160,7 +159,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
InitPokemonMove(&move,0x163);
if (!sub_80571F0(entity,&move)) {
TrySendImmobilizeSleepEndMsg(pokemon,entity);
sub_806F370(pokemon,entity,gUnknown_80F4F90,0,0,0,0x21a,0,0,0);
sub_806F370(pokemon,entity,gBlowAwayDmgValue,0,0,0,0x21a,0,0,0);
}
}
if (sub_8044B28()) {

1498
src/code_807E5AC.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
#define IMMUNE EFFECTIVENESS_IMMUNE
#define RESIST EFFECTIVENESS_RESIST
#define NEUTRAL EFFECTIVENESS_NEUTRAL
#define SUPER EFFECTIVENESS_SUPER
const s16 gTypeEffectivenessChart[NUM_TYPES][NUM_TYPES] = {
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, RESIST, RESIST, SUPER, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, RESIST, NEUTRAL, SUPER},
{NEUTRAL, NEUTRAL, SUPER, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, RESIST, SUPER, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, SUPER, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, RESIST, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, IMMUNE, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL},
{NEUTRAL, NEUTRAL, RESIST, RESIST, SUPER, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, SUPER, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST},
{NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, NEUTRAL, RESIST, RESIST, RESIST, SUPER, NEUTRAL, NEUTRAL, SUPER, SUPER},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, NEUTRAL, IMMUNE},
{NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, IMMUNE, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, SUPER, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, IMMUNE, RESIST},
{NEUTRAL, NEUTRAL, RESIST, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, SUPER, RESIST},
{NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST},
{NEUTRAL, IMMUNE, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST},
{NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, RESIST, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, RESIST, RESIST},
{NEUTRAL, NEUTRAL, RESIST, RESIST, NEUTRAL, RESIST, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, NEUTRAL, SUPER, NEUTRAL, NEUTRAL, NEUTRAL, RESIST}
};

View File

@ -1,6 +1,5 @@
#include "global.h"
#include "dungeon_ai_attack.h"
#include "charge_move.h"
#include "code_8045A00.h"
#include "dungeon_message.h"
@ -17,6 +16,7 @@
#include "dungeon_ai_targeting.h"
#include "dungeon_ai.h"
#include "dungeon_capabilities.h"
#include "dungeon_config.h"
#include "dungeon_engine.h"
#include "dungeon_map_access.h"
#include "dungeon_pokemon_attributes.h"
@ -37,8 +37,6 @@
#define REGULAR_ATTACK_INDEX 4
const s16 gRegularAttackWeights[] = {100, 20, 30, 40, 50};
extern const u8 *const gItemStickyDoesntWorkText[];
extern const u8 *const gPtrMysteriousPowerPreventedUseMessage[];
extern const u8 *const gUnknown_80FC6A8[];
@ -84,7 +82,7 @@ void ChooseAIMove(Entity *pokemon)
if (CannotAttack(pokemon, FALSE) ||
ShouldMonsterRunAwayAndShowEffect(pokemon, TRUE) ||
IsTacticSet(pokemon, TACTIC_KEEP_YOUR_DISTANCE) ||
(pokemonInfo->cringeClassStatus.status == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance)))
(pokemonInfo->cringeClassStatus.status == STATUS_CONFUSED && DungeonRandOutcome(gAIConfusedAttackChance)))
{
return;
}
@ -249,7 +247,7 @@ void ChooseAIMove(Entity *pokemon)
}
else
{
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = gRegularAttackWeights[numUsableMoves];
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = gAiRegularAttackWeights[numUsableMoves];
}
total += aiPossibleMove[REGULAR_ATTACK_INDEX].weight;
}

View File

@ -1,6 +1,5 @@
#include "global.h"
#include "dungeon_ai_leader.h"
#include "charge_move.h"
#include "code_803E46C.h"
#include "code_804267C.h"
@ -26,6 +25,7 @@
#include "pokemon_3.h"
#include "pokemon.h"
#include "trap.h"
#include "dungeon_config.h"
extern u8 gUnknown_202F221;
extern u8 gUnknown_202F222;
@ -36,7 +36,6 @@ extern u8 gUnknown_203B434;
extern u8 *gUnknown_80FA5B4[];
extern u8 *gUnknown_80FE478[];
extern u8 *gUnknown_80FD2CC[];
extern u8 gUnknown_80F58F4[NUM_DUNGEON_ACTIONS][2];
extern u8 *gUnknown_80FE6D4[];
void sub_8075BA4(Entity *param_1, u8 param_2);

1132
src/dungeon_config.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -31,14 +31,10 @@
#include "exclusive_pokemon.h"
#include "trap.h"
#include "math.h"
#include "dungeon_config.h"
extern u32 gDungeonBrightness;
extern const s16 gUnknown_80F57CA;
extern const s16 gUnknown_80F57CC;
extern const s16 gUnknown_80F57CE;
extern const s16 gUnknown_80F57D0;
extern const s16 gUnknown_80F57D2;
extern const struct DungeonDialogueStruct GroudonPreFightDialogue_10;
extern const struct DungeonDialogueStruct GroudonPreFightDialogue_11;
extern const struct DungeonDialogueStruct GroudonPreFightDialogue_12;
@ -849,7 +845,7 @@ void sub_808729C(void)
sub_8068FE0(zapdosEntity,0x21c,0);
}
else {
sub_8072008(zapdosEntity,zapdosEntity,gUnknown_80F57CC,0,0);
sub_8072008(zapdosEntity,zapdosEntity,gZapdosConfigLevel,0,0);
SetFacingDirection(zapdosEntity,DIRECTION_SOUTH);
sub_8086A3C(zapdosEntity);
}
@ -1083,7 +1079,7 @@ void sub_8087848(void)
sub_8068FE0(moltresEntity,0x21c,0);
}
else {
sub_8072008(moltresEntity,moltresEntity,gUnknown_80F57CE,0,0);
sub_8072008(moltresEntity,moltresEntity,gMoltresConfigLevel,0,0);
SetFacingDirection(moltresEntity, DIRECTION_SOUTH);
sub_8086A3C(moltresEntity);
}
@ -1503,7 +1499,7 @@ void sub_8087FF8(void)
sub_8068FE0(articunoEntity,0x21c,0);
}
else {
sub_8072008(articunoEntity,articunoEntity,gUnknown_80F57D0,0,0);
sub_8072008(articunoEntity,articunoEntity,gArticunoConfigLevel,0,0);
SetFacingDirection(articunoEntity, DIRECTION_SOUTH);
sub_8086A3C(articunoEntity);
}
@ -1814,7 +1810,7 @@ void sub_808875C(void)
sub_8068FE0(groudonEntity,0x21c,0);
}
else {
sub_8072008(groudonEntity,groudonEntity,gUnknown_80F57D2,0,0);
sub_8072008(groudonEntity,groudonEntity,gGroudonConfigLevel,0,0);
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
sub_80861D4(groudonEntity,0xf,DIRECTION_SOUTH);
}
@ -2365,7 +2361,7 @@ void sub_8089328(void)
sub_8068FE0(rayquazaEntity,0x21c,0);
}
else {
sub_8072008(rayquazaEntity,rayquazaEntity,gUnknown_80F57CA,0,0);
sub_8072008(rayquazaEntity,rayquazaEntity,gRayquazaConfigLevel,0,0);
sub_8086A3C(rayquazaEntity);
}
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);

View File

@ -16,6 +16,7 @@
#include "structs/str_dungeon.h"
#include "structs/map.h"
#include "structs/str_806B7F8.h"
#include "dungeon_config.h"
extern const u8 gUnknown_80F6DCC[];
extern struct FileArchive gDungeonFileArchive;
@ -4032,8 +4033,6 @@ static void ShuffleSpawnPositions(struct PositionU8 *spawns, s32 count)
*
* See below for specific conditions on each type of spawn.
*/
extern const s16 gUnknown_80F4DA0;
extern const s16 gUnknown_80F4DA4;
static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse)
{
struct PositionU8 validSpawns[DUNGEON_MAX_SIZE_X * DUNGEON_MAX_SIZE_Y];
@ -4230,20 +4229,20 @@ static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHou
if (count != 0) {
// Choose a subset of the available tiles to spawn stuff on
s32 numItems = DungeonRandRange((count / 2), (count * 8) / 10);
s32 numItemsTraps = DungeonRandRange((count / 2), (count * 8) / 10);
if (numItems < 6) {
numItems = 6;
if (numItemsTraps < 6) {
numItemsTraps = 6;
}
// Cap item spawns at 7 (normally)
if (numItems >= gUnknown_80F4DA0) {
numItems = gUnknown_80F4DA0;
if (numItemsTraps >= gMonsterHouseMaxItemsTraps) {
numItemsTraps = gMonsterHouseMaxItemsTraps;
}
// Randomly select among the valid item spawn spots
ShuffleSpawnPositions(validSpawns, count);
randIndex = DungeonRandInt(count);
for (i = 0; i < numItems; i++) {
for (i = 0; i < numItemsTraps; i++) {
Tile *tile = GetTileMut(validSpawns[randIndex].x, validSpawns[randIndex].y);
// 50/50 chance of spawning an item or a trap
@ -4459,7 +4458,7 @@ static void SpawnEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse)
// This floor was marked to force a monster house
// Place extra enemy spawns in the Monster House room
numMonsterHouseEnemies = gUnknown_80F4DA4;
numMonsterHouseEnemies = gMonsterHouseMaxMons;
count = 0;
if (isEmptyMonsterHouse) {
// An "empty" monster house only spawns 3 enemies
@ -5962,8 +5961,6 @@ static void sub_8051438(struct GridCell *gridCell, s32 fixedRoomNumber)
}
}
extern const s16 gUnknown_80F57D4[][3][3];
static void sub_8051654(FloorProperties *floorProps)
{
s32 i, n;
@ -6058,7 +6055,7 @@ static void sub_8051654(FloorProperties *floorProps)
if ((tile->terrainType & TERRAIN_TYPE_NATURAL_JUNCTION))
continue;
if (gUnknown_80F57D4[floorProps->unk18][yIndex][xIndex] > DungeonRandInt(100)) {
if (sKecleonShopItemSpawnChances[floorProps->unk18][yIndex][xIndex] > DungeonRandInt(100)) {
tile->spawnOrVisibilityFlags |= SPAWN_FLAG_ITEM;
}
}

View File

@ -10,7 +10,6 @@
#include "constants/status.h"
#include "constants/weather.h"
#include "constants/iq_skill.h"
#include "type_chart.h"
#include "position_util.h"
#include "dungeon_items.h"
#include "code_806CD90.h"
@ -25,7 +24,6 @@
#include "dungeon_random.h"
#include "targeting_flags.h"
#include "targeting.h"
#include "called_move_data.h"
#include "dungeon_map_access.h"
#include "math.h"
#include "code_800DAC0.h"
@ -40,11 +38,12 @@
#include "code_803E46C.h"
#include "code_8041AD0.h"
#include "code_800E9E4.h"
#include "dungeon_config.h"
extern void sub_80429C8(Entity *r0);
extern bool8 sub_8045888(Entity *r0);
extern void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 arg4, bool32 arg8, s32 argC);
extern void CalcDamage(Entity *, Entity *, u8, u32, u32, struct DamageStruct *dmgStruct, u32, u16, u32);
extern void CalcDamage(Entity *, Entity *, u8, u32, u32, struct DamageStruct *dmgStruct, s24_8, u16, u32);
extern s16 sub_8057600(Move *move, s32 itemID);
extern void sub_803ED30(s32, Entity *r0, u8, s32);
extern void sub_8042238(Entity *pokemon, Entity *target);
@ -301,7 +300,7 @@ extern bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 pa
extern bool8 MetronomeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
extern bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
s32 HandleDamagingMove(Entity *, Entity *, Move *, s32, s32);
s32 HandleDamagingMove(Entity *, Entity *, Move *, s24_8, s32);
static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk);
static void TriggerTargetAbilityEffect(Entity *attacker);
static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accuracyType, bool8 selfAlwaysHits);
@ -317,13 +316,6 @@ static void SortTargets(Entity **targetsArray, Entity *attacker);
extern const s32 gUnknown_8106A50;
extern const s32 gUnknown_8106A4C;
extern const s16 gUnknown_80F5006;
extern const s32 gUnknown_80F519C;
extern const s32 gUnknown_80F51A0;
extern const s32 gUnknown_80F50F4[2][21];
extern const s16 gUnknown_80F4E70[];
extern const s16 gUnknown_80F4E74[];
extern const u16 gUnknown_80F5004;
extern const u8 *const gUnknown_80FEEA4;
extern const u8 *const gUnknown_80FEEC8;
extern const u8 *const gUnknown_80FEEEC;
@ -446,7 +438,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
else if (HasHeldItem(currTarget, ITEM_PASS_SCARF)) {
if (!CannotAttack(currTarget, FALSE)
&& (GetMoveTargetAndRangeForPokemon(attacker, move, FALSE) & 0xF0) == 0
&& FixedPointToInt(targetInfo->belly) >= gUnknown_80F5006
&& FixedPointToInt(targetInfo->belly) >= gPassScarfBellyDownValue
&& targetInfo->unkFF == 0)
{
s32 direction1 = targetInfo->action.direction;
@ -480,7 +472,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
sub_806CE68(currTarget, direction1);
sub_803E708(2, 0x43);
}
targetInfo->belly = FixedPoint_Subtract(targetInfo->belly, IntToFixedPoint(gUnknown_80F5006));
targetInfo->belly = FixedPoint_Subtract(targetInfo->belly, IntToFixedPoint(gPassScarfBellyDownValue));
if (move->id == MOVE_REGULAR_ATTACK) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDDA8); // Attack was passed off
}
@ -717,13 +709,13 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
case MOVE_WIDE_SLASH:
case MOVE_SPIN_SLASH:
case MOVE_BLOOP_SLASH:
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, 0x100, itemId) != 0);
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, IntToF248_2(1), itemId) != 0);
break;
case MOVE_REGULAR_ATTACK:
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, 0x80, itemId) != 0);
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, IntToF248_2(0.5), itemId) != 0);
break;
case MOVE_NOTHING:
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, 0, itemId) != 0);
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, IntToF248_2(0), itemId) != 0);
break;
case MOVE_EARTHQUAKE:
moveHadEffect = EarthquakeMoveAction(attacker, currTarget, move, itemId);
@ -765,7 +757,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
case MOVE_CROSS_CHOP:
case MOVE_RAZOR_LEAF:
case MOVE_LEAF_BLADE:
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, 0x100, itemId) != 0);
moveHadEffect = (HandleDamagingMove(attacker, currTarget, move, IntToF248_2(1), itemId) != 0);
break;
case MOVE_FISSURE:
moveHadEffect = FissureMoveAction(attacker, currTarget, move, itemId);
@ -1656,10 +1648,10 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move
bool32 HandleRegularDamagingMove(Entity *attacker, Entity *target, Move *move, s32 itemId)
{
return (HandleDamagingMove(attacker, target, move, 0x100, itemId) != 0);
return (HandleDamagingMove(attacker, target, move, IntToF248_2(1), itemId) != 0);
}
s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s32 r9, s32 itemId)
s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s24_8 modifier, s32 itemId)
{
struct DamageStruct dmgStruct;
s16 unk;
@ -1667,19 +1659,19 @@ s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s32 r9, s32
s32 movePower = GetMovePower(attacker, move);
s32 critChance = GetMoveCritChance(move);
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, r9, move->id, 1);
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1);
unk = sub_8057600(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, unk);
}
s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s32 r9, s32 itemId)
s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8 modifier, s32 itemId)
{
struct DamageStruct dmgStruct;
s16 unk;
s32 movePower = GetMovePower(attacker, move);
s32 critChance = GetMoveCritChance(move);
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, r9, move->id, 1);
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1);
unk = sub_8057600(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, unk);
}
@ -1951,7 +1943,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
gUnknown_202F222 = 0;
if (EntityExists(attacker)) {
EntityInfo *attackerInfo = GetEntInfo(attacker);
s32 statusTurns = CalculateStatusTurns(attacker, gUnknown_80F4E70, TRUE);
s32 statusTurns = CalculateStatusTurns(attacker, gPauseTurnRange, TRUE);
PausedStatusTarget(attacker, attacker, 1, statusTurns, FALSE);
SetExpMultplier(attackerInfo);
}
@ -1996,7 +1988,7 @@ static void TriggerTargetAbilityEffect(Entity *attacker)
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_SLP) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF54); // Effect Spore scattered spores!
SleepStatusTarget(attacker, attacker, CalculateStatusTurns(attacker, gUnknown_80F4E74, TRUE), TRUE);
SleepStatusTarget(attacker, attacker, CalculateStatusTurns(attacker, gSleepTurnRange, TRUE), TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_FLAME_BODY) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF74); // Flame Body caused a burn!
@ -2010,7 +2002,7 @@ static void TriggerTargetAbilityEffect(Entity *attacker)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEFD0); // A horrid stench billowed out
sub_80428A0(attacker);
entInfo->terrifiedTurns = gUnknown_80F5004;
entInfo->terrifiedTurns = gStenchTerrifiedTurnsNo;
}
entInfo->abilityEffectFlags = 0;
@ -2705,7 +2697,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32
static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accuracyType, bool8 selfAlwaysHits)
{
s32 statStageAccuracy, statStageEvasion;
s32 statStageMul;
s24_8 statStageMul;
s32 accuracy = GetMoveAccuracyOrAIChance(move, accuracyType);
s32 rand = DungeonRandInt(100);
EntityInfo *attackerInfo = GetEntInfo(attacker);
@ -2723,10 +2715,10 @@ static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accu
return TRUE;
if (HasHeldItem(target, ITEM_DETECT_BAND)) {
accuracy -= gUnknown_80F519C;
accuracy -= gDetectBandAccuracyDebuffValue;
}
if (IQSkillIsEnabled(target, IQ_QUICK_DODGER)) {
accuracy -= gUnknown_80F51A0;
accuracy -= gIqQuickDodgerAccuracyDebuffValue;
}
statStageAccuracy = attackerInfo->hitChanceStages[0];
@ -2746,11 +2738,11 @@ static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accu
if (statStageAccuracy < 0) statStageAccuracy = 0;
if (statStageAccuracy > 20) statStageAccuracy = 20;
statStageMul = gUnknown_80F50F4[0][statStageAccuracy];
if (statStageMul < 0) statStageMul = 0;
if (statStageMul > (256 * 100)) statStageMul = (256 * 100);
statStageMul = gAccEvsStatStageMultipliers[0][statStageAccuracy];
if (statStageMul.raw < 0) statStageMul.raw = 0;
if (statStageMul.raw > IntToF248_2(100).raw) statStageMul = IntToF248_2(100);
accuracy *= statStageMul;
accuracy *= statStageMul.raw;
accuracy /= 256;
statStageEvasion = targetInfo->hitChanceStages[1];
@ -2770,11 +2762,11 @@ static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accu
if (statStageEvasion < 0) statStageEvasion = 0;
if (statStageEvasion > 20) statStageEvasion = 20;
statStageMul = gUnknown_80F50F4[1][statStageEvasion];
if (statStageMul < 0) statStageMul = 0;
if (statStageMul > (256 * 100)) statStageMul = (256 * 100);
statStageMul = gAccEvsStatStageMultipliers[1][statStageEvasion];
if (statStageMul.raw < 0) statStageMul.raw = 0;
if (statStageMul.raw > IntToF248_2(100).raw) statStageMul = IntToF248_2(100);
accuracy *= statStageMul;
accuracy *= statStageMul.raw;
accuracy /= 256;
if (rand < accuracy)
return TRUE;

View File

@ -15,10 +15,9 @@
#include "moves.h"
#include "pokemon_3.h"
#include "pokemon.h"
#include "dungeon_config.h"
#include "structs/str_dungeon.h"
const s16 gItemMasterMinWildLevel[] = {16};
extern const u8 *gUnknown_80FC31C;
extern const u8 * gUnknown_80FCEFC;
extern const u8 * gUnknown_80FC2FC;
@ -166,7 +165,7 @@ void LoadIQSkills(Entity *pokemon)
SetIQSkill(iqSkills, IQ_ITEM_CATCHER);
if (pokemonInfo->bossFlag)
SetIQSkill(iqSkills, IQ_SELF_CURER);
if (pokemonInfo->level >= *gItemMasterMinWildLevel)
if (pokemonInfo->level >= gIqItemMasterMinWildLevel)
SetIQSkill(iqSkills, IQ_ITEM_MASTER);
pokemonInfo->tactic = TACTIC_GO_AFTER_FOES;
}

View File

@ -362,7 +362,7 @@ static void WriteMonster(DataSerializer *seri, Entity *src)
WriteSpeedCounters(seri, info->speedUpCounters, NUM_SPEED_COUNTERS);
WriteSpeedCounters(seri, info->speedDownCounters, NUM_SPEED_COUNTERS);
WriteU8(seri, info->stockpileStage);
WriteU8(seri, info->unk113);
WriteU8(seri, info->speedBoostFrames);
WriteU8(seri, info->moveRandomly);
WriteMoves(seri, &info->moves);
WriteBelly(seri, &info->belly);
@ -1046,7 +1046,7 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index)
ReadSpeedCounters(seri, entInfo.speedUpCounters, NUM_SPEED_COUNTERS);
ReadSpeedCounters(seri, entInfo.speedDownCounters, NUM_SPEED_COUNTERS);
entInfo.stockpileStage = ReadU8(seri);
entInfo.unk113 = ReadU8(seri);
entInfo.speedBoostFrames = ReadU8(seri);
entInfo.moveRandomly = ReadU8(seri);
ReadMoves(seri, &entInfo.moves);
ReadBelly(seri, &entInfo.belly);

View File

@ -581,7 +581,7 @@ bool8 FP48_16_SLessThan(s48_16 *a, s48_16 *b)
}
}
void F48_16_SMul(s48_16 *dst, s48_16 *a, s48_16 *b)
void F48_16_SMul(s48_16 *dst, const s48_16 *a, const s48_16 *b)
{
bool8 aIsNegative;
bool8 bIsNegative;
@ -694,7 +694,7 @@ static void F48_16_UMul(s48_16 *dst, s48_16 *a, s48_16 *b)
#endif
u32 r6;
s32 i;
if (F48_16_IsZero(a)) {
dst->hi = 0;
dst->lo = 0;

File diff suppressed because it is too large Load Diff

View File

@ -16,92 +16,11 @@
#include "status.h"
#include "status_actions.h"
#include "status_checks_1.h"
#include "text_util.h"
#include "tile_types.h"
#include "trap.h"
#include "weather.h"
// Array indices correspond to the current dungeon tileset.
const u8 gDungeonCamouflageTypes[76] = {
TYPE_WATER,
TYPE_GRASS,
TYPE_ROCK,
TYPE_ROCK,
TYPE_ROCK,
TYPE_ROCK,
TYPE_ROCK,
TYPE_ROCK,
TYPE_NORMAL,
TYPE_ROCK,
TYPE_GRASS,
TYPE_GROUND,
TYPE_NORMAL,
TYPE_NORMAL,
TYPE_GRASS,
TYPE_ICE,
TYPE_NORMAL,
TYPE_ROCK,
TYPE_ICE,
TYPE_ICE,
TYPE_GRASS,
TYPE_GROUND,
TYPE_ROCK,
TYPE_NORMAL,
TYPE_ICE,
TYPE_GRASS,
TYPE_GRASS,
TYPE_NORMAL,
TYPE_ROCK,
TYPE_GRASS,
TYPE_ROCK,
TYPE_ROCK,
TYPE_GRASS,
TYPE_GRASS,
TYPE_ROCK,
TYPE_NORMAL,
TYPE_ICE,
TYPE_ROCK,
TYPE_ROCK,
TYPE_ROCK,
TYPE_ROCK,
TYPE_GRASS,
TYPE_ROCK,
TYPE_ROCK,
TYPE_GROUND,
TYPE_NORMAL,
TYPE_ROCK,
TYPE_ICE,
TYPE_ROCK,
TYPE_WATER,
TYPE_GRASS,
TYPE_GRASS,
TYPE_GROUND,
TYPE_WATER,
TYPE_ROCK,
TYPE_ROCK,
TYPE_GRASS,
TYPE_NORMAL,
TYPE_NORMAL,
TYPE_ROCK,
TYPE_GRASS,
TYPE_ROCK,
TYPE_GRASS,
TYPE_GRASS,
TYPE_ROCK,
TYPE_GRASS,
TYPE_ROCK,
TYPE_ROCK,
TYPE_NORMAL,
TYPE_NORMAL,
TYPE_ROCK,
TYPE_NORMAL,
TYPE_ICE,
TYPE_WATER,
TYPE_WATER,
TYPE_ROCK
};
#include "dungeon_config.h"
bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
{

View File

@ -1,6 +1,5 @@
#include "global.h"
#include "move_effects_target.h"
#include "code_8045A00.h"
#include "dungeon_message.h"
#include "code_806CD90.h"
@ -35,6 +34,7 @@
#include "structs/str_dungeon.h"
#include "targeting.h"
#include "tile_types.h"
#include "dungeon_config.h"
extern u8 *gUnknown_80FB380[];
extern u8 *gUnknown_80FB384[];
@ -58,12 +58,9 @@ extern u8 *gUnknown_80FB414[];
extern u8 *gUnknown_80FB43C[];
extern u8 *gUnknown_80FB41C[];
extern u8 *gUnknown_80FB458[];
extern s16 gUnknown_80F4E7C[];
extern s16 gUnknown_80F4F00[];
extern u8 *gUnknown_80FB52C[];
extern u8 *gUnknown_80FCC4C[];
extern u8 *gUnknown_80FB50C[];
extern s16 gUnknown_80F4E30[];
extern u8 *gUnknown_80FF01C[];
extern u8 *gUnknown_80FEBBC[];
extern u8 *gUnknown_80FB564[];
@ -71,39 +68,30 @@ extern u8 *gUnknown_80FB548[];
extern u8 *gUnknown_80FCE84[];
extern u8 *gUnknown_80FCE5C[];
extern u8 *gUnknown_80FD524[];
extern s16 gUnknown_80F4E34[];
extern u8 *gUnknown_80FCEDC[];
extern u8 *gUnknown_80FCEB0[];
extern u8 *gUnknown_80FB5D4[];
extern u8 *gUnknown_80FB598[];
extern u8 *gUnknown_80FB5F8[];
extern u8 *gUnknown_80FB5B4[];
extern s16 gUnknown_80F4E38[];
extern u8 *gUnknown_80FCE34[];
extern s16 gUnknown_80F4E2C[];
extern u8 *gUnknown_80FB610[];
extern u8 *gUnknown_80FCDE0[];
extern u8 *gUnknown_80FCE00[];
extern u8 *gUnknown_80FA844[];
extern u8 *gUnknown_80FB64C[];
extern s16 gUnknown_80F4E58[];
extern u8 *gUnknown_80FB628[];
extern u8 *gUnknown_80FB4F0[];
extern u8 *gUnknown_80FB4B0[];
extern u8 *gUnknown_80FB480[];
extern u8 *gUnknown_80FB4D4[];
extern s16 gUnknown_80F4E54[];
extern u8 *gUnknown_80FB668[];
extern u8 *gUnknown_80FB688[];
extern s16 gUnknown_80F4E60[];
extern u8 *gUnknown_80FB6A4[];
extern u8 *gUnknown_80FB6C0[];
extern s16 gUnknown_80F4E5C[];
extern u8 *gUnknown_80FB6D8[];
extern u8 *gUnknown_80FB6FC[];
extern u8 *gUnknown_80FB718[];
extern s16 gUnknown_80F4EC0[];
extern s16 gUnknown_80F4EBC[];
extern u8 *gUnknown_80FB7DC[];
extern u8 *gUnknown_80FB7BC[];
extern u8 *gUnknown_80FC0B8[];
@ -380,7 +368,7 @@ void SleeplessStatusTarget(Entity * pokemon, Entity * target)
if (entityInfo->sleepClassStatus.status != STATUS_SLEEPLESS)
{
entityInfo->sleepClassStatus.status = STATUS_SLEEPLESS;
entityInfo->sleepClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E7C, FALSE) + 1;
entityInfo->sleepClassStatus.turns = CalculateStatusTurns(target, gSleeplessTurnRange, FALSE) + 1;
entityInfo->unk165 = 0xFF;
entityInfo->unk164 = 0xFF;
sub_8041EE8(target);
@ -450,7 +438,7 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
if (entityInfo->cringeClassStatus.status != STATUS_INFATUATED) {
entityInfo->cringeClassStatus.status = STATUS_INFATUATED;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gInfatuatedTurnRange,TRUE) + 1;
sub_8041EF8(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB50C);
}
@ -503,7 +491,7 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
isNotBurned = TRUE;
if (entityInfo->burnClassStatus.status != STATUS_BURN) {
entityInfo->burnClassStatus.status = STATUS_BURN;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E30,TRUE) + 1;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gBurnTurnRange,TRUE) + 1;
entityInfo->burnClassStatus.damageCountdown = 0;
entityInfo->burnClassStatus.unk4 = 0;
isNotBurned = FALSE;
@ -592,7 +580,7 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
if(entityInfo->burnClassStatus.status != STATUS_POISONED)
{
entityInfo->burnClassStatus.status = STATUS_POISONED;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E34,TRUE) + 1;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gPoisonTurnRange,TRUE) + 1;
entityInfo->burnClassStatus.damageCountdown = 0;
entityInfo->burnClassStatus.unk4 = 0;
isNotPoisoned = FALSE;
@ -679,7 +667,7 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM
if(entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED)
{
entityInfo->burnClassStatus.status = STATUS_BADLY_POISONED;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E38,TRUE) + 1;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gBadPoisonTurnRange,TRUE) + 1;
entityInfo->burnClassStatus.damageCountdown = 0;
entityInfo->burnClassStatus.unk4 = 0;
isNotBadlyPoisoned = FALSE;
@ -760,7 +748,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
}
sub_8041F08(target);
entityInfo->frozenClassStatus.status = STATUS_FROZEN;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E2C,TRUE) + 1;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gFreezeTurnRange,TRUE) + 1;
entityInfo->frozenClassStatus.damageCountdown = 0;
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB610);
EntityUpdateStatusSprites(target);
@ -788,7 +776,7 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s16 param_3, bool32
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->frozenClassStatus.status != STATUS_CONSTRICTION) {
entityInfo->frozenClassStatus.status = STATUS_CONSTRICTION;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E58,TRUE) + 1;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gConstrictionTurnRange,TRUE) + 1;
entityInfo->frozenClassStatus.damageCountdown = 0;
entityInfo->frozenClassStatus.unk4 = param_3_s32;
nullsub_71(target);
@ -818,7 +806,7 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->frozenClassStatus.status != STATUS_SHADOW_HOLD) {
entityInfo->frozenClassStatus.status = STATUS_SHADOW_HOLD;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E54,TRUE) + 1;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gShadowHoldTurnRange,TRUE) + 1;
entityInfo->frozenClassStatus.damageCountdown = 0;
nullsub_70(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB668);
@ -843,7 +831,7 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->frozenClassStatus.status != STATUS_INGRAIN) {
entityInfo->frozenClassStatus.status = STATUS_INGRAIN;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gIngrainTurnRange,TRUE) + 1;
entityInfo->frozenClassStatus.damageCountdown = 0;
nullsub_90(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB6A4);
@ -871,7 +859,7 @@ void WrapTarget(Entity * pokemon, Entity * target)
}
pokemonEntityData = GetEntInfo(pokemon);
targetEntityInfo = GetEntInfo(target);
if ((u8)(pokemonEntityData->frozenClassStatus.status - 3U) > 1) {
if (pokemonEntityData->frozenClassStatus.status != STATUS_WRAP && pokemonEntityData->frozenClassStatus.status != STATUS_WRAPPED) {
if ((targetEntityInfo->frozenClassStatus.status != STATUS_WRAP))
{
if(targetEntityInfo->frozenClassStatus.status != STATUS_WRAPPED) {
@ -879,7 +867,7 @@ void WrapTarget(Entity * pokemon, Entity * target)
pokemonEntityData->frozenClassStatus.turns = 0x7f;
pokemonEntityData->frozenClassStatus.damageCountdown = 0;
targetEntityInfo->frozenClassStatus.status = STATUS_WRAPPED;
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E5C, TRUE) + 1;
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target, gWrapTurnRange, TRUE) + 1;
targetEntityInfo->frozenClassStatus.damageCountdown = 0;
iVar5 = &pokemonEntityData->unk9C;
piVar3 = &gDungeon->unk37F4;
@ -953,10 +941,10 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target)
if (targetEntityInfo->frozenClassStatus.status != STATUS_PETRIFIED) {
targetEntityInfo->frozenClassStatus.status = STATUS_PETRIFIED;
if (targetEntityInfo->isTeamLeader) {
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EBC,TRUE) + 1;
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gPetrifiedLeaderTurnRange,TRUE) + 1;
}
else {
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EC0,TRUE) + 1;
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gPetrifiedTurnRange,TRUE) + 1;
}
targetEntityInfo->frozenClassStatus.damageCountdown = 0;
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB7BC);

View File

@ -1,6 +1,5 @@
#include "global.h"
#include "status.h"
#include "code_803E46C.h"
#include "code_8045A00.h"
#include "code_806CD90.h"
@ -23,6 +22,7 @@
#include "status_checks_1.h"
#include "structs/map.h"
#include "structs/str_dungeon.h"
#include "dungeon_config.h"
extern u8 *gUnknown_80FBD78[];
extern u8 *gUnknown_80FBD9C[];
@ -48,28 +48,22 @@ extern u8 *gUnknown_80FC09C[];
extern u8 *gUnknown_80FC1F0[];
extern u8 *gUnknown_80FC1A4[];
extern u8 *gUnknown_80FCA64[];
extern s16 gUnknown_80F4E3C[];
extern u8 *gUnknown_80FCC18[];
extern u8 *gUnknown_80FB2E0[];
extern u8 *gUnknown_80FB300[];
extern s16 gUnknown_80F4E50[];
extern u8 *gUnknown_80FB2CC[];
extern u8 *gUnknown_80FB2AC[];
extern u8 *gUnknown_80FF01C[];
extern u8 *gUnknown_80FCBF8[];
extern s16 gUnknown_80F4E40[];
extern u8 *gUnknown_80FA124[];
extern u8 *gUnknown_80FC2B8[];
extern u8 *gUnknown_80FC298[];
extern u8 *gUnknown_80FC2D8[];
extern u8 *gUnknown_80FC298[];
extern s16 gUnknown_80F4E48[];
extern s16 gUnknown_80F4E4C[];
extern u8 *gUnknown_80FB27C[];
extern u8 *gUnknown_80FB25C[];
extern u8 *gUnknown_80FCDB4[];
extern u8 *gUnknown_80FD500[];
extern s16 gUnknown_80F4ECC[];
extern u8 *gUnknown_80FB960[];
extern u8 *gUnknown_80FB940[];
extern u8 *gUnknown_80FB204[];
@ -89,44 +83,33 @@ extern u8 *gPtrCantLeechSeedMonMessage[];
extern u8 *gUnknown_80FAA8C[];
extern u8 *gUnknown_80FAE58[];
extern u8 *gUnknown_80FAE7C[];
extern s16 gUnknown_80F4EB0[];
extern u8 *gUnknown_80FBB4C[];
extern u8 *gUnknown_80FBB78[];
extern u8 *gUnknown_80FA79C[];
extern s16 gUnknown_80F4EF0[];
extern u8 *gUnknown_80FB73C[];
extern u8 *gUnknown_80FB764[];
extern u8 *gUnknown_80FB780[];
extern u8 *gUnknown_80FB7A0[];
extern s16 gUnknown_80F4EC4[];
extern u8 *gUnknown_80FB8BC[];
extern u8 *gUnknown_80FB8E4[];
extern s16 gUnknown_80F4EC8[];
extern u8 *gUnknown_80FB900[];
extern u8 *gUnknown_80FB924[];
extern u8 *gUnknown_80FB994[];
extern s16 gUnknown_80F4ED0[];
extern u8 *gUnknown_80FB978[];
extern s16 gUnknown_80F4EA4[];
extern u8 *gUnknown_80FB004[];
extern u32 gUnknown_8106A4C;
extern s16 gUnknown_80F4EA8[];
extern u8 *gUnknown_80FB01C[];
extern s16 gUnknown_80F4ED8[];
extern u8 *gUnknown_80FBA14[];
extern u8 *gUnknown_80FB9F0[];
extern u8 *gUnknown_80FBA38[];
extern u8 *gUnknown_80FBA60[];
extern u8 *gUnknown_80FBAA0[];
extern u8 *gUnknown_80FBA80[];
extern s16 gUnknown_80F4EE4[];
extern s16 gUnknown_80F4EEC[];
extern u8 *gUnknown_80FBB04[];
extern u8 *gUnknown_80FBB28[];
extern u8 *gUnknown_80FBBD4[];
extern u8 *gUnknown_80FBBB8[];
extern u8 *gUnknown_80FBB94[];
extern s16 gUnknown_80F4EF4[];
extern u8 *gUnknown_80FBE84[];
extern u8 *gUnknown_80FBEA0[];
extern u8 *gUnknown_80FBE64[];
@ -134,8 +117,6 @@ extern u8 *gUnknown_80FBDF0[];
extern u8 *gUnknown_80FBDC4[];
extern u8 *gUnknown_80FBE14[];
extern s32 gFormatArgs[10];
extern void sub_8041D84(Entity *);
extern void sub_804178C(u32);
extern void sub_8041D5C(Entity *);
@ -417,7 +398,7 @@ void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage)
if(entityInfo->cringeClassStatus.status != STATUS_CRINGE)
{
entityInfo->cringeClassStatus.status = STATUS_CRINGE;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target, gCringeTurnRange, TRUE) + 1;
sub_80420A0(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB2E0);
}
@ -454,7 +435,7 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->burnClassStatus.status != STATUS_PARALYSIS) {
entityInfo->burnClassStatus.status = STATUS_PARALYSIS;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E50,TRUE) + 1;
entityInfo->burnClassStatus.turns = CalculateStatusTurns(target,gParalysisTurnRange,TRUE) + 1;
entityInfo->burnClassStatus.damageCountdown = 0;
entityInfo->burnClassStatus.unk4 = 0;
bVar6 = FALSE;
@ -500,7 +481,7 @@ void RaiseMovementSpeedTarget(Entity * pokemon, Entity * target, s32 turns, bool
return;
}
if (turns == 0) {
turns = CalculateStatusTurns(target,gUnknown_80F4E40,FALSE) + 1;
turns = CalculateStatusTurns(target,gSpeedRaiseTurnRange,FALSE) + 1;
}
entityInfo = GetEntInfo(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
@ -560,7 +541,7 @@ void LowerMovementSpeedTarget(Entity * pokemon, Entity * target, s32 levels, boo
for(index = 0; index < NUM_SPEED_COUNTERS; index++)
{
if (entityInfo->speedDownCounters[index]== 0) {
entityInfo->speedDownCounters[index] = CalculateStatusTurns(target,gUnknown_80F4E48,TRUE) + 1;
entityInfo->speedDownCounters[index] = CalculateStatusTurns(target,gSpeedLowerTurnRange,TRUE) + 1;
break;
}
}
@ -608,7 +589,7 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage
entityInfo = GetEntInfo(target);
if (entityInfo->cringeClassStatus.status != STATUS_CONFUSED) {
entityInfo->cringeClassStatus.status = STATUS_CONFUSED;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4E4C,TRUE) + 1;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gConfusionTurnRange,TRUE) + 1;
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB25C);
}
else {
@ -628,7 +609,7 @@ void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->cringeClassStatus.status != STATUS_COWERING) {
entityInfo->cringeClassStatus.status = STATUS_COWERING;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gCowerTurnRange,TRUE) + 1;
sub_8041BF8(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB940);
}
@ -813,7 +794,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FAA8C);
default:
entityInfo->leechSeedClassStatus.status = STATUS_LEECH_SEED;
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EB0, TRUE) + 1;
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target, gLeechSeedTurnRange, TRUE) + 1;
entityInfo->leechSeedClassStatus.damageCountdown = 0;
nullsub_78(target);
entityInfo->leechSeedClassStatus.unk8 = 0xff;
@ -867,22 +848,19 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
EntityInfo *entityInfo;
EntityInfo *entityInfo2;
s32 index;
u8 *status;
s32 zero;
if (((EntityExists(target)) && (GetEntityType(pokemon) == ENTITY_MONSTER)) &&
(GetEntityType(target) == ENTITY_MONSTER)) {
entityInfo = GetEntInfo(pokemon);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
status = &entityInfo->leechSeedClassStatus.status;
if (entityInfo->leechSeedClassStatus.status != STATUS_DESTINY_BOND)
{
if (entityInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED)
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FA79C);
zero = 0;
*status = STATUS_DESTINY_BOND;
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EF0,TRUE) + 1;
entityInfo->leechSeedClassStatus.damageCountdown = zero;
entityInfo->leechSeedClassStatus.status = STATUS_DESTINY_BOND;
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target,gDestinyBondTurnRange,TRUE) + 1;
entityInfo->leechSeedClassStatus.damageCountdown = 0;
nullsub_74(target);
entityInfo->leechSeedClassStatus.unk8 = 0xff;
}
@ -953,7 +931,7 @@ void FixedDamageStatusTarget(Entity *pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->sureShotClassStatus.status != STATUS_SET_DAMAGE) {
entityInfo->sureShotClassStatus.status = STATUS_SET_DAMAGE;
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EC4, FALSE) + 1;
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gSetDamageTurnRange, FALSE) + 1;
nullsub_79(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB8BC);
}
@ -973,7 +951,7 @@ void FocusEnergyStatusTarget(Entity *pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->sureShotClassStatus.status != STATUS_FOCUS_ENERGY) {
entityInfo->sureShotClassStatus.status = STATUS_FOCUS_ENERGY;
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gUnknown_80F4EC8, FALSE) + 1;
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gFocusEnergyTurnRange, FALSE) + 1;
nullsub_80(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB900);
}
@ -1017,7 +995,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3)
targetEntityInfo->curseClassStatus.status = STATUS_DECOY;
targetEntityInfo->curseClassStatus.applierNonTeamMemberFlag = GetEntInfo(pokemon)->isNotTeamMember;
targetEntityInfo->curseClassStatus.unk2 = param_3;
targetEntityInfo->curseClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4ED0,TRUE) + 1;
targetEntityInfo->curseClassStatus.turns = CalculateStatusTurns(target,gDecoyTurnRange,TRUE) + 1;
targetEntityInfo->curseClassStatus.damageCountdown = 0;
sub_806CCB4(target,sub_806CEBC(target));
gDungeon->decoyIsActive = TRUE;
@ -1067,7 +1045,7 @@ void CurseStatusTarget(Entity *pokemon, Entity * target)
}
if (targetEntityInfo->curseClassStatus.status != STATUS_CURSED) {
targetEntityInfo->curseClassStatus.status = STATUS_CURSED;
targetEntityInfo->curseClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EA4,TRUE) + 1;
targetEntityInfo->curseClassStatus.turns = CalculateStatusTurns(target,gCurseTurnRange,TRUE) + 1;
targetEntityInfo->curseClassStatus.damageCountdown = 0;
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
@ -1104,7 +1082,7 @@ void SnatchStatusTarget(Entity * pokemon, Entity * target)
targetEntityInfo = GetEntInfo(target);
if (targetEntityInfo->curseClassStatus.status != STATUS_SNATCH) {
targetEntityInfo->curseClassStatus.status = STATUS_SNATCH;
targetEntityInfo->curseClassStatus.turns= CalculateStatusTurns(target,gUnknown_80F4EA8,FALSE) + 1;
targetEntityInfo->curseClassStatus.turns= CalculateStatusTurns(target,gSnatchTurnRange,FALSE) + 1;
targetEntityInfo->curseClassStatus.damageCountdown = 0;
}
@ -1125,7 +1103,7 @@ void TauntStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->cringeClassStatus.status != STATUS_TAUNTED) {
entityInfo->cringeClassStatus.status = STATUS_TAUNTED;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gTauntTurnRange,TRUE) + 1;
nullsub_73(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FB9F0);
}
@ -1169,7 +1147,7 @@ void InvisibleStatusTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (targetEntityInfo->invisibleClassStatus.status != STATUS_INVISIBLE) {
targetEntityInfo->invisibleClassStatus.status = STATUS_INVISIBLE;
targetEntityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EE4,FALSE) + 1;
targetEntityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gInvisibleTurnRange,FALSE) + 1;
sub_8041D84(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBA80);
}
@ -1189,7 +1167,7 @@ void PerishSongTarget(Entity * pokemon, Entity * target)
entityInfo = GetEntInfo(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->perishSongTurns == 0) {
entityInfo->perishSongTurns = CalculateStatusTurns(target,gUnknown_80F4EEC,FALSE) + 1;
entityInfo->perishSongTurns = CalculateStatusTurns(target,gPerishSongTurnRange,FALSE) + 1;
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBB04);
}
else {
@ -1220,7 +1198,7 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (EntityInfo->cringeClassStatus.status != STATUS_ENCORE) {
EntityInfo->cringeClassStatus.status = STATUS_ENCORE;
EntityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1;
EntityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gEncoreTurnRange,TRUE) + 1;
nullsub_83(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,*gUnknown_80FBB94);
}

View File

@ -1,6 +1,5 @@
#include "global.h"
#include "status_actions.h"
#include "charge_move.h"
#include "code_8045A00.h"
#include "dungeon_message.h"
@ -33,7 +32,7 @@
#include "tile_types.h"
#include "trap.h"
#include "weather.h"
#include "called_move_data.h"
#include "dungeon_config.h"
extern void sub_807F43C(Entity *, Entity *);
extern void HandleOneRoomOrb(Entity *, Entity *);
@ -58,7 +57,7 @@ extern s16 sub_803D970(u32);
extern bool8 sub_806AA0C(s32, u32);
extern void sub_806BB6C(Entity *, s32);
extern void HandleSwitcherOrb(Entity *, Entity *, u32);
extern u32 HandleDamagingMove(Entity *, Entity *, Move *, u32, u32);
extern u32 HandleDamagingMove(Entity *, Entity *, Move *, s24_8, u32);
extern void sub_806A6E8(Entity *);
extern u8 sub_8069D18(DungeonPos *);
extern u8 sub_804AD34(DungeonPos *);
@ -82,31 +81,21 @@ extern bool8 MoveRequiresCharging(Entity* pokemon,u16 moveID);
extern void sub_80783C4(Entity *, Entity *, bool8);
// NOTE: Override pokemon.c types for these two funcs
// GetSize is ok
extern u8 GetBodySize(s32 index);
// TODO The parameters don't match the function definition in pokemon_mid.h (u8*, s16).
extern void CopyCyanMonsterNametoBuffer(u8 *buffer, s32 index);
extern u32 GetSize(s16 index);
extern s16 gUnknown_80F55EC[];
extern s16 gUnknown_80F4DCE;
extern u8 *gUnknown_80FDD00[];
extern u8 *gUnknown_80FDCE4[];
extern u32 gUnknown_8106A50;
extern u8 *gPtrSleepingTargetOnlyMessage[];
extern u8 *gUnknown_80FAFF0[];
extern u32 gUnknown_80F4F58;
extern u32 gUnknown_8106A4C;
extern s16 gUnknown_80F4E74[];
extern u8 *gUnknown_80FD450[];
extern u8 *gUnknown_80FD434[];
extern s16 gUnknown_80F4F80;
extern u8 *gUnknown_80FF678[];
extern u8 *gUnknown_80FD0B8[];
extern u8 *gUnknown_80FD0B4[];
extern u8 *gUnknown_80FD454[];
extern s16 gUnknown_80F4FC6;
extern u8 *gUnknown_81004F0[];
extern u8 *gUnknown_80FD1CC[];
extern u8 *gUnknown_80FD1B0[];
@ -123,26 +112,17 @@ extern u8 *gUnknown_80FD430[];
extern u8 *gUnknown_80FD40C[];
extern u8 *gUnknown_80FD3F0[];
extern u32 gUnknown_8106A50;
extern s16 gUnknown_80F4DDC;
extern s16 gUnknown_80F4F7E;
extern u8 *gUnknown_80FDCA0[];
extern u8 *gUnknown_80FDC9C[];
extern s16 gUnknown_80F4DD8;
extern u32 gUnknown_202F224;
extern u32 gUnknown_8106A8C[];
extern s16 gUnknown_80F4F94[];
extern u8 *gUnknown_80FC5A8[];
extern u8 *gPtrForecastPreventsTypeSwitchMessage[];
extern u8 *gUnknown_80FEB08[];
extern s16 gUnknown_80F4E08;
extern u8 gDungeonCamouflageTypes[76];
extern u32 gMetronomeCalledArrayId;
extern s16 gUnknown_80F4DC6;
extern u8 *gUnknown_80FEFF4[];
extern u32 gUnknown_80F51C4[];
bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4)
{
EntityInfo *entityInfo;
@ -166,7 +146,7 @@ bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, u32 para
index = 3;
}
flag = HandleDamagingMove(pokemon,target,move,gUnknown_80F51C4[index],param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gEruptionModifiers[index],param_4) ? TRUE : FALSE;
return flag;
}
@ -194,9 +174,9 @@ bool8 PoisonTailMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gUnknown_80F4DC6) != 0) {
if (sub_805727C(pokemon,target,gPoisonTailSecondaryChance) != 0) {
PoisonedStatusTarget(pokemon,target,FALSE);
}
}
@ -255,9 +235,9 @@ bool8 sub_805B17C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
uVar4 = 0x7e;
}
}
if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gUnknown_80F4E08) != 0) {
if (sub_805727C(pokemon,target,gMovesConstrictionChance) != 0) {
SqueezedStatusTarget(pokemon,target,uVar4,0);
}
}
@ -304,7 +284,7 @@ bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
{
s32 r3;
bool8 r6;
s32 iVar5;
s32 magnitudeDmgVal;
EntityInfo *entityInfo;
entityInfo = GetEntInfo(target);
@ -313,11 +293,11 @@ bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
gDungeon->unk181e8.unk18200 = gUnknown_8106A8C[r3];
gDungeon->unk181e8.unk18204 = 0;
iVar5 = gUnknown_80F4F94[r3];
magnitudeDmgVal = gMagnitudeDmgValues[r3];
if (entityInfo->bideClassStatus.status == STATUS_DIGGING) {
iVar5 *= 2;
magnitudeDmgVal *= 2;
}
r6 = sub_8055864(pokemon,target,move,iVar5,param_4) ? TRUE : FALSE;
r6 = sub_8055864(pokemon,target,move,magnitudeDmgVal,param_4) ? TRUE : FALSE;
return r6;
}
@ -350,9 +330,9 @@ bool8 MistBallMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gUnknown_80F4DD8) != 0) {
if (sub_805727C(pokemon,target,gMistBallSecondaryChance) != 0) {
LowerAttackStageTarget(pokemon,target,gUnknown_8106A50,1,1,0);
}
}
@ -367,7 +347,7 @@ bool8 DestinyBondMoveAction(Entity * pokemon,Entity * target,Move *move, s32 par
bool8 FalseSwipeMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
return (HandleDamagingMove(pokemon,target,move,0x100,param_4)) ? TRUE : FALSE;
return (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4)) ? TRUE : FALSE;
}
bool8 MirrorCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
@ -386,7 +366,7 @@ bool8 CalmMindMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_
bool8 HiddenPowerMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
{
HandleDamagingMove(pokemon,target,move,0x100,param_4);
HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4);
return TRUE;
}
@ -396,9 +376,9 @@ bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,0x100,param_5) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_5) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,pokemon,gUnknown_80F4DCE) != 0) {
if (sub_805727C(pokemon,pokemon,gMetalClawSecondaryChance) != 0) {
entityInfo = GetEntInfo(pokemon);
RaiseAttackStageTarget(pokemon,pokemon,param_4,1);
SetExpMultplier(entityInfo);
@ -452,30 +432,20 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4
bool8 FrustrationMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
s16 *r1;
s32 index;
s32 r5;
s32 IQ;
u8 local_24;
EntityInfo *entityInfo;
s32 i;
bool8 local_24 = FALSE;
EntityInfo *entityInfo = GetEntInfo(pokemon);
s32 dmg = 1;
local_24 = 0;
entityInfo = GetEntInfo(pokemon);
r5 = 1;
index = 0;
if (0 <= gUnknown_80F55EC[0]) {
IQ = entityInfo->IQ;
for(r1 = &gUnknown_80F55EC[index]; (999 > index) && (*r1 >= 0); r1 = r1 + 2, index++)
{
if ((IQ < *r1)){
r5 = r1[1];
goto _0805B598;
}
}
for (i = 0; i < 999 && gFrustrationDmgData[i].minIq >= 0; i++) {
if (entityInfo->IQ < gFrustrationDmgData[i].minIq) {
dmg = gFrustrationDmgData[i].dmgVal;
break;
}
}
_0805B598:
sub_806F370(pokemon,target,r5,1,&local_24, GetMoveType(move),sub_8057600(move,param_4),0,1,0);
local_24 = local_24 == 0;
sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
local_24 = (local_24 == 0);
return local_24;
}
@ -509,7 +479,7 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
flag = FALSE;
hasLiquidOoze = AbilityIsActive(target, ABILITY_LIQUID_OOZE);
if (IsSleeping(target)) {
iVar3 = HandleDamagingMove(pokemon,target,move,0x100,param_4);
iVar3 = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4);
if (iVar3 != 0) {
flag = TRUE;
newHP = iVar3 / 2;
@ -585,7 +555,7 @@ bool8 DragonRageMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
u8 local_20;
local_20 = 0;
sub_806F370(pokemon,target,gUnknown_80F4F7E,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,gDragonRageDmgValue,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
local_20 = (local_20 == 0);
return local_20;
}
@ -602,7 +572,7 @@ bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
bool8 flag;
if (MoveMatchesBideClassStatus(pokemon,move)) {
flag = HandleDamagingMove(pokemon,target,move,gUnknown_80F4F58,param_4) != 0 ? 1 : 0;
flag = HandleDamagingMove(pokemon,target,move,gSkullBashModifier,param_4) != 0 ? 1 : 0;
sub_8079764(pokemon);
}
else {
@ -617,9 +587,9 @@ bool8 LusterPurgeMoveAction(Entity * pokemon, Entity * target, Move * move, s32
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gUnknown_80F4DDC))
if(sub_805727C(pokemon, target, gLusterPurgeSecondaryChance))
{
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 1, 1, 0);
}
@ -634,7 +604,7 @@ bool8 StruggleMoveAction(Entity * pokemon, Entity * target, Move * move, s32 par
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
flag = TRUE;
if (RollSecondaryEffect(pokemon,0) != 0) {
entityHP = GetEntInfo(pokemon)->maxHPStat;
@ -689,7 +659,7 @@ bool8 ThiefAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
Item *targetItem;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,0x100,param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target, 0) != 0) {
pokemonInfo1 = GetEntInfo(pokemon);
@ -789,7 +759,7 @@ bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_
bool8 SlumberOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
{
SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE);
SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gSleepTurnRange, TRUE), TRUE);
return TRUE;
}
@ -1051,7 +1021,7 @@ bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
{
bool8 flag;
flag = sub_8055864(pokemon, target, move, gUnknown_80F4F80, param_4) != 0 ? TRUE : FALSE;
flag = sub_8055864(pokemon, target, move, gVacuumCutDmgValue, param_4) != 0 ? TRUE : FALSE;
return flag;
}
@ -1082,7 +1052,7 @@ bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4)
bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4)
{
sub_8078A58(pokemon, target, gUnknown_80F4FC6, 0);
sub_8078A58(pokemon, target, gFamishBellyDownValue, 0);
return TRUE;
}

View File

@ -13,8 +13,6 @@
#include "dungeon_capabilities.h"
#include "dungeon_random.h"
const s16 gConfusedAttackChance = 70;
extern const char *gPtrFrozenMessage[];
extern const char *gPtrWrappedAroundMessage[];
extern const char *gPtrWrappedByMessage[];

View File

@ -1,6 +1,5 @@
#include "global.h"
#include "trap.h"
#include "code_803E668.h"
#include "code_803E724.h"
#include "code_80450F8.h"
@ -25,6 +24,7 @@
#include "structs/map.h"
#include "structs/str_dungeon.h"
#include "structs/str_806B7F8.h"
#include "dungeon_config.h"
extern u8 *gTrapNames[];
extern u8 *gUnknown_80FC5FC[];
@ -33,7 +33,6 @@ extern u8 *gUnknown_80FDB5C[];
extern u8 *gUnknown_80FDB7C[];
extern u8 *gUnknown_80FD7F4[];
extern u8 *gUnknown_80FD7F8[];
extern s16 gUnknown_80F4E74[];
extern u8 *gUnknown_80FDC18[];
extern u8 *gUnknown_80FDC40[];
extern u8 *gUnknown_80FDC7C[];
@ -51,12 +50,8 @@ extern u8 *gUnknown_80FDB04[];
extern u8 *gUnknown_80FDB2C[];
extern s16 gUnknown_80F4E0E;
extern s16 gUnknown_80F4F84;
extern s16 gUnknown_80F4F86;
extern u32 gUnknown_8106A4C;
extern u32 gUnknown_8106A50;
extern s16 gUnknown_80F4F8A;
void sub_806A9B4(Entity *, u32);
@ -336,7 +331,7 @@ void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4)
break;
case TRAP_CHESTNUT_TRAP:
if (target != NULL) {
DealDamageToEntity(target,gUnknown_80F4F86,0xf,0x213);
DealDamageToEntity(target,gChestnutTrapDmgValue,0xf,0x213);
}
break;
case TRAP_WONDER_TILE:
@ -348,7 +343,7 @@ void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4)
break;
case TRAP_SPIKE_TRAP:
if (target != NULL) {
DealDamageToEntity(target,gUnknown_80F4F84,10,0x206);
DealDamageToEntity(target,gSpikeTrapDmgValue,10,0x206);
}
}
if (EntityExists(target)) {
@ -444,7 +439,7 @@ void HandleSlumberTrap(Entity *pokemon, Entity *target)
if(target != NULL)
{
turns = CalculateStatusTurns(target, gUnknown_80F4E74, TRUE);
turns = CalculateStatusTurns(target, gSleepTurnRange, TRUE);
SleepStatusTarget(pokemon, target, turns, TRUE);
}
}
@ -502,7 +497,7 @@ void HandleGrimyTrap(Entity *pokemon, Entity *target)
}
for (index = 0; index < counter; index++) {
if (((GetItemCategory(itemStack[index]->id) == CATEGORY_FOOD_GUMMIES) && (itemStack[index]->id != ITEM_GRIMY_FOOD)) &&
(DungeonRandInt(100) < gUnknown_80F4E0E)) {
(DungeonRandInt(100) < gGrimyTrapActivateChance)) {
badFoodCount++;
sub_8045C28(itemStack[index], ITEM_GRIMY_FOOD, 2);
}
@ -544,7 +539,7 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile)
info->unk15C = 1;
info->unk15E = 1;
sub_803E708(0x28,0x4b);
DealDamageToEntity(target,gUnknown_80F4F8A,0x11,0x215);
DealDamageToEntity(target,gPitfallTrapDmgValue,0x11,0x215);
gDungeon->unk2 = 2;
return;
}

View File

@ -1,4 +0,0 @@
#include "global.h"
#include "type_chart.h"
#include "data/type_chart.h"

View File

@ -1,6 +1,5 @@
#include "global.h"
#include "type_effectiveness.h"
#include "constants/ability.h"
#include "constants/status.h"
#include "constants/weather.h"
@ -10,7 +9,7 @@
#include "dungeon_util.h"
#include "math.h"
#include "status.h"
#include "type_chart.h"
#include "dungeon_config.h"
#include "weather.h"
@ -59,8 +58,6 @@ extern u8 *gUnknown_80FEDC8[];
extern u8 *gUnknown_80FEDA8[];
extern u8 *gUnknown_80FED88[];
extern const s32 gUnknown_80F54B4[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS];
void sub_80428D8(Entity *);
void sub_8042978(Entity *);
void sub_804298C(Entity *);
@ -124,7 +121,7 @@ bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 type, str
gDungeon->unk134.unk13C[index] = effectiveness;
}
param_5->effectiveness = gUnknown_80F54B4[local_38[0]][local_38[1]];
param_5->effectiveness = gEffectivenessChart[local_38[0]][local_38[1]];
bVar4 = TRUE;
if ((param_5->effectiveness != EFFECTIVENESS_SUPER) && (bVar4 = FALSE, hasWonderGuard)) {
temp = gUnknown_8106EFC[1];

View File

@ -25,8 +25,8 @@ void sub_807E5AC(void)
{
u8 weather;
weather = gDungeon->unk1C574.unk4;
if(weather == WEATHER_RANDOM)
weather = DungeonRandInt(WEATHER_RANDOM);
if(weather == WEATHER_COUNT)
weather = DungeonRandInt(WEATHER_COUNT);
sub_807E5E4(weather);
TriggerWeatherAbilities();
sub_807EAA0(0, 1);