|
本帖最后由 jiangzhengwenjz 于 2015-7-12 12:08 编辑
限于火红版,当然可以方便地移植到绿宝石版。。未大量测试,不准转载
公式:若队伍里最高等级大于等于3,则野生精灵从[队伍最高等级 - 2]浮动到[队伍最高等级]
若队伍里最高等级小于等于2,则野生精灵从[1]浮动到[队伍最高等级]
但缺乏道馆徽章的话会有一些等级限制:
限制野生最高等级:[道馆徽章数+1] * 10(若徽章全有,则无限制)
若队伍内有蛋,该蛋的等级(5)不会影响野生精灵的等级
首先在0x828FC写入:00 4C 20 47 XX XX XX XX其中XX XX XX XX是下面程序的指针(thumb模式+1)
随后找空位写入下面的程序、并对应修改上面的指针:(空位偏移量需以0,4,8,c结尾,否则无法读取程序中所需的指针)- .thumb
- .align 2
- mainfunc:
- ldr r4, =0x020242D8
- mov r2, #0
- mov r0, #0
- loop:
- ldrb r5, [r4]
- cmp r5, #5
- beq checkegg
- checked:
- cmp r5, r0
- bgt change
- nochange:
- add r4, #0x64
- add r2, #1
- cmp r2, #6
- bne loop
- check:
- cmp r0, #2
- bls adjust
- sub r5, r0, #2
- checkflag:
- push {r0-r2, r4-r7}
- mov r0, #0x41
- lsl r0, r0, #5
- add r4, r0, #0
- mov r3, #0
- loop2:
- ldr r2, =0x0806E6D1
- bl viar2
- cmp r0, #0
- beq limiter
- add r0, r4, #1
- add r4, r0, #0
- mov r1, #0x41
- lsl r1, r1, #5
- add r1, #8
- cmp r0, r1
- bls loop2
- back:
- pop {r0-r2, r4-r7}
- cmp r3, #0
- beq back2
- cmp r0, r3
- bgt adjust2
- back2:
- ldr r4, =0x0808290d
- bx r4
- change:
- add r0, r5, #0
- b nochange
- adjust:
- mov r5, #1
- b back2
- checkegg:
- push {r0-r4, r6, r7}
- mov r1, #0x2D
- sub r4, #0x54
- mov r0, r4
- ldr r2, =0x0803FBE9
- bl viar2
- cmp r0, #1
- beq egg
- b share
- egg:
- add r5, r0, #0
- share:
- pop {r0-r4, r6, r7}
- b checked
- viar2:
- bx r2
- limiter:
- mov r1, #0x41
- lsl r1, r1, #5
- sub r1, r4, r1
- add r1, #1
- mov r3, #0xa
- mul r3, r1
- b back
- adjust2:
- add r0, r3, #0
- sub r5, r0, #2
- b back2
复制代码 编译后版本:- 21 4C 00 22 00 20 25 78 05 2D 24 D0 85 42 1E DC 64 34 01 32 06 2A F6 D1 02 28 1A D9 85 1E F7 B4 41 20 40 01 04 1C 00 23 18 4A 00 F0 21 F8 00 28 1F D0 60 1C 04 1C 41 21 49 01 08 31 88 42 F3 D9 F7 BC 00 2B 01 D0 98 42 1A DC 11 4C 20 47 28 1C DE E7 01 25 F9 E7 DF B4 2D 21 54 3C 20 1C 0D 4A 00 F0 06 F8 01 28 00 D0 00 E0 05 1C DF BC CD E7 10 47 41 21 49 01 61 1A 01 31 0A 23 4B 43 DF E7 18 1C 85 1E E1 E7 00 00 D8 42 02 02 D1 E6 06 08 0D 29 08 08 E9 FB 03 08
复制代码 |
|