forked from public/fvtt-yggdrasill
Merge branch 'Archonoir-main-patch' into 'main'
Update template.json See merge request LeRatierBretonnien/fvtt-yggdrasill!1
This commit is contained in:
commit
6b42e9dc3f
@ -48,12 +48,14 @@ export class YggdrasillActorSheet extends ActorSheet {
|
|||||||
blessures: this.actor.getBlessures(),
|
blessures: this.actor.getBlessures(),
|
||||||
armes: this.actor.getArmes(),
|
armes: this.actor.getArmes(),
|
||||||
armures: this.actor.getArmures(),
|
armures: this.actor.getArmures(),
|
||||||
|
boucliers: this.actor.getBoucliers(),
|
||||||
prouessesMartiales: this.actor.getProuessesMartiales(),
|
prouessesMartiales: this.actor.getProuessesMartiales(),
|
||||||
equipements: this.actor.getToutEquipements(),
|
equipements: this.actor.getToutEquipements(),
|
||||||
effetsmagiques: this.actor.getEffetsMagiques(),
|
effetsmagiques: this.actor.getEffetsMagiques(),
|
||||||
effetsRunes: this.actor.getEffetsDeRunes(),
|
effetsRunes: this.actor.getEffetsDeRunes(),
|
||||||
encTotal: this.actor.getEncTotal(),
|
encTotal: this.actor.getEncTotal(),
|
||||||
protectionTotal: this.actor.getProtectionTotal(),
|
protectionTotal: this.actor.getProtectionTotal(),
|
||||||
|
dpBouclier: this.actor.getDpBouclier(),
|
||||||
monnaies: this.actor.getMonnaies(),
|
monnaies: this.actor.getMonnaies(),
|
||||||
sortsSejdr:this.actor.getSortsSejdr(),
|
sortsSejdr:this.actor.getSortsSejdr(),
|
||||||
sortsGaldr:this.actor.getSortsGaldr(),
|
sortsGaldr:this.actor.getSortsGaldr(),
|
||||||
@ -81,10 +83,10 @@ export class YggdrasillActorSheet extends ActorSheet {
|
|||||||
dm.total = dm.max + Number(dm.bonusmalus);
|
dm.total = dm.max + Number(dm.bonusmalus);
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
updateDP( data ) {
|
updateDP( data ) {
|
||||||
let dp = data.caracsecondaire.defensephy;
|
let dp = data.caracsecondaire.defensephy;
|
||||||
dp.total = dp.max + Number(dp.bonusmalus);
|
dp.total = dp.max + Number(dp.bonusmalus);
|
||||||
dp.total += (dp.bouclierequipe) ? 3 : 0;
|
dp.total += this.actor.getDpBouclier();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -280,7 +280,7 @@ export class YggdrasillActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getToutEquipements() {
|
getToutEquipements() {
|
||||||
return this.data.items.filter( item => item.type == 'equipement' || item.type == 'armure' || item.type == 'armecc' || item.type == 'armedist');
|
return this.data.items.filter( item => item.type == 'equipement' || item.type == 'armure' || item.type == 'armecc' || item.type == 'armedist' || item.type == 'bouclier');
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getArmes() {
|
getArmes() {
|
||||||
@ -289,6 +289,9 @@ export class YggdrasillActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getArmures() {
|
getArmures() {
|
||||||
return this.data.items.filter( item => item.type == 'armure' && item.data.data.equipe );
|
return this.data.items.filter( item => item.type == 'armure' && item.data.data.equipe );
|
||||||
|
}
|
||||||
|
getBoucliers() {
|
||||||
|
return this.data.items.filter( item => item.type == 'bouclier' && item.data.data.equipe );
|
||||||
}
|
}
|
||||||
getProuessesMartiales() {
|
getProuessesMartiales() {
|
||||||
let prouesse = this.data.items.filter( item => item.type == 'prouesse' );
|
let prouesse = this.data.items.filter( item => item.type == 'prouesse' );
|
||||||
@ -738,13 +741,19 @@ export class YggdrasillActor extends Actor {
|
|||||||
getEncTotal( ) {
|
getEncTotal( ) {
|
||||||
let encTotal = 0;
|
let encTotal = 0;
|
||||||
for( let item of this.data.items) {
|
for( let item of this.data.items) {
|
||||||
if (item.type == "equipement" || item.type == "armecc"
|
if (item.type == "equipement" || item.type == "armecc"
|
||||||
|| item.type == "armedist" || item.type == "armure" || item.type == "monnaie") {
|
|| item.type == "armedist" || item.type == "armure" || item.type == "monnaie" || item.type == "bouclier") {
|
||||||
encTotal += item.data.data.enc;
|
encTotal += (item.data.data.enc * item.data.data.quantite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for( let item of this.data.items) {
|
||||||
|
if (item.type == "bouclier" && item.data.data.equipe) {
|
||||||
|
encTotal -= (item.data.data.enc * item.data.data.quantite);
|
||||||
|
encTotal += (item.data.data.enccomb * item.data.data.quantite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return encTotal;
|
return encTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getProtectionTotal( ) {
|
getProtectionTotal( ) {
|
||||||
@ -756,6 +765,16 @@ export class YggdrasillActor extends Actor {
|
|||||||
}
|
}
|
||||||
return protectionTotal;
|
return protectionTotal;
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
getDpBouclier( ) {
|
||||||
|
let dpBouclier = 0;
|
||||||
|
for( let item of this.data.items) {
|
||||||
|
if (item.type == "bouclier" && item.data.data.equipe) {
|
||||||
|
dpBouclier += Number(item.data.data.defensebonus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dpBouclier;
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async incrementeQuantite( objetId ) {
|
async incrementeQuantite( objetId ) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "fvtt-yggdrasill",
|
"name": "fvtt-yggdrasill",
|
||||||
"title": "Yggdrasill",
|
"title": "Yggdrasill",
|
||||||
"description": "Système non-officiel Yggdrasill (7ième Cercle) pour FoundryVTT",
|
"description": "Système non-officiel Yggdrasill (7ième Cercle) pour FoundryVTT",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"manifestPlusVersion": "1.0.0",
|
"manifestPlusVersion": "1.0.0",
|
||||||
"minimumCoreVersion": "9",
|
"minimumCoreVersion": "9",
|
||||||
"compatibleCoreVersion": "9",
|
"compatibleCoreVersion": "9",
|
||||||
|
@ -128,7 +128,6 @@
|
|||||||
"defensephy": {
|
"defensephy": {
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"bonusmalus": 0,
|
"bonusmalus": 0,
|
||||||
"bouclierequipe": false,
|
|
||||||
"max": 0,
|
"max": 0,
|
||||||
"label": "Défense Physique",
|
"label": "Défense Physique",
|
||||||
"abbrev": "dp"
|
"abbrev": "dp"
|
||||||
@ -330,6 +329,16 @@
|
|||||||
"enc": 0,
|
"enc": 0,
|
||||||
"valeur": 0,
|
"valeur": 0,
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"bouclier": {
|
||||||
|
"categorie": "",
|
||||||
|
"equipe": false,
|
||||||
|
"defensebonus": 0,
|
||||||
|
"enc": 0,
|
||||||
|
"enccomb": 0,
|
||||||
|
"solidite": 0,
|
||||||
|
"valeur": 0,
|
||||||
|
"description": ""
|
||||||
},
|
},
|
||||||
"equipement": {
|
"equipement": {
|
||||||
"equipe": false,
|
"equipe": false,
|
||||||
|
@ -156,10 +156,6 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
|
||||||
<span>Bouclier ?</span>
|
|
||||||
<span class="attribute-value checkbox"><input type="checkbox" name="data.caracsecondaire.{{key}}.bouclierequipe" {{checked caracsec.bouclierequipe}}/></span>
|
|
||||||
</li>
|
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<span class="stat-label flexrow tooltip tooltip-nobottom" name="{{key}}-total">Total : {{caracsec.total}}</span>
|
<span class="stat-label flexrow tooltip tooltip-nobottom" name="{{key}}-total">Total : {{caracsec.total}}</span>
|
||||||
</li>
|
</li>
|
||||||
@ -372,6 +368,31 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div><h4>Bouclier (Bonus de défense physique : {{dpBouclier}}) </h4></div>
|
||||||
|
<ul class="item-list alternate-list">
|
||||||
|
<li class="stat flexrow" >
|
||||||
|
<span class="stat-label flexrow">Nom</span>
|
||||||
|
<span class="stat-label flexrow">Catégorie</span>
|
||||||
|
<span class="stat-label flexrow">Bonus DP</span>
|
||||||
|
<div class="item-controls">
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{#each bouclier as |bouclier key|}}
|
||||||
|
<li class="item stat flexrow list-item" data-armure-id="{{bouclier.id}}" data-item-id="{{bouclier.id}}">
|
||||||
|
<img class="sheet-competence-img" src="{{bouclier.img}}"/>
|
||||||
|
<span class="stat-label combat-label flexrow tooltip tooltip-nobottom"><a name="{{bouclier.name}}">{{bouclier.name}}</a></span>
|
||||||
|
<span class="stat-label combat-label"> {{bouclier.data.data.categorie}}</span>
|
||||||
|
<span class="stat-label combat-label"> {{bouclier.data.data.defensebonus}}</span>
|
||||||
|
<div class="item-controls">
|
||||||
|
<a class="item-control item-equip" title="Worn">{{#if bouclier.data.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||||
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
35
templates/item-bouclier-sheet.html
Normal file
35
templates/item-bouclier-sheet.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
<div class="tab" data-group="primary">
|
||||||
|
<ul>
|
||||||
|
<li class="flexrow"><label class="generic-label">Catégorie</label>
|
||||||
|
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
|
||||||
|
{{#select data.categorie}}
|
||||||
|
<option value="bouclier">bouclier</option>
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Equipée ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipe" {{checked data.equipe}}/></label>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Bonus DP</label><input type="text" name="data.defensebonus" value="{{data.defensebonus}}" data-dtype="Number"/></li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="data.enc" value="{{data.enc}}" data-dtype="Number"/></li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Encombrement en combat</label><input type="text" name="data.enccomb" value="{{data.enccomb}}" data-dtype="Number"/></li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Solidité</label><input type="text" name="data.solidite" value="{{data.solidite}}" data-dtype="Number"/></li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="data.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
|
||||||
|
</ul>
|
||||||
|
<label class="generic-label">Description</label>
|
||||||
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</form>
|
Loading…
Reference in New Issue
Block a user