Difference between revisions of "FF7/Field/Script/Opcodes/23 BTRLD"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Synergy Blades
m (Results)
m (9 revisions imported)
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
 
==== Arguments ====
 
==== Arguments ====
  
* '''const UByte''' ''B'': Bank to store result.
+
* '''const UByte''' ''B'': Bank to store result; should be a 16-bit bank.
 
* '''const UByte''' ''A'': Address to store result.
 
* '''const UByte''' ''A'': Address to store result.
  
Line 25: Line 25:
 
! style="background:rgb(204,204,204)" | Bit Result & Description
 
! style="background:rgb(204,204,204)" | Bit Result & Description
 
|-
 
|-
| rowspan="2" align="center" | 8
+
| rowspan="2" align="center" | 8 (0x1000)
 
| 1: The party escaped the battle.
 
| 1: The party escaped the battle.
 
|-
 
|-
 
| 0: The party did not escape.
 
| 0: The party did not escape.
 
|-
 
|-
| rowspan="2" align="center" | 1
+
| rowspan="2" align="center" | 1 (0x1)
 
| 1: The party was defeated (correct [[FF7/Field/Script/Opcodes/22 BTMD2|battle mode]] must be set to avoid [[FF7/Field/Script/Opcodes/FF GAMEOVER|game over]]).
 
| 1: The party was defeated (correct [[FF7/Field/Script/Opcodes/22 BTMD2|battle mode]] must be set to avoid [[FF7/Field/Script/Opcodes/FF GAMEOVER|game over]]).
 
|-
 
|-

Latest revision as of 05:16, 23 May 2019

  • Opcode: 0x23
  • Short name: BTRLD
  • Long name: Battle Result Load

Memory layout

0x23 B A

Arguments

  • const UByte B: Bank to store result; should be a 16-bit bank.
  • const UByte A: Address to store result.

Description

Stores the result of the last BATTLE to an address in memory. The resulting value can then be examined to see what the outcome of the battle was.

Results

Bit to AND Bit Result & Description
8 (0x1000) 1: The party escaped the battle.
0: The party did not escape.
1 (0x1) 1: The party was defeated (correct battle mode must be set to avoid game over).
0: The party was not defeated.