Skip to content

rq.BattleHitCtx ​

since 2.1.0

What rq.battle.on_hit gets for one hit.

Fields ​

NameTypeDescription
attackerintegerThe attacker's roster slot.
defenderintegerThe defender's roster slot.
skillintegerThe skill number.
kind"physical"|"magic"|"special"The kind of action: an attack, or a special skill (since 2.26.0).
damageintegerThe HP the hit took; 0 for a miss, a barrier or an immune target. For a special skill, the HP the target lost, 0 for most.
missedbooleanThe hit missed (◆攻撃外れた).
critbooleanThe hit was a critical; false for a special skill.
downedbooleanThe defender is down after the hit.
counterbooleanThe hit is a counter.

Functions ​

NameSummary
rq.BattleHitCtx:logAdds text to this hit's battle log line, after the game's own (" X took 120 damage. (Stun)").

rq.BattleHitCtx:log ​

lua
rq.BattleHitCtx:log(text)

since 2.1.0

Adds text to this hit's battle log line, after the game's own (" X took 120 damage. (Stun)").

Start it with a space, as the game's suffixes do: " (Burn)".

Raises an error for a value that is not a string.

ParameterTypeDescription
textstringThe text to add.

See also: rq.battle.on_log

Used by ​

rq.battle.on_hit