> For the complete documentation index, see [llms.txt](https://solo-player.gitbook.io/most-in-one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solo-player.gitbook.io/most-in-one/most-systems/most-damage.md).

# MOST Damage

It's supposed to be called Damage/Heal. MOST Damage system is a full health control system with a lot of features related health system

## <mark style="color:red;">Features</mark>

<figure><img src="/files/poR936RHUSVzgaEkGunu" alt=""><figcaption></figcaption></figure>

* Damage/healing trigger and collision option
* Support layer and tag objects detection and control

<figure><img src="/files/Fzvs4GwesafHg6cUDjos" alt=""><figcaption></figcaption></figure>

* Support the health bar manager
* Effects and fx spawner for all events (on damage, on heal, on defeat)
* Event section for all events (on damage, on heal, on defeat)

<figure><img src="/files/FS7wKz4eZG0XqLHJWLWx" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">API reference</mark>

{% hint style="success" %} <mark style="color:green;">**All public properties can be updated at runtime, and the changes will be set immediately.**</mark>
{% endhint %}

```csharp
// Next to each line shows the return and set data Type 

// You can use this function to apply damage from other behaviors
// amount for damage amount, and if amount is not set, the system will use DefaultDamageAmount
Most_Damage.OnDamage([Optional] float amount);

// You can use this function to apply a heal from other behaviors
// amount for heal amount, and if amount is not set, the system will use DefaultHealAmount
Most_Damage.AddHealth([Optional] float amount);

// Current health // to update this property, use OnDamage() and AddHealth()
Most_Damage.Health; return float

// Max health of the object
Most_Damage.MaxHealth; return or set float

// the default damage amount
// if OnDamage() is called without giving the amount 
// or if the damage object(like bullet) have undefined damage/attack value
Most_Damage.DefaultDamageAmount; return or set float

// the default heal amount
// if AddHealth() is called without giving the amount 
// or if the heal object have undefined health value
Most_Damage.DefaultHealAmount; return or set float

// enable/disable health bar syncing
Most_Damage.EnableHealthBar; return or set bool

// If the damage system will be affected by Triggered collider components
Most_Damage.UseOnTrigger; return or set bool

// If the damage system will be affected by collider components
Most_Damage.UseOnCollision; return or set bool
```
