大佬,我又重新修改了一下,但是拥有特性的精灵开始战斗会卡死,没这个特性的精灵没事,经过测试,我发现删除bl 0x08E073E4就不会卡死,但又不会改变形态,可以帮忙看下嘛?- .gba
- .thumb
- .create "test.gba",0x8000000
- .close
- .open "永暗.gba","test.gba",0x8000000
- .org 0x08F2EB24
- .func new
- ldr r5,=0x0202420B
- ldrb r5,[r5]
- mov r2,#0x58
- mul r5,r2
- ldr r2,=0x02024084
- add r5,r2
- add r5,#0x20
- ldrb r5,[r5]
- cmp r5,#0xE9 ;"饱了又饿"特性编号
- beq yes
- end:
- lsl r6,r2,#0
- mov r2,#0x9B
- sub sp,#0x2C
- str r3,[sp,#12]
- ldr r1,=0x08E0368A
- mov pc,r1
- yes:
- ldrh r5,[r2]
- ; 经过计算将"空腹花纹"编号存入r2
- cmp r5,#1
- bne cmp
- mov r2,#2
- keep:
- mov r5,r0
- mov r0,r2
- mov r1,#0xFF
- add r1,#0x22
- lsl r1,r1,#1
- ldr r2,=BS_Script
- ldr r4,=0x02024214
- ldr r4,[r4]
- str r2,[r4]
- bl 0x08E073E4
- b end
- cmp:
- ; 经过计算将"满腹花纹"编号存入r2
- cmp r5,#2
- bne end
- mov r2,#1
- b keep
- .endfunc
- .pool
- BS_Script:
- .byte 0x10,0x30,0x1,0x83,0x77,0x0,0x45,0xA,0x21,0x0,0x0,0x0,0x0,0x3A,0x83,0x7A,0x0,0x12,0x40,0x0,0x83,0x73,0x0,0x3F
- .org 0x08E03682
- ldr r2,=new
- mov pc,r2
- .pool
- .close
复制代码 |