Difference between revisions of "InflictStatus"
m (Xifanie moved page Event Instruction 92 to InflictStatus) |
(Adding in a note that InflictStatus (at least for Revive with 1 HP) will block all event-based HP healing, as well as the way to restore units with full HP.) |
||
Line 15: | Line 15: | ||
== Status : Byte (hex) == | == Status : Byte (hex) == | ||
− | *x00: Revive with | + | *x00: Revive with 1 HP if necessary. Note that the use of this command will block any attempts at event-based HP restoration within the same event. See below for an alternative. |
*x01: Crystal | *x01: Crystal | ||
*x02: Poison + Critical | *x02: Poison + Critical | ||
*x04: Apply any status currently set on the unit (see [[Battle Stats]] 0x01A7 to 0x01AB). Requires the [[Event Instruction Upgrade]] hack. Warning: Many statuses at once might not apply properly / This instruction erases the currently written statuses! You'll have to rewrite them if you want them activated for battle. | *x04: Apply any status currently set on the unit (see [[Battle Stats]] 0x01A7 to 0x01AB). Requires the [[Event Instruction Upgrade]] hack. Warning: Many statuses at once might not apply properly / This instruction erases the currently written statuses! You'll have to rewrite them if you want them activated for battle. | ||
+ | |||
+ | In order to revive a dead unit with full HP, use the following commands. (Requires the https://ffhacktics.com/wiki/Event_Instruction_Upgrade hack.) | ||
+ | |||
+ | UnitAddress(x??,x70) | ||
+ | LoadAddress(x71,x0058,x70,001) | ||
+ | SUB(x0071,x0020) | ||
+ | SaveAddress(x71,x0058,x70,001) | ||
+ | LoadAddress(x71,x01BB,x70,001) | ||
+ | SUB(x0071,x0020) | ||
+ | SaveAddress(x71,x01BB,x70,001) | ||
+ | |||
+ | ChangeStats(x??,x00,x00,+00999) | ||
+ | |||
+ | RemoveUnit(x??,x00) | ||
+ | AddUnit(x??,x00,x00) | ||
+ | WaitAddUnit() | ||
== Unknown : Byte (hex) == | == Unknown : Byte (hex) == |
Revision as of 03:51, 7 May 2021
Contents
{92} InflictStatus
InflictStatus(xID,x00,xSS,x0C,x00)
Inflict a status on a given unit.
See Also: {83} ChangeStats ― {E5} WaitForInstruction(x43,x00)
Unit ID : Byte (hex)
ID of the unit specified in the ENTD.
x00 : Byte (hex)
This value is always set to x00 in the original game; it probably doesn't have a function.
Status : Byte (hex)
- x00: Revive with 1 HP if necessary. Note that the use of this command will block any attempts at event-based HP restoration within the same event. See below for an alternative.
- x01: Crystal
- x02: Poison + Critical
- x04: Apply any status currently set on the unit (see Battle Stats 0x01A7 to 0x01AB). Requires the Event Instruction Upgrade hack. Warning: Many statuses at once might not apply properly / This instruction erases the currently written statuses! You'll have to rewrite them if you want them activated for battle.
In order to revive a dead unit with full HP, use the following commands. (Requires the https://ffhacktics.com/wiki/Event_Instruction_Upgrade hack.)
UnitAddress(x??,x70) LoadAddress(x71,x0058,x70,001) SUB(x0071,x0020) SaveAddress(x71,x0058,x70,001) LoadAddress(x71,x01BB,x70,001) SUB(x0071,x0020) SaveAddress(x71,x01BB,x70,001)
ChangeStats(x??,x00,x00,+00999)
RemoveUnit(x??,x00) AddUnit(x??,x00,x00) WaitAddUnit()
Unknown : Byte (hex)
Often 0x0C, else 0x01.
x00 : Byte (hex)
This value is always set to x00 in the original game; it probably doesn't have a function.