Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pret/pokered
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Dec 25, 2024
2 parents 6e94bc3 + a59c2bb commit 47b784a
Show file tree
Hide file tree
Showing 22 changed files with 73 additions and 67 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- name: Install rgbds
working-directory: rgbds
run: |
sudo apt-get install -yq libpng-dev
sudo make install
- name: Remove rgbds
Expand Down
4 changes: 2 additions & 2 deletions constants/move_effect_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const POISON_SIDE_EFFECT1 ; $02
const DRAIN_HP_EFFECT ; $03
const BURN_SIDE_EFFECT1 ; $04
const FREEZE_SIDE_EFFECT ; $05
const FREEZE_SIDE_EFFECT1 ; $05
const PARALYZE_SIDE_EFFECT1 ; $06
const EXPLODE_EFFECT ; $07 Explosion, Self Destruct
const DREAM_EATER_EFFECT ; $08
Expand Down Expand Up @@ -39,7 +39,7 @@
const SLEEP_EFFECT ; $20
const POISON_SIDE_EFFECT2 ; $21
const BURN_SIDE_EFFECT2 ; $22
const UNUSED_EFFECT_23 ; $23
const FREEZE_SIDE_EFFECT2 ; $23 unused (Blizzard in JP Red/Green)
const PARALYZE_SIDE_EFFECT2 ; $24
const FLINCH_SIDE_EFFECT2 ; $25
const OHKO_EFFECT ; $26 moves like Horn Drill
Expand Down
2 changes: 1 addition & 1 deletion constants/palette_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ DEF SET_PAL_DEFAULT EQU $ff
const PAL_GREENMON ; $16
const PAL_PINKMON ; $17
const PAL_YELLOWMON ; $18
const PAL_GREYMON ; $19
const PAL_GRAYMON ; $19
const PAL_SLOTS1 ; $1A
const PAL_SLOTS2 ; $1B
const PAL_SLOTS3 ; $1C
Expand Down
4 changes: 2 additions & 2 deletions data/moves/effects_pointers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MoveEffectPointerTable:
dw PoisonEffect ; POISON_SIDE_EFFECT1
dw DrainHPEffect ; DRAIN_HP_EFFECT
dw FreezeBurnParalyzeEffect ; BURN_SIDE_EFFECT1
dw FreezeBurnParalyzeEffect ; FREEZE_SIDE_EFFECT
dw FreezeBurnParalyzeEffect ; FREEZE_SIDE_EFFECT1
dw FreezeBurnParalyzeEffect ; PARALYZE_SIDE_EFFECT1
dw ExplodeEffect ; EXPLODE_EFFECT
dw DrainHPEffect ; DREAM_EATER_EFFECT
Expand Down Expand Up @@ -35,7 +35,7 @@ MoveEffectPointerTable:
dw SleepEffect ; SLEEP_EFFECT
dw PoisonEffect ; POISON_SIDE_EFFECT2
dw FreezeBurnParalyzeEffect ; BURN_SIDE_EFFECT2
dw FreezeBurnParalyzeEffect ; unused effect
dw FreezeBurnParalyzeEffect ; FREEZE_SIDE_EFFECT2
dw FreezeBurnParalyzeEffect ; PARALYZE_SIDE_EFFECT2
dw FlinchSideEffect ; FLINCH_SIDE_EFFECT2
dw OneHitKOEffect ; OHKO_EFFECT
Expand Down
6 changes: 3 additions & 3 deletions data/moves/moves.asm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Moves:
move MEGA_PUNCH, NO_ADDITIONAL_EFFECT, 80, NORMAL, 85, 20
move PAY_DAY, PAY_DAY_EFFECT, 40, NORMAL, 100, 20
move FIRE_PUNCH, BURN_SIDE_EFFECT1, 75, FIRE, 100, 15
move ICE_PUNCH, FREEZE_SIDE_EFFECT, 75, ICE, 100, 15
move ICE_PUNCH, FREEZE_SIDE_EFFECT1, 75, ICE, 100, 15
move THUNDERPUNCH, PARALYZE_SIDE_EFFECT1, 75, ELECTRIC, 100, 15
move SCRATCH, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35
move VICEGRIP, NO_ADDITIONAL_EFFECT, 55, NORMAL, 100, 30
Expand Down Expand Up @@ -68,8 +68,8 @@ Moves:
move WATER_GUN, NO_ADDITIONAL_EFFECT, 40, WATER, 100, 25
move HYDRO_PUMP, NO_ADDITIONAL_EFFECT, 120, WATER, 80, 5
move SURF, NO_ADDITIONAL_EFFECT, 95, WATER, 100, 15
move ICE_BEAM, FREEZE_SIDE_EFFECT, 95, ICE, 100, 10
move BLIZZARD, FREEZE_SIDE_EFFECT, 120, ICE, 90, 5
move ICE_BEAM, FREEZE_SIDE_EFFECT1, 95, ICE, 100, 10
move BLIZZARD, FREEZE_SIDE_EFFECT1, 120, ICE, 90, 5
move PSYBEAM, CONFUSION_SIDE_EFFECT, 65, PSYCHIC_TYPE, 100, 20
move BUBBLEBEAM, SPEED_DOWN_SIDE_EFFECT, 65, WATER, 100, 20
move AURORA_BEAM, ATTACK_DOWN_SIDE_EFFECT, 65, ICE, 100, 20
Expand Down
48 changes: 24 additions & 24 deletions data/pokemon/palettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ MonsterPalettes:
db PAL_BROWNMON ; PIDGEY
db PAL_BROWNMON ; PIDGEOTTO
db PAL_BROWNMON ; PIDGEOT
db PAL_GREYMON ; RATTATA
db PAL_GREYMON ; RATICATE
db PAL_GRAYMON ; RATTATA
db PAL_GRAYMON ; RATICATE
db PAL_BROWNMON ; SPEAROW
db PAL_BROWNMON ; FEAROW
db PAL_PURPLEMON ; EKANS
Expand Down Expand Up @@ -66,36 +66,36 @@ MonsterPalettes:
db PAL_YELLOWMON ; ABRA
db PAL_YELLOWMON ; KADABRA
db PAL_YELLOWMON ; ALAKAZAM
db PAL_GREYMON ; MACHOP
db PAL_GREYMON ; MACHOKE
db PAL_GREYMON ; MACHAMP
db PAL_GRAYMON ; MACHOP
db PAL_GRAYMON ; MACHOKE
db PAL_GRAYMON ; MACHAMP
db PAL_GREENMON ; BELLSPROUT
db PAL_GREENMON ; WEEPINBELL
db PAL_GREENMON ; VICTREEBEL
db PAL_CYANMON ; TENTACOOL
db PAL_CYANMON ; TENTACRUEL
db PAL_GREYMON ; GEODUDE
db PAL_GREYMON ; GRAVELER
db PAL_GREYMON ; GOLEM
db PAL_GRAYMON ; GEODUDE
db PAL_GRAYMON ; GRAVELER
db PAL_GRAYMON ; GOLEM
db PAL_REDMON ; PONYTA
db PAL_REDMON ; RAPIDASH
db PAL_PINKMON ; SLOWPOKE
db PAL_PINKMON ; SLOWBRO
db PAL_GREYMON ; MAGNEMITE
db PAL_GREYMON ; MAGNETON
db PAL_GRAYMON ; MAGNEMITE
db PAL_GRAYMON ; MAGNETON
db PAL_BROWNMON ; FARFETCHD
db PAL_BROWNMON ; DODUO
db PAL_BROWNMON ; DODRIO
db PAL_BLUEMON ; SEEL
db PAL_BLUEMON ; DEWGONG
db PAL_PURPLEMON ; GRIMER
db PAL_PURPLEMON ; MUK
db PAL_GREYMON ; SHELLDER
db PAL_GREYMON ; CLOYSTER
db PAL_GRAYMON ; SHELLDER
db PAL_GRAYMON ; CLOYSTER
db PAL_PURPLEMON ; GASTLY
db PAL_PURPLEMON ; HAUNTER
db PAL_PURPLEMON ; GENGAR
db PAL_GREYMON ; ONIX
db PAL_GRAYMON ; ONIX
db PAL_YELLOWMON ; DROWZEE
db PAL_YELLOWMON ; HYPNO
db PAL_REDMON ; KRABBY
Expand All @@ -104,15 +104,15 @@ MonsterPalettes:
db PAL_YELLOWMON ; ELECTRODE
db PAL_PINKMON ; EXEGGCUTE
db PAL_GREENMON ; EXEGGUTOR
db PAL_GREYMON ; CUBONE
db PAL_GREYMON ; MAROWAK
db PAL_GRAYMON ; CUBONE
db PAL_GRAYMON ; MAROWAK
db PAL_BROWNMON ; HITMONLEE
db PAL_BROWNMON ; HITMONCHAN
db PAL_PINKMON ; LICKITUNG
db PAL_PURPLEMON ; KOFFING
db PAL_PURPLEMON ; WEEZING
db PAL_GREYMON ; RHYHORN
db PAL_GREYMON ; RHYDON
db PAL_GRAYMON ; RHYHORN
db PAL_GRAYMON ; RHYDON
db PAL_PINKMON ; CHANSEY
db PAL_BLUEMON ; TANGELA
db PAL_BROWNMON ; KANGASKHAN
Expand All @@ -121,33 +121,33 @@ MonsterPalettes:
db PAL_REDMON ; GOLDEEN
db PAL_REDMON ; SEAKING
db PAL_REDMON ; STARYU
db PAL_GREYMON ; STARMIE
db PAL_GRAYMON ; STARMIE
db PAL_PINKMON ; MR_MIME
db PAL_GREENMON ; SCYTHER
db PAL_MEWMON ; JYNX
db PAL_YELLOWMON ; ELECTABUZZ
db PAL_REDMON ; MAGMAR
db PAL_BROWNMON ; PINSIR
db PAL_GREYMON ; TAUROS
db PAL_GRAYMON ; TAUROS
db PAL_REDMON ; MAGIKARP
db PAL_BLUEMON ; GYARADOS
db PAL_CYANMON ; LAPRAS
db PAL_GREYMON ; DITTO
db PAL_GREYMON ; EEVEE
db PAL_GRAYMON ; DITTO
db PAL_GRAYMON ; EEVEE
db PAL_CYANMON ; VAPOREON
db PAL_YELLOWMON ; JOLTEON
db PAL_REDMON ; FLAREON
db PAL_GREYMON ; PORYGON
db PAL_GRAYMON ; PORYGON
db PAL_BLUEMON ; OMANYTE
db PAL_BLUEMON ; OMASTAR
db PAL_BROWNMON ; KABUTO
db PAL_BROWNMON ; KABUTOPS
db PAL_GREYMON ; AERODACTYL
db PAL_GRAYMON ; AERODACTYL
db PAL_PINKMON ; SNORLAX
db PAL_BLUEMON ; ARTICUNO
db PAL_YELLOWMON ; ZAPDOS
db PAL_REDMON ; MOLTRES
db PAL_GREYMON ; DRATINI
db PAL_GRAYMON ; DRATINI
db PAL_BLUEMON ; DRAGONAIR
db PAL_BROWNMON ; DRAGONITE
db PAL_MEWMON ; MEWTWO
Expand Down
4 changes: 2 additions & 2 deletions data/sgb/sgb_palettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SuperPalettes:
RGB 31,31,30, 24,28,18, 13,21,15, 06,06,06 ; PAL_GREENMON
RGB 31,31,30, 31,24,26, 31,18,21, 06,06,06 ; PAL_PINKMON
RGB 31,31,30, 31,31,19, 28,23,09, 06,06,06 ; PAL_YELLOWMON
RGB 31,31,30, 25,25,18, 16,16,14, 06,06,06 ; PAL_GREYMON
RGB 31,31,30, 25,25,18, 16,16,14, 06,06,06 ; PAL_GRAYMON
RGB 31,31,30, 27,22,30, 26,09,06, 06,06,06 ; PAL_SLOTS1
RGB 31,31,30, 31,23,26, 29,29,08, 06,06,06 ; PAL_SLOTS2
RGB 31,31,30, 23,31,20, 29,29,08, 06,06,06 ; PAL_SLOTS3
Expand Down Expand Up @@ -71,7 +71,7 @@ GBCBasePalettes:
RGB 31,31,31, 17,31,11, 01,22,06, 03,03,03 ; PAL_GREENMON
RGB 31,31,31, 31,15,18, 31,00,06, 03,03,03 ; PAL_PINKMON
RGB 31,31,31, 31,31,00, 28,14,00, 03,03,03 ; PAL_YELLOWMON
RGB 31,31,31, 20,23,10, 11,11,05, 03,03,03 ; PAL_GREYMON
RGB 31,31,31, 20,23,10, 11,11,05, 03,03,03 ; PAL_GRAYMON
RGB 31,31,31, 25,01,31, 31,00,00, 03,03,03 ; PAL_SLOTS1
RGB 31,31,31, 31,04,19, 31,31,00, 03,03,03 ; PAL_SLOTS2
RGB 31,31,31, 08,31,00, 31,31,00, 03,03,03 ; PAL_SLOTS3
Expand Down
2 changes: 1 addition & 1 deletion engine/battle/animations.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,7 @@ FallingObjects_UpdateOAMEntry:
ld [wdef4], a
.asm_79e5c
inc hl
ld a, (1 << OAM_X_FLIP)
ld a, 1 << OAM_X_FLIP
.next2
ld b, a
ld a, [wdef4]
Expand Down
4 changes: 2 additions & 2 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6867,7 +6867,7 @@ BattleRandom:
add hl, bc
inc a
ld [wLinkBattleRandomNumberListIndex], a
cp 9
cp SERIAL_RNS_LENGTH - 1
ld a, [hl]
pop bc
pop hl
Expand All @@ -6890,7 +6890,7 @@ ENDC
ld [wLinkBattleRandomNumberListIndex], a

ld hl, wLinkBattleRandomNumberList
ld b, 9
ld b, SERIAL_RNS_LENGTH - 1
.loop
ld a, [hl]
ld c, a
Expand Down
16 changes: 9 additions & 7 deletions engine/battle/effects.asm
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ FreezeBurnParalyzeEffect:
cp b ; do target type 2 and move type match?
ret z ; return if they match
ld a, [wPlayerMoveEffect]
cp UNUSED_EFFECT_23 ; more stadium stuff
cp FREEZE_SIDE_EFFECT2 ; more stadium stuff
jr nz, .asm_3f2c7
ld a, [wUnknownSerialFlag_d499]
and a
ld a, FREEZE_SIDE_EFFECT
ld a, FREEZE_SIDE_EFFECT1
ld b, 30 percent + 1
jr z, .regular_effectiveness
ld b, 10 percent + 1
Expand All @@ -236,7 +236,9 @@ FreezeBurnParalyzeEffect:
jr c, .regular_effectiveness
; extra effectiveness
ld b, 30 percent + 1
sub BURN_SIDE_EFFECT2 - BURN_SIDE_EFFECT1 ; treat extra effective as regular from now on
assert PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == BURN_SIDE_EFFECT2 - BURN_SIDE_EFFECT1
assert PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == FREEZE_SIDE_EFFECT2 - FREEZE_SIDE_EFFECT1
sub PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 ; treat extra effective as regular from now on
.regular_effectiveness
push af
call BattleRandom ; get random 8bit value for probability test
Expand All @@ -246,7 +248,7 @@ FreezeBurnParalyzeEffect:
ld a, b ; what type of effect is this?
cp BURN_SIDE_EFFECT1
jr z, .burn1
cp FREEZE_SIDE_EFFECT
cp FREEZE_SIDE_EFFECT1
jr z, .freeze1
; .paralyze1
ld a, 1 << PAR
Expand Down Expand Up @@ -284,11 +286,11 @@ FreezeBurnParalyzeEffect:
cp b
ret z
ld a, [wEnemyMoveEffect]
cp UNUSED_EFFECT_23 ; more stadium stuff
cp FREEZE_SIDE_EFFECT2 ; more stadium stuff
jr nz, .asm_3f341
ld a, [wUnknownSerialFlag_d499]
and a
ld a, FREEZE_SIDE_EFFECT
ld a, FREEZE_SIDE_EFFECT1
ld b, 30 percent + 1
jr z, .regular_effectiveness2
ld b, 10 percent + 1
Expand All @@ -309,7 +311,7 @@ FreezeBurnParalyzeEffect:
ld a, b
cp BURN_SIDE_EFFECT1
jr z, .burn2
cp FREEZE_SIDE_EFFECT
cp FREEZE_SIDE_EFFECT1
jr z, .freeze2
; .paralyze2
ld a, 1 << PAR
Expand Down
2 changes: 1 addition & 1 deletion engine/battle/ghost_marowak_anim.asm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MarowakAnim:
ld a, $1
ldh [hWhoseTurn], a
callfar ChangeMonPic
; alternate between black and light grey 8 times.
; alternate between black and light gray 8 times.
; this makes the ghost's body appear to flash
ld d, $80
call FlashSprite8Times
Expand Down
6 changes: 3 additions & 3 deletions engine/events/poison.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ApplyOutOfBattlePoisonDamage:
ld de, wPartySpecies
.applyDamageLoop
ld a, [hl]
and (1 << PSN)
and 1 << PSN
jr z, .nextMon2 ; not poisoned
dec hl
dec hl
Expand Down Expand Up @@ -92,7 +92,7 @@ ApplyOutOfBattlePoisonDamage:
ld e, 0
.countPoisonedLoop
ld a, [hl]
and (1 << PSN)
and 1 << PSN
or e
ld e, a
ld bc, wPartyMon2 - wPartyMon1
Expand All @@ -103,7 +103,7 @@ ApplyOutOfBattlePoisonDamage:
and a ; are any party members poisoned?
jr z, .skipPoisonEffectAndSound
ld b, $2
predef ChangeBGPalColor0_4Frames ; change BG white to dark grey for 4 frames
predef ChangeBGPalColor0_4Frames ; change BG white to dark gray for 4 frames
ld a, SFX_POISONED
call PlaySound
.skipPoisonEffectAndSound
Expand Down
6 changes: 3 additions & 3 deletions engine/events/prize_menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ GetPrizeMenuId:
; reg. c:
; [low nybble] number of bytes
; [bits 765 = %100] space-padding (not zero-padding)
ld c, (1 << 7 | 2)
ld c, (1 << 7) | 2
call PrintBCDNumber
ld de, wPrize2Price
hlcoord 13, 7
ld c, (1 << 7 | 2)
ld c, (1 << 7) | 2
call PrintBCDNumber
ld de, wPrize3Price
hlcoord 13, 9
ld c, (1 << 7 | 2)
ld c, (1 << 7) | 2
jp PrintBCDNumber

NoThanksText:
Expand Down
8 changes: 4 additions & 4 deletions engine/gfx/palettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ SetPal_Overworld:
ld [wDefaultPaletteCommand], a
ret
.PokemonTowerOrAgatha
ld a, PAL_GREYMON - 1
ld a, PAL_GRAYMON - 1
jr .town
.caveOrBruno
ld a, PAL_CAVE - 1
Expand All @@ -189,7 +189,7 @@ SetPal_Overworld:
xor a
jr .town
.trade_center_colosseum
ld a, PAL_GREYMON - 1
ld a, PAL_GRAYMON - 1
jr .town

; used when a Pokemon is the only thing on the screen
Expand Down Expand Up @@ -423,7 +423,7 @@ GetPal_Pikachu::
ret

.PokemonTowerOrAgatha
ld a, PAL_GREYMON - 1
ld a, PAL_GRAYMON - 1
jr .town

.caveOrBruno
Expand All @@ -435,7 +435,7 @@ GetPal_Pikachu::
jr .town

.battleOrTradeCenter
ld a, PAL_GREYMON - 1
ld a, PAL_GRAYMON - 1
jr .town

InitPartyMenuBlkPacket:
Expand Down
2 changes: 1 addition & 1 deletion engine/items/town_map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ WriteSymmetricMonPartySpriteOAM:
ld [hli], a ; tile
ld a, [wSymmetricSpriteOAMAttributes]
ld [hli], a ; attributes
xor (1 << OAM_X_FLIP)
xor 1 << OAM_X_FLIP
ld [wSymmetricSpriteOAMAttributes], a
inc d
ld a, 8
Expand Down
Loading

0 comments on commit 47b784a

Please sign in to comment.