BandaStation - Modules - TypesVar Details - Proc Details

Rip and Tear Component

A component that allows items to tear down walls with sustained attacks.

This component handles the validation and execution of wall-tearing actions, including stamina costs, wield requirements, and handling of reinforced walls. It provides visual feedback and sound effects during the tearing process.

Vars

do_after_keyUnique key for do_after actions to prevent overlapping interactions
ignore_exhaustionWhether to ignore stamina exhaustion checks
reinforced_multiplierMultiplier for tear time on reinforced walls (null means cannot tear reinforced walls)
require_wieldedWhether the item must be wielded to tear walls
stamina_costBase stamina cost for tearing actions
stamina_cost_wieldedStamina cost when wielded (if different from base)
tear_timeBase time required to tear a standard wall

Procs

InitializeInitialize the rip and tear component
get_stamina_costGet current stamina cost based on wield status
on_pre_attackHandle pre-attack validation for wall tearing
rip_and_tearExecute the wall tearing process
validate_targetValidate if target can be torn

Var Details

do_after_key

Unique key for do_after actions to prevent overlapping interactions

ignore_exhaustion

Whether to ignore stamina exhaustion checks

reinforced_multiplier

Multiplier for tear time on reinforced walls (null means cannot tear reinforced walls)

require_wielded

Whether the item must be wielded to tear walls

stamina_cost

Base stamina cost for tearing actions

stamina_cost_wielded

Stamina cost when wielded (if different from base)

tear_time

Base time required to tear a standard wall

Proc Details

Initialize

Initialize the rip and tear component

Sets up the component parameters for wall tearing behavior Arguments:

get_stamina_cost

Get current stamina cost based on wield status

Returns the appropriate stamina cost based on whether the item is wielded Returns: Stamina cost value

on_pre_attack

Handle pre-attack validation for wall tearing

Checks if the target is a valid wall for tearing and initiates the tearing process Returns: COMPONENT_CANCEL_ATTACK_CHAIN if tearing is initiated or invalid, otherwise NONE

rip_and_tear

Execute the wall tearing process

Handles the actual wall tearing sequence including do_after, stamina costs, and visual/audio feedback. Recursively continues tearing until wall is destroyed or interrupted.

validate_target

Validate if target can be torn

Checks various conditions for wall tearing validity Returns: WALL_TEAR_ALLOWED if valid, WALL_TEAR_INVALID if invalid but should continue chain, WALL_TEAR_CANCEL_CHAIN if invalid and should cancel attack chain