Ajout types de fee
This commit is contained in:
parent
301eead11f
commit
c1e9fe37dc
@ -122,7 +122,7 @@ export class HeritiersActorSheet extends ActorSheet {
|
||||
})
|
||||
|
||||
html.find('.roll-initiative').click((event) => {
|
||||
this.actor.rollAttribut("pre", true)
|
||||
this.actor.rollInitiative()
|
||||
})
|
||||
|
||||
html.find('.roll-carac').click((event) => {
|
||||
|
@ -473,7 +473,20 @@ export class HeritiersActor extends Actor {
|
||||
}
|
||||
return rollData
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollInitiative() {
|
||||
let rollData = this.getCommonRollData(undefined, "Art de la guerre")
|
||||
rollData.mode = "init"
|
||||
if (this.system.caracteristiques["san"].value > this.system.caracteristiques["per"].value) {
|
||||
rollData.caracKey = "san"
|
||||
} else {
|
||||
rollData.caracKey = "per"
|
||||
}
|
||||
rollData.carac = this.system.caracteristiques[rollData.caracKey]
|
||||
let rollDialog = await HeritiersRollDialog.create(this, rollData)
|
||||
rollDialog.render(true)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollCarac(key, isInit = false) {
|
||||
let rollData = this.getCommonRollData()
|
||||
|
@ -109,6 +109,10 @@ export const HERITIERS_CONFIG = {
|
||||
"balle": "Protège ds balles",
|
||||
"melee": "Protège en mélée",
|
||||
"tout": "Tout type de dégats"
|
||||
},
|
||||
typeFee: {
|
||||
"traditionnelle": "Traditionnelle",
|
||||
"moderne": "Moderne"
|
||||
}
|
||||
|
||||
|
||||
|
@ -362,7 +362,7 @@ export class HeritiersUtility {
|
||||
|
||||
rollData.finalResult = myRoll.total
|
||||
this.computeResult(actor, rollData)
|
||||
if (rollData.isInit) {
|
||||
if (rollData.mode == "init") {
|
||||
actor.setFlag("world", "last-initiative", rollData.finalResult)
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "fvtt-les-heritiers",
|
||||
"description": "Les Héritiers pour FoundryVTT",
|
||||
"version": "10.0.9",
|
||||
"version": "10.0.10",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Uberwald/LeRatierBretonnien",
|
||||
@ -19,7 +19,7 @@
|
||||
"gridUnits": "m",
|
||||
"license": "LICENSE.txt",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.9.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.10.zip",
|
||||
"languages": [
|
||||
{
|
||||
"lang": "fr",
|
||||
|
@ -244,6 +244,7 @@
|
||||
"feetype": 0,
|
||||
"avantages": "",
|
||||
"desavantages": "",
|
||||
"pouvoirsfeeriques": "",
|
||||
"atoutsfeeriques": "",
|
||||
"competences": "",
|
||||
"capacitenaturelles": "",
|
||||
|
@ -157,6 +157,43 @@
|
||||
<li class="item flexrow">
|
||||
<button class="chat-card-button roll-initiative">Initiative (actuelle : {{initiative}} )</button>
|
||||
</li>
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<label class="item-field-label-medium"><strong>Esquive</strong></label>
|
||||
<label class="item-field-label-medium">Masquée</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.esquive.masquee" value="{{system.combat.esquive.masquee}}" data-dtype="Number" />
|
||||
<label class="item-field-label-medium">Démasquée</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.esquive.demasquee" value="{{system.combat.esquive.demasquee}}" data-dtype="Number" />
|
||||
<label class="item-field-label-medium"><strong>Parade</strong></label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.parade.value" value="{{system.combat.parade.value}}" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<label class="item-field-label-long">Rés. physique</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.resistancephysique.value" value="{{system.combat.resistancephysique.value}}" data-dtype="Number" />
|
||||
<label class="item-field-label-long">Rés. psychique</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.resistancepsychique.value" value="{{system.combat.resistancepsychique.value}}" data-dtype="Number" />
|
||||
<label class="item-field-label-medium">Protection : </label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.protection.value" value="{{system.combat.protection.value}}" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<label class="item-field-label-long">Effets secondaires</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.effetssecondaires" value="{{system.combat.effetssecondaires}}" data-dtype="String" />
|
||||
<label class="item-field-label-long">Dissimulation : </label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.dissimulation.value" value="{{system.combat.dissimulation.value}}" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<label class="item-field-label-long"><strong>Corps à Corps</strong></label>
|
||||
<label class="item-field-label-medium">Masqué</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.corpsacorps.masquee" value="{{system.combat.corpsacorps.masquee}}" data-dtype="Number" />
|
||||
<label class="item-field-label-medium">Démasqué</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.corpsacorps.demasquee" value="{{system.combat.corpsacorps.demasquee}}" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<label class="item-field-label-long"><strong>A distance</strong></label>
|
||||
<label class="item-field-label-medium">Masqué</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.tir.masquee" value="{{system.combat.tir.masquee}}" data-dtype="Number" />
|
||||
<label class="item-field-label-medium">Démasqué</label>
|
||||
<input type="text" class="item-field-label-short" name="system.combat.tir.demasquee" value="{{system.combat.tir.demasquee}}" data-dtype="Number" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="flexcol">
|
||||
@ -188,27 +225,11 @@
|
||||
<span class="item-name-label competence-name">{{arme.name}}</span>
|
||||
|
||||
<span class="item-field-label-short">
|
||||
{{#if arme.system.equipped}}
|
||||
<button class="roll-arme-offensif button-sheet-roll">{{arme.system.totalOffensif}}</button>
|
||||
{{else}}
|
||||
<button disabled class="roll-arme-offensif button-sheet-roll">{{arme.system.totalOffensif}}</button>
|
||||
{{/if}}
|
||||
<button class="roll-arme-offensif button-sheet-roll">Attaquer</button>
|
||||
</span>
|
||||
|
||||
{{#if arme.system.isdefense}}
|
||||
<span class="item-field-label-short arme-defensif item-field-label-short"><label
|
||||
class="arme-defensif item-field-label-short defense-sheet">{{arme.system.totalDefensif}}</label></span>
|
||||
{{else}}
|
||||
<span class="item-field-label-short arme-defensif item-field-label-short"><label
|
||||
class="arme-defensif item-field-label-short defense-sheet">N/A</label></span>
|
||||
{{/if}}
|
||||
|
||||
<span class="item-field-label-short">
|
||||
{{#if arme.system.equipped}}
|
||||
<button class="roll-arme-degats button-sheet-roll">{{arme.system.totalDegats}}</button>
|
||||
{{else}}
|
||||
<button disabled class="roll-arme-degats button-sheet-roll">{{arme.system.totalDegats}}</button>
|
||||
{{/if}}
|
||||
</span>
|
||||
|
||||
<div class="item-filler"> </div>
|
||||
|
68
templates/item-fee-sheet.html
Normal file
68
templates/item-fee-sheet.html
Normal file
@ -0,0 +1,68 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{> systems/fvtt-les-heritiers/templates/partial-item-header.html}}
|
||||
|
||||
{{> systems/fvtt-les-heritiers/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-les-heritiers/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="item-field-label-long">Type de féé</label>
|
||||
<select class="item-field-label-long" type="text" name="system.feetype"
|
||||
value="{{system.feetype}}" data-dtype="string">
|
||||
{{#select system.feetype}}
|
||||
{{#each config.typeFee as |type key|}}
|
||||
<option value="{{key}}">{{type}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow item">
|
||||
<label class="item-field-label-long">Avantages</label>
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<textarea rows="5" cols="60" name="system.avantages" data-dtype="String">{{system.avantages}}</textarea>
|
||||
</li>
|
||||
|
||||
<li class="flexrow item">
|
||||
<label class="item-field-label-long">Désavantages</label>
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<textarea rows="5" cols="60" name="system.desavantages" data-dtype="String">{{system.desavantages}}</textarea>
|
||||
</li>
|
||||
|
||||
<li class="flexrow item">
|
||||
<label class="item-field-label-long">Atouts féériques</label>
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<textarea rows="5" cols="60" name="system.desavantages" data-dtype="String">{{system.desavantages}}</textarea>
|
||||
</li>
|
||||
|
||||
<li class="flexrow item">
|
||||
<label class="item-field-label-long">Compétences</label>
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<textarea rows="5" cols="60" name="system.competences" data-dtype="String">{{system.competences}}</textarea>
|
||||
</li>
|
||||
|
||||
<li class="flexrow item">
|
||||
<label class="item-field-label-long">Capacités naturelles</label>
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<textarea rows="5" cols="60" name="system.capacitenaturelles" data-dtype="String">{{system.capacitenaturelles}}</textarea>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</form>
|
@ -54,7 +54,7 @@
|
||||
<input type="text" class="item-field-label-short" name="system.prix"
|
||||
value="{{system.prix}}" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
c <li class="flexrow item">
|
||||
<label class="generic-label item-field-label-long">Quantité : </label>
|
||||
<input type="text" class="item-field-label-short" name="system.quantite"
|
||||
value="{{system.quantite}}" data-dtype="Number" />
|
||||
|
Loading…
Reference in New Issue
Block a user