Skip to content

Instantly share code, notes, and snippets.

import asm65816
import ASMRef
define Battle_Swirl_Flag = 0x3FE
//Stops music from changing during battle swirl
ROM[0xC22FA9] = JSL (Battle_Swirl)
ROM[0xC0D28B] = JSL (Battle_Swirl)
@HS39
HS39 / Movement Notes.txt
Created February 18, 2019 16:05
Common movement codes
Movement 6
(C3A2E4 - C3A33A)
Same as Movement 12.
Movement 8
(C3A2AA - C3A2C5)
Stationary, does not walk in place. When you talk to the NPC, it turns to face you. After the NPC finished talking, it will not turn back to face its original direction.
Movement 10
(C3A2D3 - C3A2E3)
import asm65816
import ASMRef
// Code that determines how much HP and PP are gained per stat point on level up
ROM[0xC1D617] = {
JSL (LevelUp_Vital)
BRA_a (0xD639)
}
import asm65816
import ASMRef
Magnet_No_PP_Text:
newline
"@{target} does not have any PP![03]"
eob
Magnet: {
REP (0x31)
import asm65816
import ASMRef
Healing_Alpha: {
REP (0x31)
PHD
TDC
ADC_i (0xFFEE)
TCD
LDA_a (0xA972) //Loads Current target to Accumulator
import asm65816
import ASMRef
define Lifeup_A_Power = 100
define Lifeup_B_Power = 300
define Lifeup_G_Power = 10000
define Lifeup_O_Power = 400
Lifeup_General: {
REP (0x31)
import asm65816
import ASMRef
Flash_Alpha: {
REP (0x31)
JSL (NPC_Check) //Checks if target is an NPC
CMP_i (0x0000)
BNE_a (FlashA_Return) //Attack fails if target is an NPC
JSL (Flash_Immunity_Test)
CMP_i (0x0000)
import asm65816
import ASMRef
define Thunder_A_Damage = 120
define Thunder_B_Damage = 120
define Thunder_G_Damage = 200
define Thunder_O_Damage = 200
define Thunder_A_Hits = 1
define Thunder_B_Hits = 2
define Thunder_G_Hits = 3
import asm65816
import ASMRef
define Starstorm_A_Power = 360
define Starstorm_O_Power = 720
Starstorm_General: {
REP (0x31)
PHD
PHA
import asm65816
import ASMRef
define Rockin_A_Power = 80
define Rockin_B_Power = 180
define Rockin_G_Power = 320
define Rockin_O_Power = 640
Rockin_General: {
REP (0x31)