projectiles
This commit is contained in:
@@ -124,7 +124,49 @@ public class DungeonItemDefinition
|
||||
// Stacking
|
||||
public bool Stackable { get; set; } = false;
|
||||
public int MaxStack { get; set; } = 1;
|
||||
|
||||
|
||||
// Projectile/Ranged Weapon Properties
|
||||
/// <summary>
|
||||
/// Whether this weapon requires ammunition to fire (bows, crossbows)
|
||||
/// Throwable weapons (knives, javelins) don't require ammo but consume themselves
|
||||
/// </summary>
|
||||
public bool RequiresAmmunition { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Type of ammunition required (e.g., "arrow", "bolt")
|
||||
/// Null for melee weapons and throwables
|
||||
/// </summary>
|
||||
[MaxLength(32)]
|
||||
public string? AmmunitionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Projectile speed in pixels per second (0 = melee weapon)
|
||||
/// </summary>
|
||||
public float ProjectileSpeed { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Max range in pixels before projectile expires (0 = melee weapon)
|
||||
/// </summary>
|
||||
public int ProjectileRange { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Chance (0.0 to 1.0) to recover this ammunition after hitting a target
|
||||
/// 0.05 = 5%, 0.20 = 20%, etc.
|
||||
/// Only applies to ammunition items
|
||||
/// </summary>
|
||||
public float ArrowRecoveryChance { get; set; } = 0.05f;
|
||||
|
||||
/// <summary>
|
||||
/// For quiver containers: number of ammo slots available
|
||||
/// 0 = not a container
|
||||
/// </summary>
|
||||
public int QuiverCapacity { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this item is throwable (consumes from inventory)
|
||||
/// </summary>
|
||||
public bool IsThrowable { get; set; } = false;
|
||||
|
||||
// Visuals
|
||||
/// <summary>
|
||||
/// Path to the item's sprite image on CDN (e.g., "textures/items/sword_iron.png")
|
||||
|
||||
Reference in New Issue
Block a user