forked from public/foundryvtt-reve-de-dragon
v10 migration, ongoing WIP
This commit is contained in:
@ -845,6 +845,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateCarac(caracName, caracValue) {
|
||||
console.log("Carac change", caracName)
|
||||
if (caracName == "force") {
|
||||
if (Number(caracValue) > this.getTaille() + 4) {
|
||||
ui.notifications.warn("Votre FORCE doit être au maximum de TAILLE+4");
|
||||
@ -951,11 +952,11 @@ export class RdDActor extends Actor {
|
||||
if (competence) {
|
||||
const update = { _id: competence.id }
|
||||
if (fieldName == "niveau")
|
||||
update['data.niveau'] = compValue;
|
||||
update['system.niveau'] = compValue;
|
||||
else if (fieldName == "dommages")
|
||||
update['data.dommages'] = compValue;
|
||||
update['system.dommages'] = compValue;
|
||||
else
|
||||
update['data.carac_value'] = compValue;
|
||||
update['system.carac_value'] = compValue;
|
||||
await this.updateEmbeddedDocuments('Item', [update]); // updates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user