Skip to content

ThreatEffect ​

Inherits: Effect < DatabaseResource < Resource

Changes threat: adds, reduces or clears the threat an entity has on hostile NPCs, puts it at the top of their lists, or (REDIRECT, with a duration) makes the threat an entity generates go to someone else for a while: misdirection. For ADD / REDUCE / CLEAR / SET_TO_TOP choose whose threat changes (the originator or the target) and on which enemies (the target NPC, or every enemy fighting that entity). For REDIRECT the entity the effect is on (set "applies to" to the originator for a misdirection the caster puts on himself) gives its threat to the other one of the originator and the target. See docs/systems/ability-mechanics-plan.md, section 6.

Properties ​

ModemodeMode.ADD
floatvalue100.0
Whosewhose_threatWhose.ORIGINATOR
OnEnemieson_enemiesOnEnemies.ALL_ENGAGED
intredirect_uses0
floatredirect_percent100.0

Methods ​

voidspecific_effect_logic( effect_instance: EffectInstance )
Stringget_effect_description()
Stringget_editor_description()
boolis_one_off_application()

Enumerations ​

enum Mode ​

The options of mode: add, reduce, clear, set to top, redirect.

  • ADD = 0 - adds value threat
  • REDUCE = 1 - takes value threat away (never below 0)
  • CLEAR = 2 - takes all of the threat away (a vanish, a feign)
  • SET_TO_TOP = 3 - puts the threat value above the highest one on that NPC
  • REDIRECT = 4 - the threat the affected entity generates goes to the other party while the effect lasts (needs a duration)

enum Whose ​

The options of whose: originator, target.

  • ORIGINATOR = 0
  • TARGET = 1

enum OnEnemies ​

The options of on enemies: target npc, all engaged.

  • TARGET_NPC = 0
  • ALL_ENGAGED = 1

Property descriptions ​

Threat

Mode mode = Mode.ADD ​

What the effect does to threat (add, reduce, clear, top of the list or redirect).

float value = 100.0 ​

The amount (ADD, REDUCE) or the margin above the highest threat (SET_TO_TOP)

Whose whose_threat = Whose.ORIGINATOR ​

Whose threat changes (not for REDIRECT)

OnEnemies on_enemies = OnEnemies.ALL_ENGAGED ​

On which NPCs: the target of the effect, or every enemy fighting the entity whose threat changes (not for REDIRECT)

int redirect_uses = 0 ​

REDIRECT: how many threat-making actions are redirected (0 = all of them while the effect lasts)

float redirect_percent = 100.0 ​

REDIRECT: the share of the threat that goes to the other party, in percent (100 = all of it, a classic misdirection; 10 = a tenth of it goes, the rest stays)

Method descriptions ​

void specific_effect_logic( effect_instance: EffectInstance ) ​

What the effect does to its target when it is applied.

String get_effect_description() ​

The text of the effect for tooltips, with its values filled in.

String get_editor_description() ​

A short text for the effect editor that says what the effect does.

bool is_one_off_application() ​

Changing threat happens once; a redirect is a lasting state