2 Commits

Author SHA1 Message Date
uberwald 888b08fc8d Various items fixes and enhancements 2025-12-03 11:06:24 +01:00
uberwald 58d9b10251 Fix skills and multiple maneuvers per weapons 2025-11-29 11:14:16 +01:00
12 changed files with 695 additions and 125 deletions
+138
View File
@@ -1550,6 +1550,96 @@ i.prismrpg {
.prismrpg .weapon-content label { .prismrpg .weapon-content label {
flex: 10%; flex: 10%;
} }
.prismrpg .weapon-content .weapon-passives legend {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.prismrpg .weapon-content .weapon-passives legend button {
padding: 2px 8px;
font-size: 12px;
}
.prismrpg .weapon-content .weapon-passives .passive-item {
margin-bottom: 16px;
padding: 12px;
border: 1px solid var(--color-border-light-primary);
border-radius: 4px;
background: rgba(0, 0, 0, 0.05);
}
.prismrpg .weapon-content .weapon-passives .passive-item:last-child {
margin-bottom: 0;
}
.prismrpg .weapon-content .weapon-passives .passive-header {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 8px;
}
.prismrpg .weapon-content .weapon-passives .passive-header input[type="text"] {
flex: 1;
}
.prismrpg .weapon-content .weapon-passives .passive-header button {
padding: 4px 8px;
font-size: 12px;
}
.prismrpg .weapon-content .weapon-passives .passive-header button[data-action="delete-passive"] {
color: var(--color-text-danger, #c00);
}
.prismrpg .weapon-content .weapon-passives .passive-header button[data-action="delete-passive"]:hover {
background: var(--color-bg-danger, rgba(200, 0, 0, 0.1));
}
.prismrpg .weapon-content .weapon-passives .hint {
font-style: italic;
color: var(--color-text-light-secondary);
text-align: center;
padding: 12px;
}
.prismrpg .weapon-content .weapon-maneuvers legend {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.prismrpg .weapon-content .weapon-maneuvers legend button {
padding: 2px 8px;
font-size: 12px;
}
.prismrpg .weapon-content .weapon-maneuvers .maneuver-item {
margin-bottom: 16px;
padding: 12px;
border: 1px solid var(--color-border-light-primary);
border-radius: 4px;
background: rgba(0, 0, 0, 0.05);
}
.prismrpg .weapon-content .weapon-maneuvers .maneuver-item:last-child {
margin-bottom: 0;
}
.prismrpg .weapon-content .weapon-maneuvers .maneuver-header {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 8px;
}
.prismrpg .weapon-content .weapon-maneuvers .maneuver-header input[type="text"] {
flex: 1;
}
.prismrpg .weapon-content .weapon-maneuvers .maneuver-header button {
padding: 4px 8px;
font-size: 12px;
}
.prismrpg .weapon-content .weapon-maneuvers .maneuver-header button[data-action="delete-maneuver"] {
color: var(--color-text-danger, #c00);
}
.prismrpg .weapon-content .weapon-maneuvers .maneuver-header button[data-action="delete-maneuver"]:hover {
background: var(--color-bg-danger, rgba(200, 0, 0, 0.1));
}
.prismrpg .weapon-content .weapon-maneuvers .hint {
font-style: italic;
color: var(--color-text-light-secondary);
text-align: center;
padding: 12px;
}
.prismrpg .armor-content { .prismrpg .armor-content {
font-family: var(--font-primary); font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
@@ -2004,6 +2094,54 @@ i.prismrpg {
.prismrpg .equipment-content label { .prismrpg .equipment-content label {
flex: 10%; flex: 10%;
} }
.prismrpg .equipment-content .kit-passive {
margin-bottom: 16px;
}
.prismrpg .equipment-content .special-activations legend {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.prismrpg .equipment-content .special-activations legend button {
padding: 2px 8px;
font-size: 12px;
}
.prismrpg .equipment-content .special-activations .activation-item {
margin-bottom: 16px;
padding: 12px;
border: 1px solid var(--color-border-light-primary);
border-radius: 4px;
background: rgba(0, 0, 0, 0.05);
}
.prismrpg .equipment-content .special-activations .activation-item:last-child {
margin-bottom: 0;
}
.prismrpg .equipment-content .special-activations .activation-header {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 8px;
}
.prismrpg .equipment-content .special-activations .activation-header input[type="text"] {
flex: 1;
}
.prismrpg .equipment-content .special-activations .activation-header button {
padding: 4px 8px;
font-size: 12px;
}
.prismrpg .equipment-content .special-activations .activation-header button[data-action="delete-special-activation"] {
color: var(--color-text-danger, #c00);
}
.prismrpg .equipment-content .special-activations .activation-header button[data-action="delete-special-activation"]:hover {
background: var(--color-bg-danger, rgba(200, 0, 0, 0.1));
}
.prismrpg .equipment-content .special-activations .hint {
font-style: italic;
color: var(--color-text-light-secondary);
text-align: center;
padding: 12px;
}
.prismrpg .shield-content { .prismrpg .shield-content {
font-family: var(--font-primary); font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
+47 -2
View File
@@ -60,6 +60,24 @@
} }
}, },
"Character": { "Character": {
"str": {
"label": "Strength"
},
"dex": {
"label": "Dexterity"
},
"con": {
"label": "Constitution"
},
"int": {
"label": "Intelligence"
},
"wis": {
"label": "Wisdom"
},
"cha": {
"label": "Charisma"
},
"FIELDS": { "FIELDS": {
"moneys": { "moneys": {
"tinbit": { "tinbit": {
@@ -282,6 +300,18 @@
}, },
"money": { "money": {
"label": "Money unit" "label": "Money unit"
},
"isKit": {
"label": "Is Kit?"
},
"passive": {
"label": "Passive Name"
},
"passiveDescription": {
"label": "Passive Description"
},
"specialActivations": {
"label": "Special Activations"
} }
} }
}, },
@@ -475,6 +505,7 @@
"encumbranceLoad": "Encumbrance Load", "encumbranceLoad": "Encumbrance Load",
"isHelmet": "Is Helmet?", "isHelmet": "Is Helmet?",
"equipped": "Equipped?", "equipped": "Equipped?",
"isImplement": "Is Implement?",
"armorPassive": "Armor Passive", "armorPassive": "Armor Passive",
"passiveName": "Passive Name", "passiveName": "Passive Name",
"passiveDescription": "Passive Description", "passiveDescription": "Passive Description",
@@ -499,11 +530,22 @@
"hands": "Hands Required", "hands": "Hands Required",
"groupPassive": "Weapon Group Passive", "groupPassive": "Weapon Group Passive",
"groupPassiveName": "Group Passive Name", "groupPassiveName": "Group Passive Name",
"weaponPassive": "Weapon Passive", "weaponPassives": "Weapon Passives",
"weaponManeuver": "Weapon Maneuver", "addPassive": "Add Passive",
"deletePassive": "Delete Passive",
"weaponManeuvers": "Weapon Maneuvers",
"addManeuver": "Add Maneuver",
"deleteManeuver": "Delete Maneuver",
"maneuverName": "Maneuver Name", "maneuverName": "Maneuver Name",
"maneuverDescription": "Maneuver Description", "maneuverDescription": "Maneuver Description",
"weaponAugment": "Weapon Augment", "weaponAugment": "Weapon Augment",
"isKit": "Is Kit?",
"kitPassive": "Kit Passive",
"specialActivations": "Special Activations",
"addSpecialActivation": "Add Special Activation",
"deleteSpecialActivation": "Delete Special Activation",
"activationName": "Activation Name",
"activationDescription": "Activation Description",
"shieldType": "Shield Type", "shieldType": "Shield Type",
"blockAPC": "Block APC", "blockAPC": "Block APC",
"shieldRating": "Shield Rating (SR)", "shieldRating": "Shield Rating (SR)",
@@ -666,6 +708,9 @@
"violet": "Violet" "violet": "Violet"
}, },
"Hint": { "Hint": {
"noPassives": "No passives defined. Click the + button to add one.",
"noSpecialActivations": "No special activations defined. Click the + button to add one.",
"noManeuvers": "No maneuvers defined. Click the + button to add one.",
"isCoreSkill": "Check this if this is your character's chosen Core Skill", "isCoreSkill": "Check this if this is your character's chosen Core Skill",
"attributeBonus": "Choose which attribute receives the +2 bonus", "attributeBonus": "Choose which attribute receives the +2 bonus",
"advancedChecks": "Only Core Skills allow advanced checks", "advancedChecks": "Only Core Skills allow advanced checks",
@@ -23,6 +23,48 @@ export default class PrismRPGEquipmentSheet extends PrismRPGItemSheet {
async _prepareContext() { async _prepareContext() {
const context = await super._prepareContext() const context = await super._prepareContext()
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }) context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
// Enrich passive description if equipment is a kit
if (this.document.system.isKit && this.document.system.passiveDescription) {
context.enrichedPassiveDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.passiveDescription, { async: true })
}
// Enrich descriptions for all special activations
context.enrichedSpecialActivations = await Promise.all(
this.document.system.specialActivations.map(async (activation) => ({
...activation,
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(activation.description, { async: true })
}))
)
return context return context
} }
/** @override */
_onRender(context, options) {
super._onRender(context, options)
// Add event listeners for special activation management
this.element.querySelectorAll('[data-action="add-special-activation"]').forEach(el => {
el.addEventListener("click", this._onAddSpecialActivation.bind(this))
})
this.element.querySelectorAll('[data-action="delete-special-activation"]').forEach(el => {
el.addEventListener("click", this._onDeleteSpecialActivation.bind(this))
})
}
async _onAddSpecialActivation(event) {
event.preventDefault()
const specialActivations = [...this.document.system.specialActivations]
specialActivations.push({ name: "", description: "" })
await this.document.update({ "system.specialActivations": specialActivations })
}
async _onDeleteSpecialActivation(event) {
event.preventDefault()
const index = parseInt(event.currentTarget.closest("[data-activation-index]").dataset.activationIndex)
const specialActivations = this.document.system.specialActivations.filter((_, i) => i !== index)
await this.document.update({ "system.specialActivations": specialActivations })
}
} }
+68 -2
View File
@@ -23,9 +23,75 @@ export default class PrismRPGWeaponSheet extends PrismRPGItemSheet {
async _prepareContext() { async _prepareContext() {
const context = await super._prepareContext() const context = await super._prepareContext()
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }) context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
context.enrichedPassiveDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.passiveDescription, { async: true })
context.enrichedManeuverDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.maneuverDescription, { async: true }) // Enrich descriptions for all passives
context.enrichedPassives = await Promise.all(
this.document.system.passives.map(async (passive) => ({
...passive,
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(passive.description, { async: true })
}))
)
// Enrich descriptions for all maneuvers
context.enrichedManeuvers = await Promise.all(
this.document.system.maneuvers.map(async (maneuver) => ({
...maneuver,
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(maneuver.description, { async: true })
}))
)
return context return context
} }
/** @override */
_onRender(context, options) {
super._onRender(context, options)
// Add event listeners for passive management
this.element.querySelectorAll('[data-action="add-passive"]').forEach(el => {
el.addEventListener("click", this._onAddPassive.bind(this))
})
this.element.querySelectorAll('[data-action="delete-passive"]').forEach(el => {
el.addEventListener("click", this._onDeletePassive.bind(this))
})
// Add event listeners for maneuver management
this.element.querySelectorAll('[data-action="add-maneuver"]').forEach(el => {
el.addEventListener("click", this._onAddManeuver.bind(this))
})
this.element.querySelectorAll('[data-action="delete-maneuver"]').forEach(el => {
el.addEventListener("click", this._onDeleteManeuver.bind(this))
})
}
async _onAddPassive(event) {
event.preventDefault()
const passives = [...this.document.system.passives]
passives.push({ name: "", description: "" })
await this.document.update({ "system.passives": passives })
}
async _onDeletePassive(event) {
event.preventDefault()
const index = parseInt(event.currentTarget.closest("[data-passive-index]").dataset.passiveIndex)
const passives = this.document.system.passives.filter((_, i) => i !== index)
await this.document.update({ "system.passives": passives })
}
async _onAddManeuver(event) {
event.preventDefault()
const maneuvers = [...this.document.system.maneuvers]
maneuvers.push({ name: "", description: "" })
await this.document.update({ "system.maneuvers": maneuvers })
}
async _onDeleteManeuver(event) {
event.preventDefault()
const index = parseInt(event.currentTarget.closest("[data-maneuver-index]").dataset.maneuverIndex)
const maneuvers = this.document.system.maneuvers.filter((_, i) => i !== index)
await this.document.update({ "system.maneuvers": maneuvers })
}
} }
+19 -63
View File
@@ -4,98 +4,80 @@
* - +5 bonus to basic skill checks * - +5 bonus to basic skill checks
* - Access to advanced skill checks * - Access to advanced skill checks
* - Access to a Core Skill Class (based on archetype) * - Access to a Core Skill Class (based on archetype)
* - +2 to one of 3 associated attributes * - +2 to one chosen attribute
*/ */
export const CORE_SKILLS = Object.freeze({ export const CORE_SKILLS = Object.freeze({
acrobatics: { acrobatics: {
id: "acrobatics", id: "acrobatics",
label: "PRISMRPG.Skill.CoreSkill.acrobatics", label: "PRISMRPG.Skill.CoreSkill.acrobatics"
attributeChoices: ["dex", "wis", "con"]
}, },
animalHandling: { animalHandling: {
id: "animalHandling", id: "animalHandling",
label: "PRISMRPG.Skill.CoreSkill.animalHandling", label: "PRISMRPG.Skill.CoreSkill.animalHandling"
attributeChoices: ["str", "con", "dex"]
}, },
arcana: { arcana: {
id: "arcana", id: "arcana",
label: "PRISMRPG.Skill.CoreSkill.arcana", label: "PRISMRPG.Skill.CoreSkill.arcana"
attributeChoices: ["str", "int", "wis"]
}, },
athletics: { athletics: {
id: "athletics", id: "athletics",
label: "PRISMRPG.Skill.CoreSkill.athletics", label: "PRISMRPG.Skill.CoreSkill.athletics"
attributeChoices: ["str", "dex", "con"]
}, },
deception: { deception: {
id: "deception", id: "deception",
label: "PRISMRPG.Skill.CoreSkill.deception", label: "PRISMRPG.Skill.CoreSkill.deception"
attributeChoices: ["int", "wis", "cha"]
}, },
history: { history: {
id: "history", id: "history",
label: "PRISMRPG.Skill.CoreSkill.history", label: "PRISMRPG.Skill.CoreSkill.history"
attributeChoices: ["str", "wis", "con"]
}, },
insight: { insight: {
id: "insight", id: "insight",
label: "PRISMRPG.Skill.CoreSkill.insight", label: "PRISMRPG.Skill.CoreSkill.insight"
attributeChoices: ["int", "cha", "wis"]
}, },
intimidate: { intimidate: {
id: "intimidate", id: "intimidate",
label: "PRISMRPG.Skill.CoreSkill.intimidate", label: "PRISMRPG.Skill.CoreSkill.intimidate"
attributeChoices: ["str", "cha", "wis"]
}, },
investigation: { investigation: {
id: "investigation", id: "investigation",
label: "PRISMRPG.Skill.CoreSkill.investigation", label: "PRISMRPG.Skill.CoreSkill.investigation"
attributeChoices: ["int", "wis", "con"]
}, },
medicine: { medicine: {
id: "medicine", id: "medicine",
label: "PRISMRPG.Skill.CoreSkill.medicine", label: "PRISMRPG.Skill.CoreSkill.medicine"
attributeChoices: ["con", "wis", "int"]
}, },
nature: { nature: {
id: "nature", id: "nature",
label: "PRISMRPG.Skill.CoreSkill.nature", label: "PRISMRPG.Skill.CoreSkill.nature"
attributeChoices: ["str", "wis", "int"]
}, },
perception: { perception: {
id: "perception", id: "perception",
label: "PRISMRPG.Skill.CoreSkill.perception", label: "PRISMRPG.Skill.CoreSkill.perception"
attributeChoices: ["dex", "wis", "cha"]
}, },
performance: { performance: {
id: "performance", id: "performance",
label: "PRISMRPG.Skill.CoreSkill.performance", label: "PRISMRPG.Skill.CoreSkill.performance"
attributeChoices: ["str", "cha", "wis"]
}, },
persuasion: { persuasion: {
id: "persuasion", id: "persuasion",
label: "PRISMRPG.Skill.CoreSkill.persuasion", label: "PRISMRPG.Skill.CoreSkill.persuasion"
attributeChoices: ["cha", "dex", "int"]
}, },
religion: { religion: {
id: "religion", id: "religion",
label: "PRISMRPG.Skill.CoreSkill.religion", label: "PRISMRPG.Skill.CoreSkill.religion"
attributeChoices: ["str", "wis", "cha"]
}, },
sleightOfHand: { sleightOfHand: {
id: "sleightOfHand", id: "sleightOfHand",
label: "PRISMRPG.Skill.CoreSkill.sleightOfHand", label: "PRISMRPG.Skill.CoreSkill.sleightOfHand"
attributeChoices: ["dex", "wis", "int"]
}, },
stealth: { stealth: {
id: "stealth", id: "stealth",
label: "PRISMRPG.Skill.CoreSkill.stealth", label: "PRISMRPG.Skill.CoreSkill.stealth"
attributeChoices: ["int", "dex", "cha"]
}, },
survival: { survival: {
id: "survival", id: "survival",
label: "PRISMRPG.Skill.CoreSkill.survival", label: "PRISMRPG.Skill.CoreSkill.survival"
attributeChoices: ["int", "con", "cha"]
} }
}); });
@@ -130,29 +112,3 @@ export const CORE_SKILL_BONUS = Object.freeze({
basic: 5, // +5 to basic skill checks basic: 5, // +5 to basic skill checks
attributeBonus: 2 // +2 to chosen attribute attributeBonus: 2 // +2 to chosen attribute
}); });
/**
* Legacy skill categories (may be deprecated)
*/
export const CATEGORY = Object.freeze({
layperson: {
id: "layperson",
label: "PRISMRPG.Skill.Category.layperson",
},
professional: {
id: "professional",
label: "PRISMRPG.Skill.Category.professional",
},
weapon: {
id: "weapon",
label: "PRISMRPG.Skill.Category.weapon",
},
armor: {
id: "armor",
label: "PRISMRPG.Skill.Category.armor",
},
resist: {
id: "resist",
label: "PRISMRPG.Skill.Category.resist",
}
})
+35
View File
@@ -13,6 +13,41 @@ export default class PrismRPGEquipment extends foundry.abstract.TypeDataModel {
schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY }) schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
// Kit properties
schema.isKit = new fields.BooleanField({
required: true,
initial: false,
label: "Is Kit"
})
// Kit passive (only applies when isKit is true)
schema.passive = new fields.StringField({
required: false,
initial: "",
label: "Passive Name"
})
schema.passiveDescription = new fields.HTMLField({
required: false,
initial: "",
label: "Passive Description"
})
// Special Activations (only applies when isKit is true)
schema.specialActivations = new fields.ArrayField(new fields.SchemaField({
name: new fields.StringField({
required: true,
initial: ""
}),
description: new fields.HTMLField({
required: true,
initial: ""
})
}), {
required: true,
initial: []
})
return schema return schema
} }
+24 -15
View File
@@ -54,26 +54,34 @@ export default class PrismRPGWeapon extends foundry.abstract.TypeDataModel {
initial: "" initial: ""
}) })
// Weapon-specific passive ability // Weapon-specific passive abilities
schema.passive = new fields.StringField({ schema.passives = new fields.ArrayField(new fields.SchemaField({
name: new fields.StringField({
required: true,
initial: ""
}),
description: new fields.HTMLField({
required: true,
initial: ""
})
}), {
required: true, required: true,
initial: "" initial: []
})
schema.passiveDescription = new fields.HTMLField({
required: true,
initial: ""
}) })
// Maneuver(s) available with this weapon // Maneuver(s) available with this weapon
schema.maneuver = new fields.StringField({ schema.maneuvers = new fields.ArrayField(new fields.SchemaField({
name: new fields.StringField({
required: true,
initial: ""
}),
description: new fields.HTMLField({
required: true,
initial: ""
})
}), {
required: true, required: true,
initial: "" initial: []
})
schema.maneuverDescription = new fields.HTMLField({
required: true,
initial: ""
}) })
// Augment effects (for equipment progression) // Augment effects (for equipment progression)
@@ -116,6 +124,7 @@ export default class PrismRPGWeapon extends foundry.abstract.TypeDataModel {
schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY }) schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
schema.equipped = new fields.BooleanField({ required: true, initial: false }) schema.equipped = new fields.BooleanField({ required: true, initial: false })
schema.isImplement = new fields.BooleanField({ required: true, initial: false })
return schema return schema
} }
+62 -1
View File
@@ -9,8 +9,69 @@
height: 50px; height: 50px;
} }
} }
label { label {
flex: 10%; flex: 10%;
} }
.kit-passive {
margin-bottom: 16px;
}
.special-activations {
legend {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
button {
padding: 2px 8px;
font-size: 12px;
}
}
.activation-item {
margin-bottom: 16px;
padding: 12px;
border: 1px solid var(--color-border-light-primary);
border-radius: 4px;
background: rgba(0, 0, 0, 0.05);
&:last-child {
margin-bottom: 0;
}
}
.activation-header {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 8px;
input[type="text"] {
flex: 1;
}
button {
padding: 4px 8px;
font-size: 12px;
&[data-action="delete-special-activation"] {
color: var(--color-text-danger, #c00);
&:hover {
background: var(--color-bg-danger, rgba(200, 0, 0, 0.1));
}
}
}
}
.hint {
font-style: italic;
color: var(--color-text-light-secondary);
text-align: center;
padding: 12px;
}
}
} }
+115 -1
View File
@@ -9,8 +9,122 @@
height: 50px; height: 50px;
} }
} }
label { label {
flex: 10%; flex: 10%;
} }
.weapon-passives {
legend {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
button {
padding: 2px 8px;
font-size: 12px;
}
}
.passive-item {
margin-bottom: 16px;
padding: 12px;
border: 1px solid var(--color-border-light-primary);
border-radius: 4px;
background: rgba(0, 0, 0, 0.05);
&:last-child {
margin-bottom: 0;
}
}
.passive-header {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 8px;
input[type="text"] {
flex: 1;
}
button {
padding: 4px 8px;
font-size: 12px;
&[data-action="delete-passive"] {
color: var(--color-text-danger, #c00);
&:hover {
background: var(--color-bg-danger, rgba(200, 0, 0, 0.1));
}
}
}
}
.hint {
font-style: italic;
color: var(--color-text-light-secondary);
text-align: center;
padding: 12px;
}
}
.weapon-maneuvers {
legend {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
button {
padding: 2px 8px;
font-size: 12px;
}
}
.maneuver-item {
margin-bottom: 16px;
padding: 12px;
border: 1px solid var(--color-border-light-primary);
border-radius: 4px;
background: rgba(0, 0, 0, 0.05);
&:last-child {
margin-bottom: 0;
}
}
.maneuver-header {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 8px;
input[type="text"] {
flex: 1;
}
button {
padding: 4px 8px;
font-size: 12px;
&[data-action="delete-maneuver"] {
color: var(--color-text-danger, #c00);
&:hover {
background: var(--color-bg-danger, rgba(200, 0, 0, 0.1));
}
}
}
}
.hint {
font-style: italic;
color: var(--color-text-light-secondary);
text-align: center;
padding: 12px;
}
}
} }
+61
View File
@@ -13,6 +13,67 @@
{{formField systemFields.cost value=system.cost localize=true}} {{formField systemFields.cost value=system.cost localize=true}}
{{formField systemFields.money value=system.money localize=true}} {{formField systemFields.money value=system.money localize=true}}
{{formField systemFields.isKit value=system.isKit localize=true label="PRISMRPG.Label.isKit"}}
{{#if system.isKit}}
{{! Kit Passive }}
<fieldset class="kit-passive">
<legend>{{localize "PRISMRPG.Label.kitPassive"}}</legend>
{{formField
systemFields.passive
value=system.passive
localize=true
label="PRISMRPG.Label.passiveName"
}}
<label>{{localize "PRISMRPG.Label.passiveDescription"}}</label>
{{formInput
systemFields.passiveDescription
enriched=enrichedPassiveDescription
value=system.passiveDescription
name="system.passiveDescription"
toggled=true
}}
</fieldset>
{{! Special Activations }}
<fieldset class="special-activations">
<legend>
{{localize "PRISMRPG.Label.specialActivations"}}
<button type="button" data-action="add-special-activation" data-tooltip="{{localize 'PRISMRPG.Label.addSpecialActivation'}}">
<i class="fas fa-plus"></i>
</button>
</legend>
{{#each enrichedSpecialActivations}}
<div class="activation-item" data-activation-index="{{@index}}">
<div class="activation-header">
{{formInput
../systemFields.specialActivations.element.fields.name
value=this.name
name=(concat "system.specialActivations." @index ".name")
placeholder=(localize "PRISMRPG.Label.activationName")
}}
<button type="button" data-action="delete-special-activation" data-tooltip="{{localize 'PRISMRPG.Label.deleteSpecialActivation'}}">
<i class="fas fa-trash"></i>
</button>
</div>
<label>{{localize "PRISMRPG.Label.activationDescription"}}</label>
{{formInput
../systemFields.specialActivations.element.fields.description
enriched=this.enrichedDescription
value=this.description
name=(concat "system.specialActivations." @index ".description")
toggled=true
}}
</div>
{{/each}}
{{#unless enrichedSpecialActivations.length}}
<p class="hint">{{localize "PRISMRPG.Hint.noSpecialActivations"}}</p>
{{/unless}}
</fieldset>
{{/if}}
<fieldset> <fieldset>
<legend>{{localize "PRISMRPG.Label.description"}}</legend> <legend>{{localize "PRISMRPG.Label.description"}}</legend>
{{formInput {{formInput
+5 -7
View File
@@ -17,13 +17,11 @@
<label>{{localize "PRISMRPG.Label.attributeBonusChoice"}}</label> <label>{{localize "PRISMRPG.Label.attributeBonusChoice"}}</label>
<select name="system.attributeBonus"> <select name="system.attributeBonus">
<option value="">{{localize "PRISMRPG.Label.selectAttribute"}}</option> <option value="">{{localize "PRISMRPG.Label.selectAttribute"}}</option>
{{#with (lookup config.CORE_SKILLS system.coreSkill)}} {{#each config.CHARACTERISTICS}}
{{#each attributeChoices}} <option value="{{@key}}" {{#if (eq ../system.attributeBonus @key)}}selected{{/if}}>
<option value="{{this}}" {{#if (eq ../../system.attributeBonus this)}}selected{{/if}}> {{localize this.label}}
{{localize (concat "PRISMRPG.Label." this)}} </option>
</option> {{/each}}
{{/each}}
{{/with}}
</select> </select>
<p class="hint">{{localize "PRISMRPG.Hint.attributeBonus"}}</p> <p class="hint">{{localize "PRISMRPG.Hint.attributeBonus"}}</p>
</div> </div>
+79 -34
View File
@@ -52,6 +52,13 @@
label="PRISMRPG.Label.equipped" label="PRISMRPG.Label.equipped"
}} }}
{{formField
systemFields.isImplement
value=system.isImplement
localize=true
label="PRISMRPG.Label.isImplement"
}}
</div> </div>
<div class="align-top"> <div class="align-top">
@@ -94,42 +101,80 @@
</div> </div>
</div> </div>
{{! Prism RPG: Weapon Passive }} {{! Prism RPG: Weapon Passives }}
<fieldset class="weapon-passive"> <fieldset class="weapon-passives">
<legend>{{localize "PRISMRPG.Label.weaponPassive"}}</legend> <legend>
{{formField {{localize "PRISMRPG.Label.weaponPassives"}}
systemFields.passive <button type="button" data-action="add-passive" data-tooltip="{{localize 'PRISMRPG.Label.addPassive'}}">
value=system.passive <i class="fas fa-plus"></i>
localize=true </button>
label="PRISMRPG.Label.passiveName" </legend>
}}
<label>{{localize "PRISMRPG.Label.passiveDescription"}}</label> {{#each enrichedPassives}}
{{formInput <div class="passive-item" data-passive-index="{{@index}}">
systemFields.passiveDescription <div class="passive-header">
enriched=enrichedPassiveDescription {{formInput
value=system.passiveDescription ../systemFields.passives.element.fields.name
name="system.passiveDescription" value=this.name
toggled=true name=(concat "system.passives." @index ".name")
}} placeholder=(localize "PRISMRPG.Label.passiveName")
}}
<button type="button" data-action="delete-passive" data-tooltip="{{localize 'PRISMRPG.Label.deletePassive'}}">
<i class="fas fa-trash"></i>
</button>
</div>
<label>{{localize "PRISMRPG.Label.passiveDescription"}}</label>
{{formInput
../systemFields.passives.element.fields.description
enriched=this.enrichedDescription
value=this.description
name=(concat "system.passives." @index ".description")
toggled=true
}}
</div>
{{/each}}
{{#unless enrichedPassives.length}}
<p class="hint">{{localize "PRISMRPG.Hint.noPassives"}}</p>
{{/unless}}
</fieldset> </fieldset>
{{! Prism RPG: Weapon Maneuver }} {{! Prism RPG: Weapon Maneuvers }}
<fieldset class="weapon-maneuver"> <fieldset class="weapon-maneuvers">
<legend>{{localize "PRISMRPG.Label.weaponManeuver"}}</legend> <legend>
{{formField {{localize "PRISMRPG.Label.weaponManeuvers"}}
systemFields.maneuver <button type="button" data-action="add-maneuver" data-tooltip="{{localize 'PRISMRPG.Label.addManeuver'}}">
value=system.maneuver <i class="fas fa-plus"></i>
localize=true </button>
label="PRISMRPG.Label.maneuverName" </legend>
}}
<label>{{localize "PRISMRPG.Label.maneuverDescription"}}</label> {{#each enrichedManeuvers}}
{{formInput <div class="maneuver-item" data-maneuver-index="{{@index}}">
systemFields.maneuverDescription <div class="maneuver-header">
enriched=enrichedManeuverDescription {{formInput
value=system.maneuverDescription ../systemFields.maneuvers.element.fields.name
name="system.maneuverDescription" value=this.name
toggled=true name=(concat "system.maneuvers." @index ".name")
}} placeholder=(localize "PRISMRPG.Label.maneuverName")
}}
<button type="button" data-action="delete-maneuver" data-tooltip="{{localize 'PRISMRPG.Label.deleteManeuver'}}">
<i class="fas fa-trash"></i>
</button>
</div>
<label>{{localize "PRISMRPG.Label.maneuverDescription"}}</label>
{{formInput
../systemFields.maneuvers.element.fields.description
enriched=this.enrichedDescription
value=this.description
name=(concat "system.maneuvers." @index ".description")
toggled=true
}}
</div>
{{/each}}
{{#unless enrichedManeuvers.length}}
<p class="hint">{{localize "PRISMRPG.Hint.noManeuvers"}}</p>
{{/unless}}
</fieldset> </fieldset>
<fieldset> <fieldset>