Compare commits
	
		
			6 Commits
		
	
	
		
			fvtt-imper
			...
			master
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 9c589d3ac7 | |||
| fef19cbd4c | |||
| 08a8415cba | |||
| 025d7a2740 | |||
| 634feabb75 | |||
| a100da7cd9 | 
@@ -1,3 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
"ACTOR": {
 | 
			
		||||
  "TypePersonnage": "Personnage",
 | 
			
		||||
  "TypeCreature": "Créature",
 | 
			
		||||
  "TypeEntite": "Entité de cauchemar",
 | 
			
		||||
  "TypeVehicule": "Véhicule"
 | 
			
		||||
},
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								lang/fr.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								lang/fr.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
{
 | 
			
		||||
  "ACTOR": {
 | 
			
		||||
    "TypeCharacter": "Personnage",
 | 
			
		||||
    "TypePm": "Protagoniste du meneur"
 | 
			
		||||
  },
 | 
			
		||||
  "ITEM": {
 | 
			
		||||
    "TypeCapacite": "Capacité",
 | 
			
		||||
    "TypeArchetype": "Archétype",
 | 
			
		||||
    "TypeSpecialite": "Spécialité",
 | 
			
		||||
    "TypeFamiliarite": "Familiarité",
 | 
			
		||||
    "TypeNature": "Nature Profonde",
 | 
			
		||||
    "TypeTrait": "Trait",
 | 
			
		||||
    "TypeSymbiose": "Symbiose",
 | 
			
		||||
    "TypeRessource": "Ressource",
 | 
			
		||||
    "TypeSingularite": "Singularité",
 | 
			
		||||
    "TypeContact": "Contact",
 | 
			
		||||
    "TypeEquipement": "Equipement"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										144
									
								
								modules/imperium5-actor-pm-sheet.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										144
									
								
								modules/imperium5-actor-pm-sheet.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,144 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Extend the basic ActorSheet with some very simple modifications
 | 
			
		||||
 * @extends {ActorSheet}
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
import { Imperium5Utility } from "./imperium5-utility.js";
 | 
			
		||||
import { Imperium5RollDialog } from "./imperium5-roll-dialog.js";
 | 
			
		||||
 | 
			
		||||
/* -------------------------------------------- */
 | 
			
		||||
export class Imperium5ActorPMSheet extends ActorSheet {
 | 
			
		||||
 | 
			
		||||
  /** @override */
 | 
			
		||||
  static get defaultOptions() {
 | 
			
		||||
 | 
			
		||||
    return mergeObject(super.defaultOptions, {
 | 
			
		||||
      classes: ["fvtt-imperium5", "sheet", "actor"],
 | 
			
		||||
      template: "systems/fvtt-imperium5/templates/actor-pm-sheet.html",
 | 
			
		||||
      width: 720,
 | 
			
		||||
      height: 760,
 | 
			
		||||
      tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
 | 
			
		||||
      dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
 | 
			
		||||
      editScore: true
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async getData() {    
 | 
			
		||||
    let actorData = duplicate(this.object.system)
 | 
			
		||||
 | 
			
		||||
    let formData = {
 | 
			
		||||
      title: this.title,
 | 
			
		||||
      id: this.actor.id,
 | 
			
		||||
      type: this.actor.type,
 | 
			
		||||
      img: this.actor.img,
 | 
			
		||||
      name: this.actor.name,
 | 
			
		||||
      editable: this.isEditable,
 | 
			
		||||
      cssClass: this.isEditable ? "editable" : "locked",
 | 
			
		||||
      system: actorData,
 | 
			
		||||
      archetype: this.actor.getArchetype(),
 | 
			
		||||
      specialites: this.actor.getSpecialites(),
 | 
			
		||||
      familiarites: this.actor.getFamiliarites(),
 | 
			
		||||
      nature: this.actor.getNatureProfonde(),
 | 
			
		||||
      traits: this.actor.getTraits(),
 | 
			
		||||
      symbioses: this.actor.getSymbioses(),
 | 
			
		||||
      equipements: this.actor.getEquipements(),
 | 
			
		||||
      capacites: this.actor.getCapacites(),
 | 
			
		||||
      singularites: this.actor.getSingularites(),
 | 
			
		||||
      contacts: this.actor.getContacts(),
 | 
			
		||||
      effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
 | 
			
		||||
      limited: this.object.limited,
 | 
			
		||||
      options: this.options,
 | 
			
		||||
      owner: this.document.isOwner,
 | 
			
		||||
      editScore: this.options.editScore,
 | 
			
		||||
      isGM: game.user.isGM
 | 
			
		||||
    }
 | 
			
		||||
    this.formData = formData;
 | 
			
		||||
 | 
			
		||||
    console.log("PM : ", formData, this.object);
 | 
			
		||||
    return formData;
 | 
			
		||||
  }
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  /** @override */
 | 
			
		||||
  activateListeners(html) {
 | 
			
		||||
    super.activateListeners(html);
 | 
			
		||||
 | 
			
		||||
    // Everything below here is only needed if the sheet is editable
 | 
			
		||||
    if (!this.options.editable) return;
 | 
			
		||||
    
 | 
			
		||||
    html.bind("keydown", function(e) { // Ignore Enter in actores sheet
 | 
			
		||||
      if (e.keyCode === 13) return false;
 | 
			
		||||
    });  
 | 
			
		||||
 | 
			
		||||
    // Update Inventory Item
 | 
			
		||||
    html.find('.item-edit').click(ev => {
 | 
			
		||||
      const li = $(ev.currentTarget).parents(".item");
 | 
			
		||||
      let itemId = li.data("item-id");
 | 
			
		||||
      const item = this.actor.items.get( itemId );
 | 
			
		||||
      item.sheet.render(true);
 | 
			
		||||
    });
 | 
			
		||||
    // Delete Inventory Item
 | 
			
		||||
    html.find('.item-delete').click(ev => {
 | 
			
		||||
      const li = $(ev.currentTarget).parents(".item");
 | 
			
		||||
      Imperium5Utility.confirmDelete(this, li);
 | 
			
		||||
    });
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    html.find('.quantity-minus').click(event => {
 | 
			
		||||
      const li = $(event.currentTarget).parents(".item");
 | 
			
		||||
      this.actor.incDecQuantity( li.data("item-id"), -1 );
 | 
			
		||||
    } );
 | 
			
		||||
    html.find('.quantity-plus').click(event => {
 | 
			
		||||
      const li = $(event.currentTarget).parents(".item");
 | 
			
		||||
      this.actor.incDecQuantity( li.data("item-id"), +1 );
 | 
			
		||||
    } );
 | 
			
		||||
            
 | 
			
		||||
    html.find('.lock-unlock-sheet').click((event) => {
 | 
			
		||||
      this.options.editScore = !this.options.editScore;
 | 
			
		||||
      this.render(true);
 | 
			
		||||
    });    
 | 
			
		||||
    html.find('.item-link a').click((event) => {
 | 
			
		||||
      const itemId = $(event.currentTarget).data("item-id")
 | 
			
		||||
      const item = this.actor.getOwnedItem(itemId);
 | 
			
		||||
      item.sheet.render(true);
 | 
			
		||||
    });    
 | 
			
		||||
    html.find('.item-equip').click(ev => {
 | 
			
		||||
      const li = $(ev.currentTarget).parents(".item");
 | 
			
		||||
      this.actor.equipItem( li.data("item-id") );
 | 
			
		||||
      this.render(true);      
 | 
			
		||||
    });
 | 
			
		||||
    html.find('.update-field').change(ev => {
 | 
			
		||||
      const fieldName = $(ev.currentTarget).data("field-name");
 | 
			
		||||
      let value = Number(ev.currentTarget.value);
 | 
			
		||||
      this.actor.update( { [`${fieldName}`]: value } );
 | 
			
		||||
    });    
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  /** @override */
 | 
			
		||||
  setPosition(options = {}) {
 | 
			
		||||
    const position = super.setPosition(options);
 | 
			
		||||
    const sheetBody = this.element.find(".sheet-body");
 | 
			
		||||
    const bodyHeight = position.height - 192;
 | 
			
		||||
    sheetBody.css("height", bodyHeight);
 | 
			
		||||
    return position;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async _onDropItemUNUSED(event, dragData) {
 | 
			
		||||
    let item = await Imperium5Utility.searchItem( dragData)
 | 
			
		||||
    if (item == undefined) {
 | 
			
		||||
      item = this.actor.items.get( dragData.data._id )
 | 
			
		||||
    }
 | 
			
		||||
    //this.actor.preprocessItem( event, item, true )
 | 
			
		||||
    super._onDropItem(event, dragData)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  /** @override */
 | 
			
		||||
  _updateObject(event, formData) {
 | 
			
		||||
    // Update the Actor
 | 
			
		||||
    return this.object.update(formData);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -59,32 +59,6 @@ export class Imperium5ActorSheet extends ActorSheet {
 | 
			
		||||
    return formData;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async openGenericRoll() {
 | 
			
		||||
    let rollData = Imperium5Utility.getBasicRollData()
 | 
			
		||||
    rollData.alias = "Dice Pool Roll", 
 | 
			
		||||
    rollData.mode  = "generic"
 | 
			
		||||
    rollData.title = `Dice Pool Roll`
 | 
			
		||||
    rollData.img = "icons/dice/d12black.svg"
 | 
			
		||||
    
 | 
			
		||||
    let rollDialog = await Imperium5RollDialog.create( this.actor, rollData);
 | 
			
		||||
    rollDialog.render( true );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async rollIDR( itemId, diceValue) { 
 | 
			
		||||
    let item = this.actor.items.get( itemId) ?? {name: "Unknown"}
 | 
			
		||||
    let myRoll = new Roll(diceValue+"x").roll({ async: false })
 | 
			
		||||
    await Imperium5Utility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
 | 
			
		||||
    let chatData = {
 | 
			
		||||
      user: game.user.id,
 | 
			
		||||
      rollMode: game.settings.get("core", "rollMode"),
 | 
			
		||||
      whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
 | 
			
		||||
      content: `${this.actor.name} has roll IDR for ${item.name} : ${myRoll.total}`
 | 
			
		||||
    }
 | 
			
		||||
    ChatMessage.create(chatData)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  /** @override */
 | 
			
		||||
  activateListeners(html) {
 | 
			
		||||
@@ -154,7 +128,7 @@ export class Imperium5ActorSheet extends ActorSheet {
 | 
			
		||||
      this.render(true);
 | 
			
		||||
    });    
 | 
			
		||||
    html.find('.item-link a').click((event) => {
 | 
			
		||||
      const itemId = $(event.currentTarget).data("item-id");
 | 
			
		||||
      const itemId = $(event.currentTarget).data("item-id")
 | 
			
		||||
      const item = this.actor.getOwnedItem(itemId);
 | 
			
		||||
      item.sheet.render(true);
 | 
			
		||||
    });    
 | 
			
		||||
@@ -183,7 +157,6 @@ export class Imperium5ActorSheet extends ActorSheet {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async _onDropItemUNUSED(event, dragData) {
 | 
			
		||||
    console.log(">>>>>> DROPPED!!!!")
 | 
			
		||||
    let item = await Imperium5Utility.searchItem( dragData)
 | 
			
		||||
    if (item == undefined) {
 | 
			
		||||
      item = this.actor.items.get( dragData.data._id )
 | 
			
		||||
 
 | 
			
		||||
@@ -111,6 +111,10 @@ export class Imperium5Actor extends Actor {
 | 
			
		||||
    let item = duplicate(this.items.filter( it => it.type == "contact") || [] )
 | 
			
		||||
    return item 
 | 
			
		||||
  }
 | 
			
		||||
  getResources() {
 | 
			
		||||
    let item = duplicate(this.items.filter( it => it.type == "equipement" || it.type == "singularite" || it.type == "capacite" || it.type == "contact") || [] )
 | 
			
		||||
    return item 
 | 
			
		||||
  }
 | 
			
		||||
  getUnusedParadigmes() {
 | 
			
		||||
    let paraList = []
 | 
			
		||||
    for(let k in this.system.paradigmes) {
 | 
			
		||||
@@ -124,10 +128,21 @@ export class Imperium5Actor extends Actor {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  incDecKarma( value ) {
 | 
			
		||||
  transferToSource( nbSuccess) {
 | 
			
		||||
    let karma = duplicate(this.system.karma)
 | 
			
		||||
    karma.value += value
 | 
			
		||||
    karma.source += Number(nbSuccess)
 | 
			
		||||
    let nbKarma = Math.floor(karma.source / 3)    
 | 
			
		||||
    karma.value += nbKarma
 | 
			
		||||
    karma.source -= nbKarma*3
 | 
			
		||||
    this.update( { 'system.karma': karma})
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  decOneKarma(  ) {
 | 
			
		||||
    let karma = duplicate(this.system.karma)
 | 
			
		||||
    karma.value--
 | 
			
		||||
    karma.value = Math.max(karma.value, 0)
 | 
			
		||||
    karma.xp++
 | 
			
		||||
    this.update( { 'system.karma': karma})
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -265,6 +280,8 @@ export class Imperium5Actor extends Actor {
 | 
			
		||||
    rollData.img = this.img
 | 
			
		||||
    rollData.capacites = this.getUnusedCapacites()
 | 
			
		||||
    rollData.paradigmes = this.getUnusedParadigmes()
 | 
			
		||||
    rollData.ressources = this.getResources()
 | 
			
		||||
    rollData.selectedRessources = []
 | 
			
		||||
    rollData.selectedParadigme = "none"
 | 
			
		||||
    rollData.karma = this.system.karma.value
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@
 | 
			
		||||
import { Imperium5Actor } from "./imperium5-actor.js";
 | 
			
		||||
import { Imperium5ItemSheet } from "./imperium5-item-sheet.js";
 | 
			
		||||
import { Imperium5ActorSheet } from "./imperium5-actor-sheet.js";
 | 
			
		||||
import { Imperium5ActorPMSheet } from "./imperium5-actor-pm-sheet.js";
 | 
			
		||||
import { Imperium5Utility } from "./imperium5-utility.js";
 | 
			
		||||
import { Imperium5Combat } from "./imperium5-combat.js";
 | 
			
		||||
import { Imperium5Item } from "./imperium5-item.js";
 | 
			
		||||
@@ -50,6 +51,7 @@ Hooks.once("init", async function () {
 | 
			
		||||
  // Register sheet application classes
 | 
			
		||||
  Actors.unregisterSheet("core", ActorSheet)
 | 
			
		||||
  Actors.registerSheet("fvtt-imperium5", Imperium5ActorSheet, { types: ["character"], makeDefault: true })
 | 
			
		||||
  Actors.registerSheet("fvtt-imperium5", Imperium5ActorPMSheet, { types: ["pm"], makeDefault: true })
 | 
			
		||||
 | 
			
		||||
  Items.unregisterSheet("core", ItemSheet)
 | 
			
		||||
  Items.registerSheet("fvtt-imperium5", Imperium5ItemSheet, { makeDefault: true } )
 | 
			
		||||
 
 | 
			
		||||
@@ -68,8 +68,8 @@ export class Imperium5RollDialog extends Dialog {
 | 
			
		||||
      this.rollData.useArchetype = event.currentTarget.checked
 | 
			
		||||
      this.updatePCPool()
 | 
			
		||||
    })    
 | 
			
		||||
    html.find('#select-use-aide').change(async (event) =>  {
 | 
			
		||||
      this.rollData.useAide = event.currentTarget.checked
 | 
			
		||||
    html.find('#select-aide-pj').change(async (event) =>  {
 | 
			
		||||
      this.rollData.nbAide = Number(event.currentTarget.value)
 | 
			
		||||
      this.updatePCPool()
 | 
			
		||||
    })
 | 
			
		||||
    html.find('#select-use-karma').change(async (event) =>  {
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,7 @@ export class Imperium5Utility {
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static async init() {
 | 
			
		||||
    Hooks.on('renderChatLog', (log, html, data) => Imperium5Utility.chatListeners(html));
 | 
			
		||||
    Hooks.on("getChatLogEntryContext", (html, options) => Imperium5Utility.chatRollMenu(html, options))
 | 
			
		||||
 | 
			
		||||
    Hooks.on("getCombatTrackerEntryContext", (html, options) => {
 | 
			
		||||
      Imperium5Utility.pushInitiativeOptions(html, options);
 | 
			
		||||
@@ -48,6 +49,38 @@ export class Imperium5Utility {
 | 
			
		||||
    Handlebars.registerHelper('exists', function (val) {
 | 
			
		||||
      return val != null && val != undefined;
 | 
			
		||||
    })
 | 
			
		||||
    Handlebars.registerHelper('for', function (from, to, incr, block) {
 | 
			
		||||
      var accum = '';
 | 
			
		||||
      for (var i = from; i < to; i += incr)
 | 
			
		||||
        accum += block.fn(i);
 | 
			
		||||
      return accum;
 | 
			
		||||
    })
 | 
			
		||||
    Handlebars.registerHelper('times', function (n, block) {
 | 
			
		||||
      var accum = '';
 | 
			
		||||
      for (var i = 1; i <= n; ++i)
 | 
			
		||||
        accum += block.fn(i);
 | 
			
		||||
      return accum;
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static registerSettings() {
 | 
			
		||||
    game.settings.register("fvtt-imperium5", "use-entropie-reussite", {
 | 
			
		||||
      name: "Utilisation du dé d'Entropie dans les réussites",
 | 
			
		||||
      hint: "Si coché, ajoute 1 succès au joueur sur un 2, et 1 succés au MJ sur un 7.",
 | 
			
		||||
      scope: "world",
 | 
			
		||||
      config: true,
 | 
			
		||||
      default: false,
 | 
			
		||||
      type: Boolean
 | 
			
		||||
    })
 | 
			
		||||
    game.settings.register("fvtt-imperium5", "use-specialite", {
 | 
			
		||||
      name: "Utilisation complémentaire des Spécialités",
 | 
			
		||||
      hint: "Si coché, les Spécialités peuvent permettre de réduire de 1 la valeur d'un dé",
 | 
			
		||||
      scope: "world",
 | 
			
		||||
      config: true,
 | 
			
		||||
      default: false,
 | 
			
		||||
      type: Boolean
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -56,7 +89,7 @@ export class Imperium5Utility {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static async ready() {
 | 
			
		||||
 | 
			
		||||
    this.registerSettings()
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -90,14 +123,44 @@ export class Imperium5Utility {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static async chatListeners(html) {
 | 
			
		||||
 | 
			
		||||
    html.on("click", '.button-apply-paradigme', event => {
 | 
			
		||||
      let paraKey = $(event.currentTarget).data("para-key")
 | 
			
		||||
    html.on("change", '.select-apply-paradigme', event => {
 | 
			
		||||
      let paraKey = event.currentTarget.value
 | 
			
		||||
      let rollData = this.getRollDataFromMessage(event)
 | 
			
		||||
      rollData.previousMessageId = Imperium5Utility.findChatMessageId(event.currentTarget)
 | 
			
		||||
      this.applyParadigme(rollData, paraKey)
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    html.on("click", '.apply-specialite', event => {
 | 
			
		||||
      let resultIndex = $(event.currentTarget).data("result-index")
 | 
			
		||||
      let rollData = this.getRollDataFromMessage(event)
 | 
			
		||||
      rollData.previousMessageId = Imperium5Utility.findChatMessageId(event.currentTarget)
 | 
			
		||||
      this.applySpecialite(rollData, resultIndex)
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    html.on("change", '.transfer-success', event => {
 | 
			
		||||
      let nbSuccess = event.currentTarget.value
 | 
			
		||||
      let rollData = this.getRollDataFromMessage(event)
 | 
			
		||||
      rollData.previousMessageId = Imperium5Utility.findChatMessageId(event.currentTarget)
 | 
			
		||||
      this.applySuccessTransfer(rollData, nbSuccess)
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    html.on("change", '.select-ressource', async event => {
 | 
			
		||||
      // Filter / remove the ressource
 | 
			
		||||
      let rollData = this.getRollDataFromMessage(event)
 | 
			
		||||
      let ressource = rollData.ressources.find(r => r._id == event.currentTarget.value)
 | 
			
		||||
      rollData.selectedRessources.push(ressource)
 | 
			
		||||
      rollData.ressources = rollData.ressources.filter(r => r._id != event.currentTarget.value)
 | 
			
		||||
      rollData.realSuccessPC--;
 | 
			
		||||
      this.computeIntensite(rollData)
 | 
			
		||||
      // Update the roll data in the message
 | 
			
		||||
      rollData.previousMessageId = Imperium5Utility.findChatMessageId(event.currentTarget)
 | 
			
		||||
      let msg = await this.createChatWithRollMode(rollData.alias, {
 | 
			
		||||
        content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData)
 | 
			
		||||
      })
 | 
			
		||||
      msg.setFlag("world", "imperium5-roll-data", rollData)
 | 
			
		||||
      this.removeChatMessageId(rollData.previousMessageId)  
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -192,24 +255,22 @@ export class Imperium5Utility {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static updateRollData(rollData) {
 | 
			
		||||
 | 
			
		||||
    let id = rollData.rollId;
 | 
			
		||||
    let oldRollData = this.rollDataStore[id] || {};
 | 
			
		||||
    let newRollData = mergeObject(oldRollData, rollData);
 | 
			
		||||
    this.rollDataStore[id] = newRollData;
 | 
			
		||||
  }
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static saveRollData(rollData) {
 | 
			
		||||
    game.socket.emit("system.fvtt-imperium5", {
 | 
			
		||||
      name: "msg_update_roll", data: rollData
 | 
			
		||||
    }); // Notify all other clients of the roll    
 | 
			
		||||
    this.updateRollData(rollData);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static getRollData(id) {
 | 
			
		||||
    return this.rollDataStore[id];
 | 
			
		||||
  static chatRollMenu(html, options) {
 | 
			
		||||
    let canApply = li => canvas.tokens.controlled.length && li.find(".imperium5-roll").length
 | 
			
		||||
    let canApplyIntensite = function (li) {
 | 
			
		||||
      let message = game.messages.get(li.attr("data-message-id"))
 | 
			
		||||
      let rollData = message.getFlag("world", "imperium5-roll-data")
 | 
			
		||||
      return (rollData.currentIntensite > 0)
 | 
			
		||||
    }
 | 
			
		||||
    options.push(
 | 
			
		||||
      {
 | 
			
		||||
        name: "Ajouer +3 (1 point de Bonne Aventure)",
 | 
			
		||||
        icon: "<i class='fas fa-user-plus'></i>",
 | 
			
		||||
        condition: canApply && canApplyIntensite,
 | 
			
		||||
        callback: li => Imperium5Utility.applyBonneAventureRoll(li, -1, "+3")
 | 
			
		||||
      }
 | 
			
		||||
    )
 | 
			
		||||
    return options
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -285,18 +346,41 @@ export class Imperium5Utility {
 | 
			
		||||
      let capa = rollData.capacites.find(c => c._id == rollData.usedCapacite)
 | 
			
		||||
      capaDice = capa.system.aide
 | 
			
		||||
    }
 | 
			
		||||
    let val = rollData.ame.value + capaDice + ((rollData.useKarma) ? 1 : 0) + ((rollData.useArchetype) ? 1 : 0) + ((rollData.useAide) ? 1 : 0) + rollData.ameMalus
 | 
			
		||||
    let val = rollData.ame.value + capaDice + ((rollData.useKarma) ? 1 : 0) + ((rollData.useArchetype) ? 1 : 0) + rollData.nbAide + rollData.ameMalus
 | 
			
		||||
    return Math.max(val, 0)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static computeReussites(rollData) {
 | 
			
		||||
    let myRoll = rollData.roll
 | 
			
		||||
    rollData.successPC = myRoll.terms[0].results.filter(res => res.result <= rollData.seuil).length
 | 
			
		||||
    rollData.successGM = myRoll.terms[4].results.filter(res => res.result <= rollData.seuil).length
 | 
			
		||||
    // Calcul des réussites sur les 2 pools
 | 
			
		||||
    rollData.successPC = rollData.resultsPC.filter(res => res.result <= rollData.seuil).length
 | 
			
		||||
    rollData.successGM = myRoll.terms[4].results.filter(res => res.result <= 2).length
 | 
			
		||||
    // Calcul du présage
 | 
			
		||||
    rollData.bonPresage = myRoll.terms[2].results[0].result == 1
 | 
			
		||||
    rollData.mauvaisPresage = myRoll.terms[2].results[0].result == 8
 | 
			
		||||
    rollData.nbUnitesNarration = Math.max( rollData.successPC-1, 0)
 | 
			
		||||
    // gestion règle optionnelle de l'Entropie
 | 
			
		||||
    if (rollData.useEntropieReussite && myRoll.terms[2].results[0].result == 2) {
 | 
			
		||||
      rollData.successPC++
 | 
			
		||||
    }
 | 
			
		||||
    if (rollData.useEntropieReussite && myRoll.terms[2].results[0].result == 7) {
 | 
			
		||||
      rollData.successGM++
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static computeIntensite(rollData) {
 | 
			
		||||
    rollData.totalIntensite = 0
 | 
			
		||||
    let pi = 3
 | 
			
		||||
    let nbSuccess = rollData.realSuccessPC
 | 
			
		||||
    while (nbSuccess) {
 | 
			
		||||
      rollData.totalIntensite += pi
 | 
			
		||||
      pi = 2 // 3 for the first, 2 after
 | 
			
		||||
      nbSuccess--
 | 
			
		||||
    }
 | 
			
		||||
    for(let r of rollData.selectedRessources) {
 | 
			
		||||
      rollData.totalIntensite += r.system.ressource
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -305,16 +389,16 @@ export class Imperium5Utility {
 | 
			
		||||
    // Karma management
 | 
			
		||||
    let actor = game.actors.get(rollData.actorId)
 | 
			
		||||
    rollData.nbKarma = 0
 | 
			
		||||
    if ( rollData.useKarma ) {
 | 
			
		||||
      actor.incDecKarma(-1)
 | 
			
		||||
    if (rollData.useKarma) {
 | 
			
		||||
      actor.decOneKarma()
 | 
			
		||||
      rollData.nbKarma++
 | 
			
		||||
    }
 | 
			
		||||
    if ( rollData.usedCapacite != "none" ) {
 | 
			
		||||
      actor.incDecKarma(-1)
 | 
			
		||||
    if (rollData.usedCapacite != "none") {
 | 
			
		||||
      actor.decOneKarma()
 | 
			
		||||
      rollData.nbKarma++
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    let nbAmeDice = this.computeDiceReserve( rollData ) 
 | 
			
		||||
    let nbAmeDice = this.computeDiceReserve(rollData)
 | 
			
		||||
    let diceFormula = `${nbAmeDice}d8[green] + 1d8[blue] + ${rollData.realiteDice}d8[red]`
 | 
			
		||||
    let humanFormula = `${nbAmeDice}d8, 1d8, ${rollData.realiteDice}d8`
 | 
			
		||||
    // Performs roll
 | 
			
		||||
@@ -326,56 +410,64 @@ export class Imperium5Utility {
 | 
			
		||||
      rollData.diceFormula = diceFormula
 | 
			
		||||
      rollData.humanFormula = humanFormula
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // local copy of results to allow changes
 | 
			
		||||
    rollData.resultsPC = duplicate(myRoll.terms[0].results)
 | 
			
		||||
    // Calcul réussites
 | 
			
		||||
    this.computeReussites(rollData)
 | 
			
		||||
    rollData.realSuccessPC = rollData.successPC // To manage source transfer
 | 
			
		||||
    this.computeIntensite(rollData)
 | 
			
		||||
 | 
			
		||||
    let msg = await this.createChatWithRollMode(rollData.alias, {
 | 
			
		||||
      content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData)
 | 
			
		||||
    })
 | 
			
		||||
    msg.setFlag("world", "imperium5-roll-data", rollData)
 | 
			
		||||
    console.log("Final rollData", rollData)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------  ------------------- */
 | 
			
		||||
  static async processParadigmeRoll(rollData) {
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static async applyParadigme(rollData, paraKey) {
 | 
			
		||||
    let actor = game.actors.get(rollData.actorId)
 | 
			
		||||
    let para = actor.system.paradigmes[paraKey]
 | 
			
		||||
    rollData.seuil = para.value
 | 
			
		||||
    rollData.usedParadigme = para.label
 | 
			
		||||
    console.log(">>>>>>>>>>NEW SEUIL : ", rollData.seuil)
 | 
			
		||||
    actor.setParadigmeUsed(paraKey)
 | 
			
		||||
 | 
			
		||||
    this.computeReussites(rollData)
 | 
			
		||||
    rollData.realSuccessPC = rollData.successPC // To manage source transfer
 | 
			
		||||
    rollData.paradigmes = []
 | 
			
		||||
    let msg = await this.createChatWithRollMode(rollData.alias, {
 | 
			
		||||
      content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData)
 | 
			
		||||
    })
 | 
			
		||||
    msg.setFlag("world", "imperium5-roll-data", rollData)
 | 
			
		||||
    this.removeChatMessageId(rollData.previousMessageId)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static async applySpecialite(rollData, resultIndex) {
 | 
			
		||||
    let res = rollData.resultsPC[resultIndex]
 | 
			
		||||
    res.result = (res.result > 1) ? res.result - 1 : res.result
 | 
			
		||||
    this.computeReussites(rollData)
 | 
			
		||||
    rollData.useSpecialite = false
 | 
			
		||||
    rollData.specialiteApplied = true
 | 
			
		||||
    let msg = await this.createChatWithRollMode(rollData.alias, {
 | 
			
		||||
      content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData)
 | 
			
		||||
    })
 | 
			
		||||
    msg.setFlag("world", "imperium5-roll-data", rollData)
 | 
			
		||||
    this.removeChatMessageId(rollData.previousMessageId)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------  ------------------- */
 | 
			
		||||
  static async updateRoll(rollData) {
 | 
			
		||||
 | 
			
		||||
    let diceResults = rollData.diceResults
 | 
			
		||||
    let sortedRoll = []
 | 
			
		||||
    for (let i = 0; i < 10; i++) {
 | 
			
		||||
      sortedRoll[i] = 0;
 | 
			
		||||
    }
 | 
			
		||||
    for (let dice of diceResults) {
 | 
			
		||||
      sortedRoll[dice.result]++
 | 
			
		||||
    }
 | 
			
		||||
    let index = 0;
 | 
			
		||||
    let bestRoll = 0;
 | 
			
		||||
    for (let i = 0; i < 10; i++) {
 | 
			
		||||
      if (sortedRoll[i] > bestRoll) {
 | 
			
		||||
        bestRoll = sortedRoll[i]
 | 
			
		||||
        index = i
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    let bestScore = (bestRoll * 10) + index
 | 
			
		||||
    rollData.bestScore = bestScore
 | 
			
		||||
    rollData.finalScore = bestScore + rollData.negativeModifier + rollData.positiveModifier
 | 
			
		||||
 | 
			
		||||
    this.saveRollData(rollData)
 | 
			
		||||
 | 
			
		||||
    this.createChatWithRollMode(rollData.alias, {
 | 
			
		||||
      content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-generic-result.html`, rollData)
 | 
			
		||||
    });
 | 
			
		||||
  static async applySuccessTransfer(rollData, nbSuccess) {
 | 
			
		||||
    let actor = game.actors.get(rollData.actorId)
 | 
			
		||||
    actor.transferToSource(nbSuccess)
 | 
			
		||||
    rollData.realSuccessPC -= nbSuccess
 | 
			
		||||
    rollData.sourceTransfer = nbSuccess
 | 
			
		||||
    let msg = await this.createChatWithRollMode(rollData.alias, {
 | 
			
		||||
      content: await renderTemplate(`systems/fvtt-imperium5/templates/chat-generic-result.html`, rollData)
 | 
			
		||||
    })
 | 
			
		||||
    msg.setFlag("world", "imperium5-roll-data", rollData)
 | 
			
		||||
    this.removeChatMessageId(rollData.previousMessageId)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------  ------------------- */
 | 
			
		||||
@@ -471,25 +563,19 @@ export class Imperium5Utility {
 | 
			
		||||
      realiteDice: 0,
 | 
			
		||||
      ameMalus: 0,
 | 
			
		||||
      useArchetype: false,
 | 
			
		||||
      useAide: false,
 | 
			
		||||
      nbAide: 0,
 | 
			
		||||
      useKarma: false,
 | 
			
		||||
      usedCapacite: "none",
 | 
			
		||||
      seuil: 2
 | 
			
		||||
      seuil: 2,
 | 
			
		||||
      currentIntensite: -1,
 | 
			
		||||
      nbSuccessSource: 0,
 | 
			
		||||
      useSpecialite: game.settings.get("fvtt-imperium5", "use-specialite"),
 | 
			
		||||
      useEntropieReussite: game.settings.get("fvtt-imperium5", "use-entropie-reussite")
 | 
			
		||||
    }
 | 
			
		||||
    Imperium5Utility.updateWithTarget(rollData)
 | 
			
		||||
    return rollData
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static applyParadigme(rollData, paraKey) {
 | 
			
		||||
    let actor = game.actors.get(rollData.actorId)
 | 
			
		||||
    let para = actor.system.paradigmes[paraKey]
 | 
			
		||||
    rollData.seuil = para.value
 | 
			
		||||
    rollData.usedParadigme = para.label
 | 
			
		||||
    actor.setParadigmeUsed(paraKey)
 | 
			
		||||
    
 | 
			
		||||
    this.processParadigmeRoll(rollData)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static updateWithTarget(rollData) {
 | 
			
		||||
 
 | 
			
		||||
@@ -57,10 +57,10 @@
 | 
			
		||||
 | 
			
		||||
/* Fonts */
 | 
			
		||||
.sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item {
 | 
			
		||||
  font-size: 1.0rem;
 | 
			
		||||
  font-size: 0.8rem;
 | 
			
		||||
} /* For title, sidebar character and scene */
 | 
			
		||||
.sheet nav.sheet-tabs {
 | 
			
		||||
  font-size: 1.2rem;
 | 
			
		||||
  font-size: 0.8rem;
 | 
			
		||||
} /* For nav and title */
 | 
			
		||||
.window-app input, .foundryvtt-vadentis .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
 | 
			
		||||
  font-size: 0.8rem;
 | 
			
		||||
@@ -446,7 +446,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.sheet nav.sheet-tabs {
 | 
			
		||||
  font-size: 1.0rem;
 | 
			
		||||
  font-size: 0.8rem;
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
  height: 2.5rem;
 | 
			
		||||
  flex: 0 0 3rem;
 | 
			
		||||
@@ -1165,7 +1165,7 @@ ul, li {
 | 
			
		||||
.common-button {
 | 
			
		||||
  box-shadow: inset 0px 1px 0px 0px #a6827e;
 | 
			
		||||
  background: linear-gradient(to bottom, #B8A799F0 5%, #80624af0 100%);
 | 
			
		||||
  background-color: #B8A799F0; /*#7d5d3b00;*/
 | 
			
		||||
  background-color: #80624af0; /*#7d5d3b00;*/
 | 
			
		||||
  border-radius: 4px;
 | 
			
		||||
  opacity: 60%;
 | 
			
		||||
  border: 2px ridge #846109;
 | 
			
		||||
@@ -1177,6 +1177,11 @@ ul, li {
 | 
			
		||||
  position: relative;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.common-button option {
 | 
			
		||||
  background: linear-gradient(to bottom, #B8A799F0 5%, #80624af0 100%);
 | 
			
		||||
  background-color: #80624af0; /*#7d5d3b00;*/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.common-button:hover {
 | 
			
		||||
  background: linear-gradient(to bottom, #97B5AEFF 5%, rgb(101, 167, 151) 100%);
 | 
			
		||||
  background-color: #97B5AEFF;
 | 
			
		||||
@@ -1397,6 +1402,10 @@ ul, li {
 | 
			
		||||
  width: 64px;
 | 
			
		||||
  height: auto;
 | 
			
		||||
}
 | 
			
		||||
.separator-slash {
 | 
			
		||||
  width: 0.8rem;
 | 
			
		||||
  max-width: 0.8rem;
 | 
			
		||||
}
 | 
			
		||||
.item-name-img {
 | 
			
		||||
  flex-grow:1;
 | 
			
		||||
  max-width: 2rem;
 | 
			
		||||
@@ -1433,6 +1442,16 @@ ul, li {
 | 
			
		||||
  max-width: 8rem;
 | 
			
		||||
  min-width: 8rem;
 | 
			
		||||
}
 | 
			
		||||
.item-field-label-long2 {
 | 
			
		||||
  flex-grow:1;
 | 
			
		||||
  max-width: 20rem;
 | 
			
		||||
  min-width: 20rem;
 | 
			
		||||
}
 | 
			
		||||
.item-field-label-long2-no-img {
 | 
			
		||||
  flex-grow:1;
 | 
			
		||||
  max-width: 18rem;
 | 
			
		||||
  min-width: 18rem;
 | 
			
		||||
}
 | 
			
		||||
.item-control-end {
 | 
			
		||||
  align-self: flex-end;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								system.json
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								system.json
									
									
									
									
									
								
							@@ -7,7 +7,15 @@
 | 
			
		||||
      "flags": {}
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "version": "10.0.4",
 | 
			
		||||
  "languages": [
 | 
			
		||||
    {
 | 
			
		||||
      "lang": "fr",
 | 
			
		||||
      "name": "Français",
 | 
			
		||||
      "path": "lang/fr.json",
 | 
			
		||||
      "flags": {}
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "version": "10.0.13",
 | 
			
		||||
  "compatibility": {
 | 
			
		||||
    "minimum": "10",
 | 
			
		||||
    "verified": "10",
 | 
			
		||||
@@ -67,5 +75,5 @@
 | 
			
		||||
  "background": "images/ui/imperium5_welcome_page.webp",
 | 
			
		||||
  "url": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5",
 | 
			
		||||
  "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5/raw/branch/master/system.json",
 | 
			
		||||
  "download": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5/archive/fvtt-imperium5-v10.0.4.zip"
 | 
			
		||||
  "download": "https://www.uberwald.me/gitea/uberwald/fvtt-imperium5/archive/fvtt-imperium5-v10.0.13.zip"
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,8 @@
 | 
			
		||||
{
 | 
			
		||||
  "Actor": {
 | 
			
		||||
    "types": [
 | 
			
		||||
      "character"
 | 
			
		||||
      "character",
 | 
			
		||||
      "pm"
 | 
			
		||||
    ],
 | 
			
		||||
    "templates": {
 | 
			
		||||
      "biodata": {
 | 
			
		||||
@@ -21,7 +22,8 @@
 | 
			
		||||
          "description": "",
 | 
			
		||||
          "rebuild": "",
 | 
			
		||||
          "contacts": "",
 | 
			
		||||
          "gmnotes": ""
 | 
			
		||||
          "gmnotes": "",
 | 
			
		||||
          "archetype": ""
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      "core": {
 | 
			
		||||
@@ -126,6 +128,34 @@
 | 
			
		||||
          "seuil": 0,
 | 
			
		||||
          "reserve": 0
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      "pmcore": {
 | 
			
		||||
        "ames": {
 | 
			
		||||
          "niveau": 0,
 | 
			
		||||
          "intensite": 1,
 | 
			
		||||
          "riposte": 1,
 | 
			
		||||
          "cohesions": [
 | 
			
		||||
            {
 | 
			
		||||
              "max": 1,
 | 
			
		||||
              "value": 1
 | 
			
		||||
            }
 | 
			
		||||
          ],
 | 
			
		||||
          "rupture": 0
 | 
			
		||||
        },
 | 
			
		||||
        "paradigmes": {
 | 
			
		||||
          "custom01": {
 | 
			
		||||
            "label": "A changer",
 | 
			
		||||
            "value": 0,
 | 
			
		||||
            "used": false,
 | 
			
		||||
            "editable": true
 | 
			
		||||
          },
 | 
			
		||||
          "custom02": {
 | 
			
		||||
            "label": "A changer",
 | 
			
		||||
            "value": 0,
 | 
			
		||||
            "used": false,
 | 
			
		||||
            "editable": true
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "character": {
 | 
			
		||||
@@ -133,6 +163,12 @@
 | 
			
		||||
        "biodata",
 | 
			
		||||
        "core"
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "pm": {
 | 
			
		||||
      "templates": [
 | 
			
		||||
        "biodata",
 | 
			
		||||
        "pmcore"
 | 
			
		||||
      ]
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "Item": {
 | 
			
		||||
@@ -168,7 +204,7 @@
 | 
			
		||||
      "description": ""
 | 
			
		||||
    },
 | 
			
		||||
    "ressource": {
 | 
			
		||||
      "value": 0,
 | 
			
		||||
      "ressource": 0,
 | 
			
		||||
      "description": ""
 | 
			
		||||
    },
 | 
			
		||||
    "capacite": {
 | 
			
		||||
@@ -178,15 +214,15 @@
 | 
			
		||||
      "description": ""
 | 
			
		||||
    },
 | 
			
		||||
    "singularite": {
 | 
			
		||||
      "value": 0,
 | 
			
		||||
      "ressource": 0,
 | 
			
		||||
      "description": ""
 | 
			
		||||
    },
 | 
			
		||||
    "equipement": {
 | 
			
		||||
      "value": 0,
 | 
			
		||||
      "ressource": 0,
 | 
			
		||||
      "description": ""
 | 
			
		||||
    },
 | 
			
		||||
    "contact": {
 | 
			
		||||
      "value": 0,
 | 
			
		||||
      "ressource": 0,
 | 
			
		||||
      "description": ""
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@
 | 
			
		||||
 | 
			
		||||
    <input type="text" class="input-numeric-short padd-right status-small-label color-class-common cohesion-input"
 | 
			
		||||
      name="system.amestype.{{typeame}}.cohesion" value="{{typedata.cohesion}}" data-dtype="Number" {{#unless
 | 
			
		||||
      @root.editScore}}disabled{{/unless}} /> /
 | 
			
		||||
      @root.editScore}}disabled{{/unless}} /> <label class="ame-margin separator-slash"> / </label>
 | 
			
		||||
    <input type="text" class="input-numeric-short padd-right status-small-label color-class-common cohesion-input"
 | 
			
		||||
      name="system.amestype.{{typeame}}.cohesionmax" value="{{typedata.cohesionmax}}" data-dtype="Number" {{#unless
 | 
			
		||||
      @root.editScore}}disabled{{/unless}}>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										374
									
								
								templates/actor-pm-sheet.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										374
									
								
								templates/actor-pm-sheet.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,374 @@
 | 
			
		||||
<form class="{{cssClass}}" autocomplete="off">
 | 
			
		||||
 | 
			
		||||
  {{!-- Sheet Header --}}
 | 
			
		||||
  <header class="sheet-header">
 | 
			
		||||
    <div class="header-fields">
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <div>
 | 
			
		||||
          <h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
 | 
			
		||||
          {{!-- Sheet Tab Navigation --}}
 | 
			
		||||
          <nav class="sheet-tabs tabs" data-group="primary">
 | 
			
		||||
            <a class="item tab-title" data-tab="principal">Principal</a>
 | 
			
		||||
            <a class="item tab-title" data-tab="biodata">Bio</a>
 | 
			
		||||
          </nav>
 | 
			
		||||
        </div>
 | 
			
		||||
        <img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </header>
 | 
			
		||||
 | 
			
		||||
  {{!-- Sheet Body --}}
 | 
			
		||||
  <section class="sheet-body">
 | 
			
		||||
 | 
			
		||||
    {{!-- Combat Tab --}}
 | 
			
		||||
    <div class="tab principal" data-group="primary" data-tab="principal">
 | 
			
		||||
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
 | 
			
		||||
        <div class="flexrow">
 | 
			
		||||
          <div class="sheet-box color-bg-ame ">
 | 
			
		||||
            <span class="flexrow">
 | 
			
		||||
              <img class="ame-icon" src="systems/fvtt-imperium5/images/icons/ame_transparent.webp">
 | 
			
		||||
              <h4 class="ame-margin title-font">AMES</h4>
 | 
			
		||||
            </span>
 | 
			
		||||
 | 
			
		||||
            <div class="ame-block">
 | 
			
		||||
              <span class="flexrow">
 | 
			
		||||
                <label class="ame-margin">Niveau</label>
 | 
			
		||||
                <input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
 | 
			
		||||
                  name="system.ames.niveau" value="{{system.ames.niveau}}" data-dtype="Number" {{#unless
 | 
			
		||||
                  @root.editScore}}disabled{{/unless}} />
 | 
			
		||||
              </span>
 | 
			
		||||
 | 
			
		||||
              <span class="flexrow">
 | 
			
		||||
                <label class="ame-margin">Intensité</label>
 | 
			
		||||
                <input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
 | 
			
		||||
                  name="system.ames.intensite" value="{{system.ames.intensite}}" data-dtype="Number" {{#unless
 | 
			
		||||
                  @root.editScore}}disabled{{/unless}} />
 | 
			
		||||
              </span>
 | 
			
		||||
 | 
			
		||||
              <span class="flexrow">
 | 
			
		||||
                <label class="ame-margin">Riposte</label>
 | 
			
		||||
                <input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
 | 
			
		||||
                  name="system.ames.riposte" value="{{system.ames.riposte}}" data-dtype="Number" {{#unless
 | 
			
		||||
                  @root.editScore}}disabled{{/unless}} />
 | 
			
		||||
              </span>
 | 
			
		||||
 | 
			
		||||
              <span class="flexrow">
 | 
			
		||||
                <label class="ame-margin">Cohésion</label>        
 | 
			
		||||
                  <input type="text" class="input-numeric-short padd-right status-small-label color-class-common cohesion-input"
 | 
			
		||||
                    name="system.ames.cohesions.value" value="{{system.ames.cohesions.value}}" data-dtype="Number" {{#unless
 | 
			
		||||
                    @root.editScore}}disabled{{/unless}} /> <label class="ame-margin separator-slash"> / </label>
 | 
			
		||||
                  <input type="text" class="input-numeric-short padd-right status-small-label color-class-common cohesion-input"
 | 
			
		||||
                    name="system.ames.cohesions.max" value="{{system.ames.cohesions.max}}" data-dtype="Number" {{#unless
 | 
			
		||||
                  @root.editScore}}disabled{{/unless}}>
 | 
			
		||||
              </span>
 | 
			
		||||
        
 | 
			
		||||
      
 | 
			
		||||
              <span class="flexrow">
 | 
			
		||||
                <label class="ame-margin">Rupture</label>
 | 
			
		||||
                <select class="input-numeric-short padd-right status-small-label color-class-common" type="text"
 | 
			
		||||
                name="system.ames.rupture" value="{{system.ames.rupture}}" data-dtype="Number">
 | 
			
		||||
                {{#select system.ames.rupture}}
 | 
			
		||||
                <option value="0">0</option>
 | 
			
		||||
                <option value="-1">-1</option>
 | 
			
		||||
                <option value="-2">-2</option>
 | 
			
		||||
                <option value="-3">-3</option>
 | 
			
		||||
                <option value="-3">-4</option>
 | 
			
		||||
                {{/select}}
 | 
			
		||||
                </select>
 | 
			
		||||
              </span>
 | 
			
		||||
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="sheet-box color-bg-paradigme ">
 | 
			
		||||
 | 
			
		||||
          <span class="flexrow">
 | 
			
		||||
            <img class="ame-icon" src="systems/fvtt-imperium5/images/icons/paradigme_transparent.webp">
 | 
			
		||||
            <h4 class="ame-margin title-font">PARADIGMES</h4>
 | 
			
		||||
          </span>
 | 
			
		||||
          <ul>
 | 
			
		||||
            {{> systems/fvtt-imperium5/templates/actor-partial-paradigmes.html}}
 | 
			
		||||
          </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        <div class="sheet-box color-bg-archetype ">
 | 
			
		||||
 | 
			
		||||
          <span class="flexrow">
 | 
			
		||||
            <img class="ame-icon" src="systems/fvtt-imperium5/images/icons/nature_transparent.webp">
 | 
			
		||||
            <h4 class="ame-margin title-font">NATURE PROFONDE</h4>
 | 
			
		||||
          </span>
 | 
			
		||||
          {{#if nature}}
 | 
			
		||||
          <ul>
 | 
			
		||||
            <li class="item stat flexrow " data-item-id="{{nature._id}}">
 | 
			
		||||
              <img class="sheet-competence-img" src="{{nature.img}}" />
 | 
			
		||||
              <span class="item-name-label">{{nature.name}}</span>
 | 
			
		||||
              <div class="item-filler"> </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>
 | 
			
		||||
          </ul>
 | 
			
		||||
          {{else}}
 | 
			
		||||
          <ul>
 | 
			
		||||
            <li class="item stat flexrow " >
 | 
			
		||||
              <span >Aucune nature profonde</span>
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
          {{/if}}
 | 
			
		||||
 | 
			
		||||
          <h4 class="ame-margin">Traits</h4>
 | 
			
		||||
          <ul>
 | 
			
		||||
            {{#each traits as |trait key|}}
 | 
			
		||||
            <li class="item stat flexrow " data-item-id="{{trait._id}}">
 | 
			
		||||
              <img class="sheet-competence-img" src="{{trait.img}}" />
 | 
			
		||||
              <span class="item-name-label">{{trait.name}}</span>
 | 
			
		||||
              <div class="item-filler"> </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>
 | 
			
		||||
 | 
			
		||||
          <h4 class="ame-margin">Symbioses :</h4>
 | 
			
		||||
          <ul>
 | 
			
		||||
            {{#each symbioses as |symbiose key|}}
 | 
			
		||||
            <li class="item stat flexrow " data-item-id="{{symbiose._id}}">
 | 
			
		||||
              <img class="sheet-competence-img" src="{{symbiose.img}}" />
 | 
			
		||||
              <span class="item-name-label">{{symbiose.name}}</span>
 | 
			
		||||
              <div class="item-filler"> </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>
 | 
			
		||||
 | 
			
		||||
        <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">Equipement</label></h3>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Intensité</label>
 | 
			
		||||
              </span>
 | 
			
		||||
            </li>
 | 
			
		||||
            {{#each equipements as |equip key|}}
 | 
			
		||||
            <li class="item flexrow " data-item-id="{{equip._id}}">
 | 
			
		||||
              <img class="item-name-img" src="{{equip.img}}" />
 | 
			
		||||
              <span class="item-name-label">{{equip.name}}</span>
 | 
			
		||||
              <span class="item-field-label-short">{{equip.system.value}}</span>
 | 
			
		||||
 | 
			
		||||
              <div class="item-filler"> </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>
 | 
			
		||||
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <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">Capacités</label></h3>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Aide</label>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Ressource</label>
 | 
			
		||||
              </span>
 | 
			
		||||
            </li>
 | 
			
		||||
            {{#each capacites as |capa key|}}
 | 
			
		||||
            <li class="item flexrow " data-item-id="{{capa._id}}">
 | 
			
		||||
              <img class="item-name-img" src="{{capa.img}}" /></a>
 | 
			
		||||
              <span class="item-name-label">{{capa.name}}</span>
 | 
			
		||||
              <span class="item-field-label-short"">{{capa.system.aide}}</span>
 | 
			
		||||
              <span class=" item-field-label-short"">{{capa.system.ressource}}</span>
 | 
			
		||||
 | 
			
		||||
              <div class="item-filler"> </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>
 | 
			
		||||
 | 
			
		||||
        <div class="flexrow">
 | 
			
		||||
 | 
			
		||||
          <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">Singularités</label></h3>
 | 
			
		||||
                </span>
 | 
			
		||||
                <span class="item-field-label-short">
 | 
			
		||||
                  <label class="short-label">Intensité</label>
 | 
			
		||||
                </span>
 | 
			
		||||
              </li>
 | 
			
		||||
              {{#each singularites as |singul key|}}
 | 
			
		||||
              <li class="item flexrow " data-item-id="{{singul._id}}">
 | 
			
		||||
                <img class="item-name-img" src="{{singul.img}}" />
 | 
			
		||||
                <span class="item-name-label">{{singul.name}}</span>
 | 
			
		||||
                <span class="item-field-label-short">{{singul.system.value}}</span>
 | 
			
		||||
 | 
			
		||||
                <div class="item-filler"> </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>
 | 
			
		||||
 | 
			
		||||
          <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">Contacts/Finances</label></h3>
 | 
			
		||||
                </span>
 | 
			
		||||
                <span class="item-field-label-short">
 | 
			
		||||
                  <label class="short-label">Intensité</label>
 | 
			
		||||
                </span>
 | 
			
		||||
              </li>
 | 
			
		||||
              {{#each contacts as |contact key|}}
 | 
			
		||||
              <li class="item flexrow " data-item-id="{{contact._id}}">
 | 
			
		||||
                <img class="item-name-img" src="{{contact.img}}" />
 | 
			
		||||
                <span class="item-name-label">{{contact.name}}</span>
 | 
			
		||||
                <span class="item-field-label-short">{{contact.system.value}}</span>
 | 
			
		||||
 | 
			
		||||
                <div class="item-filler"> </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>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    {{!-- Biography Tab --}}
 | 
			
		||||
    <div class="tab biodata" data-group="primary" data-tab="biodata">
 | 
			
		||||
      <div class="grid grid-3col">
 | 
			
		||||
        <div>
 | 
			
		||||
          <ul class="item-list alternate-list">
 | 
			
		||||
            <li class="item flexrow">
 | 
			
		||||
              <label class="generic-label">Imperium</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.imperium" value="{{system.biodata.imperium}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
            <li class="item flexrow">
 | 
			
		||||
              <label class="generic-label">ADM ID</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.admid" value="{{system.biodata.admid}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
            <li class="item flexrow">
 | 
			
		||||
              <label class="generic-label">Age</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div>
 | 
			
		||||
          <ul>
 | 
			
		||||
            <li class="flexrow item">
 | 
			
		||||
              <label class="generic-label">Poids</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.weight" value="{{system.biodata.weight}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
            <li class="flexrow item">
 | 
			
		||||
              <label class="generic-label">Sexe</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
            <li class="item flexrow">
 | 
			
		||||
              <label class="generic-label">Taille</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.size" value="{{system.biodata.size}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div>
 | 
			
		||||
          <li class="item flexrow">
 | 
			
		||||
            <label class="generic-label">Yeux</label>
 | 
			
		||||
            <input type="text" class="" name="system.biodata.eyes" value="{{system.biodata.eyes}}"
 | 
			
		||||
              data-dtype="String" />
 | 
			
		||||
          </li>
 | 
			
		||||
          <li class="flexrow item">
 | 
			
		||||
            <label class="generic-label">Main préférée</label>
 | 
			
		||||
            <input type="text" class="" name="system.biodata.preferredhand" value="{{system.biodata.preferredhand}}"
 | 
			
		||||
              data-dtype="String" />
 | 
			
		||||
          </li>
 | 
			
		||||
          <li class="item flexrow">
 | 
			
		||||
            <label class="generic-label">Cheveux</label>
 | 
			
		||||
            <input type="text" class="" name="system.biodata.hair" value="{{system.biodata.hair}}"
 | 
			
		||||
              data-dtype="String" />
 | 
			
		||||
          </li>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <div>
 | 
			
		||||
          <h3>Apparence actuelle : </h3>
 | 
			
		||||
          <div class="form-group small-editor">
 | 
			
		||||
            {{editor system.biodata.appactual target="system.biodata.appactual" button=true owner=owner
 | 
			
		||||
            editable=editable}}
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div>
 | 
			
		||||
          <h3>Traits particuliers : </h3>
 | 
			
		||||
          <div class="form-group small-editor">
 | 
			
		||||
            {{editor system.biodata.traits target="system.biodata.traits" button=true owner=owner
 | 
			
		||||
            editable=editable}}
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <h3>Qui suis-je : </h3>
 | 
			
		||||
      <div class="form-group editor">
 | 
			
		||||
        {{editor system.biodata.whoami target="system.biodata.whoami" button=true owner=owner
 | 
			
		||||
        editable=editable}}
 | 
			
		||||
      </div>
 | 
			
		||||
      <hr>
 | 
			
		||||
      <h3>Notes : </h3>
 | 
			
		||||
      <div class="form-group editor">
 | 
			
		||||
        {{editor system.biodata.notes target="system.biodata.notes" button=true owner=owner editable=editable}}
 | 
			
		||||
      </div>
 | 
			
		||||
      <hr>
 | 
			
		||||
      </article>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
  </section>
 | 
			
		||||
</form>
 | 
			
		||||
@@ -30,15 +30,18 @@
 | 
			
		||||
            <h4 class="ame-margin title-font">KARMA</h4>
 | 
			
		||||
            <span class="item-name-label flexrow">Karma
 | 
			
		||||
              <input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
 | 
			
		||||
                  name="system.karma.value" value="{{system.karma.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} /> 
 | 
			
		||||
                name="system.karma.value" value="{{system.karma.value}}" data-dtype="Number" {{#unless
 | 
			
		||||
                @root.editScore}}disabled{{/unless}} />
 | 
			
		||||
            </span>
 | 
			
		||||
            <span class="item-name-label flexrow">Source
 | 
			
		||||
              <input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
 | 
			
		||||
                  name="system.karma.source" value="{{system.karma.source}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} /> 
 | 
			
		||||
                name="system.karma.source" value="{{system.karma.source}}" data-dtype="Number" {{#unless
 | 
			
		||||
                @root.editScore}}disabled{{/unless}} />
 | 
			
		||||
            </span>
 | 
			
		||||
            <span class="item-name-label flexrow">XP
 | 
			
		||||
              <input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
 | 
			
		||||
                  name="system.karma.xp" value="{{system.karma.xp}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} /> 
 | 
			
		||||
                name="system.karma.xp" value="{{system.karma.xp}}" data-dtype="Number" {{#unless
 | 
			
		||||
                @root.editScore}}disabled{{/unless}} />
 | 
			
		||||
            </span>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
@@ -52,11 +55,14 @@
 | 
			
		||||
              <img class="ame-icon" src="systems/fvtt-imperium5/images/icons/ame_transparent.webp">
 | 
			
		||||
              <h4 class="ame-margin title-font">AMES</h4>
 | 
			
		||||
            </span>
 | 
			
		||||
            {{>systems/fvtt-imperium5/templates/actor-partial-ames.html typeame="physique" typedata=system.amestype.physique}}
 | 
			
		||||
            {{>systems/fvtt-imperium5/templates/actor-partial-ames.html typeame="physique"
 | 
			
		||||
            typedata=system.amestype.physique}}
 | 
			
		||||
 | 
			
		||||
            {{>systems/fvtt-imperium5/templates/actor-partial-ames.html typeame="social" typedata=system.amestype.social}}
 | 
			
		||||
            {{>systems/fvtt-imperium5/templates/actor-partial-ames.html typeame="social"
 | 
			
		||||
            typedata=system.amestype.social}}
 | 
			
		||||
 | 
			
		||||
            {{>systems/fvtt-imperium5/templates/actor-partial-ames.html typeame="mental" typedata=system.amestype.mental}}
 | 
			
		||||
            {{>systems/fvtt-imperium5/templates/actor-partial-ames.html typeame="mental"
 | 
			
		||||
            typedata=system.amestype.mental}}
 | 
			
		||||
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
@@ -68,6 +74,8 @@
 | 
			
		||||
              <h4 class="ame-margin title-font">ARCHETYPE</h4>
 | 
			
		||||
            </span>
 | 
			
		||||
            <h4 class="ame-margin"></h4>
 | 
			
		||||
 | 
			
		||||
            {{#if archetype}}
 | 
			
		||||
            <ul>
 | 
			
		||||
              <li class="item stat flexrow" data-item-id="{{archetype._id}}">
 | 
			
		||||
                <img class="sheet-competence-img" src="{{archetype.img}}" /></a>
 | 
			
		||||
@@ -79,6 +87,14 @@
 | 
			
		||||
                </div>
 | 
			
		||||
              </li>
 | 
			
		||||
            </ul>
 | 
			
		||||
            {{else}}
 | 
			
		||||
            <ul>
 | 
			
		||||
              <li class="item stat flexrow">
 | 
			
		||||
                <span>Aucun archetype</span>
 | 
			
		||||
              </li>
 | 
			
		||||
            </ul>
 | 
			
		||||
 | 
			
		||||
            {{/if}}
 | 
			
		||||
 | 
			
		||||
            <h4 class="ame-margin">Spécialités</h4>
 | 
			
		||||
            <ul>
 | 
			
		||||
@@ -133,6 +149,8 @@
 | 
			
		||||
            <img class="ame-icon" src="systems/fvtt-imperium5/images/icons/nature_transparent.webp">
 | 
			
		||||
            <h4 class="ame-margin title-font">NATURE PROFONDE</h4>
 | 
			
		||||
          </span>
 | 
			
		||||
 | 
			
		||||
          {{#if nature}}
 | 
			
		||||
          <ul>
 | 
			
		||||
            <li class="item stat flexrow " data-item-id="{{nature._id}}">
 | 
			
		||||
              <img class="sheet-competence-img" src="{{nature.img}}" />
 | 
			
		||||
@@ -144,6 +162,13 @@
 | 
			
		||||
              </div>
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
          {{else}}
 | 
			
		||||
          <ul>
 | 
			
		||||
            <li class="item stat flexrow ">
 | 
			
		||||
              <span>Aucune nature profonde</span>
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
          {{/if}}
 | 
			
		||||
 | 
			
		||||
          <h4 class="ame-margin">Traits</h4>
 | 
			
		||||
          <ul>
 | 
			
		||||
@@ -189,48 +214,18 @@
 | 
			
		||||
        <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">Equipement</label></h3>
 | 
			
		||||
              <span class="item-name-label-header item-field-label-long2">
 | 
			
		||||
                <h3><label class="item-field-label-long2">Equipement</label></h3>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Intensité</label>
 | 
			
		||||
              <span class="item-field-label-long">
 | 
			
		||||
                <label class="item-field-label-long">Ressouce/Intensité</label>
 | 
			
		||||
              </span>
 | 
			
		||||
            </li>
 | 
			
		||||
            {{#each equipements as |equip key|}}
 | 
			
		||||
            <li class="item flexrow " data-item-id="{{equip._id}}">
 | 
			
		||||
              <img class="item-name-img" src="{{equip.img}}" />
 | 
			
		||||
              <span class="item-name-label">{{equip.name}}</span>
 | 
			
		||||
              <span class="item-field-label-short">{{equip.system.value}}</span>
 | 
			
		||||
 | 
			
		||||
              <div class="item-filler"> </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>
 | 
			
		||||
 | 
			
		||||
        <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">Capacités</label></h3>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Aide</label>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Ressource</label>
 | 
			
		||||
              </span>
 | 
			
		||||
            </li>
 | 
			
		||||
            {{#each capacites as |capa key|}}
 | 
			
		||||
            <li class="item flexrow " data-item-id="{{capa._id}}">
 | 
			
		||||
              <img class="item-name-img" src="{{capa.img}}" /></a>
 | 
			
		||||
              <span class="item-name-label">{{capa.name}}</span>
 | 
			
		||||
              <span class="item-field-label-short"">{{capa.system.aide}}</span>
 | 
			
		||||
              <span class=" item-field-label-short"">{{capa.system.ressource}}</span>
 | 
			
		||||
              <span class="item-field-label-long2-no-img">{{equip.name}}</span>
 | 
			
		||||
              <span class="item-field-label-long">{{equip.system.ressource}}</span>
 | 
			
		||||
 | 
			
		||||
              <div class="item-filler"> </div>
 | 
			
		||||
              <div class="item-controls item-controls-fixed">
 | 
			
		||||
@@ -244,6 +239,38 @@
 | 
			
		||||
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <div class="sheet-box color-bg-archetype">
 | 
			
		||||
          <ul class="item-list alternate-list">
 | 
			
		||||
            <li class="item flexrow">
 | 
			
		||||
              <span class="item-name-label-header item-field-label-long2">
 | 
			
		||||
                <h3><label class="item-field-label-long2">Capacités</label></h3>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Aide</label>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-long">
 | 
			
		||||
                <label class="item-field-label-long">Ressource/Intensité</label>
 | 
			
		||||
              </span>
 | 
			
		||||
            </li>
 | 
			
		||||
            {{#each capacites as |capa key|}}
 | 
			
		||||
            <li class="item flexrow " data-item-id="{{capa._id}}">
 | 
			
		||||
              <img class="item-name-img" src="{{capa.img}}" /></a>
 | 
			
		||||
              <span class="item-field-label-long2-no-img">{{capa.name}}</span>
 | 
			
		||||
              <span class="item-field-label-short"">{{capa.system.aide}}</span>
 | 
			
		||||
            <span class=" item-field-label-short"">{{capa.system.ressource}}</span>
 | 
			
		||||
 | 
			
		||||
              <div class="item-filler"> </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>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
 | 
			
		||||
        <div class="sheet-box color-bg-archetype">
 | 
			
		||||
@@ -252,15 +279,15 @@
 | 
			
		||||
              <span class="item-name-label-header">
 | 
			
		||||
                <h3><label class="items-title-text">Singularités</label></h3>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Intensité</label>
 | 
			
		||||
              <span class="item-field-label-long">
 | 
			
		||||
                <label class="item-field-label-long">Ressource/Intensité</label>
 | 
			
		||||
              </span>
 | 
			
		||||
            </li>
 | 
			
		||||
            {{#each singularites as |singul key|}}
 | 
			
		||||
            <li class="item flexrow " data-item-id="{{singul._id}}">
 | 
			
		||||
              <img class="item-name-img" src="{{singul.img}}" />
 | 
			
		||||
              <span class="item-name-label">{{singul.name}}</span>
 | 
			
		||||
              <span class="item-field-label-short">{{singul.system.value}}</span>
 | 
			
		||||
              <span class="item-field-label-long">{{singul.system.ressource}}</span>
 | 
			
		||||
 | 
			
		||||
              <div class="item-filler"> </div>
 | 
			
		||||
              <div class="item-controls item-controls-fixed">
 | 
			
		||||
@@ -278,15 +305,15 @@
 | 
			
		||||
              <span class="item-name-label-header">
 | 
			
		||||
                <h3><label class="items-title-text">Contacts/Finances</label></h3>
 | 
			
		||||
              </span>
 | 
			
		||||
              <span class="item-field-label-short">
 | 
			
		||||
                <label class="short-label">Intensité</label>
 | 
			
		||||
              <span class="item-field-label-long">
 | 
			
		||||
                <label class="item-field-label-long">Ressource/Intensité</label>
 | 
			
		||||
              </span>
 | 
			
		||||
            </li>
 | 
			
		||||
            {{#each contacts as |contact key|}}
 | 
			
		||||
            <li class="item flexrow " data-item-id="{{contact._id}}">
 | 
			
		||||
              <img class="item-name-img" src="{{contact.img}}" />
 | 
			
		||||
              <span class="item-name-label">{{contact.name}}</span>
 | 
			
		||||
              <span class="item-field-label-short">{{contact.system.value}}</span>
 | 
			
		||||
              <span class="item-field-label-long">{{contact.system.ressource}}</span>
 | 
			
		||||
 | 
			
		||||
              <div class="item-filler"> </div>
 | 
			
		||||
              <div class="item-controls item-controls-fixed">
 | 
			
		||||
@@ -320,7 +347,8 @@
 | 
			
		||||
            </li>
 | 
			
		||||
            <li class="item flexrow">
 | 
			
		||||
              <label class="generic-label">Age</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}" data-dtype="String" />
 | 
			
		||||
              <input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
@@ -333,18 +361,21 @@
 | 
			
		||||
            </li>
 | 
			
		||||
            <li class="flexrow item">
 | 
			
		||||
              <label class="generic-label">Sexe</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}" data-dtype="String" />
 | 
			
		||||
              <input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
            <li class="item flexrow">
 | 
			
		||||
              <label class="generic-label">Taille</label>
 | 
			
		||||
              <input type="text" class="" name="system.biodata.size" value="{{system.biodata.size}}" data-dtype="String" />
 | 
			
		||||
              <input type="text" class="" name="system.biodata.size" value="{{system.biodata.size}}"
 | 
			
		||||
                data-dtype="String" />
 | 
			
		||||
            </li>
 | 
			
		||||
          </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div>
 | 
			
		||||
          <li class="item flexrow">
 | 
			
		||||
            <label class="generic-label">Yeux</label>
 | 
			
		||||
            <input type="text" class="" name="system.biodata.eyes" value="{{system.biodata.eyes}}" data-dtype="String" />
 | 
			
		||||
            <input type="text" class="" name="system.biodata.eyes" value="{{system.biodata.eyes}}"
 | 
			
		||||
              data-dtype="String" />
 | 
			
		||||
          </li>
 | 
			
		||||
          <li class="flexrow item">
 | 
			
		||||
            <label class="generic-label">Main préférée</label>
 | 
			
		||||
@@ -353,7 +384,8 @@
 | 
			
		||||
          </li>
 | 
			
		||||
          <li class="item flexrow">
 | 
			
		||||
            <label class="generic-label">Cheveux</label>
 | 
			
		||||
            <input type="text" class="" name="system.biodata.hair" value="{{system.biodata.hair}}" data-dtype="String" />
 | 
			
		||||
            <input type="text" class="" name="system.biodata.hair" value="{{system.biodata.hair}}"
 | 
			
		||||
              data-dtype="String" />
 | 
			
		||||
          </li>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -5,58 +5,118 @@
 | 
			
		||||
  <h4 class=chat-actor-name>{{alias}}</h4>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
  <hr>
 | 
			
		||||
<hr>
 | 
			
		||||
 | 
			
		||||
  <div class="flexcol">
 | 
			
		||||
    </div>
 | 
			
		||||
<div class="flexcol">
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
    <div>
 | 
			
		||||
      <ul>
 | 
			
		||||
        <li>Réserve : {{humanFormula}}</li>
 | 
			
		||||
        <li>Score : 
 | 
			
		||||
            (
 | 
			
		||||
              {{#each roll.terms.0.results as |r k|}}
 | 
			
		||||
              {{r.result}} 
 | 
			
		||||
              {{/each}}
 | 
			
		||||
            )
 | 
			
		||||
            (
 | 
			
		||||
              {{#each roll.terms.2.results as |r k|}}
 | 
			
		||||
              {{r.result}} 
 | 
			
		||||
              {{/each}}
 | 
			
		||||
            )
 | 
			
		||||
            (
 | 
			
		||||
              {{#each roll.terms.4.results as |r k|}}
 | 
			
		||||
              {{r.result}} 
 | 
			
		||||
              {{/each}}
 | 
			
		||||
            )
 | 
			
		||||
        </li>
 | 
			
		||||
        {{#if usedParadigme}}
 | 
			
		||||
        <li>Paradigme utilisé : {{usedParadigme}}</li>
 | 
			
		||||
        {{/if}}
 | 
			
		||||
        <li>Seuil : {{seuil}}</li>
 | 
			
		||||
        <li>Succés : {{successPC}}</li>
 | 
			
		||||
        <li>Succés de Réalité : {{successGM}}</li>
 | 
			
		||||
        <li>Unités de narration : {{nbUnitesNarration}}</li>
 | 
			
		||||
        {{#if nbKarma}}
 | 
			
		||||
        <li>Points de Karma utilisés : {{nbKarma}}</li>
 | 
			
		||||
        {{/if}}
 | 
			
		||||
<div>
 | 
			
		||||
  <ul>
 | 
			
		||||
    <li class="imperium5-roll">Réserve : {{humanFormula}}</li>
 | 
			
		||||
    <li>Score :
 | 
			
		||||
      (
 | 
			
		||||
      {{#each resultsPC as |r k|}}
 | 
			
		||||
      {{#if @root.useSpecialite}}
 | 
			
		||||
      <a class="apply-specialite common-button" data-result-index="{{k}}">{{r.result}}</a>
 | 
			
		||||
      {{else}}
 | 
			
		||||
      {{r.result}}
 | 
			
		||||
      {{/if}}
 | 
			
		||||
      {{/each}}
 | 
			
		||||
      )
 | 
			
		||||
      (
 | 
			
		||||
      {{#each roll.terms.2.results as |r k|}}
 | 
			
		||||
      {{r.result}}
 | 
			
		||||
      {{/each}}
 | 
			
		||||
      )
 | 
			
		||||
      (
 | 
			
		||||
      {{#each roll.terms.4.results as |r k|}}
 | 
			
		||||
      {{r.result}}
 | 
			
		||||
      {{/each}}
 | 
			
		||||
      )
 | 
			
		||||
    </li>
 | 
			
		||||
 | 
			
		||||
        {{#if bonPresage}}
 | 
			
		||||
        <li>Bon Présage !</li>
 | 
			
		||||
        {{/if}}
 | 
			
		||||
        {{#if mauvaisPresage}}
 | 
			
		||||
        <li>Mauvais Présage !</li>
 | 
			
		||||
        {{/if}}
 | 
			
		||||
    {{#if specialiteApplied}}
 | 
			
		||||
    <li>Une Spécialité a réduit de 1 le résultat du dé</li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
        {{#if (count paradigmes)}}
 | 
			
		||||
        <li class="li-button-paradigme">
 | 
			
		||||
          {{#each paradigmes as |para key|}}
 | 
			
		||||
          <button class="common-button chat-card-button button-apply-paradigme" data-para-key="{{para.key}}">Utiliser {{para.label}} ({{para.value}})</button>
 | 
			
		||||
          {{/each}}
 | 
			
		||||
        </li>
 | 
			
		||||
        {{/if}}
 | 
			
		||||
    {{#if usedParadigme}}
 | 
			
		||||
    <li>Paradigme utilisé : {{usedParadigme}}</li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
    <li>Seuil : {{seuil}}
 | 
			
		||||
      {{#if (count paradigmes)}}
 | 
			
		||||
      <select class="common-button select-apply-paradigme" type="text" value="{{selectedParadigme}}"
 | 
			
		||||
        data-dtype="String">
 | 
			
		||||
        {{#select selectedParadigme}}
 | 
			
		||||
        <option value="none">Pas de paradigme</option>
 | 
			
		||||
        {{#each paradigmes as |para key|}}
 | 
			
		||||
        <option value="{{para.key}}">{{para.label}} ({{para.value}})</option>
 | 
			
		||||
        {{/each}}
 | 
			
		||||
        {{/select}}
 | 
			
		||||
      </select>
 | 
			
		||||
      {{/if}}
 | 
			
		||||
    </li>
 | 
			
		||||
 | 
			
		||||
    <li>Unités de narration : {{realSuccessPC}}
 | 
			
		||||
      {{#if realSuccessPC}}
 | 
			
		||||
      <select class="common-button transfer-success" type="text" value="{{nbSuccessSource}}" data-dtype="Number">
 | 
			
		||||
        {{#select nbSuccessSource}}
 | 
			
		||||
        <option value="none">0 -> Source</option>
 | 
			
		||||
        {{#times realSuccessPC}}
 | 
			
		||||
        <option value="{{this}}">{{this}} -> Source</option>
 | 
			
		||||
        {{/times}}
 | 
			
		||||
        {{/select}}
 | 
			
		||||
      </select>
 | 
			
		||||
      {{/if}}
 | 
			
		||||
    </li>
 | 
			
		||||
 | 
			
		||||
    {{#if realSuccessPC}}
 | 
			
		||||
    <li>Ressource :
 | 
			
		||||
      <select class="common-button select-ressource" type="text" value="none" data-dtype="String">
 | 
			
		||||
        {{#select "none"}}
 | 
			
		||||
        <option value="none">Aucun</option>
 | 
			
		||||
        {{#each ressources as |ressource key|}}
 | 
			
		||||
        <option value="{{ressource._id}}">{{ressource.name}} ({{ressource.system.ressource}})</option>
 | 
			
		||||
        {{/each}}
 | 
			
		||||
        {{/select}}
 | 
			
		||||
      </select>
 | 
			
		||||
    </li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
    {{#if (count selectedRessources)}}
 | 
			
		||||
    <li>Ressources utilisées : </li>
 | 
			
		||||
      <ul class="ul-level1">
 | 
			
		||||
        {{#each selectedRessources as |ressource key|}}
 | 
			
		||||
          <li>
 | 
			
		||||
            {{ressource.name}} ({{ressource.system.ressource}});
 | 
			
		||||
          </li>
 | 
			
		||||
        {{/each}}
 | 
			
		||||
      </ul>
 | 
			
		||||
    </div>
 | 
			
		||||
    </li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
  </div>
 | 
			
		||||
    {{#if totalIntensite}}
 | 
			
		||||
    <li>Intensité totale : {{totalIntensite}}</li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
    {{#if sourceTransfer}}
 | 
			
		||||
    <li>Succés transférés à la Source : {{sourceTransfer}}</li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
    <li>Succés de Réalité : {{successGM}}</li>
 | 
			
		||||
 | 
			
		||||
    {{#if nbKarma}}
 | 
			
		||||
    <li>Points de Karma utilisés : {{nbKarma}}</li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
    {{#if bonPresage}}
 | 
			
		||||
    <li>Bon Présage !</li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
    {{#if mauvaisPresage}}
 | 
			
		||||
    <li>Mauvais Présage !</li>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
 | 
			
		||||
  </ul>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
</div>
 | 
			
		||||
@@ -13,31 +13,24 @@
 | 
			
		||||
    
 | 
			
		||||
    <div class="flexcol">
 | 
			
		||||
      {{#if (exists system.capatype)}}
 | 
			
		||||
      <span>
 | 
			
		||||
        <label class="generic-label">Type de capacité : </label>        
 | 
			
		||||
      <span class="flexrow">
 | 
			
		||||
        <label class="generic-label item-field-label-long">Type de capacité : </label>        
 | 
			
		||||
        <input type="text" class="padd-right status-small-label color-class-common" name="system.capatype" value="{{system.capatype}}"
 | 
			
		||||
        data-dtype="String" />
 | 
			
		||||
      </span>
 | 
			
		||||
      {{/if}}
 | 
			
		||||
      {{#if (exists system.value)}}
 | 
			
		||||
      <span>
 | 
			
		||||
        <label class="generic-label">Valeur : </label>        
 | 
			
		||||
        <input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="system.value" value="{{system.value}}"
 | 
			
		||||
        data-dtype="Number" />
 | 
			
		||||
      </span>
 | 
			
		||||
      {{/if}}
 | 
			
		||||
 | 
			
		||||
      {{#if (exists system.aide)}}
 | 
			
		||||
      <span class="generic-label">
 | 
			
		||||
        <label>Aide : </label>        
 | 
			
		||||
      <span class="flexrow">
 | 
			
		||||
        <label class="generic-label item-field-label-long">Aide : </label>        
 | 
			
		||||
        <input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="system.aide" value="{{system.aide}}"
 | 
			
		||||
        data-dtype="Number" />
 | 
			
		||||
      </span>
 | 
			
		||||
      {{/if}}
 | 
			
		||||
 | 
			
		||||
      {{#if (exists system.ressource)}}
 | 
			
		||||
      <span class="generic-label">
 | 
			
		||||
        <label>Resource : </label>        
 | 
			
		||||
      <span class="flexrow">
 | 
			
		||||
        <label class="generic-label item-field-label-long">Resource/Intensité : </label>        
 | 
			
		||||
        <input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="system.ressource" value="{{system.ressource}}"
 | 
			
		||||
        data-dtype="Number" />
 | 
			
		||||
      </span>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,48 +1,56 @@
 | 
			
		||||
<form class="skill-roll-dialog">
 | 
			
		||||
  <header class="roll-dialog-header">
 | 
			
		||||
    {{#if img}}
 | 
			
		||||
    <img class="actor-icon" src="{{img}}" data-edit="img" title="{{name}}" />
 | 
			
		||||
    {{#if actorImg}}
 | 
			
		||||
    <img class="actor-icon" src="{{actorImg}}" data-edit="img" title="{{name}}" />
 | 
			
		||||
    {{/if}}
 | 
			
		||||
    <h1 class="dialog-roll-title roll-dialog-header">{{title}}</h1>
 | 
			
		||||
    <h1 class="dialog-roll-title roll-dialog-header">{{ame.label}} ({{ame.value}})</h1>
 | 
			
		||||
  </header>
 | 
			
		||||
 | 
			
		||||
  <div class="flexcol">
 | 
			
		||||
  <div class="flexcol sheet-box color-bg-ame">
 | 
			
		||||
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Ame : {{ame.label}} ({{ame.value}})</span>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Malus : {{ameMalus}}</span>
 | 
			
		||||
      <span class="roll-dialog-label">Ruptures : {{ameMalus}}</span>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Utiliser l'Archetype ? : </span>
 | 
			
		||||
      <input class="ame-checkbox" id="select-use-archetype" type="checkbox" {{checked useArchetype}}>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Aide d'un autre personnage ? : </span>
 | 
			
		||||
      <input class="ame-checkbox" id="select-use-aide" type="checkbox" {{checked useAide}}>
 | 
			
		||||
      <span class="roll-dialog-label">Aides ? : </span>
 | 
			
		||||
      <select class="roll-dialog-label" id="select-aide-pj" type="text" name="nbAide" value="{{nbAide}}"
 | 
			
		||||
        data-dtype="Number">
 | 
			
		||||
        {{#select nbAide}}
 | 
			
		||||
        <option value="0">0</option>
 | 
			
		||||
        <option value="1">1</option>
 | 
			
		||||
        <option value="2">2</option>
 | 
			
		||||
        <option value="3">3</option>
 | 
			
		||||
        {{/select}}
 | 
			
		||||
      </select>
 | 
			
		||||
    </div>
 | 
			
		||||
    {{#if karma}}
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <span class="roll-dialog-label">Utiliser une capacité : </span>
 | 
			
		||||
        <select class="roll-dialog-label" id="select-capacite" type="text" name="usedCapacite" value="{{usedCapacite}}"
 | 
			
		||||
          data-dtype="Number">
 | 
			
		||||
          {{#select usedCapacite}}
 | 
			
		||||
          <option value="none">Aucune</option>
 | 
			
		||||
            {{#each capacites as |capa key|}}
 | 
			
		||||
            <option value="{{capa._id}}">{{capa.name}} ({{capa.system.aide}})</option>
 | 
			
		||||
            {{/each}}
 | 
			
		||||
          {{/select}}
 | 
			
		||||
        </select>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <span class="roll-dialog-label">Utiliser 1 Point de Karma ? : </span>
 | 
			
		||||
        <input class="ame-checkbox" id="select-use-karma" type="checkbox" {{checked useKarma}}>
 | 
			
		||||
      </div>
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Utiliser une capacité : </span>
 | 
			
		||||
      <select class="roll-dialog-label" id="select-capacite" type="text" name="usedCapacite" value="{{usedCapacite}}"
 | 
			
		||||
        data-dtype="Number">
 | 
			
		||||
        {{#select usedCapacite}}
 | 
			
		||||
        <option value="none">Aucune</option>
 | 
			
		||||
        {{#each capacites as |capa key|}}
 | 
			
		||||
        <option value="{{capa._id}}">{{capa.name}} ({{capa.system.aide}})</option>
 | 
			
		||||
        {{/each}}
 | 
			
		||||
        {{/select}}
 | 
			
		||||
      </select>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Utiliser 1 Point de Karma ? : </span>
 | 
			
		||||
      <input class="ame-checkbox" id="select-use-karma" type="checkbox" {{checked useKarma}}>
 | 
			
		||||
    </div>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Total : <span id="ame-total">{{ame.value}}</span>d8</span>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  <div class="flexcol sheet-box color-bg-archetype">
 | 
			
		||||
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <span class="roll-dialog-label">Dés de Réalité : </span>
 | 
			
		||||
@@ -60,6 +68,7 @@
 | 
			
		||||
      </select>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user