#110 - Update chance actuelle et mise à jour archetypes
This commit is contained in:
@ -557,6 +557,11 @@ export class RdDActor extends Actor {
|
||||
this.setPointsDeSeuil(caracValue);
|
||||
}
|
||||
}
|
||||
if (caracName == "chance") {
|
||||
if (caracValue > Misc.toInt(this.data.data.compteurs.chance.value)) {
|
||||
this.setPointsDeChance(caracValue);
|
||||
}
|
||||
}
|
||||
await this.update({ [caracpath]: caracValue });
|
||||
}
|
||||
|
||||
@ -1040,6 +1045,13 @@ export class RdDActor extends Actor {
|
||||
await this.update({ "data.reve.seuil": seuil });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setPointsDeChance(value) {
|
||||
let chance = duplicate(this.data.data.compteurs.chance);
|
||||
chance.value = value;
|
||||
await this.update({ "data.compteurs.chance": chance });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getSonne() {
|
||||
return !this.isEntiteCauchemar() && (this.data.data.sante.sonne?.value ?? false);
|
||||
@ -2509,6 +2521,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
buildVehiculesList() {
|
||||
if ( !this.data.data.subacteurs) return [];
|
||||
let myArray = [];
|
||||
for (let vehiculeLink of this.data.data.subacteurs.vehicules) {
|
||||
let vehicule = game.actors.get( vehiculeLink.id );
|
||||
@ -2521,6 +2534,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
buildSuivantsList() {
|
||||
if ( !this.data.data.subacteurs) return [];
|
||||
let myArray = [];
|
||||
for (let suivantLink of this.data.data.subacteurs.suivants) {
|
||||
let suivant = game.actors.get( suivantLink.id );
|
||||
@ -2531,6 +2545,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
buildMonturesList() {
|
||||
if ( !this.data.data.subacteurs) return [];
|
||||
let myArray = [];
|
||||
for (let montureLink of this.data.data.subacteurs.montures) {
|
||||
let monture = game.actors.get( montureLink.id );
|
||||
|
Reference in New Issue
Block a user