forked from public/foundryvtt-reve-de-dragon
Fix item duplication in same container
This commit is contained in:
@ -162,6 +162,9 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
} else { // This is the attack roll!
|
||||
if (rolled.isSuccess) {
|
||||
if (rolled.tache >= 3) { // Critique !
|
||||
console.log("TODO Gérer critique!");
|
||||
}
|
||||
rollData.domArmePlusDom = parseInt(rollData.arme.data.dommages);
|
||||
if (rollData.selectedCarac.label == "Mêlée") // +dom only for Melee
|
||||
rollData.domArmePlusDom += parseInt(this.data.data.attributs.plusdom.value);
|
||||
@ -196,7 +199,7 @@ export class RdDActor extends Actor {
|
||||
lvl = rollData.selectedDraconic.name + "/" + rollData.selectedSort.name;
|
||||
let myReve = duplicate(this.data.data.reve.reve);
|
||||
if (rolled.isSuccess) { // Réussite du sort !
|
||||
if (rolled.tache >= 4) costReve = Math.ceil(costReve / 2);
|
||||
if (rolled.tache >= 3) costReve = Math.ceil(costReve / 2);
|
||||
if (costReve < 1) costReve = 1;
|
||||
myReve.value = myReve.value - costReve; // Todo 0 pts de reve !!!!
|
||||
if (myReve.value < 0) myReve.value = 0;
|
||||
|
Reference in New Issue
Block a user