mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Replace flawed Metal Powder bugfix (#890)
This commit is contained in:
parent
61faca1f91
commit
91fa3dd9b9
@ -182,23 +182,33 @@ Fixes in the [multi-player battle engine](#multi-player-battle-engine) category
|
|||||||
|
|
||||||
([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450))
|
([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450))
|
||||||
|
|
||||||
**Fix:** Edit `DittoMetalPowder` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm):
|
**Fix:** Edit [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm):
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
ld a, c
|
DittoMetalPowder:
|
||||||
srl a
|
...
|
||||||
add c
|
|
||||||
ld c, a
|
|
||||||
ret nc
|
|
||||||
|
|
||||||
srl b
|
- ld a, c
|
||||||
ld a, b
|
- srl a
|
||||||
and a
|
- add c
|
||||||
jr nz, .done
|
- ld c, a
|
||||||
inc b
|
- ret nc
|
||||||
.done
|
-
|
||||||
scf
|
- srl b
|
||||||
rr c
|
- ld a, b
|
||||||
|
- and a
|
||||||
|
- jr nz, .done
|
||||||
|
- inc b
|
||||||
|
-.done
|
||||||
|
- scf
|
||||||
|
- rr c
|
||||||
|
+ ld h, b
|
||||||
|
+ ld l, c
|
||||||
|
+ srl b
|
||||||
|
+ rr c
|
||||||
|
+ add hl, bc
|
||||||
|
+ ld b, h
|
||||||
|
+ ld c, l
|
||||||
+
|
+
|
||||||
+ ld a, HIGH(MAX_STAT_VALUE)
|
+ ld a, HIGH(MAX_STAT_VALUE)
|
||||||
+ cp b
|
+ cp b
|
||||||
@ -213,6 +223,46 @@ Fixes in the [multi-player battle engine](#multi-player-battle-engine) category
|
|||||||
ret
|
ret
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```diff
|
||||||
|
PlayerAttackDamage:
|
||||||
|
...
|
||||||
|
|
||||||
|
.done
|
||||||
|
+ push hl
|
||||||
|
+ call DittoMetalPowder
|
||||||
|
+ pop hl
|
||||||
|
|
||||||
|
call TruncateHL_BC
|
||||||
|
|
||||||
|
ld a, [wBattleMonLevel]
|
||||||
|
ld e, a
|
||||||
|
- call DittoMetalPowder
|
||||||
|
|
||||||
|
ld a, 1
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
```
|
||||||
|
|
||||||
|
```diff
|
||||||
|
EnemyAttackDamage:
|
||||||
|
...
|
||||||
|
|
||||||
|
.done
|
||||||
|
+ push hl
|
||||||
|
+ call DittoMetalPowder
|
||||||
|
+ pop hl
|
||||||
|
|
||||||
|
call TruncateHL_BC
|
||||||
|
|
||||||
|
ld a, [wBattleMonLevel]
|
||||||
|
ld e, a
|
||||||
|
- call DittoMetalPowder
|
||||||
|
|
||||||
|
ld a, 1
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Reflect and Light Screen can make (Special) Defense wrap around above 1024
|
### Reflect and Light Screen can make (Special) Defense wrap around above 1024
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user