summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-05-23 12:48:14 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2018-05-23 12:48:14 -0400
commit32b92ca51c73f1ad9be169bef476b9c93687e2a4 (patch)
tree310cbf0ee30c832941a1afc0da5ff35e1089c292 /engine
parent4e776d4fa6bb0510fa06416ad7a6dd9ffe0ff724 (diff)
Start improving sprite movement engine (to do: identify bit flags)
Introduce maskbits N[, S]: optionally shift the bitmask
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/ai/scoring.asm4
-rw-r--r--engine/battle/effect_commands.asm2
-rw-r--r--engine/pokemon/move_mon.asm10
3 files changed, 8 insertions, 8 deletions
diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm
index e83682427..567737c1f 100644
--- a/engine/battle/ai/scoring.asm
+++ b/engine/battle/ai/scoring.asm
@@ -1055,7 +1055,7 @@ AI_Smart_TrapTarget: ; 38a71
jr nz, .asm_38a91
ld a, [wPlayerSubStatus1]
- and 1<<SUBSTATUS_IN_LOVE | 1<<SUBSTATUS_ROLLOUT | 1<<SUBSTATUS_IDENTIFIED | 1<<SUBSTATUS_NIGHTMARE
+ and 1 << SUBSTATUS_IN_LOVE | 1 << SUBSTATUS_ROLLOUT | 1 << SUBSTATUS_IDENTIFIED | 1 << SUBSTATUS_NIGHTMARE
jr nz, .asm_38a91
; Else, 50% chance to greatly encourage this move if it's the player's Pokemon first turn.
@@ -1847,7 +1847,7 @@ AI_Smart_MeanLook: ; 38dfb
; 80% chance to greatly encourage this move if the player is either
; in love, identified, stuck in Rollout, or has a Nightmare.
ld a, [wPlayerSubStatus1]
- and 1<<SUBSTATUS_IN_LOVE | 1<<SUBSTATUS_ROLLOUT | 1<<SUBSTATUS_IDENTIFIED | 1<<SUBSTATUS_NIGHTMARE
+ and 1 << SUBSTATUS_IN_LOVE | 1 << SUBSTATUS_ROLLOUT | 1 << SUBSTATUS_IDENTIFIED | 1 << SUBSTATUS_NIGHTMARE
jr nz, .asm_38e26
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index fad5b27a0..5fd37e054 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -364,7 +364,7 @@ CantMove: ; 341f0
ld a, BATTLE_VARS_SUBSTATUS3
call GetBattleVarAddr
ld a, [hl]
- and $ff ^ (1<<SUBSTATUS_BIDE + 1<<SUBSTATUS_RAMPAGE + 1<<SUBSTATUS_CHARGED)
+ and $ff ^ (1 << SUBSTATUS_BIDE | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_CHARGED)
ld [hl], a
call ResetFuryCutterCount
diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm
index 630479797..2074e537f 100644
--- a/engine/pokemon/move_mon.asm
+++ b/engine/pokemon/move_mon.asm
@@ -1497,29 +1497,29 @@ CalcMonStatC: ; e17b
jr z, .Special
cp STAT_SDEF
jr z, .Special
-; DV_HP = (DV_ATK & 1) << 3 + (DV_DEF & 1) << 2 + (DV_SPD & 1) << 1 + (DV_SPC & 1)
+; DV_HP = (DV_ATK & 1) << 3 | (DV_DEF & 1) << 2 | (DV_SPD & 1) << 1 | (DV_SPC & 1)
push bc
ld a, [hl]
swap a
- and $1
+ and 1
add a
add a
add a
ld b, a
ld a, [hli]
- and $1
+ and 1
add a
add a
add b
ld b, a
ld a, [hl]
swap a
- and $1
+ and 1
add a
add b
ld b, a
ld a, [hl]
- and $1
+ and 1
add b
pop bc
jr .GotDV