ref: d6b00d0cc177b3a94b477735fd165232614a6cee
parent: 6c405e38598309bd090bb325a45f135e08b47a6f
author: Rangi <[email protected]>
date: Sun Feb 4 08:16:40 EST 2018
Sync code with wiki
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -4431,7 +4431,7 @@
ld c, a
dec de
ld a, [de]
- adc $0
+ adc 0
ld [wBuffer6], a
ld b, a
ld a, [hld]
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -4011,25 +4011,25 @@
ld a, [hBattleTurn]
and a
- jr z, .mimic_random
+ jr z, .dont_sample_failure
ld a, [wLinkMode]
and a
- jr nz, .mimic_random
+ jr nz, .dont_sample_failure
ld a, [wInBattleTowerBattle]
and a
- jr nz, .mimic_random
+ jr nz, .dont_sample_failure
ld a, [wPlayerSubStatus5]
bit SUBSTATUS_LOCK_ON, a
- jr nz, .mimic_random
+ jr nz, .dont_sample_failure
call BattleRandom
cp 25 percent + 1 ; 25% chance AI fails
jr c, .failed
-.mimic_random
+.dont_sample_failure
call CheckSubstituteOpp
jr nz, .failed
ld a, [wAttackMissed]
@@ -6364,7 +6364,7 @@
jr nz, .dont_sample_failure
call BattleRandom
- cp 1 + 25 percent
+ cp 25 percent + 1 ; 25% chance AI fails
jr c, .failed
.dont_sample_failure
--- a/engine/dma_transfer.asm
+++ b/engine/dma_transfer.asm
@@ -618,7 +618,7 @@
add BG_MAP_WIDTH - SCREEN_WIDTH
ld l, a
ld a, h
- adc $0
+ adc 0
ld h, a
dec b
jr nz, .outer_loop
--- a/engine/events/map_name_sign.asm
+++ b/engine/events/map_name_sign.asm
@@ -85,7 +85,7 @@
ret z
cp POWER_PLANT
ret z
- ld a, $1
+ ld a, 1
and a
ret
; b8089
--- a/engine/map_palettes.asm
+++ b/engine/map_palettes.asm
@@ -14,7 +14,7 @@
add [hl]
ld l, a
ld a, [wTilesetPalettes + 1]
- adc $0
+ adc 0
ld h, a
ld a, [hl]
and $f
@@ -25,7 +25,7 @@
add [hl]
ld l, a
ld a, [wTilesetPalettes + 1]
- adc $0
+ adc 0
ld h, a
ld a, [hl]
swap a
@@ -58,7 +58,7 @@
add [hl]
ld l, a
ld a, [wTilesetPalettes + 1]
- adc $0
+ adc 0
ld h, a
ld a, [hl]
and $f
@@ -69,7 +69,7 @@
add [hl]
ld l, a
ld a, [wTilesetPalettes + 1]
- adc $0
+ adc 0
ld h, a
ld a, [hl]
swap a
--- a/engine/mystery_gift.asm
+++ b/engine/mystery_gift.asm
@@ -867,7 +867,7 @@
add e
ld [hPrintNum5], a
ld a, [hPrintNum6]
- adc $0
+ adc 0
ld [hPrintNum6], a
.asm_104f02
xor a
@@ -1045,7 +1045,7 @@
add e
ld [hPrintNum5], a
ld a, [hPrintNum6]
- adc $0
+ adc 0
ld [hPrintNum6], a
jr .asm_104fd2
.asm_10501a
--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -60,7 +60,7 @@
add c
ld c, a
ld a, b
- adc $0
+ adc 0
ld b, a
ret
; 110029
@@ -1667,7 +1667,7 @@
add c
ld [hli], a
ld a, b
- adc $0
+ adc 0
ld [hl], a
xor a
ld [$c993], a
@@ -1708,8 +1708,8 @@
ld a, [$c993]
add e
ld [hli], a
- ld a, $0
- adc $0
+ ld a, 0
+ adc 0
ld [hl], a
xor a
ld [$c993], a
@@ -2495,8 +2495,8 @@
ld a, [$c991]
add e
ld [hli], a
- ld a, $0
- adc $0
+ ld a, 0
+ adc 0
ld [hl], a
xor a
ld [$c991], a
@@ -6829,7 +6829,7 @@
add c
ld [$c82d], a
ld a, [$c82e]
- adc $0
+ adc 0
ld [$c82e], a
ld hl, $c829
ld a, e
@@ -7549,7 +7549,7 @@
add b
ld [hli], a
ld a, [hl]
- adc $0
+ adc 0
ld [hl], a
ld c, b
pop hl
--- a/mobile/mobile_12.asm
+++ b/mobile/mobile_12.asm
@@ -1798,7 +1798,7 @@
add e
ld c, a
ld a, b
- adc $0
+ adc 0
ld b, a
ld a, c
ld [hld], a
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -7714,7 +7714,7 @@
ld e, a
ld a, h
cpl
- adc $0
+ adc 0
ld d, a
pop hl
add hl, de