Feat: Add sous-type field to Creature sheets (Créature, Démon, Automata)

- Add soustype field to CreatureDataModel
- Add optionsSousTypeCreature to config with localization support
- Add sous-type select dropdown to creature-sheet.hbs header
- Add translation keys to fr.json

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-07 21:42:59 +02:00
parent cb4b255b35
commit 494ec3ea84
4 changed files with 16 additions and 1 deletions
+2
View File
@@ -59,6 +59,8 @@
"duration": "Durée",
"details": "Détails",
"description": "Description",
"demon": "Démon",
"automata": "Automata",
"elementaires": "Élémentaires",
"elementslords": "Seigneurs des Éléments",
"equipment": "Equipement",
+2 -1
View File
@@ -109,7 +109,8 @@ export default class CreatureDataModel extends foundry.abstract.TypeDataModel {
// Spécifique aux créatures
ressources: new fields.SchemaField({
value: new fields.NumberField({ initial: 0, integer: true })
})
}),
soustype: new fields.StringField({ initial: "" })
};
}
}
+6
View File
@@ -119,6 +119,12 @@ export const MOURNBLADECYD2_CONFIG = {
{ key: "personnage", label: "Personnage" },
{ key: "traitespece", label: "Trait d'espèce" }
],
optionsSousTypeCreature: [
{ key: "", label: localizeOrFallback("MNBL.none", "Aucun") },
{ key: "creature", label: localizeOrFallback("MNBL.creature", "Créature") },
{ key: "demon", label: localizeOrFallback("MNBL.demon", "Démon") },
{ key: "automata", label: localizeOrFallback("MNBL.automata", "Automata") }
],
// Configuration des ActiveEffects
effectTypes: {
+6
View File
@@ -6,6 +6,12 @@
<div class="header-banner">
<img class="profile-img" src="{{actor.img}}" data-action="editImage" title="{{actor.name}}" />
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Nom de la créature" /></h1>
<div class="header-subtitle">
<label>Sous-type: </label>
<select name="system.soustype">
{{selectOptions config.optionsSousTypeCreature selected=system.soustype valueAttr="key" nameAttr="key" labelAttr="label"}}
</select>
</div>
</div>
<div class="header-stat-cards">