Skip to content

SusStatusEffect

SusStatusEffect

Buff / debuff chip — icon with optional stacks, multiply, turns; tooltip on mini/normal.

Package

SusGame · HUD (commercial)

Open in Playground

SusGame · HUD

Props

NameTypeDefault
SizeProp<string>"normal"
IconProp<string>""
TitleProp<string>""
DescriptionProp<string>""
StacksProp<int>1
MultiplyProp<float>1f
TurnsLeftProp<int>0
IsDebuffProp<bool>false

Slots

No slots.

Events

NameFieldPayload
ClickedOnClicked

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-status-effect
  • sus-status-effect__desc
  • sus-status-effect__icon
  • sus-status-effect__meta
  • sus-status-effect__multiply
  • sus-status-effect__stacks
  • sus-status-effect__title
  • sus-status-effect__turns
  • sus-status-effect--buff
  • sus-status-effect--debuff
  • sus-status-effect--large
  • sus-status-effect--mini
  • sus-status-effect--normal
  • sus-status-effect-host

Usage

csharp
var fx = new SusStatusEffect();
fx.Size.Value = "normal"; // mini | normal | large
fx.ApplyData(new SusStatusEffectData
{
    Id = "regen",
    Icon = "heart",
    Title = "Regen",
    Description = "Restore HP each turn",
    Stacks = 2,
    Multiply = 1f,
    TurnsLeft = 3,
    IsDebuff = false,
});
fx.OnClicked += () => { /* open detail */ };
xml
<template>
  <sus:SusStatusEffect :Size="Size.Value"
                       :Icon="Icon.Value"
                       :Title="Title.Value"
                       :Description="Desc.Value"
                       :Stacks="Stacks.Value"
                       :Multiply="Mul.Value"
                       :TurnsLeft="Turns.Value"
                       :IsDebuff="Debuff.Value"
                       @clicked="OnClicked" />
</template>

<script>
public Prop<string> Size = new("normal");
public Prop<string> Icon = new("heart");
public Prop<string> Title = new("Regen");
public Prop<string> Desc = new("Restore HP each turn");
public Prop<int> Stacks = new(2);
public Prop<float> Mul = new(1f);
public Prop<int> Turns = new(3);
public Prop<bool> Debuff = new(false);
void OnClicked() { /* … */ }
</script>
Prop / APIRole
Sizemini (icon) · normal (meta) · large (title+desc, tooltip off)
Icon · Title · DescriptionVisual + tooltip copy
StacksBadge xN when > 1 (hidden in mini)
Multiply×N when ≠ 0/1 (normal only)
TurnsLeftNt when > 0
IsDebuffDebuff vs buff chrome / icon color
ApplyData(SusStatusEffectData)Batch-set fields
OnClickedClick on chip body

Notes

  • Built on kit SusTooltip + SusIcon — theme tokens cascade from SusKit.
  • Unit cards / rails usually own instances via SetEffects; standalone for inspectors / large detail.
  • Compact icon-only trays: see SusBuffTray.