Armes/Protections/Equipement

This commit is contained in:
sladecraven 2022-10-24 15:39:09 +02:00
parent c2a9beea89
commit 3b10ac18c2
8 changed files with 174 additions and 181 deletions

View File

@ -122,7 +122,8 @@ export class HawkmoonUtility {
'systems/fvtt-hawkmoon-cyd/templates/editor-notes-gm.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html'
'systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html'
]
return loadTemplates(templatePaths);
}

View File

@ -713,6 +713,12 @@ ul, li {
flex-grow: 0;
}
.numeric-input {
text-align: right;
direction: rtl;
padding: 5px;
}
.input-numeric-short {
width: 40px;
max-width: 40px;
@ -1324,11 +1330,13 @@ ul, li {
min-width: 9rem;
}
.item-field-label-short {
padding-top: 6px;
flex-grow:1;
max-width: 4rem;
min-width: 4rem;
}
.item-field-label-medium {
padding-top: 6px;
flex-grow:1;
max-width: 6rem;
min-width: 6rem;
@ -1339,11 +1347,17 @@ ul, li {
max-width: 8rem;
min-width: 8rem;
}
.item-field-label-long2 {
padding-top: 6px;
flex-grow:1;
max-width: 20rem;
min-width: 20rem;
}
.item-control-end {
align-self: flex-end;
}
.alternate-list {
margin-top: 4px;
margin-top: 2px;
flex-wrap: nowrap;
}
.item-filler {

View File

@ -101,6 +101,13 @@
"templates": {
"base": {
"description": ""
},
"basequip": {
"prixpo": 0,
"prixca": 0,
"prixsc": 0,
"rarete": 0,
"equipped": false
}
},
"types": [
@ -149,10 +156,9 @@
]
},
"equipement": {
"rarete": 0,
"prix": 0,
"templates": [
"base"
"base",
"basequip"
]
},
"competence": {
@ -168,35 +174,34 @@
},
"arme": {
"typearme": "",
"isdefense": false,
"bonusmaniementoff": 0,
"bonusmaniementdef": 0,
"seuildefense": 0,
"onlevelonly": false,
"degats": "",
"deuxmains": false,
"percearmure": false,
"percearmurevalue": 0,
"courte": 0,
"moyenne": 0,
"longue": 0,
"tr": 0,
"rarete": 0,
"prix": 0,
"equipped": false,
"templates": [
"base"
"base",
"basequip"
]
},
"protection": {
"typeprotection": "",
"protection": 0,
"rarete": 0,
"prix": 0,
"equipped": false,
"adversitepoids" :0,
"templates": [
"base"
"base",
"basequip"
]
},
"monnaie": {
"templates": [
"base"
"base",
"basequip"
]
},
"artefact": {
@ -211,7 +216,8 @@
"avantages": "",
"competences": "",
"templates": [
"base"
"base",
"basequip"
]
}

View File

@ -1,84 +1,94 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-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>
<header class="sheet-header">
<img class="item-sheet-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">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
<div class="flexcol">
<span class="flexrow">
<label class="generic-label">Type d'arme : </label>
<select class="status-small-label color-class-common" type="text" name="system.typearme" value="{{data.typearme}}" data-dtype="string" >
{{#select data.typearme}}
{{!-- 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">Type d'arme : </label>
<select class="item-field-label-long" type="text" name="system.typearme"
value="{{system.typearme}}" data-dtype="string">
{{#select system.typearme}}
<option value="contact">Arme de contact</option>
<option value="contactjet">Arme de contact et de Jet</option>
<option value="jet">Arme de Jet</option>
<option value="tir">Arme de Tir</option>
{{/select}}
</select>
</span>
<span class="flexrow">
<label class="generic-label">Bonus de maniement (offensif) : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.bonusmaniementoff" value="{{data.bonusmaniementoff}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Défensive ? </label>
<input type="checkbox" name="system.isdefense" {{checked data.isdefense}}/>
</span>
{{#if data.isdefense}}
<span class="flexrow">
<label class="generic-label">Bonus de maniement (défensif) : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.bonusmaniementdef" value="{{data.bonusmaniementdef}}" data-dtype="Number" />
</span>
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Bonus offensif : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.bonusmaniementoff"
value="{{system.bonusmaniementoff}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Seuil de Défense : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.seuildefense"
value="{{system.seuildefense}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long2">1 niveau de Combativité au maximum ? </label>
<input type="checkbox" name="system.onlevelonly" {{checked system.onlevelonly}} />
</li>
{{#if system.onlevelonly}}
{{else}}
<li class="flexrow item">
<label class="generic-label item-field-label-long">Dégâts : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.degats"
value="{{system.degats}}" data-dtype="Number" />
</li>
{{/if}}
<span class="flexrow">
<label class="generic-label">Dégâts : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.degats" value="{{data.degats}}" data-dtype="String" />
</span>
<span class="flexrow">
<label class="generic-label">Dégâts non létaux ? </label>
<input type="checkbox" name="system.nonletaux" {{checked data.nonletaux}}/>
</span>
<span class="flexrow">
<label class="generic-label">Equipé ? </label>
<input type="checkbox" name="system.equipped" {{checked data.equipped}}/>
</span>
<span class="flexrow">
<label class="generic-label">A deux mains ? </label>
<input type="checkbox" name="system.deuxmains" {{checked data.deuxmains}}/>
</span>
<span class="flexrow">
<label class="generic-label">Portée courte </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.courte" value="{{data.courte}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Portée moyenne </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.moyenne" value="{{data.moyenne}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Portée longue </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.longue" value="{{data.longue}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Temps de rechargement </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.tr" value="{{data.tr}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span>
<li class="flexrow item">
<label class="generic-label item-field-label-long">A deux mains ? </label>
<input type="checkbox" name="system.deuxmains" {{checked system.deuxmains}} />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Perce Armure ? </label>
<input type="checkbox" name="system.percearmure" {{checked system.percearmure}} />
</li>
{{#if system.percearmure}}
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Valeur de Perce Armure : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.percearmurevalue"
value="{{system.percearmurevalue}}" data-dtype="Number" />
</li>
{{/if}}
<li class="flexrow item">
<label class="generic-label item-field-label-long">Portée courte </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.courte"
value="{{system.courte}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Portée moyenne </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.moyenne"
value="{{system.moyenne}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Portée longue </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.longue"
value="{{system.longue}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Temps de rechargement </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.tr" value="{{system.tr}}"
data-dtype="Number" />
</li>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</div>
</section>
</section>
</form>

View File

@ -1,43 +0,0 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-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="flexcol">
<span class="flexrow">
<label class="generic-label">Bonus de défense : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.bonusdefense" value="{{data.bonusdefense}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Degats : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.degats" value="{{data.degats}}" data-dtype="String" />
</span>
<span class="flexrow">
<label class="generic-label">Dégâts non létaux ? </label>
<input type="checkbox" name="system.nonletaux" {{checked data.nonletaux}}/>
</span>
<span class="flexrow">
<label class="generic-label">Equipé ? </label>
<input type="checkbox" name="system.equipped" {{checked data.equipped}}/>
</span>
<span class="flexrow">
<label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}}
</div>
</section>
</form>

View File

@ -6,25 +6,21 @@
</div>
</header>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
<ul class="item-list alternate-list">
<li class="flexrow item">
<label class="generic-label item-field-label-long">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-long" name="system.rarete"
value="{{data.rarete}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-long" name="system.prix"
value="{{data.prix}}" data-dtype="Number" />
</li>
</ul>
{{> 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">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</ul>
</div>
</section>

View File

@ -6,13 +6,22 @@
</div>
</header>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="flexcol">
{{> 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">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</ul>
</div>
</section>

View File

@ -1,35 +1,35 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-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>
<header class="sheet-header">
<img class="item-sheet-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">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
<div class="flexcol">
<span class="flexrow">
<label class="generic-label">Protection : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.protection" value="{{data.protection}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Equipé ? </label>
<input type="checkbox" name="system.equipped" {{checked data.equipped}}/>
</span>
<span class="flexrow">
<label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> 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">Protection : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.protection"
value="{{system.protection}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Adversités dues au poids : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.adversitepoids"
value="{{system.adversitepoids}}" data-dtype="Number" />
</li>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</div>
</section>
</section>
</form>