Neo-Tokyo Neon Noir design pour fiches items
- Nouvelle palette : #080c14 fond, accents néon par type (#00d4d4 item, #ff3d5a kungfu, #4a9eff spell, #cc44ff supernatural) - Nouveaux composants LESS : .cde-neon-header (clip-path angulaire + accent line), .cde-avatar (clip-path), .cde-stat-grid/.cde-stat-cell (style terminal), .cde-badge (parallélogramme), .cde-neon-tabs (underline néon animé), .cde-check-cell - Fix layout : .cde-sheet width: 100% + height: 100% + overflow: hidden, .cde-tab-body flex: 1 + min-height: 0, .cde-notes-editor flex stretch - Fix positions : DEFAULT_OPTIONS height explicite pour tous les types (item 620x580, spell 660x680, kungfu 720x680, supernatural 560x520) - 4 templates items reécrits avec nouvelles classes et structure épurée Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
46
src/data/actors/npc.js
Normal file
46
src/data/actors/npc.js
Normal file
@@ -0,0 +1,46 @@
|
||||
export default class NpcDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const { fields } = foundry.data
|
||||
const numberField = (initial = 0, extra = {}) => new fields.NumberField({ required: true, nullable: false, integer: true, initial, ...extra })
|
||||
const stringField = (initial = "") => new fields.StringField({ required: true, nullable: false, initial })
|
||||
const boolField = (initial = false) => new fields.BooleanField({ required: true, initial })
|
||||
const htmlField = (initial = "") => new fields.HTMLField({ required: true, nullable: false, initial, textSearch: true })
|
||||
|
||||
const aptitudeField = () =>
|
||||
new fields.SchemaField({
|
||||
value: numberField(0, { min: 0 }),
|
||||
speciality: stringField(""),
|
||||
})
|
||||
|
||||
const trackedField = () =>
|
||||
new fields.SchemaField({
|
||||
value: numberField(0, { min: 0 }),
|
||||
calcul: numberField(0, { min: 0 }),
|
||||
note: stringField(""),
|
||||
})
|
||||
|
||||
return {
|
||||
type: stringField(""),
|
||||
levelofthreat: numberField(0, { min: 0 }),
|
||||
powerofnuisance: numberField(0, { min: 0 }),
|
||||
initiative: numberField(1, { min: 0 }),
|
||||
anti_initiative: numberField(24, { min: 0 }),
|
||||
aptitudes: new fields.SchemaField({
|
||||
physical: aptitudeField(),
|
||||
martial: aptitudeField(),
|
||||
mental: aptitudeField(),
|
||||
social: aptitudeField(),
|
||||
spiritual: aptitudeField(),
|
||||
}),
|
||||
vitality: trackedField(),
|
||||
hei: trackedField(),
|
||||
description: htmlField(""),
|
||||
prefs: new fields.SchemaField({
|
||||
typeofthrow: new fields.SchemaField({
|
||||
check: boolField(false),
|
||||
choice: stringField("0"),
|
||||
}),
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user