forked from public/foundryvtt-reve-de-dragon
Gestion armures
This commit is contained in:
@ -394,11 +394,25 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
equiperObjet( itemID )
|
||||
{
|
||||
let item = this.getOwnedItem(itemID);
|
||||
if ( item && item.data.data )
|
||||
item.data.data.equipe = !item.data.data.equipe;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
computeArmure( locData )
|
||||
{
|
||||
/* TODO */
|
||||
return 0;
|
||||
let protection = 0;
|
||||
for (const item of this.data.items) {
|
||||
if (item.type == "armure" && item.data.equipe) {
|
||||
protection += item.data.protection;
|
||||
}
|
||||
}
|
||||
console.log("Final protect", protection);
|
||||
return protection;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user