User Tools

Site Tools


mr:bow_class

Bow Class - Machine Readable Reference

Description

The Bow abstract class (`com.nyrds.pixeldungeon.items.guts.weapon.ranged.Bow`) serves as the base class for all bow weapons in the guts package. It extends `KindOfBow` and provides a common constructor for bow tiers, accuracy, and delay.

Entity Information

  • Entity Kind: Bow (abstract class)
  • Type: Weapon Base Class (Ranged)
  • Package: com.nyrds.pixeldungeon.items.guts.weapon.ranged
  • Category: Ranged Weapons Base

Java Classes

JSON Configuration

  • No direct JSON configuration for this abstract class; concrete bows (CompoundBow, WoodenBow, RubyBow, etc.) are configured in their respective classes
  • SpidersTreasury.json - Contains drop rates for concrete bows
  • Treasury.json - Contains drop rates for concrete bows

String Resources

<!-- English -->
<string name="Bow_Info1">This bow requires arrows to be used.</string>
<string name="KindOfBow_SelectArrowKind">Select arrow kind</string>
 
<!-- Russian -->
<string name="Bow_Info1">Этот лук требует стрел для использования.</string>
<string name="KindOfBow_SelectArrowKind">Выберите вид стрел</string>

Properties

// Bow.java constructor
public Bow(int tier, float acu, float dly) {
    super(tier, acu, dly);
    animation_class = BOW_ATTACK;
}
 
// Inherited from KindOfBow:
// tier - Weapon tier (affects damage, STR requirement)
// acu - Base accuracy (e.g., 0.8f for Compound Bow)
// dly - Base attack delay (e.g., 1.5f for Compound Bow)
// arrowType - Type of arrow used (default: "Arrow")
// acuFactor() - Accuracy multiplier (default: 1)
// dmgFactor() - Damage multiplier (default: 1, overridden by subclasses)
// dlyFactor() - Delay multiplier (default: 1, overridden by subclasses)

Concrete Implementations

Modding Considerations

  • Extend this class for custom bow types in the guts package
  • Override `acuFactor()`, `dmgFactor()`, `dlyFactor()` for custom scaling
  • Compatible with standard arrow mechanics
  • Uses `BOW_ATTACK` animation class
  • Requires arrows to function (handled by KindOfBow)
  • KindOfBow - Parent class with arrow management
  • MeleeWeapon - Grandparent class with tier-based damage
  • Arrow - Ammunition base class
  • Compound Bow - Concrete implementation
  • Ranged Weapons Category

Implementation Notes

  • Abstract class - cannot be instantiated directly
  • Provides guts-package alternative to standard bow hierarchy
  • Sets animation_class to BOW_ATTACK for proper rendering
  • Delegates arrow selection/management to KindOfBow
  • Damage calculation follows MeleeWeapon tier formula modified by dmgFactor()
mr/bow_class.txt · Last modified: by 127.0.0.1