Résolution de soucis inter-types de jets V2
- diminution de la dépendance au token cible pour les attaques - ne pas proposer l'attaque sur les jets "par défaut" - filtrer les sous-parties inutiles (ie: sorts pour les attaques, etc)
This commit is contained in:
@@ -5,7 +5,7 @@ import { ROLL_TYPE_OEUVRE } from "./roll-constants.mjs"
|
||||
import { PART_CARAC } from "./roll-part-carac.mjs"
|
||||
import { PART_COMP } from "./roll-part-comp.mjs"
|
||||
import { RollPartSelect } from "./roll-part-select.mjs"
|
||||
import { ROLLDIALOG_SECTION } from "./roll-part.mjs"
|
||||
import { ROLLDIALOG_SECTION, RollPart } from "./roll-part.mjs"
|
||||
|
||||
export const PART_OEUVRE = "oeuvre"
|
||||
|
||||
@@ -35,8 +35,9 @@ export class RollPartOeuvre extends RollPartSelect {
|
||||
get code() { return PART_OEUVRE }
|
||||
get section() { return ROLLDIALOG_SECTION.CHOIX }
|
||||
|
||||
get rollTypes() { return [ROLL_TYPE_OEUVRE] }
|
||||
isValid(rollData) { return rollData.active.actor.isPersonnage() }
|
||||
visible(rollData) { return this.isRollType(rollData, ROLL_TYPE_OEUVRE) }
|
||||
visible(rollData) { return RollPart.isRollType(rollData, ROLL_TYPE_OEUVRE) }
|
||||
|
||||
loadRefs(rollData) {
|
||||
const refs = this.getRefs(rollData)
|
||||
@@ -88,7 +89,7 @@ export class RollPartOeuvre extends RollPartSelect {
|
||||
const current = this.getCurrent(rollData)
|
||||
switch (part.code) {
|
||||
case PART_CARAC: return part.filterCaracs(rollData, current.caracs)
|
||||
case PART_COMP: return part.filterComps(rollData,[current.comp?.name])
|
||||
case PART_COMP: return part.filterComps(rollData, [current.comp?.name])
|
||||
}
|
||||
}
|
||||
return undefined
|
||||
|
||||
Reference in New Issue
Block a user