Corrections des TMRs et des Statuis #554
@ -322,8 +322,8 @@ export class RdDTMRDialog extends Dialog {
|
|||||||
this.currentRencontre.graphics = []; // Keep track of rectangles to delete it
|
this.currentRencontre.graphics = []; // Keep track of rectangles to delete it
|
||||||
this.currentRencontre.locList = duplicate(listCoordTMR); // And track of allowed location
|
this.currentRencontre.locList = duplicate(listCoordTMR); // And track of allowed location
|
||||||
for (let coordTMR of listCoordTMR) {
|
for (let coordTMR of listCoordTMR) {
|
||||||
let rect = this._getCaseRectangleCoord(coordTMR);
|
const rect = this._getCaseRectangleCoord(coordTMR);
|
||||||
var rectDraw = new PIXI.Graphics();
|
const rectDraw = new PIXI.Graphics();
|
||||||
rectDraw.beginFill(0xffff00, 0.3);
|
rectDraw.beginFill(0xffff00, 0.3);
|
||||||
// set the line style to have a width of 5 and set the color to red
|
// set the line style to have a width of 5 and set the color to red
|
||||||
rectDraw.lineStyle(5, 0xff0000);
|
rectDraw.lineStyle(5, 0xff0000);
|
||||||
@ -342,18 +342,13 @@ export class RdDTMRDialog extends Dialog {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async choisirCasePortee(coord, portee) {
|
async choisirCasePortee(coord, portee) {
|
||||||
if (this.actor.isTMRCache()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Récupère la liste des cases à portées
|
// Récupère la liste des cases à portées
|
||||||
let locList = TMRUtility.getTMRPortee(coord, portee);
|
this.colorierZoneRencontre(TMRUtility.getTMRPortee(coord, portee));
|
||||||
this.colorierZoneRencontre(locList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async choisirCaseType(type) {
|
async choisirCaseType(type) {
|
||||||
const locList = TMRUtility.filterTMR(it => it.type == type).map(it => it.coord);
|
this.colorierZoneRencontre(TMRUtility.filterTMR(it => it.type == type).map(it => it.coord));
|
||||||
this.colorierZoneRencontre(locList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -932,7 +927,7 @@ export class RdDTMRDialog extends Dialog {
|
|||||||
|
|
||||||
const isInArea = this.rencontreState == 'aucune'
|
const isInArea = this.rencontreState == 'aucune'
|
||||||
? (this.isTerreAttache(targetCoord) || this.isConnaissanceFleuve(currentCoord, targetCoord) || TMRUtility.distanceOddq(fromOddq, toOddq) <= 1)
|
? (this.isTerreAttache(targetCoord) || this.isConnaissanceFleuve(currentCoord, targetCoord) || TMRUtility.distanceOddq(fromOddq, toOddq) <= 1)
|
||||||
: this.currentRencontre?.locList.find(coord => coord == targetCoord) ?? false
|
: this.currentRencontre?.locList?.find(coord => coord == targetCoord) ?? false
|
||||||
if (isInArea) {
|
if (isInArea) {
|
||||||
switch (this.rencontreState) {
|
switch (this.rencontreState) {
|
||||||
case 'aucune': return 'normal';
|
case 'aucune': return 'normal';
|
||||||
|
Loading…
Reference in New Issue
Block a user