User Tools

Site Tools


mr:javelin_item

Javelin Item - Code References

Java Classes

JSON Configuration

This entity does not use JSON configuration (implemented in Java)

String Resources

<string name="Javelin_Name">javelin</string>
<string name="Javelin_Info">This length of metal is weighted to keep the spike at its tip foremost as it sails through the air towards its victim</string>
<string name="Javelin_Gender">neuter</string>

Lua Scripts

This entity is implemented in Java, no Lua script exists

Entity Kind

  • Entity Kind: javelin

Implementation Details

  • Class: `com.watabou.pixeldungeon.items.weapon.missiles.Javelin`
  • Extends: `MissileWeapon`
  • Package: `com.watabou.pixeldungeon.items.weapon.missiles`
  • Implementation Type: Pure Java (no Lua/JSON)

Constructor

  • Default constructor: `Javelin()` - Creates single javelin
  • Parameterized constructor: `Javelin(int number)` - Creates javelins with specified quantity
  • Sets image: `ItemSpriteSheet.JAVELIN`
  • Sets strength requirement: `setSTR(15)`
  • Sets damage range: `MIN = 2`, `MAX = 15`

Stats

  • Base Damage: 2-15 (MIN: 2, MAX: 15)
  • Strength Required: 15 (setSTR: 15)
  • Stackable: Yes, typically 5-15 quantity (Random.Int(5, 15))
  • Price: 15 gold per item (15 * quantity())

Special Abilities

  • Attack Proc: Applies Cripple status effect for Cripple.DURATION turns
  • Method: `attackProc(Char attacker, Char defender, int damage)`
  • Effect: `Buff.prolong(defender, Cripple.class, Cripple.DURATION)`

Random Generation

  • Method: `random()`
  • Quantity: Random between 5-15 javelins
  • Returns: Modified item instance

Price Calculation

  • Method: `price()`
  • Formula: 15 * quantity()
  • Example: Stack of 10 javelins = 150 gold

Code References

mr/javelin_item.txt · Last modified: by 127.0.0.1