Merge pull request #550 from mid-kid/master

Misc things
This commit is contained in:
Rangi 2018-08-19 13:09:16 -04:00 committed by GitHub
commit edb624c20c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 1751 additions and 1751 deletions

View File

@ -60,7 +60,7 @@ Run setup and leave the default settings. At "Select Packages", choose to instal
- `git`
- `gcc-core`
Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.tar.gz** or **win32.tar.gz** release. Extract it and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**.
Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.zip** or **win32.zip** release. Extract it and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**.
**Note: If you have an older rgbds, you will need to update to 0.3.3 or newer.** Ignore this if you have never installed rgbds before.

View File

@ -94,7 +94,7 @@
const ENGINE_LUCKY_NUMBER_SHOW
; wStatusFlags2
const ENGINE_4F
; wDailyFlags
; wDailyFlags1
const ENGINE_KURT_MAKING_BALLS ; 50
const ENGINE_DAILY_BUG_CONTEST
const ENGINE_FISH_SWARM
@ -103,7 +103,7 @@
const ENGINE_GOT_SHUCKIE_TODAY
const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
; wWeeklyFlags
; wDailyFlags2
const ENGINE_MT_MOON_SQUARE_CLEFAIRY
const ENGINE_UNION_CAVE_LAPRAS
const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT

View File

@ -232,27 +232,27 @@ CELEBIEVENT_FOREST_IS_RESTLESS_F EQU 2
const BIKEFLAGS_ALWAYS_ON_BIKE_F ; 1
const BIKEFLAGS_DOWNHILL_F ; 2
; wDailyFlags:: ; dc1e
; wDailyFlags1:: ; dc1e
const_def
const DAILYFLAGS_KURT_MAKING_BALLS_F ; 0
const DAILYFLAGS_BUG_CONTEST_F ; 1
const DAILYFLAGS_FISH_SWARM_F ; 2
const DAILYFLAGS_TIME_CAPSULE_F ; 3
const DAILYFLAGS_ALL_FRUIT_TREES_F ; 4
const DAILYFLAGS_GOT_SHUCKIE_TODAY_F ; 5
const DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F ; 6
const DAILYFLAGS_TRAINER_HOUSE_F ; 7
const DAILYFLAGS1_KURT_MAKING_BALLS_F ; 0
const DAILYFLAGS1_BUG_CONTEST_F ; 1
const DAILYFLAGS1_FISH_SWARM_F ; 2
const DAILYFLAGS1_TIME_CAPSULE_F ; 3
const DAILYFLAGS1_ALL_FRUIT_TREES_F ; 4
const DAILYFLAGS1_GOT_SHUCKIE_TODAY_F ; 5
const DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F ; 6
const DAILYFLAGS1_TRAINER_HOUSE_F ; 7
; wWeeklyFlags:: ; dc1f
; wDailyFlags2:: ; dc1f
const_def
const WEEKLYFLAGS_MT_MOON_SQUARE_CLEFAIRY_F ; 0
const WEEKLYFLAGS_UNION_CAVE_LAPRAS_F ; 1
const WEEKLYFLAGS_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F ; 2
const WEEKLYFLAGS_GOLDENROD_DEPT_STORE_TM27_RETURN_F ; 3
const WEEKLYFLAGS_DAISYS_GROOMING_F ; 4
const WEEKLYFLAGS_INDIGO_PLATEAU_RIVAL_FIGHT_F ; 5
const WEEKLYFLAGS_DAILY_MOVE_TUTOR_F ; 6
const WEEKLYFLAGS_BUENAS_PASSWORD_F ; 7
const DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F ; 0
const DAILYFLAGS2_UNION_CAVE_LAPRAS_F ; 1
const DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F ; 2
const DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F ; 3
const DAILYFLAGS2_DAISYS_GROOMING_F ; 4
const DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F ; 5
const DAILYFLAGS2_MOVE_TUTOR_F ; 6
const DAILYFLAGS2_BUENAS_PASSWORD_F ; 7
; wSwarmFlags:: ; dc20
const_def

View File

@ -20,7 +20,7 @@ BattleCommandPointers:
dw BattleCommand_ApplyDamage
dw BattleCommand_CriticalText
dw BattleCommand_SuperEffectiveText
dw BattleCommand_CheckDestinyBond
dw BattleCommand_CheckFaint
dw BattleCommand_BuildOpponentRage
dw BattleCommand_PoisonTarget
dw BattleCommand_SleepTarget

View File

@ -104,23 +104,23 @@ EngineFlags:
engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_3_F
engine_flag wDailyFlags, DAILYFLAGS_KURT_MAKING_BALLS_F ; $50
engine_flag wDailyFlags, DAILYFLAGS_BUG_CONTEST_F
engine_flag wDailyFlags, DAILYFLAGS_FISH_SWARM_F
engine_flag wDailyFlags, DAILYFLAGS_TIME_CAPSULE_F
engine_flag wDailyFlags, DAILYFLAGS_ALL_FRUIT_TREES_F
engine_flag wDailyFlags, DAILYFLAGS_GOT_SHUCKIE_TODAY_F
engine_flag wDailyFlags, DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F
engine_flag wDailyFlags, DAILYFLAGS_TRAINER_HOUSE_F
engine_flag wDailyFlags1, DAILYFLAGS1_KURT_MAKING_BALLS_F ; $50
engine_flag wDailyFlags1, DAILYFLAGS1_BUG_CONTEST_F
engine_flag wDailyFlags1, DAILYFLAGS1_FISH_SWARM_F
engine_flag wDailyFlags1, DAILYFLAGS1_TIME_CAPSULE_F
engine_flag wDailyFlags1, DAILYFLAGS1_ALL_FRUIT_TREES_F
engine_flag wDailyFlags1, DAILYFLAGS1_GOT_SHUCKIE_TODAY_F
engine_flag wDailyFlags1, DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F
engine_flag wDailyFlags1, DAILYFLAGS1_TRAINER_HOUSE_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_MT_MOON_SQUARE_CLEFAIRY_F ; $58
engine_flag wWeeklyFlags, WEEKLYFLAGS_UNION_CAVE_LAPRAS_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_GOLDENROD_DEPT_STORE_TM27_RETURN_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_DAISYS_GROOMING_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_INDIGO_PLATEAU_RIVAL_FIGHT_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_DAILY_MOVE_TUTOR_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_BUENAS_PASSWORD_F
engine_flag wDailyFlags2, DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F ; $58
engine_flag wDailyFlags2, DAILYFLAGS2_UNION_CAVE_LAPRAS_F
engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F
engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F
engine_flag wDailyFlags2, DAILYFLAGS2_DAISYS_GROOMING_F
engine_flag wDailyFlags2, DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F
engine_flag wDailyFlags2, DAILYFLAGS2_MOVE_TUTOR_F
engine_flag wDailyFlags2, DAILYFLAGS2_BUENAS_PASSWORD_F
engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F ; $60
engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F

View File

@ -17,7 +17,7 @@ NormalHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -47,7 +47,7 @@ PoisonHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
poisontarget
endmove
@ -68,7 +68,7 @@ LeechHit:
criticaltext
supereffectivetext
draintarget
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -89,7 +89,7 @@ BurnHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
burntarget
endmove
@ -110,7 +110,7 @@ FreezeHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
freezetarget
endmove
@ -131,7 +131,7 @@ ParalyzeHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
paralyzetarget
endmove
@ -152,7 +152,7 @@ Selfdestruct:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -173,7 +173,7 @@ DreamEater:
criticaltext
supereffectivetext
eatdream
checkdestinybond
checkfaint
buildopponentrage
endmove
@ -551,7 +551,7 @@ AttackDownHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
attackdown
statdownmessage
@ -573,7 +573,7 @@ DefenseDownHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
effectchance ; bug: duplicate effectchance shouldn't be here
defensedown
@ -596,7 +596,7 @@ SpeedDownHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
speeddown
statdownmessage
@ -618,7 +618,7 @@ SpecialAttackDownHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
specialattackdown
statdownmessage
@ -640,7 +640,7 @@ SpecialDefenseDownHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
specialdefensedown
statdownmessage
@ -662,7 +662,7 @@ AccuracyDownHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
accuracydown
statdownmessage
@ -684,7 +684,7 @@ EvasionDownHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
evasiondown
statdownmessage
@ -706,7 +706,7 @@ DefenseUpHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
defenseup
statupmessage
@ -728,7 +728,7 @@ AttackUpHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
attackup
statupmessage
@ -750,7 +750,7 @@ AllUpHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
allstatsup
endmove
@ -771,7 +771,7 @@ PayDay:
criticaltext
supereffectivetext
payday
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -801,7 +801,7 @@ Bide:
moveanim
bidefailtext
applydamage
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -824,7 +824,7 @@ Rampage:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -856,7 +856,7 @@ MultiHit:
criticaltext
cleartext
supereffectivelooptext
checkdestinybond
checkfaint
buildopponentrage
endloop
raisesub
@ -883,7 +883,7 @@ PoisonMultiHit:
criticaltext
cleartext
supereffectivelooptext
checkdestinybond
checkfaint
buildopponentrage
endloop
raisesub
@ -907,7 +907,7 @@ FlinchHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
flinchtarget
endmove
@ -923,7 +923,7 @@ OHKOHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
endmove
@ -943,7 +943,7 @@ RecoilHit:
criticaltext
supereffectivetext
recoil
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -987,7 +987,7 @@ ConfuseHit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
confusetarget
endmove
@ -1029,7 +1029,7 @@ TriAttack:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
tristatuschance
endmove
@ -1073,7 +1073,7 @@ SkyAttack:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
flinchtarget
kingsrock
@ -1102,7 +1102,7 @@ HyperBeam:
criticaltext
supereffectivetext
rechargenextturn
checkdestinybond
checkfaint
buildopponentrage
endmove
@ -1123,7 +1123,7 @@ Rage:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1183,7 +1183,7 @@ RazorWind:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1206,7 +1206,7 @@ Fly:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1227,7 +1227,7 @@ TrapTarget:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
traptarget
endmove
@ -1244,7 +1244,7 @@ StaticDamage:
moveanim
failuretext
applydamage
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1260,7 +1260,7 @@ Reversal:
failuretext
applydamage
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1273,7 +1273,7 @@ Counter:
moveanim
failuretext
applydamage
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1311,7 +1311,7 @@ Snore:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
flinchtarget
kingsrock
@ -1385,7 +1385,7 @@ FalseSwipe:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1417,7 +1417,7 @@ TripleKick:
criticaltext
cleartext
supereffectivelooptext
checkdestinybond
checkfaint
buildopponentrage
kickcounter
endloop
@ -1442,7 +1442,7 @@ Thief:
criticaltext
supereffectivetext
thief
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1478,7 +1478,7 @@ FlameWheel:
criticaltext
supereffectivetext
defrost
checkdestinybond
checkfaint
buildopponentrage
burntarget
endmove
@ -1550,7 +1550,7 @@ Rollout:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1589,7 +1589,7 @@ FuryCutter:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1618,7 +1618,7 @@ Return:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1639,7 +1639,7 @@ Present:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1660,7 +1660,7 @@ Frustration:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1689,7 +1689,7 @@ SacredFire:
criticaltext
supereffectivetext
defrost
checkdestinybond
checkfaint
buildopponentrage
burntarget
endmove
@ -1711,7 +1711,7 @@ Magnitude:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1739,7 +1739,7 @@ Pursuit:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1760,7 +1760,7 @@ RapidSpin:
criticaltext
supereffectivetext
clearhazards
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1801,7 +1801,7 @@ HiddenPower:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1852,7 +1852,7 @@ MirrorCoat:
moveanim
failuretext
applydamage
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -1874,7 +1874,7 @@ SkullBash:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endturn
@ -1899,7 +1899,7 @@ Twister:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
flinchtarget
endmove
@ -1921,7 +1921,7 @@ Earthquake:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
endmove
@ -1938,7 +1938,7 @@ FutureSight:
moveanimnosub
failuretext
applydamage
checkdestinybond
checkfaint
buildopponentrage
endmove
@ -1958,7 +1958,7 @@ Gust:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
endmove
@ -1979,7 +1979,7 @@ Stomp:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
flinchtarget
endmove
@ -2002,7 +2002,7 @@ Solarbeam:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
kingsrock
endmove
@ -2024,7 +2024,7 @@ Thunder:
applydamage
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
paralyzetarget
endmove
@ -2055,7 +2055,7 @@ BeatUp:
criticaltext
cleartext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
endloop
beatupfailtext

View File

@ -5,8 +5,8 @@ Trainers:
; - db "NAME@", TRAINERTYPE_* constant
; - 1 to 6 Pokémon:
; * for TRAINERTYPE_NORMAL: db level, species
; * for TRAINERTYPE_ITEM: db level, species, item
; * for TRAINERTYPE_MOVES: db level, species, 4 moves
; * for TRAINERTYPE_ITEM: db level, species, item
; * for TRAINERTYPE_ITEM_MOVES: db level, species, item, 4 moves
; - db -1 ; end

View File

@ -226,7 +226,7 @@ This bug affects Acid, Iron Tail, and Rock Smash.
checkfaint
criticaltext
supereffectivetext
checkdestinybond
checkfaint
buildopponentrage
- effectchance ; bug: duplicate effectchance shouldn't be here
defensedown

View File

@ -29,13 +29,13 @@ Defined in [macros/scripts/battle_commands.asm](/macros/scripts/battle_commands.
## `$0D`: `failuretext`
## `$0E`: `checkfaint`
## `$0E`: `applydamage`
## `$0F`: `criticaltext`
## `$10`: `supereffectivetext`
## `$11`: `checkdestinybond`
## `$11`: `checkfaint`
## `$12`: `buildopponentrage`
@ -331,13 +331,13 @@ Defined in [macros/scripts/battle_commands.asm](/macros/scripts/battle_commands.
## `$A4`: `allstatsup`
## `$A5`: `effect0xa5`
## `$A5`: `bidefailtext`
## `$A6`: `raisesubnoanim`
## `$A7`: `lowersubnoanim`
## `$A8`: `effect0xa8`
## `$A8`: `beatupfailtext`
## `$A9`: `clearmissdamage`

View File

@ -806,7 +806,7 @@ EnemyUsedXItem:
push bc
call PrintText_UsedItemOn
pop bc
farcall CheckIfStatCanBeRaised
farcall RaiseStat
jp AIUpdateHUD
; Parameter

View File

@ -30,11 +30,11 @@ CheckPlayerMoveTypeMatchups:
ld hl, wEnemyMonType
call CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
cp EFFECTIVE + 1 ; 1.0 + 0.1
jr nc, .super_effective
and a
jr z, .next
cp 10 ; 1.0
cp EFFECTIVE ; 1.0
jr nc, .neutral
.not_very_effective
@ -75,7 +75,7 @@ CheckPlayerMoveTypeMatchups:
ld hl, wEnemyMonType1
call CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
cp EFFECTIVE + 1 ; 1.0 + 0.1
jr c, .ok
call .DecreaseScore
.ok
@ -84,7 +84,7 @@ CheckPlayerMoveTypeMatchups:
jr z, .ok2
call CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
cp EFFECTIVE + 1 ; 1.0 + 0.1
jr c, .ok2
call .DecreaseScore
.ok2
@ -130,7 +130,7 @@ CheckPlayerMoveTypeMatchups:
; not very effective
inc c
cp 10
cp EFFECTIVE
jr c, .loop2
; neutral
@ -139,7 +139,7 @@ CheckPlayerMoveTypeMatchups:
inc c
inc c
inc c
cp 10
cp EFFECTIVE
jr z, .loop2
; super effective
@ -481,7 +481,7 @@ FindEnemyMonsWithASuperEffectiveMove:
; if neutral: load 1 and continue
ld e, 1
cp 10 + 1
cp EFFECTIVE + 1
jr c, .nope
; if super-effective: load 2 and break
@ -584,7 +584,7 @@ FindEnemyMonsThatResistPlayer:
ld hl, wBaseType
call CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1
cp EFFECTIVE + 1
jr nc, .dont_choose_mon
ld a, b

View File

@ -2363,10 +2363,12 @@ BattleCommand_SuperEffectiveText:
.print
jp StdBattleTextBox
BattleCommand_CheckDestinyBond:
; checkdestinybond
BattleCommand_CheckFaint:
; checkfaint
; Faint the user if it fainted an opponent using Destiny Bond.
; Faint the opponent if its HP reached zero
; and faint the user along with it if it used Destiny Bond.
; Ends the move effect if the opponent faints.
ld hl, wEnemyMonHP
ld a, [hBattleTurn]
@ -2594,7 +2596,7 @@ PlayerAttackDamage:
.physicalcrit
ld hl, wBattleMonAttack
call GetDamageStatsCritical
call CheckDamageStatsCritical
jr c, .thickclub
ld hl, wEnemyDefense
@ -2618,7 +2620,7 @@ PlayerAttackDamage:
.specialcrit
ld hl, wBattleMonSpclAtk
call GetDamageStatsCritical
call CheckDamageStatsCritical
jr c, .lightball
ld hl, wEnemySpDef
@ -2692,20 +2694,16 @@ TruncateHL_BC:
ld b, l
ret
GetDamageStatsCritical:
; Return carry if non-critical.
CheckDamageStatsCritical:
; Return carry if boosted stats should be used in damage calculations.
; Unboosted stats should be used if the attack is a critical hit,
; and the stage of the opponent's defense is higher than the user's attack.
ld a, [wCriticalHit]
and a
scf
ret z
; fallthrough
GetDamageStats:
; Return the attacker's offensive stat and the defender's defensive
; stat based on whether the attacking type is physical or special.
push hl
push bc
ld a, [hBattleTurn]
@ -2840,7 +2838,7 @@ EnemyAttackDamage:
.physicalcrit
ld hl, wEnemyMonAttack
call GetDamageStatsCritical
call CheckDamageStatsCritical
jr c, .thickclub
ld hl, wPlayerDefense
@ -2864,7 +2862,7 @@ EnemyAttackDamage:
.specialcrit
ld hl, wEnemyMonSpclAtk
call GetDamageStatsCritical
call CheckDamageStatsCritical
jr c, .lightball
ld hl, wPlayerSpDef
ld a, [hli]
@ -4185,13 +4183,13 @@ BattleCommand_EvasionUp2:
BattleCommand_StatUp:
; statup
call CheckIfStatCanBeRaised
call RaiseStat
ld a, [wFailedMessage]
and a
ret nz
jp StatUpAnimation
jp MinimizeDropSub
CheckIfStatCanBeRaised:
RaiseStat:
ld a, b
ld [wLoweredStat], a
ld hl, wPlayerStatLevels
@ -4287,7 +4285,9 @@ CheckIfStatCanBeRaised:
ld [wFailedMessage], a
ret
StatUpAnimation:
MinimizeDropSub:
; Lower the substitute if we're minimizing
ld bc, wPlayerMinimized
ld hl, DropPlayerSub
ld a, [hBattleTurn]

View File

@ -29,11 +29,11 @@ BattleCommand_MirrorCoat:
ld de, wStringBuffer1
call GetMoveData
ld a, [wStringBuffer1 + 2]
ld a, [wStringBuffer1 + MOVE_POWER]
and a
ret z
ld a, [wStringBuffer1 + 3]
ld a, [wStringBuffer1 + MOVE_TYPE]
cp SPECIAL
ret c

View File

@ -93,8 +93,8 @@ GetFishGroupIndex:
; Return the index of fishgroup d in de.
push hl
ld hl, wDailyFlags
bit DAILYFLAGS_FISH_SWARM_F, [hl]
ld hl, wDailyFlags1
bit DAILYFLAGS1_FISH_SWARM_F, [hl]
pop hl
jr z, .done

View File

@ -41,8 +41,8 @@ GetCurTreeFruit:
ret
TryResetFruitTrees:
ld hl, wDailyFlags
bit DAILYFLAGS_ALL_FRUIT_TREES_F, [hl]
ld hl, wDailyFlags1
bit DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl]
ret nz
jp ResetFruitTrees
@ -65,8 +65,8 @@ ResetFruitTrees:
ld [hli], a
ld [hli], a
ld [hl], a
ld hl, wDailyFlags
set DAILYFLAGS_ALL_FRUIT_TREES_F, [hl]
ld hl, wDailyFlags1
set DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl]
ret
GetFruitTreeFlag:

View File

@ -54,8 +54,8 @@ GiveShuckle:
call CopyName2
; Engine flag for this event.
ld hl, wDailyFlags
set DAILYFLAGS_GOT_SHUCKIE_TODAY_F, [hl]
ld hl, wDailyFlags1
set DAILYFLAGS1_GOT_SHUCKIE_TODAY_F, [hl]
ld a, 1
ld [wScriptVar], a
ret

View File

@ -2159,7 +2159,7 @@ XItemEffect:
ld [hBattleTurn], a
ld [wAttackMissed], a
ld [wEffectFailed], a
farcall CheckIfStatCanBeRaised
farcall RaiseStat
call WaitSFX
farcall BattleCommand_StatUpMessage

View File

@ -54,8 +54,8 @@ BargainShop:
ld a, [hli]
or [hl]
jr z, .skip_set
ld hl, wDailyFlags
set DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl]
ld hl, wDailyFlags1
set DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl]
.skip_set
ld hl, Text_BargainShop_ComeAgain

View File

@ -557,18 +557,3 @@ CountTMsHMs:
ld a, b
ld [wTempTMHM], a
ret
PrintMoveDesc:
push hl
ld hl, MoveDescriptions
ld a, [wCurSpecies]
dec a
ld c, a
ld b, 0
add hl, bc
add hl, bc
ld a, [hli]
ld e, a
ld d, [hl]
pop hl
jp PlaceString

File diff suppressed because it is too large Load Diff

View File

@ -91,9 +91,9 @@ CheckDailyResetTimer::
call CheckDayDependentEventHL
ret nc
xor a
ld hl, wDailyFlags
ld [hli], a ; wDailyFlags
ld [hli], a ; wWeeklyFlags
ld hl, wDailyFlags1
ld [hli], a ; wDailyFlags1
ld [hli], a ; wDailyFlags2
ld [hli], a ; wSwarmFlags
ld [hl], a ; wSwarmFlags + 1
ld hl, wDailyRematchFlags
@ -207,14 +207,14 @@ CheckUnusedTwoDayTimer:
ret
; unused
ld hl, wDailyFlags
set DAILYFLAGS_FISH_SWARM_F, [hl]
ld hl, wDailyFlags1
set DAILYFLAGS1_FISH_SWARM_F, [hl]
ret
; unused
and a
ld hl, wDailyFlags
bit DAILYFLAGS_FISH_SWARM_F, [hl]
ld hl, wDailyFlags1
bit DAILYFLAGS1_FISH_SWARM_F, [hl]
ret nz
scf
ret

View File

@ -1558,8 +1558,8 @@ BuenasPassword4:
jp c, BuenasPassword8
ld a, [wBuenasPassword]
; If we already generated the password today, we don't need to generate a new one.
ld hl, wWeeklyFlags
bit WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
ld hl, wDailyFlags2
bit DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
jr nz, .AlreadyGotIt
; There are only 11 groups to choose from.
.greater_than_11
@ -1580,8 +1580,8 @@ BuenasPassword4:
add e
ld [wBuenasPassword], a
; Set the flag so that we don't generate a new password this week.
ld hl, wWeeklyFlags
set WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
ld hl, wDailyFlags2
set DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
.AlreadyGotIt:
ld c, a
call GetBuenasPassword
@ -1701,15 +1701,15 @@ BuenasPassword7:
BuenasPasswordAfterMidnight:
push hl
ld hl, wWeeklyFlags
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
ld hl, wDailyFlags2
res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
pop hl
ld a, BUENAS_PASSWORD_8
jp NextRadioLine
BuenasPassword8:
ld hl, wWeeklyFlags
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
ld hl, wDailyFlags2
res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
ld hl, BuenaRadioMidnightText10
ld a, BUENAS_PASSWORD_9
jp NextRadioLine
@ -1776,8 +1776,8 @@ BuenasPassword20:
farcall NoRadioName
pop af
ld [hBGMapMode], a
ld hl, wWeeklyFlags
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
ld hl, wDailyFlags2
res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
ld a, BUENAS_PASSWORD
ld [wCurrentRadioLine], a
xor a

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,290 @@
INCLUDE "data/mon_menu.asm"
MonSubmenu:
xor a
ld [hBGMapMode], a
call GetMonSubmenuItems
farcall FreezeMonIcons
ld hl, .MenuHeader
call LoadMenuHeader
call .GetTopCoord
call PopulateMonMenu
ld a, 1
ld [hBGMapMode], a
call MonMenuLoop
ld [wMenuSelection], a
call ExitMenu
ret
.MenuHeader:
db MENU_BACKUP_TILES ; flags
menu_coords 6, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw 0
db 1 ; default option
.GetTopCoord:
; TopCoord = 1 + BottomCoord - 2 * (NumSubmenuItems + 1)
ld a, [wBuffer1]
inc a
add a
ld b, a
ld a, [wMenuBorderBottomCoord]
sub b
inc a
ld [wMenuBorderTopCoord], a
call MenuBox
ret
MonMenuLoop:
.loop
ld a, MENU_UNUSED_3 | MENU_BACKUP_TILES_2 ; flags
ld [wMenuDataFlags], a
ld a, [wBuffer1] ; items
ld [wMenuDataItems], a
call InitVerticalMenuCursor
ld hl, w2DMenuFlags1
set 6, [hl]
call StaticMenuJoypad
ld de, SFX_READ_TEXT_2
call PlaySFX
ld a, [hJoyPressed]
bit A_BUTTON_F, a
jr nz, .select
bit B_BUTTON_F, a
jr nz, .cancel
jr .loop
.cancel
ld a, MONMENUITEM_CANCEL
ret
.select
ld a, [wMenuCursorY]
dec a
ld c, a
ld b, 0
ld hl, wBuffer2
add hl, bc
ld a, [hl]
ret
PopulateMonMenu:
call MenuBoxCoord2Tile
ld bc, 2 * SCREEN_WIDTH + 2
add hl, bc
ld de, wBuffer2
.loop
ld a, [de]
inc de
cp -1
ret z
push de
push hl
call GetMonMenuString
pop hl
call PlaceString
ld bc, 2 * SCREEN_WIDTH
add hl, bc
pop de
jr .loop
GetMonMenuString:
ld hl, MonMenuOptions + 1
ld de, 3
call IsInArray
dec hl
ld a, [hli]
cp MONMENU_MENUOPTION
jr z, .NotMove
inc hl
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
call GetMoveName
ret
.NotMove:
inc hl
ld a, [hl]
dec a
ld hl, MonMenuOptionStrings
call GetNthString
ld d, h
ld e, l
ret
GetMonSubmenuItems:
call ResetMonSubmenu
ld a, [wCurPartySpecies]
cp EGG
jr z, .egg
ld a, [wLinkMode]
and a
jr nz, .skip_moves
ld a, MON_MOVES
call GetPartyParamLocation
ld d, h
ld e, l
ld c, NUM_MOVES
.loop
push bc
push de
ld a, [de]
and a
jr z, .next
push hl
call IsFieldMove
pop hl
jr nc, .next
call AddMonMenuItem
.next
pop de
inc de
pop bc
dec c
jr nz, .loop
.skip_moves
ld a, MONMENUITEM_STATS
call AddMonMenuItem
ld a, MONMENUITEM_SWITCH
call AddMonMenuItem
ld a, MONMENUITEM_MOVE
call AddMonMenuItem
ld a, [wLinkMode]
and a
jr nz, .skip2
push hl
ld a, MON_ITEM
call GetPartyParamLocation
ld d, [hl]
farcall ItemIsMail
pop hl
ld a, MONMENUITEM_MAIL
jr c, .ok
ld a, MONMENUITEM_ITEM
.ok
call AddMonMenuItem
.skip2
ld a, [wBuffer1]
cp NUM_MONMENU_ITEMS
jr z, .ok2
ld a, MONMENUITEM_CANCEL
call AddMonMenuItem
.ok2
call TerminateMonSubmenu
ret
.egg
ld a, MONMENUITEM_STATS
call AddMonMenuItem
ld a, MONMENUITEM_SWITCH
call AddMonMenuItem
ld a, MONMENUITEM_CANCEL
call AddMonMenuItem
call TerminateMonSubmenu
ret
IsFieldMove:
ld b, a
ld hl, MonMenuOptions
.next
ld a, [hli]
cp -1
jr z, .nope
cp MONMENU_MENUOPTION
jr z, .nope
ld d, [hl]
inc hl
ld a, [hli]
cp b
jr nz, .next
ld a, d
scf
.nope
ret
ResetMonSubmenu:
xor a
ld [wBuffer1], a
ld hl, wBuffer2
ld bc, NUM_MONMENU_ITEMS + 1
call ByteFill
ret
TerminateMonSubmenu:
ld a, [wBuffer1]
ld e, a
ld d, 0
ld hl, wBuffer2
add hl, de
ld [hl], -1
ret
AddMonMenuItem:
push hl
push de
push af
ld a, [wBuffer1]
ld e, a
inc a
ld [wBuffer1], a
ld d, 0
ld hl, wBuffer2
add hl, de
pop af
ld [hl], a
pop de
pop hl
ret
BattleMonMenu:
ld hl, MenuHeader_0x24ed4
call CopyMenuHeader
xor a
ld [hBGMapMode], a
call MenuBox
call UpdateSprites
call PlaceVerticalMenuItems
call WaitBGMap
call CopyMenuData
ld a, [wMenuDataFlags]
bit 7, a
jr z, .set_carry
call InitVerticalMenuCursor
ld hl, w2DMenuFlags1
set 6, [hl]
call StaticMenuJoypad
ld de, SFX_READ_TEXT_2
call PlaySFX
ld a, [hJoyPressed]
bit B_BUTTON_F, a
jr z, .clear_carry
ret z
.set_carry
scf
ret
.clear_carry
and a
ret
MenuHeader_0x24ed4:
db 0 ; flags
menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw MenuData_0x24edc
db 1 ; default option
MenuData_0x24edc:
db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags
db 3 ; items
db "SWITCH@"
db "STATS@"
db "CANCEL@"

View File

@ -695,7 +695,7 @@ SendGetMonIntoFromBox:
ld a, [sBoxCount]
dec a
ld b, a
call RestorePPofDepositedPokemon
call RestorePPOfDepositedPokemon
.CloseSRAM_And_ClearCarryFlag:
call CloseSRAM
and a
@ -706,7 +706,7 @@ CloseSRAM_And_SetCarryFlag:
scf
ret
RestorePPofDepositedPokemon:
RestorePPOfDepositedPokemon:
ld a, b
ld hl, sBoxMons
ld bc, BOXMON_STRUCT_LENGTH
@ -1057,7 +1057,7 @@ SendMonIntoBox:
call CopyBytes
ld b, 0
call RestorePPofDepositedPokemon
call RestorePPOfDepositedPokemon
call CloseSRAM
scf

View File

@ -34,7 +34,7 @@ InsertPokemonIntoBox:
call CopyBytes
ld a, [wCurPartyMon]
ld b, a
farcall RestorePPofDepositedPokemon
farcall RestorePPOfDepositedPokemon
jp CloseSRAM
InsertPokemonIntoParty:

View File

@ -0,0 +1,14 @@
PrintMoveDesc:
push hl
ld hl, MoveDescriptions
ld a, [wCurSpecies]
dec a
ld c, a
ld b, 0
add hl, bc
add hl, bc
ld a, [hli]
ld e, a
ld d, [hl]
pop hl
jp PlaceString

View File

@ -21,7 +21,7 @@ ENDM
command applydamage ; 0e
command criticaltext ; 0f
command supereffectivetext ; 10
command checkdestinybond ; 11
command checkfaint ; 11
command buildopponentrage ; 12
command poisontarget ; 13
command sleeptarget ; 14

View File

@ -57,6 +57,7 @@ INCLUDE "engine/events/whiteout.asm"
INCLUDE "engine/events/forced_movement.asm"
INCLUDE "engine/events/itemfinder.asm"
INCLUDE "engine/menus/start_menu.asm"
INCLUDE "engine/pokemon/mon_menu.asm"
INCLUDE "engine/overworld/select_menu.asm"
INCLUDE "engine/events/elevator.asm"
INCLUDE "engine/events/bug_contest/contest.asm"
@ -109,7 +110,7 @@ INCLUDE "engine/overworld/map_objects_2.asm"
INCLUDE "engine/menus/scrolling_menu.asm"
INCLUDE "engine/items/switch_items.asm"
INCLUDE "engine/menus/menu_2.asm"
INCLUDE "engine/pokemon/mon_menu.asm"
INCLUDE "engine/pokemon/mon_submenu.asm"
INCLUDE "engine/battle/menu.asm"
INCLUDE "engine/items/buy_sell_toss.asm"
INCLUDE "engine/menus/trainer_card.asm"
@ -144,6 +145,7 @@ INCLUDE "engine/battle/ai/redundant.asm"
INCLUDE "engine/events/move_deleter.asm"
INCLUDE "engine/link/mystery_gift_2.asm"
INCLUDE "engine/items/tmhm.asm"
INCLUDE "engine/pokemon/print_move_description.asm"
INCLUDE "data/moves/descriptions.asm"
INCLUDE "engine/events/pokerus/pokerus.asm"
INCLUDE "engine/battle/start_battle.asm"

View File

@ -4265,7 +4265,7 @@ Function1158c2:
ld l, c
ld h, b
xor a
ld [wWeeklyFlags], a
ld [wDailyFlags2], a
.asm_1158e5
ld b, $3
@ -4290,7 +4290,7 @@ Function1158c2:
push hl
dec hl
ld a, c
ld [wWeeklyFlags], a
ld [wDailyFlags2], a
.asm_115908
xor a
ld [hld], a
@ -4430,7 +4430,7 @@ endr
jp nz, .asm_1158e5
.asm_1159c4
ld a, [wWeeklyFlags]
ld a, [wDailyFlags2]
cp $0
jr z, .asm_1159d8
push hl
@ -4890,7 +4890,7 @@ Function115bc8:
Function115c49:
ld a, e
ld [wWeeklyFlags], a
ld [wDailyFlags2], a
ld a, d
ld [wSwarmFlags], a
xor a
@ -4960,7 +4960,7 @@ endr
ld [$dc1a], a
push de
push hl
ld hl, wWeeklyFlags
ld hl, wDailyFlags2
ld a, [hli]
ld h, [hl]
ld l, a
@ -5070,7 +5070,7 @@ Function115cfd:
.asm_115d38
push de
push hl
ld a, [wWeeklyFlags]
ld a, [wDailyFlags2]
ld l, a
ld a, [wSwarmFlags]
ld h, a

View File

@ -2714,8 +2714,8 @@ wWhichMomItemSet:: db ; dc18
wMomItemTriggerBalance:: ds 3 ; dc19
wDailyResetTimer:: dw ; dc1c
wDailyFlags:: db
wWeeklyFlags:: db
wDailyFlags1:: db
wDailyFlags2:: db
wSwarmFlags:: db
ds 2
wTimerEventStartDay:: db