Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 888b08fc8d | |||
| 58d9b10251 |
@@ -1550,6 +1550,96 @@ i.prismrpg {
|
||||
.prismrpg .weapon-content label {
|
||||
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 {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
@@ -2004,6 +2094,54 @@ i.prismrpg {
|
||||
.prismrpg .equipment-content label {
|
||||
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 {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
|
||||
+47
-2
@@ -60,6 +60,24 @@
|
||||
}
|
||||
},
|
||||
"Character": {
|
||||
"str": {
|
||||
"label": "Strength"
|
||||
},
|
||||
"dex": {
|
||||
"label": "Dexterity"
|
||||
},
|
||||
"con": {
|
||||
"label": "Constitution"
|
||||
},
|
||||
"int": {
|
||||
"label": "Intelligence"
|
||||
},
|
||||
"wis": {
|
||||
"label": "Wisdom"
|
||||
},
|
||||
"cha": {
|
||||
"label": "Charisma"
|
||||
},
|
||||
"FIELDS": {
|
||||
"moneys": {
|
||||
"tinbit": {
|
||||
@@ -282,6 +300,18 @@
|
||||
},
|
||||
"money": {
|
||||
"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",
|
||||
"isHelmet": "Is Helmet?",
|
||||
"equipped": "Equipped?",
|
||||
"isImplement": "Is Implement?",
|
||||
"armorPassive": "Armor Passive",
|
||||
"passiveName": "Passive Name",
|
||||
"passiveDescription": "Passive Description",
|
||||
@@ -499,11 +530,22 @@
|
||||
"hands": "Hands Required",
|
||||
"groupPassive": "Weapon Group Passive",
|
||||
"groupPassiveName": "Group Passive Name",
|
||||
"weaponPassive": "Weapon Passive",
|
||||
"weaponManeuver": "Weapon Maneuver",
|
||||
"weaponPassives": "Weapon Passives",
|
||||
"addPassive": "Add Passive",
|
||||
"deletePassive": "Delete Passive",
|
||||
"weaponManeuvers": "Weapon Maneuvers",
|
||||
"addManeuver": "Add Maneuver",
|
||||
"deleteManeuver": "Delete Maneuver",
|
||||
"maneuverName": "Maneuver Name",
|
||||
"maneuverDescription": "Maneuver Description",
|
||||
"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",
|
||||
"blockAPC": "Block APC",
|
||||
"shieldRating": "Shield Rating (SR)",
|
||||
@@ -666,6 +708,9 @@
|
||||
"violet": "Violet"
|
||||
},
|
||||
"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",
|
||||
"attributeBonus": "Choose which attribute receives the +2 bonus",
|
||||
"advancedChecks": "Only Core Skills allow advanced checks",
|
||||
|
||||
@@ -23,6 +23,48 @@ export default class PrismRPGEquipmentSheet extends PrismRPGItemSheet {
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
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
|
||||
}
|
||||
|
||||
/** @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 })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,75 @@ export default class PrismRPGWeaponSheet extends PrismRPGItemSheet {
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
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
|
||||
}
|
||||
|
||||
/** @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
@@ -4,98 +4,80 @@
|
||||
* - +5 bonus to basic skill checks
|
||||
* - Access to advanced skill checks
|
||||
* - 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({
|
||||
acrobatics: {
|
||||
id: "acrobatics",
|
||||
label: "PRISMRPG.Skill.CoreSkill.acrobatics",
|
||||
attributeChoices: ["dex", "wis", "con"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.acrobatics"
|
||||
},
|
||||
animalHandling: {
|
||||
id: "animalHandling",
|
||||
label: "PRISMRPG.Skill.CoreSkill.animalHandling",
|
||||
attributeChoices: ["str", "con", "dex"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.animalHandling"
|
||||
},
|
||||
arcana: {
|
||||
id: "arcana",
|
||||
label: "PRISMRPG.Skill.CoreSkill.arcana",
|
||||
attributeChoices: ["str", "int", "wis"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.arcana"
|
||||
},
|
||||
athletics: {
|
||||
id: "athletics",
|
||||
label: "PRISMRPG.Skill.CoreSkill.athletics",
|
||||
attributeChoices: ["str", "dex", "con"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.athletics"
|
||||
},
|
||||
deception: {
|
||||
id: "deception",
|
||||
label: "PRISMRPG.Skill.CoreSkill.deception",
|
||||
attributeChoices: ["int", "wis", "cha"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.deception"
|
||||
},
|
||||
history: {
|
||||
id: "history",
|
||||
label: "PRISMRPG.Skill.CoreSkill.history",
|
||||
attributeChoices: ["str", "wis", "con"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.history"
|
||||
},
|
||||
insight: {
|
||||
id: "insight",
|
||||
label: "PRISMRPG.Skill.CoreSkill.insight",
|
||||
attributeChoices: ["int", "cha", "wis"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.insight"
|
||||
},
|
||||
intimidate: {
|
||||
id: "intimidate",
|
||||
label: "PRISMRPG.Skill.CoreSkill.intimidate",
|
||||
attributeChoices: ["str", "cha", "wis"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.intimidate"
|
||||
},
|
||||
investigation: {
|
||||
id: "investigation",
|
||||
label: "PRISMRPG.Skill.CoreSkill.investigation",
|
||||
attributeChoices: ["int", "wis", "con"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.investigation"
|
||||
},
|
||||
medicine: {
|
||||
id: "medicine",
|
||||
label: "PRISMRPG.Skill.CoreSkill.medicine",
|
||||
attributeChoices: ["con", "wis", "int"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.medicine"
|
||||
},
|
||||
nature: {
|
||||
id: "nature",
|
||||
label: "PRISMRPG.Skill.CoreSkill.nature",
|
||||
attributeChoices: ["str", "wis", "int"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.nature"
|
||||
},
|
||||
perception: {
|
||||
id: "perception",
|
||||
label: "PRISMRPG.Skill.CoreSkill.perception",
|
||||
attributeChoices: ["dex", "wis", "cha"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.perception"
|
||||
},
|
||||
performance: {
|
||||
id: "performance",
|
||||
label: "PRISMRPG.Skill.CoreSkill.performance",
|
||||
attributeChoices: ["str", "cha", "wis"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.performance"
|
||||
},
|
||||
persuasion: {
|
||||
id: "persuasion",
|
||||
label: "PRISMRPG.Skill.CoreSkill.persuasion",
|
||||
attributeChoices: ["cha", "dex", "int"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.persuasion"
|
||||
},
|
||||
religion: {
|
||||
id: "religion",
|
||||
label: "PRISMRPG.Skill.CoreSkill.religion",
|
||||
attributeChoices: ["str", "wis", "cha"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.religion"
|
||||
},
|
||||
sleightOfHand: {
|
||||
id: "sleightOfHand",
|
||||
label: "PRISMRPG.Skill.CoreSkill.sleightOfHand",
|
||||
attributeChoices: ["dex", "wis", "int"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.sleightOfHand"
|
||||
},
|
||||
stealth: {
|
||||
id: "stealth",
|
||||
label: "PRISMRPG.Skill.CoreSkill.stealth",
|
||||
attributeChoices: ["int", "dex", "cha"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.stealth"
|
||||
},
|
||||
survival: {
|
||||
id: "survival",
|
||||
label: "PRISMRPG.Skill.CoreSkill.survival",
|
||||
attributeChoices: ["int", "con", "cha"]
|
||||
label: "PRISMRPG.Skill.CoreSkill.survival"
|
||||
}
|
||||
});
|
||||
|
||||
@@ -130,29 +112,3 @@ export const CORE_SKILL_BONUS = Object.freeze({
|
||||
basic: 5, // +5 to basic skill checks
|
||||
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",
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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.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
|
||||
}
|
||||
|
||||
|
||||
+24
-15
@@ -54,26 +54,34 @@ export default class PrismRPGWeapon extends foundry.abstract.TypeDataModel {
|
||||
initial: ""
|
||||
})
|
||||
|
||||
// Weapon-specific passive ability
|
||||
schema.passive = new fields.StringField({
|
||||
// Weapon-specific passive abilities
|
||||
schema.passives = new fields.ArrayField(new fields.SchemaField({
|
||||
name: new fields.StringField({
|
||||
required: true,
|
||||
initial: ""
|
||||
}),
|
||||
description: new fields.HTMLField({
|
||||
required: true,
|
||||
initial: ""
|
||||
})
|
||||
}), {
|
||||
required: true,
|
||||
initial: ""
|
||||
})
|
||||
|
||||
schema.passiveDescription = new fields.HTMLField({
|
||||
required: true,
|
||||
initial: ""
|
||||
initial: []
|
||||
})
|
||||
|
||||
// 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,
|
||||
initial: ""
|
||||
})
|
||||
|
||||
schema.maneuverDescription = new fields.HTMLField({
|
||||
required: true,
|
||||
initial: ""
|
||||
initial: []
|
||||
})
|
||||
|
||||
// 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.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
|
||||
schema.equipped = new fields.BooleanField({ required: true, initial: false })
|
||||
schema.isImplement = new fields.BooleanField({ required: true, initial: false })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
+62
-1
@@ -9,8 +9,69 @@
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
label {
|
||||
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
@@ -9,8 +9,122 @@
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
label {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,67 @@
|
||||
{{formField systemFields.cost value=system.cost 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>
|
||||
<legend>{{localize "PRISMRPG.Label.description"}}</legend>
|
||||
{{formInput
|
||||
|
||||
+5
-7
@@ -17,13 +17,11 @@
|
||||
<label>{{localize "PRISMRPG.Label.attributeBonusChoice"}}</label>
|
||||
<select name="system.attributeBonus">
|
||||
<option value="">{{localize "PRISMRPG.Label.selectAttribute"}}</option>
|
||||
{{#with (lookup config.CORE_SKILLS system.coreSkill)}}
|
||||
{{#each attributeChoices}}
|
||||
<option value="{{this}}" {{#if (eq ../../system.attributeBonus this)}}selected{{/if}}>
|
||||
{{localize (concat "PRISMRPG.Label." this)}}
|
||||
</option>
|
||||
{{/each}}
|
||||
{{/with}}
|
||||
{{#each config.CHARACTERISTICS}}
|
||||
<option value="{{@key}}" {{#if (eq ../system.attributeBonus @key)}}selected{{/if}}>
|
||||
{{localize this.label}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<p class="hint">{{localize "PRISMRPG.Hint.attributeBonus"}}</p>
|
||||
</div>
|
||||
|
||||
+79
-34
@@ -52,6 +52,13 @@
|
||||
label="PRISMRPG.Label.equipped"
|
||||
}}
|
||||
|
||||
{{formField
|
||||
systemFields.isImplement
|
||||
value=system.isImplement
|
||||
localize=true
|
||||
label="PRISMRPG.Label.isImplement"
|
||||
}}
|
||||
|
||||
</div>
|
||||
<div class="align-top">
|
||||
|
||||
@@ -94,42 +101,80 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{! Prism RPG: Weapon Passive }}
|
||||
<fieldset class="weapon-passive">
|
||||
<legend>{{localize "PRISMRPG.Label.weaponPassive"}}</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
|
||||
}}
|
||||
{{! Prism RPG: Weapon Passives }}
|
||||
<fieldset class="weapon-passives">
|
||||
<legend>
|
||||
{{localize "PRISMRPG.Label.weaponPassives"}}
|
||||
<button type="button" data-action="add-passive" data-tooltip="{{localize 'PRISMRPG.Label.addPassive'}}">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</legend>
|
||||
|
||||
{{#each enrichedPassives}}
|
||||
<div class="passive-item" data-passive-index="{{@index}}">
|
||||
<div class="passive-header">
|
||||
{{formInput
|
||||
../systemFields.passives.element.fields.name
|
||||
value=this.name
|
||||
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>
|
||||
|
||||
{{! Prism RPG: Weapon Maneuver }}
|
||||
<fieldset class="weapon-maneuver">
|
||||
<legend>{{localize "PRISMRPG.Label.weaponManeuver"}}</legend>
|
||||
{{formField
|
||||
systemFields.maneuver
|
||||
value=system.maneuver
|
||||
localize=true
|
||||
label="PRISMRPG.Label.maneuverName"
|
||||
}}
|
||||
<label>{{localize "PRISMRPG.Label.maneuverDescription"}}</label>
|
||||
{{formInput
|
||||
systemFields.maneuverDescription
|
||||
enriched=enrichedManeuverDescription
|
||||
value=system.maneuverDescription
|
||||
name="system.maneuverDescription"
|
||||
toggled=true
|
||||
}}
|
||||
{{! Prism RPG: Weapon Maneuvers }}
|
||||
<fieldset class="weapon-maneuvers">
|
||||
<legend>
|
||||
{{localize "PRISMRPG.Label.weaponManeuvers"}}
|
||||
<button type="button" data-action="add-maneuver" data-tooltip="{{localize 'PRISMRPG.Label.addManeuver'}}">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</legend>
|
||||
|
||||
{{#each enrichedManeuvers}}
|
||||
<div class="maneuver-item" data-maneuver-index="{{@index}}">
|
||||
<div class="maneuver-header">
|
||||
{{formInput
|
||||
../systemFields.maneuvers.element.fields.name
|
||||
value=this.name
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user