Skip to content

02 — Cleanse • Dispel • Immunity


Goal

Learn how status effects are seeded, removed, blocked, shortened, and verified through the controller and public status contracts.


What This Scene Demonstrates

The core mental model:

seed effects → remove active effects → block future effects → shorten future durations → verify active state

  • Quick Apply builds real sample effects through StatusRegistry and submits them to StatusEffectController.
  • Cleanse removes existing active effects by StatusTag mask.
  • Dispel removes existing active effects by DispelType and tier.
  • Immunity blocks future applies through IStatusImmunity.
  • Resistance scales future durations through IStatusResistance.
  • The Active tab shows what actually survived on the controller.

The controller owns the runtime result. Demo adapters only expose public seams for learning.


What To Look For

  • Overview Shows the target, lifecycle counters, and whether the immunity and resistance adapters are present.

  • Quick Apply Seeds the controller with real registry-built status effects. Use this first before testing cleanse, dispel, immunity, or resistance.

  • Cleanse / Dispel Cleanse builds a StatusTag mask from tag toggles and calls the controller cleanse path. Dispel passes a DispelType and tier to the controller. The panel does not edit the active list directly.

  • Immunity Adds, updates, or removes a DemoStatusImmunity adapter on the target. Exact Id blocks one status. Tag mask blocks status groups. Immunity affects future applies only.

  • Resistance Adds, updates, or removes a DemoStatusResistance adapter on the target. Resistance values scale future durations. Existing active effects are not rewritten.

  • Active Shows the controller-owned live effects. Use this tab to verify what cleanse, dispel, immunity, and resistance actually did.

Read the scene as:

apply creates active effects → cleanse/dispel remove active effects → immunity blocks future effects → resistance modifies future durations → Active verifies the controller result


Sample Scope

This scene covers:

  • Seeding active effects through StatusRegistry
  • Removing active effects with CleanseByTag(...)
  • Removing active effects with Dispel(...)
  • Adding and removing a sample immunity adapter
  • Blocking future applies by exact id or tag mask
  • Adding and removing a sample resistance adapter
  • Scaling future durations with resistance values
  • Verifying results through the controller-owned Active list
  • Watching applied, refreshed, removed, and expired counters

This scene does not cover:

  • Full combat behaviour
  • Full Health integration behaviour
  • Networking implementation
  • Production authority implementation
  • Permanent project-specific immunity or resistance design

DemoStatusImmunity and DemoStatusResistance are sample adapters for this teachable. Real projects can replace them with their own components implementing the same public contracts.


Authority Note

This scene may include a permissive sample authority setup for demonstration purposes. Production projects should provide their own authority implementation.


Networking Reminder

RevFramework does not include networking. Multiplayer support is the developer’s responsibility.


How To Use

  1. Enter Play Mode.
  2. Confirm the Target is assigned and has a StatusEffectController.
  3. Open Quick Apply.
  4. Choose a known status id.
  5. Click Apply Sample to seed the controller.
  6. Open Active to confirm the effect is live.
  7. Open Cleanse / Dispel.
  8. For cleanse:

  9. Select tag toggles to build the cleanse mask.

  10. Click Cleanse.
  11. Check Active to verify what remains.
  12. For dispel:

  13. Choose a Type.

  14. Set Tier.
  15. Click Dispel.
  16. Check Active to verify what remains.
  17. Open Immunity.
  18. Toggle Enabled on or off.
  19. Set an Exact Id, tag mask, or both.
  20. Click Apply Immunity.
  21. Return to Quick Apply and apply a matching status to verify whether it is blocked.
  22. Open Resistance.
  23. Toggle Enabled on or off.
  24. Adjust All, Debuff, DOT, Poison, or Magic values.
  25. Click Apply Resistance.
  26. Return to Quick Apply and apply a matching status to verify the adjusted duration.
  27. Use Active as the final check for the real controller state.

Failure Behaviour

  • Missing Target Meaning: the panel has no receiver for status effects. Corrective action: assign a target GameObject with StatusEffectController, or create a scene object named EnemyCapsule.

  • Missing Controller Meaning: the target cannot own, remove, block, or shorten statuses. Corrective action: add StatusEffectController to the target.

  • No Known Status Ids Meaning: StatusRegistry returned no ids. Corrective action: register at least one status definition, then reopen or refresh the scene.

  • Apply Sample blocked: no controller Meaning: there is no valid StatusEffectController available. Corrective action: assign a valid target, then try again.

  • Registry could not build sample Meaning: StatusRegistry could not create the selected sample effect. Corrective action: choose another id or register that status.

  • Cleanse removed 0 effects Meaning: no active effects matched the selected StatusTag mask. Corrective action: apply matching statuses first or change the mask.

  • Dispel removed 0 effects Meaning: no active effects matched the selected DispelType and tier. Corrective action: apply matching statuses first, choose a different dispel type, or increase the tier.

  • Immunity blocked: no target Meaning: there is no GameObject to receive the sample immunity adapter. Corrective action: assign a target, then try again.

  • Immunity already disabled Meaning: no DemoStatusImmunity adapter is currently present and Enabled is off. Corrective action: enable immunity, choose an Exact Id or mask, then apply again.

  • Resistance blocked: no target Meaning: there is no GameObject to receive the sample resistance adapter. Corrective action: assign a target, then try again.

  • Resistance already disabled Meaning: no DemoStatusResistance adapter is currently present and Enabled is off. Corrective action: enable resistance, adjust values, then apply again.

The operation result explains what happened. The Active tab confirms the actual controller state.


Behind The Scenes

This panel uses:

  • StatusRegistry.KnownIdsString()
  • StatusRegistry.TryBuild(...)
  • StatusEffectController.ApplyStatus(...)
  • StatusEffectController.CleanseByTag(...)
  • StatusEffectController.Dispel(...)
  • StatusEffectController.RemoveStatusAt(...)
  • StatusEffectController.Active
  • StatusEffectController.StatusApplied
  • StatusEffectController.StatusRefreshed
  • StatusEffectController.StatusRemoved
  • StatusEffectController.StatusExpired
  • StatusContext.FromAbility(...)
  • StatusTag
  • DispelType
  • IStatusEffect
  • IStatusImmunity
  • IStatusResistance
  • DemoStatusImmunity
  • DemoStatusResistance

Key Takeaway

Cleanse and dispel remove effects that are already active.

Immunity blocks future applies.

Resistance scales future durations.

The controller owns the result, and the Active tab proves what actually happened.