name: Jet de moral
type: script
author: Hp9ImM4o9YRTSdfu
img: icons/magic/control/mouth-smile-deception-purple.webp
scope: global
command: |-
  const selected = game.system.rdd.RdDUtility.getSelectedActor();
  if (!selected) {
    ui.notifications.info('Pas de personnage sélectionné');
    return;
  }

  const dialogMoral = new Dialog({
    title: `Jet de moral`,
    content: `Jet de moral en situation`,
    buttons: {
      malheureuse: { label: `malheureuse`, icon: "<i class='fa-regular fa-face-frown'></i>", callback: () => selected.jetDeMoral('malheureuse') },
      neutre: { label: `neutre`, icon: "<i class='fa-regular fa-face-meh'></i>", callback: () => selected.jetDeMoral('neutre') },
      heureuse: { label: `heureuse`, icon: "<i class='fa-regular fa-face-smile'></i>", callback: () => selected.jetDeMoral('heureuse') }
    },
  });

  dialogMoral.render(true)
ownership:
  default: 0
folder: null
sort: 0
_id: 2VvH2rmxV33jGjMU
_stats:
  systemId: foundryvtt-reve-de-dragon
  systemVersion: 12.0.22
  coreVersion: '12.331'
_key: '!macros!2VvH2rmxV33jGjMU'

