Script WeaponComponents

Components

innateWeapon Allows the entity to attack using itself as a weapon
weapon Common component for weapon items
weaponCheckOriginCollision Suppresses any attacks originating from a tile with the wrong collision mask
weaponConsumeOnThrow Consume the weapon when it is thrown
weaponInflictConfusion Inflicts confusion to any entities hit by this weapon
weaponKnockback Causes the weapon to inflict knockback upon attacking
weaponMaterial Contains the primary material name (used for swipes)
weaponNoDamage Prevents this weapon from dealing any form of damage
weaponOverrideBeatDelay Overrides the beat delay of entities hit by this weapon
weaponParryOnAttack Causes the holder to parry incoming attacks after performing an attack with this weapon
weaponPattern Attack pattern for performing regular attacks
weaponRanged Attacks with this weapon use the ranged voice line
weaponReloadable Allows the weapon to be reloaded, performing a special attack in exchange for ammo
weaponScreenFlash
weaponShove
weaponThrowable Allows the weapon to be thrown, performing a special attack and dropping the weapon on the floor
weaponTickle Entities hit by this weapon will be "tickled", dropping their gold and counting as a "kill" for the attacker
weaponType Contains the weapon pattern type


Components

innateWeapon
Allows the entity to attack using itself as a weapon
weapon
Common component for weapon items
  • damage constant int (default 1)
  • damageType constant int (default damage.Type.PHYSICAL)
weaponCheckOriginCollision
Suppresses any attacks originating from a tile with the wrong collision mask
  • mask constant int (default collision.Group.WEAPON_CLEARANCE)
weaponConsumeOnThrow
Consume the weapon when it is thrown
weaponInflictConfusion
Inflicts confusion to any entities hit by this weapon
  • duration constant int (default 0)
weaponKnockback
Causes the weapon to inflict knockback upon attacking
  • distance constant int (default 1)
weaponMaterial
Contains the primary material name (used for swipes)
  • name constant string (default "")
  • component constant string (default "")
weaponNoDamage
Prevents this weapon from dealing any form of damage
weaponOverrideBeatDelay
Overrides the beat delay of entities hit by this weapon
  • delay constant int (default 0)
weaponParryOnAttack
Causes the holder to parry incoming attacks after performing an attack with this weapon
  • active bool (default false)
weaponPattern

Attack pattern for performing regular attacks default:

{}
  • pattern constant table
weaponRanged
Attacks with this weapon use the ranged voice line
weaponReloadable
Allows the weapon to be reloaded, performing a special attack in exchange for ammo
  • pattern

    constant table
    default:

    {}
    
  • maximumAmmo constant int (default 1)
  • ammoPerReload constant int (default 1)
  • ammo int (default 0)
  • slotImage constant string (default "ext/gui/hud_slot_reload.png")
weaponScreenFlash
weaponShove
weaponThrowable
Allows the weapon to be thrown, performing a special attack and dropping the weapon on the floor
  • pattern

    constant table
    default:

    {}
    
  • maxDistance constant int (default 100)
weaponTickle
Entities hit by this weapon will be "tickled", dropping their gold and counting as a "kill" for the attacker
weaponType
Contains the weapon pattern type
  • name constant string (default "")
  • component constant string (default "")
generated by LDoc 1.4.6