Ajout du StatusEffect surencombré
This commit is contained in:
@@ -228,7 +228,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
if (arme.system.lancer && arme.system.resistance > 0) { addAttaque(arme, ATTAQUE_TYPE.LANCER) }
|
||||
if (arme.system.tir) { addAttaque(arme, ATTAQUE_TYPE.TIR) }
|
||||
})
|
||||
addAttaque(RdDItemArme.pugilat(this), ATTAQUE_TYPE.CORPS_A_CORPS)
|
||||
addAttaque(RdDItemArme.pugilat(this), ATTAQUE_TYPE.CORPS_A_CORPS)
|
||||
|
||||
return actions
|
||||
}
|
||||
@@ -755,20 +755,18 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
let updates = {};
|
||||
if (caracName == LIST_CARAC_PERSONNAGE.reve.code) {
|
||||
if (to > Misc.toInt(this.system.reve.seuil.value)) {
|
||||
updates[`system.reve.seuil.value`] = to; // SFA : Direct and packed changes
|
||||
//this.setPointsDeSeuil(to);
|
||||
updates[`system.reve.seuil.value`] = to
|
||||
}
|
||||
}
|
||||
if (caracName == LIST_CARAC_PERSONNAGE.chance.code) {
|
||||
if (to > Misc.toInt(this.system.compteurs.chance.value)) {
|
||||
updates[`system.compteurs.chance.value`] = to; // SFA : Direct and packed changes
|
||||
//this.setPointsDeChance(to);
|
||||
updates[`system.compteurs.chance.value`] = to
|
||||
}
|
||||
}
|
||||
let selectedCarac = this.findCaracByName(caracName);
|
||||
const from = selectedCarac.value
|
||||
updates[`system.carac.${caracName}.value`] = to;
|
||||
await this.update(updates);
|
||||
await this.update(updates, { noHook: true });
|
||||
await ExperienceLog.add(this, XP_TOPIC.CARAC, from, to, caracName);
|
||||
}
|
||||
|
||||
@@ -1753,7 +1751,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
this.tmrApp?.close();
|
||||
this.tmrApp = undefined;
|
||||
}
|
||||
} ],
|
||||
}],
|
||||
onRollDone: RollDialog.onRollDoneClose,
|
||||
onClose: () => {
|
||||
this.tmrApp?.restoreTMRAfterAction();
|
||||
@@ -2607,7 +2605,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
if (item?.isEquipable()) {
|
||||
const isEquipe = !item.system.equipe;
|
||||
await item.update({ "system.equipe": isEquipe });
|
||||
this.computeEncTotal();
|
||||
this.computeEncTotal()
|
||||
if (isEquipe)
|
||||
this.verifierForceMin(item);
|
||||
}
|
||||
@@ -2998,6 +2996,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
if (updatedEndurance && options.diff) {
|
||||
await this.setEffect(STATUSES.StatusUnconscious, updatedEndurance.value == 0)
|
||||
}
|
||||
await super.onUpdateActor(update, options, actorId)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -3039,12 +3038,13 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
await this.onDeleteOwnedCaseTmr(item, options, id)
|
||||
break
|
||||
case ITEM_TYPES.empoignade:
|
||||
await RdDEmpoignade.deleteLinkedEmpoignade(this.id, item)
|
||||
// TODO: check remaining emp.
|
||||
await this.setEffect(STATUSES.StatusGrappled, false)
|
||||
await this.setEffect(STATUSES.StatusGrappling, false)
|
||||
await RdDEmpoignade.deleteLinkedEmpoignade(this.id, item)
|
||||
break
|
||||
}
|
||||
super.onDeleteItem(item, options, id)
|
||||
await super.onDeleteItem(item, options, id)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user