fix: Correct critical bugs and complete Creature/Group DataModel implementation

- Fix TypeError: controls.find is not a function in hooks.mjs
- Fix undefined 'npc' variable in applications.mjs
- Fix CONFIG.VERMINE.model undefined by checking game.system.template existence
- Fix TypeError: html.find(...).forEach is not a function in roll.mjs
- Fix Cannot set properties of undefined (setting 'initial') in actor.mjs
- Fix Cannot read properties of undefined (reading 'difficulty') in actor.mjs
- Fix ActiveEffect application phase 'initial' already completed by adding combatStatus to base template
- Fix Missing helper: 'select' in roll-dialog.hbs (removed invalid Handlebars select block)
- Add SIZE_LEVELS labels to creatureSizeLevels config
- Add SIZE_LEVELS translations to fr.json
- Add combatStatus to base actor template
- Convert all .html templates to .hbs for Foundry v14 compatibility
- Update item-sheet.mjs to use .hbs extension
- Update handlebars-manager.mjs to use .hbs for all partials

Complete Vermine2047 Creature and Group sheet implementation:
- Creature: Pattern, Size, Role, Pack with computed values
- Group: Totem, Reserve, Morale, Objectives, Members management
- All templates functional with proper styling

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-04 20:58:22 +02:00
parent f9f07cbc7e
commit 30d6f71fc7
43 changed files with 19225 additions and 609 deletions
+74 -3
View File
@@ -179,9 +179,9 @@ VERMINE.creaturePatternLevels = {
* Creature Size Levels configuration
*/
VERMINE.creatureSizeLevels = {
1: { "attack": 2, "vigor": 1, "minorWound": 0, "majorWound": 0, "deadlyWound": 1 },
2: { "attack": 3, "vigor": 2, "minorWound": 0, "majorWound": 1, "deadlyWound": 1 },
3: { "attack": 4, "vigor": 3, "minorWound": 1, "majorWound": 1, "deadlyWound": 1 }
1: { "label": "SIZE_LEVELS.small", "attack": 2, "vigor": 1, "minorWound": 0, "majorWound": 0, "deadlyWound": 1 },
2: { "label": "SIZE_LEVELS.medium", "attack": 3, "vigor": 2, "minorWound": 0, "majorWound": 1, "deadlyWound": 1 },
3: { "label": "SIZE_LEVELS.large", "attack": 4, "vigor": 3, "minorWound": 1, "majorWound": 1, "deadlyWound": 1 }
}
/**
@@ -394,3 +394,74 @@ VERMINE.combatStatus = {
passif: 9
}
/**
* Group Morale Levels configuration
* Rules: p. 68-69 - Group Reserve and Morale
*/
VERMINE.groupMoraleLevels = {
"high": {
"label": "VERMINE.morale_high",
"description": "7D+ - Moral élevé, groupe déterminé",
"minDice": 7
},
"normal": {
"label": "VERMINE.morale_normal",
"description": "3-6D - Moral normal",
"minDice": 3,
"maxDice": 6
},
"low": {
"label": "VERMINE.morale_low",
"description": "1-2D - Moral bas, groupe hésitant",
"minDice": 1,
"maxDice": 2
},
"crisis": {
"label": "VERMINE.morale_crisis",
"description": "0D - Crise, groupe au bord de l'effondrement",
"minDice": 0,
"maxDice": 0
}
}
/**
* Group Reserve configuration
* The reserve is shared among all group members and can be used with vote
*/
VERMINE.groupReserve = {
"min": 0,
"max": 10,
"description": "Réserve de dés partagée par le groupe (p. 68-69)"
}
/**
* Group Level configuration (1-10)
*/
VERMINE.groupLevels = {
1: { "label": "Niveau 1 - Débutant" },
2: { "label": "Niveau 2 - Initié" },
3: { "label": "Niveau 3 - Expérimenté" },
4: { "label": "Niveau 4 - Confirmé" },
5: { "label": "Niveau 5 - Vétéran" },
6: { "label": "Niveau 6 - Élite" },
7: { "label": "Niveau 7 - Légendaire" },
8: { "label": "Niveau 8 - Mythique" },
9: { "label": "Niveau 9 - Hérotique" },
10: { "label": "Niveau 10 - Légende" }
}
/**
* Totem Instincts and Prohibitions effects
* Rules: p. 68-69 - Instincts give +3D/+5D, Prohibitions give -3D/-5D
*/
VERMINE.totemEffects = {
"instinct": {
"minor": "+3D",
"major": "+5D"
},
"prohibition": {
"minor": "-3D",
"major": "-5D"
}
}