User Tools

Site Tools


mr:boomerang_item

Boomerang Item

Boomerang

Java Classes

JSON Configuration

String Resources (All Languages)

Lua Scripts

This entity is implemented in Java, no Lua script exists

Key Methods

  • `attackProc(Char attacker, Char defender, int damage)` - On hit, calls `circleBack()` if the boomerang is the hero's ranged weapon
  • `miss(int cell, Char thrower, Char enemy)` - On miss, also calls `circleBack()`
  • `circleBack(int from, Char owner)` - Animates the boomerang back to the owner via `MissileSprite`, restores it to the originating inventory slot and quickslot
  • `cast(Char user, int dst)` - Records `throwSlot` so `circleBack` can restore the original slot
  • `upgrade()` / `upgrade(boolean enchant)` / `degrade()` - Each upgrade adds +1 MIN, +2 MAX; `degrade()` subtracts 1 MIN and 2 MAX
  • `isFliesStraight()` - Returns false (boomerang returns in an arc)
  • `isFliesFastRotating()` - Returns true
  • `isUpgradable()` - Returns true
  • `enchant(Enchantment ench)` - Re-rolls if the chosen enchant is `Piercing` or `Swing` (to prevent infinite loops)
  • `time2equipBase()` - Returns 0
  • `price()` - Returns 100
mr/boomerang_item.txt · Last modified: by 127.0.0.1