Attack2DModifier
Inherits: TimedModifier < RefCounted < Object
Specialized TimedModifier implementation for Attack2D objects.
Description
The Attack2DModifier class extends the base TimedModifier functionality, specifically to manage temporary effects applied to Attack2D instances.
Use it to add temporary buffs and debuffs to your 2D attacks.
Tutorials
Properties
Methods
Attack2DModifier | clone |
void | copy |
void | disable |
bool | validate_modifier |
Property Descriptions
Attack2D attack
Attack2D instance being modified by this effect.
This property provides type-safe access to the target attack, mapping directly to the base class target property.
Method Descriptions
Attack2DModifier clone()
Returns an identical copy of the modifier.
void copy(base: TimedModifier)
Copies all properties from the base
modifier, including Attack2DModifier properties.
void disable()
Specialized disable behavior for attack modifiers.
Disables the modifier, removes stacks and cleans up attack references.
bool validate_modifier(_attack: Attack2D)
Returns true
if the modifier can be applied, false
otherwise.
Determines if the modifier can be applied to the specified _attack
.
Validation process:
- First checks if a custom validation callback exists and uses its result.
- If no callback exists, checks if the projectile already has a modifier with the same name.