Ajout des mutations

This commit is contained in:
LeRatierBretonnien 2024-02-24 15:54:47 +01:00
parent 9e023d3f01
commit 2ebd1bd1fd
25 changed files with 1599 additions and 1307 deletions

BIN
assets/icons/mutation.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -16,8 +16,8 @@
"monnaie": "Monnaie",
"equipement": "Equipement",
"ressource": "Ressource",
"contact": "Contact"
"contact": "Contact",
"mutation": "Mutation"
}
},
"HAWKMOON": {

View File

@ -44,6 +44,7 @@ export class HawkmoonActorSheet extends ActorSheet {
protections: duplicate(this.actor.getArmors()),
historiques: duplicate(this.actor.getHistoriques() || []),
talents: duplicate(this.actor.getTalents() || []),
mutations: duplicate(this.actor.getMutations() || []),
talentsCell: this.getCelluleTalents(),
profils: duplicate(this.actor.getProfils() || []),
combat: this.actor.getCombatValues(),

View File

@ -138,6 +138,9 @@ export class HawkmoonActor extends Actor {
getContacts() {
return this.getItemSorted(["contact"])
}
getMutations() {
return this.getItemSorted(["mutation"])
}
/* -------------------------------------------- */
getSkills() {

View File

@ -6,7 +6,7 @@ export class HawkmoonCombat extends Combat {
/* -------------------------------------------- */
async rollInitiative(ids, formula = undefined, messageOptions = {} ) {
ids = typeof ids === "string" ? [ids] : ids;
for (let cId = 0; cId < ids.length; cId++) {
for (let cId of ids) {
const c = this.combatants.get(ids[cId]);
//console.log("Init for combattant", c )
let id = c._id || c.id
@ -21,5 +21,4 @@ export class HawkmoonCombat extends Combat {
_onUpdate(changed, options, userId) {
}
}

View File

@ -13,6 +13,7 @@ export const defaultItemImg = {
artefact: "systems/fvtt-hawkmoon-cyd/assets/icons/artefact.webp",
contact: "systems/fvtt-hawkmoon-cyd/assets/icons/contacts.webp",
ressource: "systems/fvtt-hawkmoon-cyd/assets/icons/ressources.webp",
mutation: "systems/fvtt-hawkmoon-cyd/assets/icons/mutation.webp",
}
/**

View File

@ -18,7 +18,6 @@ import { HawkmoonCombat } from "./hawkmoon-combat.js";
import { HawkmoonItem } from "./hawkmoon-item.js";
import { HawkmoonAutomation } from "./hawkmoon-automation.js";
import { HawkmoonTokenHud } from "./hawkmoon-hud.js";
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
/* -------------------------------------------- */
/* Foundry VTT Initialization */
@ -99,7 +98,13 @@ Hooks.once("ready", function () {
});
}
ClassCounter.registerUsageCount();
import("https://www.uberwald.me/fvtt_appcount/count-class-ready.js").then(moduleCounter=>{
console.log("ClassCounter loaded", moduleCounter)
moduleCounter.ClassCounter.registerUsageCount()
}).catch(err=>
console.log("No stats available, giving up.")
)
welcomeMessage()
});

File diff suppressed because it is too large Load Diff

View File

@ -44,6 +44,51 @@
"flags": {}
}
],
"packFolders": [
{
"name": "Hawkmoon",
"sorting": "m",
"color": "#00435c",
"folders": [
{
"name": "Création de Personnage",
"sorting": "a",
"color": "#00435c",
"packs": [
"skills",
"historiques",
"profils",
"talents",
"talents-cellule",
"mutations"
],
"folders": []
},
{
"name": "Equipement",
"sorting": "a",
"color": "#00435c",
"packs": [
"armes",
"protections",
"equipement"
],
"folders": []
},
{
"name": "Autre",
"sorting": "a",
"color": "#00435c",
"packs": [
"skills-creatures",
"tables",
"aides-de-jeu"
],
"folders": []
}
]
}
],
"packs": [
{
"type": "Item",
@ -57,6 +102,18 @@
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Mutations",
"name": "mutations",
"path": "packs/mutations",
"system": "fvtt-hawkmoon-cyd",
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Compétences de Créatures",

View File

@ -146,7 +146,8 @@
"equipement",
"artefact",
"ressource",
"contact"
"contact",
"mutation"
],
"ressource": {
"pointdev": 0,
@ -259,7 +260,14 @@
"base",
"basequip"
]
},
"mutation": {
"templates": [
"base"
],
"mutationcategorie": "tares_communes",
"hascomplexite": false,
"complexite": 0
}
}
}

View File

@ -75,7 +75,7 @@
{{#each system.attributs as |attr key|}}
<li class="item flexrow " data-attr-key="{{key}}">
<img class="item-name-img" src="systems/fvtt-hawkmoon-cyd/assets/icons/{{attr.labelnorm}}.webp">
<span class="item-name-label competence-name item-field-label-medium"><a
<span data-tooltip="Cliquez pour faire un jet" class="item-name-label competence-name item-field-label-medium"><a
class="roll-attribut">{{attr.label}}</a></span>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number">
@ -140,7 +140,7 @@
</div>
</li>
{{#each talents as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="competence">
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="talent">
<img class="item-name-img" src="{{talent.img}}" />
<span class="item-name-label competence-name">{{talent.name}}</span>
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
@ -155,6 +155,39 @@
</ul>
</div>
{{#if (count mutations)}}
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Mutations</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Catégorie</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="mutation" title="Ajouter une Mutation"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each mutations as |mutation key|}}
<li class="item flexrow " data-item-id="{{mutation._id}}" data-item-type="mutation">
<img class="item-name-img" src="{{mutation.img}}" />
<span class="item-name-label competence-name">{{mutation.name}}</span>
<span class="item-name-label item-field-label-long2">{{mutation.system.mutationcategorie}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{/if}}
<div class="flexrow">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">

View File

@ -90,7 +90,8 @@
</li>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</ul>
</div>
</section>

View File

@ -0,0 +1,48 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
<li class="flexrow item">
<label class="generic-label item-field-label-long">Catégorie : </label>
<select class="item-field-label-long2" type="text" name="system.mutationcategorie"
value="{{system.mutationcategorie}}" data-dtype="string">
{{#select system.mutationcategorie}}
<option value="tares_communes">Tares et Malformations communes</option>
<option value="evolutions_communes">Evolutions communes</option>
<option value="tares_rares">Tares et Malformations rares</option>
<option value="evolutions_rares">Evolutions rares</option>
<option value="tares_majeures">Tares et Maformations majeures</option>
<option value="evolutions_majeures">Evolutions majeures</option>
<option value="tares_except">Tares et Malformations exceptionnelles</option>
<option value="evolutions_except">Evolutions exceptionnelles</option>
{{/select}}
</select>
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Complexité ? </label>
<input type="checkbox" name="system.hascomplexite" {{checked system.hascomplexite}} />
</li>
{{#if system.hascomplexite}}
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Valeur de complexité : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.complexite"
value="{{system.complexite}}" data-dtype="Number" />
</li>
{{/if}}
</ul>
</div>
</section>
</form>