forked from public/foundryvtt-reve-de-dragon
Enchantement des gemmes et potions
This commit is contained in:
@ -9,11 +9,11 @@
|
||||
{{else}}far fa-plus-square
|
||||
{{/if~}}"></i>
|
||||
<img class="sheet-competence-img" src="{{item.img}}"/>
|
||||
<span>{{item.name}}</span>
|
||||
<span>{{item.name}}{{#if item.system.magique}} <i class="fa-solid fa-sparkles" data-tooltip="Enchantement"></i>{{/if}}</span>
|
||||
</a>
|
||||
{{else}}
|
||||
<img class="sheet-competence-img" src="{{item.img}}"/>
|
||||
<span>{{item.name}}
|
||||
<span>{{item.name}}{{#if item.system.magique}} <i class="fa-solid fa-sparkles" data-tooltip="Enchantement"></i>{{/if}}</span>
|
||||
{{#if (eq item.type 'arme')}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/icon-arme-broken.hbs" item}}
|
||||
{{/if}}
|
||||
|
9
templates/chat-pertereve-enchantement-chateaudormant.hbs
Normal file
9
templates/chat-pertereve-enchantement-chateaudormant.hbs
Normal file
@ -0,0 +1,9 @@
|
||||
<img class="chat-icon" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
||||
<h4>
|
||||
La {{item.type}} enchantée {{item.name}} de {{alias}} a perdu un Point de Rêve (nouveau total : {{nouveaupr}}).</h4>
|
||||
<hr>
|
||||
<div>
|
||||
{{#if (and (eq item.type 'potion') (eq nouveaupr 0))}}
|
||||
Sa {{item.type}} étant désormais à 0 Point de Rêve, elle est inutilisable et peut être jetée.
|
||||
{{/if}}
|
||||
</div>
|
@ -1,9 +0,0 @@
|
||||
<img class="chat-icon" src="{{potionImg}}" data-tooltip="{{potionName}}" />
|
||||
<h4>
|
||||
La potion enchantée {{potionName}} de {{alias}} a perdu un Point de Rêve (nouveau total : {{pr}}).</h4>
|
||||
<hr>
|
||||
<div>
|
||||
{{#if (eq pr 0)}}
|
||||
Sa potion étant désormais à 0 Point de Rêve, elle est inutilisable et doit être jetée.
|
||||
{{/if}}
|
||||
</div>
|
50
templates/enchantement/dialog-enchanter.hbs
Normal file
50
templates/enchantement/dialog-enchanter.hbs
Normal file
@ -0,0 +1,50 @@
|
||||
<form class="rdd-dialog-enchanter">
|
||||
<img class="chat-icon" src="{{item.img}}" data-tooltip="Enchanter {{item.name}}" />
|
||||
<div class="flexcol">
|
||||
<h4>Enchanter {{item.name}}</h4>
|
||||
<div class="flexrow">
|
||||
<label class="flex-grow">Points de rêve (actuels: {{item.system.pr}})</label>
|
||||
<input class="attribute-value reve flex-shrink number-x2"
|
||||
data-dtype="Number" type="number" min="0" max="50"
|
||||
name="reve" value="{{reve}}" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||
</div>
|
||||
{{#if (or options.isGM (not item.system.magique) item.system.purifie purification)}}
|
||||
{{#each nouveauxpr as |nouveaupr idx|}}
|
||||
<div class="flexrow">
|
||||
<label class="flex-grow">Enchantement de {{nouveaupr}} points de rêve</label>
|
||||
<input class="attribute-value enchantement flex-shrink" type="checkbox" data-reve="{{nouveaupr}}" data-idx="{{idx}}"
|
||||
{{#if (eq idx ../idx)}}checked{{/if}}>
|
||||
</input>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (or purification options.isGM)}}
|
||||
<div class="flexrow">
|
||||
<label for="rendrepurifie">Purifier {{#if (and item.system.magique item.system.purifie)}}(déja purifiée){{/if}}</label>
|
||||
<input class="attribute-value rendrepurifie" type="checkbox" name="rendrepurifie"
|
||||
{{#unless options.isGM}}
|
||||
{{#if item.system.magique}}
|
||||
{{#if item.system.purifie}}
|
||||
disabled
|
||||
{{else if purification}}
|
||||
checked disabled
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#unless purification}}
|
||||
disabled
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{/unless}} />
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if (or permanence options.isGM)}}
|
||||
<div class="flexrow">
|
||||
<label for="rendrepermanent">Potion permanente</label>
|
||||
<input class="attribute-value rendrepermanent" type="checkbox" name="rendrepermanent"/>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</form>
|
||||
|
34
templates/enchantement/partial-enchantement.hbs
Normal file
34
templates/enchantement/partial-enchantement.hbs
Normal file
@ -0,0 +1,34 @@
|
||||
{{#if isEnchantementPossible}}
|
||||
<div class="form-group">
|
||||
<label for="system.magique">Magique {{#if system.magique}}<i class="fa-solid fa-sparkles"></i>{{/if}}</label>
|
||||
<input class="attribute-value" type="checkbox" name="system.magique" {{#if system.magique}}checked{{/if}}/>
|
||||
<label></label>
|
||||
</div>
|
||||
{{#if system.magique}}
|
||||
<div class="form-group">
|
||||
<label for="system.pr">Points de rêve</label>
|
||||
<input class="attribute-value" type="text" name="system.pr" value="{{system.pr}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.purifie">Purifiée</label>
|
||||
<input class="attribute-value" type="checkbox" name="system.purifie" {{#if system.purifie}}checked{{/if}}/>
|
||||
<label></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.prpermanent">Permanente</label>
|
||||
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if system.prpermanent}}checked{{/if}}/>
|
||||
<label></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="enchantement.jour">Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="number" name="enchantement.jour" class="date-enchantement" value="{{enchantement.jour}}" data-dtype="Number" min="1" max="28"/>
|
||||
<select name="enchantement.mois" class="date-enchantement" data-dtype="String">
|
||||
{{#select enchantement.mois}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
@ -6,9 +6,3 @@
|
||||
<option value="Repos">Potion de Repos</option>
|
||||
<option value="Soin">Potion de Soin</option>
|
||||
<option value="Autre">Potion Autre</option>
|
||||
{{#if enchantable}}
|
||||
<option value="AlchimieEnchante">Potion d'Alchimie Enchantée</option>
|
||||
<option value="ReposEnchante">Potion de Repos Enchantée</option>
|
||||
<option value="SoinEnchante">Potion de Soin Enchantée</option>
|
||||
<option value="AutreEnchante">Potion Autre Enchantée</option>
|
||||
{{/if}}
|
8
templates/item/enum-etat-alchimie.hbs
Normal file
8
templates/item/enum-etat-alchimie.hbs
Normal file
@ -0,0 +1,8 @@
|
||||
<option value=""></option>
|
||||
<option value="Liquide">Liquide</option>
|
||||
<option value="Epais">Liquide épais</option>
|
||||
<option value="Onguent">Onguent</option>
|
||||
<option value="Poudre">Poudre</option>
|
||||
<option value="Solide">Solide</option>
|
||||
<option value="Solide">Solide</option>
|
||||
<option value="Autre">Autre</option>
|
@ -1,5 +1,17 @@
|
||||
{{log this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" data-tooltip="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
<span>
|
||||
{{#if isEnchantementPossible}}
|
||||
<a class="item-enchanter chat-card-button" data-actor-id="{{actorId}}" data-tooltip="Enchanter cette gemme">Enchanter</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="informations">Informations</a>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||
@ -30,6 +42,7 @@
|
||||
<label>Enchantabilité</label>
|
||||
<input class="attribute-value" type="text" name="system.enchantabilite" value="{{system.enchantabilite}}" data-dtype="Number" disabled/>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/enchantement/partial-enchantement.hbs'}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||
</div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
{{#if options.isOwned}}
|
||||
<a class="item-potion-consommer chat-card-button" data-actor-id="{{actorId}}" data-tooltip="Consommer cette potion et appliquer ses effets">Consommer</a>
|
||||
{{/if}}
|
||||
{{#if enchantable}}
|
||||
{{#if isEnchantementPossible}}
|
||||
<a class="item-enchanter chat-card-button" data-actor-id="{{actorId}}" data-tooltip="Enchanter cette potion">Enchanter</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
@ -33,7 +33,15 @@
|
||||
<label for="system.categorie">Catégorie</label>
|
||||
<select name="system.categorie" class="categoriepotion" data-dtype="String">
|
||||
{{#select system.categorie}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/potion-enum-categorie.hbs" this}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/enum-categorie-alchimie.hbs" this}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.etat">Etat / consistance</label>
|
||||
<select name="system.etat" class="etat" data-dtype="String">
|
||||
{{#select system.etat}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/enum-etat-alchimie.hbs" this}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
@ -63,43 +71,20 @@
|
||||
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if enchantable}}
|
||||
{{#if system.magique}}
|
||||
<div class="form-group">
|
||||
<label for="system.pr">Points de rêve</label>
|
||||
<input class="attribute-value" type="text" name="system.pr" value="{{system.pr}}" data-dtype="Number" />
|
||||
</div>
|
||||
{{#if isSoins}}
|
||||
<div class="form-group">
|
||||
<label>Points de guérison</label>
|
||||
<input class="attribute-value" type="text" name="system.puissance" value="{{system.puissance}}" disabled />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if isRepos}}
|
||||
<div class="form-group">
|
||||
<label>Points de repos</label>
|
||||
<input class="attribute-value" type="text" name="system.puissance" value="{{system.puissance}}" disabled />
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="form-group">
|
||||
<label for="system.prpermanent">Permanente ? </label>
|
||||
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if system.prpermanent}}checked{{/if}}/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="enchantement.jour">Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="number" name="enchantement.jour" class="date-enchantement" value="{{enchantement.jour}}" data-dtype="Number" min="1" max="28"/>
|
||||
<select name="enchantement.mois" class="date-enchantement" data-dtype="String">
|
||||
{{#select enchantement.mois}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if system.magique}}
|
||||
<div class="form-group">
|
||||
{{#if isSoins}}
|
||||
<label>Points de guérison</label>
|
||||
{{else if isRepos}}
|
||||
<label>Points de repos</label>
|
||||
{{else}}
|
||||
<label>Puissance</label>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<input class="attribute-value" type="text" name="system.puissance" value="{{system.puissance}}" disabled />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/enchantement/partial-enchantement.hbs'}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||
</div>
|
||||
|
@ -1,22 +0,0 @@
|
||||
<form class="rdd-dialog-enchanter">
|
||||
<img class="chat-icon" src="{{item.img}}" data-tooltip="Enchanter {{item.name}}" />
|
||||
<div class="flexcol">
|
||||
<h4>Enchanter {{item.name}}</h4>
|
||||
<div class="flexrow">
|
||||
<label class="flex-grow">Nouveaux points de rêve</label>
|
||||
<input class="attribute-value nouveaupr flex-shrink number-x2" type="number" name="nouveaupr" value="{{nouveaupr}}"
|
||||
min="0" max="50" data-dtype="Number" />
|
||||
</div>
|
||||
{{!-- <div class="flexrow">
|
||||
<input class="attribute-value purifier" type="checkbox" name="purifier" {{#if purifier}}checked{{/if}}>
|
||||
<label for="purifier">Purifier</label>
|
||||
</input>
|
||||
</div> --}}
|
||||
<div class="flexrow">
|
||||
<input class="attribute-value prpermanent" type="checkbox" name="prpermanent" {{#if purifier}}checked{{/if}}>
|
||||
<label for="prpermanent">Permanente</label>
|
||||
</input>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user