Files
fvtt-prism-rpg/module/config/weapon.mjs
T
2025-11-06 00:01:59 +01:00

136 lines
4.2 KiB
JavaScript

/**
* Weapon types based on Prism RPG rules
* APC determines weapon class: Light (1 APC), One-Handed (2 APC), Heavy (3 APC)
*/
export const TYPE = Object.freeze({
light: {
id: "light",
label: "PRISMRPG.Weapon.Type.light",
apc: 1,
hands: 1
},
oneHanded: {
id: "oneHanded",
label: "PRISMRPG.Weapon.Type.oneHanded",
apc: 2,
hands: 1
},
heavy: {
id: "heavy",
label: "PRISMRPG.Weapon.Type.heavy",
apc: 3,
hands: 2
},
projectile: {
id: "projectile",
label: "PRISMRPG.Weapon.Type.projectile",
apc: 0, // Variable based on specific weapon
hands: 2
}
});
/**
* Weapon groups and their associated passives
* Each weapon belongs to a group and possesses its passive while wielded
*/
export const WEAPON_GROUP = Object.freeze({
longsword: {
id: "longsword",
label: "PRISMRPG.Weapon.WeaponGroup.longsword",
passive: "turningEdge",
passiveLabel: "PRISMRPG.Weapon.Passive.turningEdge",
passiveDescription: "PRISMRPG.Weapon.PassiveDescription.turningEdge"
},
warhammer: {
id: "warhammer",
label: "PRISMRPG.Weapon.WeaponGroup.warhammer",
passive: "puncturingBlows",
passiveLabel: "PRISMRPG.Weapon.Passive.puncturingBlows",
passiveDescription: "PRISMRPG.Weapon.PassiveDescription.puncturingBlows"
},
battleaxe: {
id: "battleaxe",
label: "PRISMRPG.Weapon.WeaponGroup.battleaxe",
passive: "shieldEater",
passiveLabel: "PRISMRPG.Weapon.Passive.shieldEater",
passiveDescription: "PRISMRPG.Weapon.PassiveDescription.shieldEater"
},
dagger: {
id: "dagger",
label: "PRISMRPG.Weapon.WeaponGroup.dagger",
passive: "balancingStance",
passiveLabel: "PRISMRPG.Weapon.Passive.balancingStance",
passiveDescription: "PRISMRPG.Weapon.PassiveDescription.balancingStance"
},
crossbow: {
id: "crossbow",
label: "PRISMRPG.Weapon.WeaponGroup.crossbow",
passive: "boltlock",
passiveLabel: "PRISMRPG.Weapon.Passive.boltlock",
passiveDescription: "PRISMRPG.Weapon.PassiveDescription.boltlock"
},
longbow: {
id: "longbow",
label: "PRISMRPG.Weapon.WeaponGroup.longbow",
passive: "volleyFire",
passiveLabel: "PRISMRPG.Weapon.Passive.volleyFire",
passiveDescription: "PRISMRPG.Weapon.PassiveDescription.volleyFire"
}
});
/**
* Damage types for weapons
*/
export const DAMAGE_TYPE = Object.freeze({
piercing: {
id: "piercing",
label: "PRISMRPG.Weapon.DamageType.piercing",
abbreviation: "P"
},
bludgeoning: {
id: "bludgeoning",
label: "PRISMRPG.Weapon.DamageType.bludgeoning",
abbreviation: "B"
},
slashing: {
id: "slashing",
label: "PRISMRPG.Weapon.DamageType.slashing",
abbreviation: "S"
}
});
// Legacy exports for backward compatibility (to be removed later)
export const WEAPON_TYPE = {
"melee": "PRISMRPG.Weapon.WeaponType.melee",
"ranged": "PRISMRPG.Weapon.WeaponType.ranged"
}
export const WEAPON_CLASS = {
"longblade": "PRISMRPG.Weapon.WeaponClass.longblade",
"shortblade": "PRISMRPG.Weapon.WeaponClass.shortblade",
"mediumblade": "PRISMRPG.Weapon.WeaponClass.mediumblade",
"axe": "PRISMRPG.Weapon.WeaponClass.axe",
"hammer": "PRISMRPG.Weapon.WeaponClass.hammer",
"mace": "PRISMRPG.Weapon.WeaponClass.mace",
"flail": "PRISMRPG.Weapon.WeaponClass.flail",
"bow": "PRISMRPG.Weapon.WeaponClass.bow",
"sling": "PRISMRPG.Weapon.WeaponClass.sling",
"thrown": "PRISMRPG.Weapon.WeaponClass.thrown",
"polearm": "PRISMRPG.Weapon.WeaponClass.polearm",
"unarmed": "PRISMRPG.Weapon.WeaponClass.unarmed"
}
export const WEAPON_CATEGORIES = {
"longblade": ["mediumblade", "shortblade"],
"shortblade": ["mediumblade", "longblade"],
"mediumblade": ["shortblade", "longblade"],
"axe": ["hammer", "mace", "flail", "bow", "sling", "thrown", "polearm"],
"hammer": ["axe", "mace", "flail", "bow", "sling", "thrown", "polearm"],
"mace": ["axe", "hammer", "flail", "bow", "sling", "thrown", "polearm"],
"flail": ["axe", "hammer", "mace", "bow", "sling", "thrown", "polearm"],
"bow": ["axe", "hammer", "mace", "flail", "sling", "thrown", "polearm"],
"sling": ["axe", "hammer", "mace", "flail", "bow", "thrown", "polearm"],
"thrown": ["axe", "hammer", "mace", "flail", "bow", "sling", "polearm"],
"polearm": ["axe", "hammer", "mace", "flail", "bow", "sling", "thrown"]
}