🌱
The Insurgent's Forge
  • Home
  • Getting Started
    • Setup
    • Resources
  • Overview
    • Configuration
      • Formulas
      • Functions
      • Classes
      • Helpers
      • Assemblies
      • Middlewares
      • Dependencies
      • Options
      • Errors
    • Improvements & Additions
    • Structures & Parameters
    • Formula Workflow
      • Combo
      • Counter
      • Area of Effect
      • Reserve Party Member
      • Reflect
      • Mist
      • Trap
      • Chain Benefit
      • Summon
      • Spawn
      • Gambit
    • Limitations
      • Animations
      • Status Effects & Augments
    • Notes
      • Flags
      • Loops
      • Function in a Function
    • Helpers
      • Add Augment
      • Add Status Effect
      • Apply Knockback
      • Get Active Party Member
      • Get Action Status Effects
      • Get Augment Duration
      • Get Battle Unit Keep
      • Get Battle Unit Keep By Focus
      • Get Battle Unit Work
      • Get Character Max Hp
      • Get Character Max Mp
      • Get Character Type
      • Get Elemental Affinities Match
      • Get Equipment Status Effects
      • Get Forced Poach Rarity
      • Get Forced Steal Rarity
      • Get Formula Proc Keep
      • Get Knockback Range
      • Get Location Mist Strength
      • Get Model Evade Types
      • Get One Hit Kill State
      • Get Random Number
      • Get Reflect Target
      • Get Remedy Status Effects
      • Get Status Effect Duration
      • Get Status Effect Tick Duration
      • Get Status Effects Match
      • Get Terrain Type
      • Get Weather
      • Is Interactable
      • Modify Content
      • Modify Gil
      • Modify Hp
      • Modify Mist Charges
      • Modify Mp
      • Modify Sky Pirates Den Stats
      • Refresh Stats
      • Remove Augment
      • Remove Status Effect
      • Set Level
      • Shift Elements
      • Show Combat Log
      • Show Number Text
      • Teleport Location
  • Support & Updates
    • Changelogs
      • Version 1.0.3
      • Version 1.0.2
      • Version 1.0.1
      • Version 1.0.0
    • Known Issues
    • FAQ
Powered by GitBook
On this page
  • Signature
  • Description
  • Arguments
  • Notes
  1. Overview
  2. Helpers

Modify Hp

Signature

modifyHp(casterAddress, targetAddress, amount, knockbackState, hitAnimationState, koAnimationType)

Description

Adds or removes hp from a character.

If target is a foe and their new hp is equal to or lower than their hp low limit, their death related properties (death count, death time, ...) are also updated.

Arguments

Caster Address

The battle unit keep address of the caster.

Target Address

The battle unit keep address of the target.

Amount

The amount of hp added or removed.

If positive, hp is added. If negative, hp is removed.

Knockback State

Show normal animation (0) or knockback animation (1) when target is hit or KO'd.

Only used if amount is 0 or lower.

Hit Animation State

Targets reacts to being hit (1) or not (0).

Only used if amount is 0 or lower.

KO Animation Type

Show normal animation (0) or fade animation (1) when target is KO'd.

Only used if amount is 0 or lower.

Notes

The target's hp cannot be reduced below their hp low limit.

If target is affected by god mode, their hp cannot be reduced.

The current hp is gradually updated to the new one in the battle stats section of the UI.

PreviousModify GilNextModify Mist Charges

Last updated 9 months ago