Skip to content

Commit

Permalink
Refactor stat change functions.
Browse files Browse the repository at this point in the history
Currently most of the battle engine still uses the old functions.
The new logic is shorter, less error-prone and works with Contrary.
  • Loading branch information
FredrIQ committed Dec 17, 2019
1 parent 10bdec5 commit a5db0e7
Show file tree
Hide file tree
Showing 13 changed files with 854 additions and 317 deletions.
15 changes: 15 additions & 0 deletions constants/battle_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ NO_EFFECT EQU $00
const MULTIPLE_STATS ; used by Curse
NUM_LEVEL_STATS EQU const_value

const_def
const STAT_TARGET_F
const STAT_LOWER_F
const STAT_MISS_F
const STAT_SECONDARY_F
const STAT_SILENT_F
const STAT_SKIPTEXT_F

STAT_TARGET EQU 1 << STAT_TARGET_F
STAT_LOWER EQU 1 << STAT_LOWER_F
STAT_MISS EQU 1 << STAT_MISS_F
STAT_SECONDARY EQU 1 << STAT_SECONDARY_F
STAT_SILENT EQU 1 << STAT_SILENT_F
STAT_SKIPTEXT EQU 1 << STAT_SKIPTEXT_F

; move struct
const_def
const MOVE_ANIM
Expand Down
18 changes: 9 additions & 9 deletions contents/bank_ends.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
> -- Morimoto, Pokémon Ultra Sun/Ultra Moon
> <https://www.serebii.net/ultrasunultramoon/virtualconsole.shtml>

Free space: 191816/2097152 (9.15%)
Free space: 191040/2097152 (9.11%)

bank end free
$00 $3f9b $0065
$01 $7fff $0001
$01 $8000 $0000
$02 $8000 $0000
$03 $7ff3 $000d
$04 $7ffe $0002
$05 $7ffe $0002
$06 $7ff4 $000c
$07 $7fd6 $002a
$07 $7fd9 $0027
$08 $7fe6 $001a
$09 $7ff9 $0007
$0a $7fda $0026
$0b $8000 $0000
$0c $7fdd $0023
$0d $7f93 $006d
$0e $7ff0 $0010
$0e $7ff7 $0009
$0f $7ff5 $000b
$10 $7ffe $0002
$11 $7fdc $0024
Expand All @@ -48,7 +48,7 @@ $24 $7ffa $0006
$25 $7fe0 $0020
$26 $7fad $0053
$27 $7fe9 $0017
$28 $7fd0 $0030
$28 $7fe9 $0017
$29 $7fe4 $001c
$2a $7ffc $0004
$2b $8000 $0000
Expand Down Expand Up @@ -85,7 +85,7 @@ $49 $7ffc $0004
$4a $7ff0 $0010
$4b $7fe8 $0018
$4c $7fc8 $0038
$4d $7fa6 $005a
$4d $7fe2 $001e
$4e $7ffc $0004
$4f $7f9a $0066
$50 $7ff7 $0009
Expand Down Expand Up @@ -115,13 +115,13 @@ $67 $7f30 $00d0
$68 $7ffd $0003
$69 $7fa6 $005a
$6a $7fff $0001
$6b $7dec $0214
$6b $7fea $0016
$6c $8000 $0000
$6d $7fea $0016
$6e $7f5f $00a1
$6e $7ff4 $000c
$6f $7fff $0001
$70 $7fd9 $0027
$71 $7cd2 $032e
$71 $7ce7 $0319
$72 $8000 $0000
$73 $7e04 $01fc
$74 $71ba $0e46
Expand Down
Loading

0 comments on commit a5db0e7

Please sign in to comment.