
export const ROLL_TYPE_ATTAQUE = 'attaque'
export const ROLL_TYPE_POSSESSION = 'possession'
export const ROLL_TYPE_COMP = 'comp'
export const ROLL_TYPE_CUISINE = 'cuisine'
export const ROLL_TYPE_DEFENSE = 'defense'
export const ROLL_TYPE_JEU = 'jeu'
export const ROLL_TYPE_MEDITATION = 'meditation'
export const ROLL_TYPE_OEUVRE = 'oeuvre'
export const ROLL_TYPE_SORT = 'sort'
export const ROLL_TYPE_TACHE = 'tache'
export const ROLL_TYPE_APPEL_CHANCE = 'appel-chance'
export const ROLL_TYPE_REVE_RESISTANCE = 'reve-resistance'

export const ATTAQUE_ROLL_TYPES = [ROLL_TYPE_ATTAQUE]
export const COMBAT_ROLL_TYPES = [ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE]
export const DEMIREVE_ROLL_TYPES = [ROLL_TYPE_SORT]
export const DEFAULT_ROLL_TYPES = [ROLL_TYPE_COMP, ROLL_TYPE_TACHE, ROLL_TYPE_MEDITATION, ROLL_TYPE_CUISINE, ROLL_TYPE_OEUVRE, ROLL_TYPE_JEU]

export const DIFF = {
  LIBRE: 'libre',
  ATTAQUE: 'attaque',
  IMPOSEE: 'imposee',
  DEFENSE: 'defense',
  DEFAUT: 'defaut',
  AUCUN: 'aucun'
}

export const DIFFS = {
  [DIFF.LIBRE]: { key: DIFF.LIBRE, label: "Diff. libre", libre: true, visible: true, max: 0 },
  [DIFF.ATTAQUE]: { key: DIFF.ATTAQUE, label: "Diff. attaque", libre: true, visible: true, max: 0 },
  [DIFF.IMPOSEE]: { key: DIFF.IMPOSEE, label: "Diff. imposée", libre: false, visible: true, max: 20 },
  [DIFF.DEFENSE]: { key: DIFF.DEFENSE, label: "Diff. défense", libre: false, visible: true, max: 0 },
  [DIFF.DEFAUT]: { key: DIFF.DEFAUT, label: "Difficulté", libre: true, visible: true, max: 5 },
  [DIFF.AUCUN]: { key: DIFF.AUCUN, label: "", libre: false, visible: false, max: 0 },
}

export class RollConstants {
  static findCompetence(rollData, name) {
    return rollData.active.actor.getCompetence(name, { onMessage: message => { } })
  }

}

