Ajout de la commande /voyage et grosse MAJK de la commande /auberge
This commit is contained in:
24
scripts/YrXhk2YJaWSChMhp.js
Normal file
24
scripts/YrXhk2YJaWSChMhp.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// Brawling management
|
||||
let base = this.actor.characteristics.ws.value;
|
||||
let melee = this.actor.has("Corps à corps (Bagarre)", "skill");
|
||||
if (!melee) {
|
||||
melee = await fromUuid("Compendium.wfrp4e-core.items.Item.jLyoyqwmBVPjRjhM");
|
||||
melee = melee.toObject();
|
||||
melee.system.modifier.value = 55 - base;
|
||||
await this.actor.createEmbeddedDocuments("Item", [melee], {fromEffect : this.effect.id});
|
||||
} else {
|
||||
//this.actor.updateEmbeddedDocuments("Item", { _id: melee.id, 'system.modifier.value': 55-base});
|
||||
await this.effect.update({"flags.wfrp4e.fistsOfGork" : 55 - base})
|
||||
}
|
||||
|
||||
// Weapon management
|
||||
base = this.actor.characteristics.s.bonus;
|
||||
weapon = await fromUuid("Compendium.wfrp4e-core.items.Item.AtpAudHA4ybXVlWM");
|
||||
weapon = weapon.toObject();
|
||||
weapon.name = "Fists of Gork";
|
||||
weapon.img = this.effect.img;
|
||||
weapon.system.rollable.skill = "Corps à corps (Bagarre)";
|
||||
weapon.system.specification.value = 9 - base;
|
||||
await this.actor.createEmbeddedDocuments("Item", [weapon], {fromEffect : this.effect.id});
|
||||
|
||||
//this.script.scriptMessage(`${this.actor.name} now has Melee (Brawling) 55 and Weapon (Fists) +9`);
|
||||
Reference in New Issue
Block a user