Sync to v7.2.0
This commit is contained in:
parent
e46d68b315
commit
2c5ff15830
0
packs/aides-de-jeu-fr/000762.log
Normal file
0
packs/aides-de-jeu-fr/000762.log
Normal file
BIN
packs/aides-de-jeu-fr/MANIFEST-000760
Normal file
BIN
packs/aides-de-jeu-fr/MANIFEST-000760
Normal file
Binary file not shown.
0
packs/antidotes-and-remedes/000764.log
Normal file
0
packs/antidotes-and-remedes/000764.log
Normal file
BIN
packs/antidotes-and-remedes/MANIFEST-000762
Normal file
BIN
packs/antidotes-and-remedes/MANIFEST-000762
Normal file
Binary file not shown.
0
packs/apothicarium/000762.log
Normal file
0
packs/apothicarium/000762.log
Normal file
BIN
packs/apothicarium/MANIFEST-000760
Normal file
BIN
packs/apothicarium/MANIFEST-000760
Normal file
Binary file not shown.
0
packs/dons-de-rhya/000762.log
Normal file
0
packs/dons-de-rhya/000762.log
Normal file
BIN
packs/dons-de-rhya/MANIFEST-000760
Normal file
BIN
packs/dons-de-rhya/MANIFEST-000760
Normal file
Binary file not shown.
0
packs/plats-dauberges/000762.log
Normal file
0
packs/plats-dauberges/000762.log
Normal file
BIN
packs/plats-dauberges/MANIFEST-000760
Normal file
BIN
packs/plats-dauberges/MANIFEST-000760
Normal file
Binary file not shown.
0
packs/tables-des-traductions/000405.log
Normal file
0
packs/tables-des-traductions/000405.log
Normal file
BIN
packs/tables-des-traductions/MANIFEST-000403
Normal file
BIN
packs/tables-des-traductions/MANIFEST-000403
Normal file
Binary file not shown.
7
scripts/18MeEQ0As3JvER71.js
Normal file
7
scripts/18MeEQ0As3JvER71.js
Normal file
@ -0,0 +1,7 @@
|
||||
let state = !this.effect.disabled;
|
||||
this.effect.update({"disabled": state});
|
||||
|
||||
if (state)
|
||||
return ui.notifications.info("EFFECT.CreatureBackInWater", {localize: true})
|
||||
|
||||
return ui.notifications.info("EFFECT.CreatureOutOfWater", {localize: true});
|
1
scripts/1LDSzXeO5CzXgTOc.js
Normal file
1
scripts/1LDSzXeO5CzXgTOc.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) || args.skill?.name == `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})`
|
20
scripts/1jQq9v8fXK8zuEBU.js
Normal file
20
scripts/1jQq9v8fXK8zuEBU.js
Normal file
@ -0,0 +1,20 @@
|
||||
let damage = this.effect.sourceActor.hasCondition("fatigued") ? 6 : 10;
|
||||
|
||||
let loc = "body"
|
||||
|
||||
let APatLoc = this.actor.system.status.armour[loc];
|
||||
|
||||
let metalAP = APatLoc.layers.reduce((metal, layer) => metal += ((layer.metal && !layer.magical) ? layer.value : 0), 0)
|
||||
|
||||
let APused = Math.max(0, APatLoc.value - metalAP); // remove metal AP at location;
|
||||
|
||||
damage -= (APused + this.actor.system.characteristics.t.bonus)
|
||||
|
||||
let msg = await this.actor.applyBasicDamage(damage, {suppressMsg : true, damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL});
|
||||
msg += ` (ignore ${metalAP} PA de métal sur ${game.wfrp4e.config.locations[loc]})`
|
||||
this.script.scriptMessage(msg)
|
||||
|
||||
let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`});
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
this.actor.addCondition("stunned");
|
8
scripts/2QB0LjueuJcIaHaC.js
Normal file
8
scripts/2QB0LjueuJcIaHaC.js
Normal file
@ -0,0 +1,8 @@
|
||||
if (isNaN(parseInt(this.item.system.specification.value)))
|
||||
{
|
||||
let value = await ValueDialog.create("Entrer la valeur d'Armure", this.effect.name);
|
||||
if (value)
|
||||
{
|
||||
this.item.updateSource({"system.specification.value" : value});
|
||||
}
|
||||
}
|
3
scripts/3CdYFcInQVCIBUiE.js
Normal file
3
scripts/3CdYFcInQVCIBUiE.js
Normal file
@ -0,0 +1,3 @@
|
||||
args.actor.system.details.move.value += 2;
|
||||
args.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.5);
|
||||
args.actor.system.details.price.gc *= 1.1;
|
1
scripts/3nTSOcCmNZpQWK8b.js
Normal file
1
scripts/3nTSOcCmNZpQWK8b.js
Normal file
@ -0,0 +1 @@
|
||||
this.actor.addCondition("blinded", 3);
|
4
scripts/4cumLUlcuJ7m8C6t.js
Normal file
4
scripts/4cumLUlcuJ7m8C6t.js
Normal file
@ -0,0 +1,4 @@
|
||||
let item = args.actor.items.find(i => i.name.includes("Smoothing"));
|
||||
let smoothing = item?.effects.find(e => e.name === "Smoothing");
|
||||
if (smoothing)
|
||||
smoothing.disabled = true;
|
1
scripts/4drWKXjMgasxY7Jy.js
Normal file
1
scripts/4drWKXjMgasxY7Jy.js
Normal file
@ -0,0 +1 @@
|
||||
args.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.1);
|
1
scripts/4otpLq2TnDdgzpvc.js
Normal file
1
scripts/4otpLq2TnDdgzpvc.js
Normal file
@ -0,0 +1 @@
|
||||
args.actor.system.details.man -= 3;
|
2
scripts/4uAUUZmLgxBKSmXA.js
Normal file
2
scripts/4uAUUZmLgxBKSmXA.js
Normal file
@ -0,0 +1,2 @@
|
||||
if (args.totalWoundLoss > 0)
|
||||
this.effect.delete();
|
53
scripts/5ScjIdRUOxblHdWS.js
Normal file
53
scripts/5ScjIdRUOxblHdWS.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Métier (Charpentier)';
|
||||
const difficulty = 'challenging';
|
||||
const target = 40;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
19
scripts/5sYpJkT2WXIe0gIZ.js
Normal file
19
scripts/5sYpJkT2WXIe0gIZ.js
Normal file
@ -0,0 +1,19 @@
|
||||
const rating = parseInt(this.effect.name.match(/\d+/)?.[0]) || 1;
|
||||
|
||||
let crewList = foundry.utils.duplicate(this.actor.system.passengers.list);
|
||||
let selectedCrew = [];
|
||||
|
||||
while (selectedCrew.length < rating && crewList.length) {
|
||||
selectedCrew.push(crewList.splice(crewList.length * Math.random() | 0, 1)[0]);
|
||||
}
|
||||
|
||||
for (let member of selectedCrew) {
|
||||
let actor = game.actors.get(member.id);
|
||||
actor.applyBasicDamage(9, {
|
||||
damageType: game.wfrp4e.config.DAMAGE_TYPE.NORMAL,
|
||||
minimumOne: true,
|
||||
loc: "roll",
|
||||
suppressMsg: false,
|
||||
hideDSN: false
|
||||
});
|
||||
}
|
8
scripts/6Ws3ieQ7pG5poUyT.js
Normal file
8
scripts/6Ws3ieQ7pG5poUyT.js
Normal file
@ -0,0 +1,8 @@
|
||||
if (isNaN(parseInt(this.item.system.specification.value)))
|
||||
{
|
||||
let value = await ValueDialog.create("Saisir lde Savoir de lancer de sort", this.effect.name, "", Object.values(game.wfrp4e.config.magicLores));
|
||||
if (value)
|
||||
{
|
||||
this.item.updateSource({"system.specification.value" : value});
|
||||
}
|
||||
}
|
5
scripts/6gRixT3zIOAberJb.js
Normal file
5
scripts/6gRixT3zIOAberJb.js
Normal file
@ -0,0 +1,5 @@
|
||||
const disease = await fromUuid("Compendium.wfrp4e-soc.items.Item.8Q9JYtR1y3B5J6UH");
|
||||
const data = disease.toObject();
|
||||
data.system.incubation.value = 0;
|
||||
data.system.duration.active = true;
|
||||
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect: this.effect.id});
|
1
scripts/6jp8slPU33oBQe1V.js
Normal file
1
scripts/6jp8slPU33oBQe1V.js
Normal file
@ -0,0 +1 @@
|
||||
return args.options.crewTest?.system.handling !== true;
|
2
scripts/6oSs8qKFNFz2lSmh.js
Normal file
2
scripts/6oSs8qKFNFz2lSmh.js
Normal file
@ -0,0 +1,2 @@
|
||||
if (args.actorsystem.details.move.sail.value > 0)
|
||||
args.actor.system.details.move.sail.value = 0;
|
31
scripts/6qJP0hpShEM43ohx.js
Normal file
31
scripts/6qJP0hpShEM43ohx.js
Normal file
@ -0,0 +1,31 @@
|
||||
const actor = args.actor;
|
||||
|
||||
if (actor.itemTypes.skill.find(s => s.name === "Savoir (Océans)")) {
|
||||
const loreTest = await actor.setupSkill('Savoir (Océans)', {
|
||||
appendTitle: ` – ${this.effect.name}`,
|
||||
skipTargets: true,
|
||||
fields: {difficulty: 'hard'},
|
||||
characteristic: 'int',
|
||||
});
|
||||
await loreTest.roll();
|
||||
|
||||
if (loreTest.succeeded) {
|
||||
loreTest.result.other.push(`<b>${actor.name}</b> reconnaît l'attrait du Léviathan.`);
|
||||
loreTest.renderRollCard();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let test = await actor.setupSkill('Calme', {
|
||||
appendTitle: ` – ${this.effect.name}`,
|
||||
skipTargets: true,
|
||||
fields: {difficulty: 'easy'},
|
||||
characteristic: 'wp',
|
||||
});
|
||||
await test.roll();
|
||||
|
||||
if (!test.succeeded) {
|
||||
test.result.other.push(`<b>${actor.name}</b> devien @Condition[Assommé] par cette vision.`);
|
||||
test.renderRollCard();
|
||||
actor.addCondition("stunned");
|
||||
}
|
1
scripts/6ubojp9zwbfJnosT.js
Normal file
1
scripts/6ubojp9zwbfJnosT.js
Normal file
@ -0,0 +1 @@
|
||||
args.actor.system.details.move.value += 1;
|
32
scripts/7w7QA7GBhzZ98OS0.js
Normal file
32
scripts/7w7QA7GBhzZ98OS0.js
Normal file
@ -0,0 +1,32 @@
|
||||
const sin = this.effect.sourceActor.system.status.sin.value;
|
||||
const result = await WFRP_Tables.rollTable("manann-mood-made-meaningless", sin);
|
||||
let match = result.text.match(/b>([^<]+)/i);
|
||||
let key = match[1];
|
||||
let roll = new Roll("5d10");
|
||||
let value = undefined;
|
||||
|
||||
await this.script.scriptMessage(result.text, {flavor: result.title});
|
||||
|
||||
switch (key) {
|
||||
case 'Stromfels Triumphant!':
|
||||
value = 0;
|
||||
break;
|
||||
case 'Stromfels Ascends!':
|
||||
await roll.evaluate();
|
||||
if (this.actor.system.status.mood.value > 0)
|
||||
value = -roll.total;
|
||||
else if (this.actor.system.status.mood.value < 0)
|
||||
value = roll.total;
|
||||
break;
|
||||
case 'No effect.':
|
||||
break;
|
||||
case 'Manann Provoked!':
|
||||
await roll.evaluate();
|
||||
value = -roll.total;
|
||||
break;
|
||||
}
|
||||
|
||||
if (roll._evaluated)
|
||||
await roll.toMessage();
|
||||
|
||||
await this.effect.setFlag("wfrp4e-soc", "m4result", {result: key, value});
|
6
scripts/86ivOsBQAuu0UmFg.js
Normal file
6
scripts/86ivOsBQAuu0UmFg.js
Normal file
@ -0,0 +1,6 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, appendTitle : ` - ${this.effect.name}`, skipTargets: true});
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("poisoned");
|
||||
}
|
53
scripts/8xqYrBIf1Zhlwizg.js
Normal file
53
scripts/8xqYrBIf1Zhlwizg.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Fini de passer <em>l'ancre</em>.</p>`;
|
||||
const test = 'Strength';
|
||||
const difficulty = 'vhard';
|
||||
const target = 20;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
3
scripts/9HWEDsnNxSykqbF5.js
Normal file
3
scripts/9HWEDsnNxSykqbF5.js
Normal file
@ -0,0 +1,3 @@
|
||||
args.actor.system.details.move.value += 3;
|
||||
args.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.25);
|
||||
args.actor.system.details.price.gc *= 1.1;
|
2
scripts/AFiB20FaOBmBv2Kz.js
Normal file
2
scripts/AFiB20FaOBmBv2Kz.js
Normal file
@ -0,0 +1,2 @@
|
||||
if (args.actorsystem.details.move.sail.value > 0)
|
||||
args.actor.system.details.move.sail.value = Math.floor(args.actor.system.details.move.sail.value * .5);
|
1
scripts/AaPPmnv7AtxsRVUs.js
Normal file
1
scripts/AaPPmnv7AtxsRVUs.js
Normal file
@ -0,0 +1 @@
|
||||
args.actor.details.move.value = 1;
|
28
scripts/BVNKF9omCppWPLys.js
Normal file
28
scripts/BVNKF9omCppWPLys.js
Normal file
@ -0,0 +1,28 @@
|
||||
let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor;
|
||||
if (!actor || !(actor.system instanceof StandardActorModel))
|
||||
return ui.notifications.warn("Vous devez contrôler un Acteur capable de réaliser un Test de Force");
|
||||
|
||||
let test = await actor.setupCharacteristic("s", {
|
||||
skipTargets: true,
|
||||
appendTitle: " - Renflouement",
|
||||
fields: {
|
||||
difficulty: "challenging"
|
||||
},
|
||||
context: {
|
||||
success: "Reduced the Holed rating!"
|
||||
}
|
||||
});
|
||||
|
||||
await test.roll();
|
||||
if (test.succeeded) {
|
||||
let SL = parseInt(test.result.SL);
|
||||
let name = this.effect.name.replace(/\d+/, rating => parseInt(rating) - SL);
|
||||
await this.effect.update({name});
|
||||
}
|
||||
|
||||
let rating = parseInt(this.effect.name.match(/\d+/)?.[0]);
|
||||
if (rating <= 1) {
|
||||
const scriptData = this.effect.flags.wfrp4e.scriptData;
|
||||
scriptData[2].trigger = '';
|
||||
await this.effect.update({disabled: true, "flags.wfrp4e.scriptData": scriptData});
|
||||
}
|
11
scripts/BZETMpgrI5k1ol5b.js
Normal file
11
scripts/BZETMpgrI5k1ol5b.js
Normal file
@ -0,0 +1,11 @@
|
||||
// If the creature currently has a Surprised, Unconscious, or Entangled Condition, it does not gain this Advantage.
|
||||
const surprised = this.actor.hasCondition("surprised")
|
||||
const unconscious = this.actor.hasCondition("unconscious")
|
||||
const entangled = this.actor.hasCondition("entangled")
|
||||
if (entangled || unconscious || surprised) return
|
||||
|
||||
// If, at the beginning of its turn, this creature does not have at least Rating Advantage points, its Advantage pool immediately increases to Rating.
|
||||
const grimRating = parseInt(this.item.specification.value) || 1
|
||||
if (grimRating > this.actor.status.advantage.value) {
|
||||
this.actor.setAdvantage(grimRating)
|
||||
}
|
3
scripts/C69xngEMghfwUx13.js
Normal file
3
scripts/C69xngEMghfwUx13.js
Normal file
@ -0,0 +1,3 @@
|
||||
let easier = ['challenging', 'average', 'easy', 'veasy'];
|
||||
if (easier.includes(args.fields.difficulty))
|
||||
args.fields.difficulty = "difficult";
|
2
scripts/CD4RnDpXZ9hnqVPQ.js
Normal file
2
scripts/CD4RnDpXZ9hnqVPQ.js
Normal file
@ -0,0 +1,2 @@
|
||||
if (!this.actor.hasCondition("entangled"))
|
||||
this.actor.addCondition("entangled");
|
9
scripts/CS6O7UUjQcUJoOUP.js
Normal file
9
scripts/CS6O7UUjQcUJoOUP.js
Normal file
@ -0,0 +1,9 @@
|
||||
if (args.test.failed) {
|
||||
let SL = Number(args.test.result.SL)
|
||||
if (SL <= -2 && SL > -4)
|
||||
this.actor.addCondition("stunned")
|
||||
else if (SL <= -4 && SL > -6)
|
||||
this.script.scriptMessage(this.actor.prototypeToken.name + " doit réaliser un Test de <b>Force Mentale</ou subir la condition @Condition[A Terre].")
|
||||
else if (SL <= -6)
|
||||
this.actor.addCondition("unconscious")
|
||||
}
|
3
scripts/Dzi2CKpYapRGwNVr.js
Normal file
3
scripts/Dzi2CKpYapRGwNVr.js
Normal file
@ -0,0 +1,3 @@
|
||||
if (args.actor.system instanceof StandardActorModel) {
|
||||
args.actor.addCondition("unconscious");
|
||||
}
|
6
scripts/E3om295BMQojnM2F.js
Normal file
6
scripts/E3om295BMQojnM2F.js
Normal file
@ -0,0 +1,6 @@
|
||||
let fatigued = this.actor.hasCondition("fatigued")
|
||||
if (fatigued)
|
||||
{
|
||||
fatigued.delete();
|
||||
this.script.scriptNotification("Fatigue supprimée")
|
||||
}
|
1
scripts/EBNrA6FNX4d05EUx.js
Normal file
1
scripts/EBNrA6FNX4d05EUx.js
Normal file
@ -0,0 +1 @@
|
||||
return !args.options.crewTest;
|
31
scripts/EC8cZmqrE095cDc2.js
Normal file
31
scripts/EC8cZmqrE095cDc2.js
Normal file
@ -0,0 +1,31 @@
|
||||
const actor = args.actor;
|
||||
|
||||
if (actor.itemTypes.skill.find(s => s.name === "Savoir (Savoir)")) {
|
||||
const loreTest = await actor.setupSkill('Savoir (Savoir)', {
|
||||
appendTitle: ` – ${this.effect.name}`,
|
||||
skipTargets: true,
|
||||
fields: {difficulty: 'hard'},
|
||||
characteristic: 'int',
|
||||
});
|
||||
await loreTest.roll();
|
||||
|
||||
if (loreTest.succeeded) {
|
||||
loreTest.result.other.push(`<b>${actor.name}</b> reconnaît les leurres de Lurkerfis.`);
|
||||
loreTest.renderRollCard();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let test = await actor.setupSkill('Calme', {
|
||||
appendTitle: ` – ${this.effect.name}`,
|
||||
skipTargets: true,
|
||||
fields: {difficulty: 'easy'},
|
||||
characteristic: 'wp',
|
||||
});
|
||||
await test.roll();
|
||||
|
||||
if (!test.succeeded) {
|
||||
test.result.other.push(`<b>${actor.name}</b> est devenu séduit par la vue et incapable d'effectuer aucune action sauf se diriger vers la lumière`);
|
||||
test.renderRollCard();
|
||||
actor.addCondition("unconscious");
|
||||
}
|
1
scripts/EDAMEOzdBfkoKHxP.js
Normal file
1
scripts/EDAMEOzdBfkoKHxP.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name !== game.i18n.localize("NAME.Navigation");
|
8
scripts/F2u4L4o0r1LTWeWK.js
Normal file
8
scripts/F2u4L4o0r1LTWeWK.js
Normal file
@ -0,0 +1,8 @@
|
||||
if (isNaN(parseInt(this.item.system.specification.value)))
|
||||
{
|
||||
let value = await ValueDialog.create("Saisir la valeur de Terreur", this.effect.name);
|
||||
if (value)
|
||||
{
|
||||
this.item.updateSource({"system.specification.value" : value});
|
||||
}
|
||||
}
|
18
scripts/FPYNcxm21678boLT.js
Normal file
18
scripts/FPYNcxm21678boLT.js
Normal file
@ -0,0 +1,18 @@
|
||||
if (args.attackerTest.data.preData.rollClass !== "CharacteristicTest") return;
|
||||
if (args.attackerTest.data.preData.characteristic !== "s") return;
|
||||
|
||||
const SL = args.opposedTest.data.opposeResult.differenceSL;
|
||||
|
||||
const targetId = this.effect.getFlag("wfrp4e", "target");
|
||||
const target = canvas.scene.tokens.get(targetId);
|
||||
|
||||
if (SL > 4) {
|
||||
args.opposedTest.data.opposeResult.other.push(`<b>${args.defenderTest.actor.name}</b> a été obligé de lâcher çà <b>${target.name}</b>.`);
|
||||
return await this.effect.delete();
|
||||
}
|
||||
|
||||
if (SL > 0) {
|
||||
args.opposedTest.data.opposeResult.other.push(`<b>${args.defenderTest.actor.name}</b> a été empêché de presser <b>${target.name}</b> pour un tour.`);
|
||||
let turns = this.effect.getFlag("wfrp4e", "turns");
|
||||
this.effect.setFlag("wfrp4e", "turns", turns + 1);
|
||||
}
|
53
scripts/FtZf56VI6Qsspu0D.js
Normal file
53
scripts/FtZf56VI6Qsspu0D.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Métier (Charpentier)';
|
||||
const difficulty = 'difficult';
|
||||
const target = 20;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
1
scripts/Fwk8WA8NfRivLFWJ.js
Normal file
1
scripts/Fwk8WA8NfRivLFWJ.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name === "Divertissement (Chant)";
|
53
scripts/GsAyB5xnK3ASeoah.js
Normal file
53
scripts/GsAyB5xnK3ASeoah.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Métier (Charpentier)';
|
||||
const difficulty = 'easy';
|
||||
const target = 20;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
53
scripts/H85k4L3yICm7cfIk.js
Normal file
53
scripts/H85k4L3yICm7cfIk.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de<em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Voile';
|
||||
const difficulty = 'easy';
|
||||
const target = 10;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
9
scripts/HUKzssLxeQo1wbx9.js
Normal file
9
scripts/HUKzssLxeQo1wbx9.js
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { fields: { difficulty: "average" }, appendTitle: " - - Blessé" })
|
||||
await test.roll();
|
||||
if (test.failed) {
|
||||
fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb").then(disease => {
|
||||
this.actor.createEmbeddedDocuments("Item", [disease.toObject()])
|
||||
this.script.scriptNotification("Gain de " + disease.name)
|
||||
})
|
||||
}
|
7
scripts/HYrl5aNMm8BAdqH7.js
Normal file
7
scripts/HYrl5aNMm8BAdqH7.js
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
let modifier = 0
|
||||
if (this.effect.name.includes("Moderate"))
|
||||
modifier = -20
|
||||
else
|
||||
modifier = -10
|
||||
args.fields.modifier += modifier
|
2
scripts/IOroJBqTsWvoakJN.js
Normal file
2
scripts/IOroJBqTsWvoakJN.js
Normal file
@ -0,0 +1,2 @@
|
||||
if (args.actorsystem.details.move.oars.value > 0)
|
||||
args.actor.system.details.move.oars.value -= 2;
|
7
scripts/IrkWq7IiFS65bTvC.js
Normal file
7
scripts/IrkWq7IiFS65bTvC.js
Normal file
@ -0,0 +1,7 @@
|
||||
if (this.actor.flags.holed.half !== true) return;
|
||||
if (this.actor.flags.holed.reminded === true) return;
|
||||
|
||||
const speaker = ChatMessage.getSpeaker({actor: this.actor});
|
||||
this.script.scriptMessage(`<p><b>${speaker.alias}</b> tombe lourdements dans l'eau. A moins que la cargaison soit étanche, elle perd [[d10]]% de sa valeur.</p>`);
|
||||
|
||||
this.actor.flags.holed.reminded = true;
|
1
scripts/JBoKPBr27C3PMoSD.js
Normal file
1
scripts/JBoKPBr27C3PMoSD.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name === game.i18n.localize("NAME.Navigation");
|
18
scripts/JXBUE0XuJOJNG7zE.js
Normal file
18
scripts/JXBUE0XuJOJNG7zE.js
Normal file
@ -0,0 +1,18 @@
|
||||
if (args.totalWoundLoss <= 7) return;
|
||||
|
||||
let options = {
|
||||
appendTitle : " – " + this.effect.name,
|
||||
skipTargets: true,
|
||||
fields: {difficulty: 'average'},
|
||||
characteristic: 'wp',
|
||||
}
|
||||
|
||||
let test = await args.actor.setupSkill('Calme', options);
|
||||
await test.roll();
|
||||
|
||||
if (!test.succeeded) {
|
||||
const targetId = this.effect.getFlag("wfrp4e", "target");
|
||||
const target = canvas.scene.tokens.get(targetId);
|
||||
await this.effect.delete();
|
||||
args.extraMessages.push(`<b>${args.actor.name}</b> perd ${args.totalWoundLoss} Blessures de l'attaque, ce qui l'a amené à lâcher prise <b>${target.name}</b>.`);
|
||||
}
|
53
scripts/JhbZWZhOJ23yOBmG.js
Normal file
53
scripts/JhbZWZhOJ23yOBmG.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Métier (Charpente)';
|
||||
const difficulty = 'hard';
|
||||
const target = 30;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
9
scripts/LjfScVGBf0Egr70E.js
Normal file
9
scripts/LjfScVGBf0Egr70E.js
Normal file
@ -0,0 +1,9 @@
|
||||
let animalCare = this.actor.itemTypes.skill.find(s => s.name === game.i18n.localize("NAME.AnimalCare"));
|
||||
let animalTrainings = this.actor.itemTypes.skill.filter(s => s.name.includes(game.i18n.localize("NAME.AnimalTraining")));
|
||||
|
||||
if (animalCare)
|
||||
animalCare.system.modifier.value += 20;
|
||||
|
||||
for (let training of animalTrainings) {
|
||||
training.system.modifier.value += 30;
|
||||
}
|
4
scripts/MIhYSuJ6MI9B65UT.js
Normal file
4
scripts/MIhYSuJ6MI9B65UT.js
Normal file
@ -0,0 +1,4 @@
|
||||
let specification = Number(this.item.specification.value) || 1;
|
||||
args.actor.system.status.wounds.max += Math.floor(args.actor.system.status.wounds.max * 0.3 * specification);
|
||||
args.actor.system.status.carries.max -= Math.floor(args.actor.system.status.carries.max * 0.1 * specification);
|
||||
args.actor.system.details.price.gc += Math.floor(args.actor.system.details.price.gc * 0.2 * specification);
|
44
scripts/MMv2B8TH7jxNCtdl.js
Normal file
44
scripts/MMv2B8TH7jxNCtdl.js
Normal file
@ -0,0 +1,44 @@
|
||||
let actor = this.actor;
|
||||
let effect = this.effect;
|
||||
let bleedingAmt;
|
||||
let bleedingRoll;
|
||||
let msg = ""
|
||||
|
||||
let damage = effect.conditionValue;
|
||||
let scriptArgs = { msg, damage };
|
||||
await Promise.all(actor.runScripts("preApplyCondition", { effect, data: scriptArgs }))
|
||||
msg = scriptArgs.msg;
|
||||
damage = scriptArgs.damage;
|
||||
msg += await actor.applyBasicDamage(damage, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, minimumOne: false, suppressMsg: true })
|
||||
|
||||
if (actor.status.wounds.value == 0 && !actor.hasCondition("unconscious")) {
|
||||
await actor.addCondition("unconscious")
|
||||
msg += "<br>" + game.i18n.format("BleedUnc", { name: actor.prototypeToken.name })
|
||||
}
|
||||
|
||||
if (actor.hasCondition("unconscious")) {
|
||||
bleedingAmt = effect.conditionValue;
|
||||
bleedingRoll = (await new Roll("1d100").roll()).total;
|
||||
if (bleedingRoll <= bleedingAmt * 10) {
|
||||
msg += "<br>" + game.i18n.format("BleedFail", { name: actor.prototypeToken.name }) + " (" + game.i18n.localize("Rolled") + " " + bleedingRoll + ")";
|
||||
await actor.addCondition("dead")
|
||||
}
|
||||
else if (bleedingRoll % 11 == 0) {
|
||||
msg += "<br>" + game.i18n.format("BleedCrit", { name: actor.prototypeToken.name }) + " (" + game.i18n.localize("Rolled") + bleedingRoll + ")"
|
||||
await actor.removeCondition("bleeding")
|
||||
}
|
||||
else {
|
||||
msg += "<br>" + game.i18n.localize("BleedRoll") + ": " + bleedingRoll;
|
||||
}
|
||||
}
|
||||
|
||||
await Promise.all(actor.runScripts("applyCondition", { effect, data: { bleedingRoll } }))
|
||||
if (args.suppressMessage) {
|
||||
let messageData = game.wfrp4e.utility.chatDataSetup(msg);
|
||||
messageData.speaker = { alias: this.effect.name }
|
||||
messageData.flavor = this.effect.name;
|
||||
return messageData
|
||||
}
|
||||
else {
|
||||
return this.script.scriptMessage(msg)
|
||||
}
|
1
scripts/MMx8f5uJ15XOgJGg.js
Normal file
1
scripts/MMx8f5uJ15XOgJGg.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name !== game.i18n.localize("NAME.Row") && args.skill?.name !== game.i18n.localize("NAME.Swim") && !args.skill?.name.includes(game.i18n.localize("NAME.Sail"));
|
5
scripts/Me1wS5XdqUEy7OGt.js
Normal file
5
scripts/Me1wS5XdqUEy7OGt.js
Normal file
@ -0,0 +1,5 @@
|
||||
let loc = (await game.wfrp4e.tables.rollTable("hitloc")).result;
|
||||
let critTable = `crit${this.generalizeTable(loc)`;
|
||||
let crit = (await game.wfrp4e.tables.rollTable(critTable)).result;
|
||||
|
||||
this.script.scriptMessage(`{this.actor.name} subit un ${crit} (localisation : ${loc}). Ne pas appliquer d'Hemmoragie ou de Blessures additionnelles.`);
|
8
scripts/NI3ZzIAlpQfVSjvf.js
Normal file
8
scripts/NI3ZzIAlpQfVSjvf.js
Normal file
@ -0,0 +1,8 @@
|
||||
if (isNaN(parseInt(this.item.system.specification.value)))
|
||||
{
|
||||
let value = await ValueDialog.create("Saisir la valeur de Peur", this.item.name);
|
||||
if (value)
|
||||
{
|
||||
this.item.updateSource({"system.specification.value" : value});
|
||||
}
|
||||
}
|
13
scripts/O45vpR4jDbQQnmvJ.js
Normal file
13
scripts/O45vpR4jDbQQnmvJ.js
Normal file
@ -0,0 +1,13 @@
|
||||
let items = [];
|
||||
|
||||
let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject();
|
||||
etiquette.name += " (Suivants de Khorne)";
|
||||
|
||||
items.push(etiquette);
|
||||
|
||||
let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.Q2MCUrG2HppMcvN0")).toObject();
|
||||
animosity.name = animosity.name.replace("(Cible)", "(Suivants de Slaanesh)");
|
||||
|
||||
items.push(animosity);
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id});
|
53
scripts/OsLXutfXyQCAkhAf.js
Normal file
53
scripts/OsLXutfXyQCAkhAf.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de<em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Voile';
|
||||
const difficulty = 'average';
|
||||
const target = 30;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
53
scripts/Pn5fekTbkwlr61XU.js
Normal file
53
scripts/Pn5fekTbkwlr61XU.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Métier (Ingénieur)';
|
||||
const difficulty = 'easy';
|
||||
const target = 10;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
10
scripts/PsO7aTdELJt35eHP.js
Normal file
10
scripts/PsO7aTdELJt35eHP.js
Normal file
@ -0,0 +1,10 @@
|
||||
let morale = await new Roll("-1d10").roll();
|
||||
let mood = await new Roll("-2d10").roll();
|
||||
|
||||
morale.toMessage(this.script.getChatData({flavor : "Morale"}));
|
||||
mood.toMessage(this.script.getChatData({flavor : "Manann's Mood"}));
|
||||
|
||||
await this.actor.system.status.morale.addEntry("Albatross Died", morale.total)
|
||||
await this.actor.system.status.mood.addEntry("Albatross Died", mood.total);
|
||||
|
||||
this.effect.delete();
|
1
scripts/Q5gh5Y9dCdclcwsD.js
Normal file
1
scripts/Q5gh5Y9dCdclcwsD.js
Normal file
@ -0,0 +1 @@
|
||||
return !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) && args.skill?.name != `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})`
|
53
scripts/Q7eULXQ9AfDRmUGO.js
Normal file
53
scripts/Q7eULXQ9AfDRmUGO.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Métier (Charpentier)';
|
||||
const difficulty = 'difficult';
|
||||
const target = 40;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
4
scripts/QHQ7XmFOjT9wXgw1.js
Normal file
4
scripts/QHQ7XmFOjT9wXgw1.js
Normal file
@ -0,0 +1,4 @@
|
||||
if (args.actorsystem.details.move.oars.value > 0)
|
||||
args.actor.system.details.move.oars.value -= 1;
|
||||
|
||||
args.actor.system.details.man -= 2;
|
3
scripts/QNxmImpLTou6WdMQ.js
Normal file
3
scripts/QNxmImpLTou6WdMQ.js
Normal file
@ -0,0 +1,3 @@
|
||||
let test = args.test
|
||||
if (test.result.minormis || test.result.majormis || test.result.catastrophicmis)
|
||||
test.result.other.push("Peut faire un Test de <b>Force Mentale Difficile (-10)</b> pour éviter l'Incantation Imparfaite")
|
18
scripts/QfTBRGXVfwQSghmd.js
Normal file
18
scripts/QfTBRGXVfwQSghmd.js
Normal file
@ -0,0 +1,18 @@
|
||||
fromUuid(this.effect.origin).then(caster => {
|
||||
if (caster) {
|
||||
if (actor.items.find(it => it.name == game.i18n.localize("Bestial"))) {
|
||||
let healed = caster.characteristics.wp.bonus
|
||||
let wounds = duplicate(args.actor.status.wounds)
|
||||
wounds.value += healed
|
||||
|
||||
if (wounds.value > wounds.max)
|
||||
wounds.value = wounds.max
|
||||
|
||||
args.actor.update({ "system.status.wounds": wounds })
|
||||
ChatMessage.create({ content: `${this.actor.prototypeToken.name} regagne ${healed} Blessures`, speaker: { alias: this.effect.name } })
|
||||
} else {
|
||||
ui.notifications.warn("L'Acteur ciblé n'a pas le Trait Bestial")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
53
scripts/R8FBHZaaARA3z9pB.js
Normal file
53
scripts/R8FBHZaaARA3z9pB.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Répération finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Métier (Charpentier)';
|
||||
const difficulty = 'hard';
|
||||
const target = 40;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
53
scripts/R8ecKGRzOr4ThvVa.js
Normal file
53
scripts/R8ecKGRzOr4ThvVa.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Réparation finie de <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Test de Maintenance Equipage';
|
||||
const difficulty = 'hard';
|
||||
const target = 80;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Réparer le ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
53
scripts/RPqgRUkiLY5thVbC.js
Normal file
53
scripts/RPqgRUkiLY5thVbC.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Finished repairing <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Strength';
|
||||
const difficulty = 'average';
|
||||
const target = 10;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Repair the ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
7
scripts/RlhOAKfN0ghrrooR.js
Normal file
7
scripts/RlhOAKfN0ghrrooR.js
Normal file
@ -0,0 +1,7 @@
|
||||
let holed = this.actor.appliedEffects.filter(e => e.name.includes("Holed"));
|
||||
|
||||
for (let effect of holed) {
|
||||
await effect.update({name: effect.name.replace(/\d+/, rating => parseInt(rating) * 2)});
|
||||
}
|
||||
|
||||
this.script.scriptNotification(`Holed Ratings of ${this.actor.name} have been doubled.`);
|
1
scripts/Rnpw6UQdJifLeuna.js
Normal file
1
scripts/Rnpw6UQdJifLeuna.js
Normal file
@ -0,0 +1 @@
|
||||
this.effect.updateSource({"flags.wfrp4e.applicationData.type" : "crew"})
|
1
scripts/RsWXCcYHONf3ANlD.js
Normal file
1
scripts/RsWXCcYHONf3ANlD.js
Normal file
@ -0,0 +1 @@
|
||||
this.actor.addCondition("stunned", 1);
|
23
scripts/RwMw848y13Jq2L4f.js
Normal file
23
scripts/RwMw848y13Jq2L4f.js
Normal file
@ -0,0 +1,23 @@
|
||||
let test = await this.actor.setupSkill("Résistance", {fields : {difficulty : "difficult"}, appendTitle : ` - ${this.effect.name}`});
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
await this.actor.addCondition("blinded");
|
||||
}
|
||||
|
||||
let msg = ``
|
||||
let armour = args.actor.itemTypes.armour.filter(i => i.system.isMetal && i.system.isEquipped);
|
||||
for(let item of armour)
|
||||
{
|
||||
for(let key in item.system.AP)
|
||||
{
|
||||
let AP = item.system.AP[key]
|
||||
let damage = Math.floor(AP / 2);
|
||||
await item.system.damageItem(damage, [key]);
|
||||
}
|
||||
msg += `<p><strong>${item.name}</strong> PA divisé par 2</p>`
|
||||
}
|
||||
if (msg)
|
||||
{
|
||||
this.script.scriptMessage(msg, {speaker : {alias : args.actor.name}});
|
||||
}
|
3
scripts/SefcrhXsdYGFcCW6.js
Normal file
3
scripts/SefcrhXsdYGFcCW6.js
Normal file
@ -0,0 +1,3 @@
|
||||
args.actor.system.details.move.value -= 3;
|
||||
args.actor.system.details.man -= 2;
|
||||
args.actor.system.status.carries.max *= 2;
|
1
scripts/Ssn21dxoMQiqD1y4.js
Normal file
1
scripts/Ssn21dxoMQiqD1y4.js
Normal file
@ -0,0 +1 @@
|
||||
return args.type == "cast" && args.item.lore.value == "fire"
|
1
scripts/T3RfSt3VMEat3iDD.js
Normal file
1
scripts/T3RfSt3VMEat3iDD.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name !== game.i18n.localize("NAME.Perception");
|
6
scripts/UDPsaymtZf39UsMk.js
Normal file
6
scripts/UDPsaymtZf39UsMk.js
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
let fatigued = this.actor.hasCondition("fatigued")
|
||||
if (!fatigued) {
|
||||
this.actor.addCondition("fatigued")
|
||||
ui.notifications.notify("Fatigue ajouté à " + this.actor.name + " qui ne peut être supprimé tant que le symptôme Malaise est présent.")
|
||||
}
|
2
scripts/UXdlnmwVgjc1QpF2.js
Normal file
2
scripts/UXdlnmwVgjc1QpF2.js
Normal file
@ -0,0 +1,2 @@
|
||||
args.actor.system.details.move.value += 1;
|
||||
args.actor.system.status.carries.max = Math.floor(args.actor.system.status.carries.max * 0.75);
|
53
scripts/UlRSaZG4ZUU6fMND.js
Normal file
53
scripts/UlRSaZG4ZUU6fMND.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Finished repairing <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Trade (Carpenter)';
|
||||
const difficulty = 'challenging';
|
||||
const target = 10;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Repair the ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
2
scripts/UtqUthabeQ4rHDLQ.js
Normal file
2
scripts/UtqUthabeQ4rHDLQ.js
Normal file
@ -0,0 +1,2 @@
|
||||
let item = await fromUuid("Compendium.wfrp4e-core.items.Item.tNWrJUOArwfWXsPw");
|
||||
this.actor.createEmbeddedDocuments("Item", [item], {fromEffect: this.effect.id});
|
53
scripts/VINX6TBAJQznhVcN.js
Normal file
53
scripts/VINX6TBAJQznhVcN.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Finished replacing <em>${this.item.name}</em> with a makeshift one.</p>`;
|
||||
const test = 'Maintenance Crew Test';
|
||||
const difficulty = 'hard';
|
||||
const target = 80;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Repair the ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
13
scripts/VLdF2HPnCrNIgp7a.js
Normal file
13
scripts/VLdF2HPnCrNIgp7a.js
Normal file
@ -0,0 +1,13 @@
|
||||
let items = [];
|
||||
|
||||
let etiquette = (await fromUuid("Compendium.wfrp4e-core.items.Item.sYbgpSnRqSZWgwFP")).toObject();
|
||||
etiquette.name += " (Suivants de Khorne)";
|
||||
|
||||
items.push(etiquette);
|
||||
|
||||
let animosity = (await fromUuid("Compendium.wfrp4e-core.items.Item.0VpT5yubw4UL7j6f")).toObject();
|
||||
animosity.system.specification.value = "Suivants de Slaanesh";
|
||||
|
||||
items.push(animosity);
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", items, {fromEffect : this.effect.id});
|
1
scripts/VTS4RzbmReI87K9a.js
Normal file
1
scripts/VTS4RzbmReI87K9a.js
Normal file
@ -0,0 +1 @@
|
||||
args.fields.slBonus = Math.floor(this.item.system.total.value * 0.1);
|
1
scripts/VlHuDIAvPr8JM1P5.js
Normal file
1
scripts/VlHuDIAvPr8JM1P5.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name !== game.i18n.localize("NAME.Row");
|
1
scripts/Vns6WrafVq8NjX7t.js
Normal file
1
scripts/Vns6WrafVq8NjX7t.js
Normal file
@ -0,0 +1 @@
|
||||
return args.skill?.name != game.i18n.localize("NAME.Heal")
|
1
scripts/WJkwIrdj4NceOYe8.js
Normal file
1
scripts/WJkwIrdj4NceOYe8.js
Normal file
@ -0,0 +1 @@
|
||||
return args.characteristic !== 'fel';
|
53
scripts/WR0Kqn8CF5iwToak.js
Normal file
53
scripts/WR0Kqn8CF5iwToak.js
Normal file
@ -0,0 +1,53 @@
|
||||
const repaired_message = `<p>Finished repairing <em>${this.item.name}</em>.</p>`;
|
||||
const test = 'Trade (Tailor)';
|
||||
const difficulty = 'difficult';
|
||||
const target = 40;
|
||||
|
||||
const extendedTestData = {
|
||||
name: this.item.name,
|
||||
type: "extendedTest",
|
||||
img: this.item.img,
|
||||
system: {
|
||||
SL: {
|
||||
current: 0,
|
||||
target: target
|
||||
},
|
||||
test: {
|
||||
value: test
|
||||
},
|
||||
completion: {
|
||||
value: "remove"
|
||||
},
|
||||
difficulty: {
|
||||
value: difficulty
|
||||
}
|
||||
},
|
||||
effects: [
|
||||
{
|
||||
name: `Repair the ${this.item.name}`,
|
||||
icon: this.item.img,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
applicationData: {
|
||||
type: "document",
|
||||
documentType: "Item"
|
||||
},
|
||||
scriptData: [
|
||||
{
|
||||
label: this.item.name,
|
||||
script: `
|
||||
let id = this.item.flags.wfrp4e.fromEffect;
|
||||
let effect = this.actor.appliedEffects.find(e => e.id === id);
|
||||
this.script.scriptMessage("${repaired_message}");
|
||||
await effect.item.delete();
|
||||
`,
|
||||
trigger: "deleteEffect"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
await this.actor.createEmbeddedDocuments("Item", [extendedTestData], {fromEffect: this.effect.id});
|
1
scripts/WeTlTniskT3Ej6vg.js
Normal file
1
scripts/WeTlTniskT3Ej6vg.js
Normal file
@ -0,0 +1 @@
|
||||
args.modifiers.other.push({label : this.effect.name, value : 2})
|
9
scripts/X08401eOhKJrhNf1.js
Normal file
9
scripts/X08401eOhKJrhNf1.js
Normal file
@ -0,0 +1,9 @@
|
||||
const grim = this.actor.items.find(i => i.type === "trait" && i.name.includes("Grim"));
|
||||
|
||||
if (args.options?.deltaAdv > 0 && this.actor.hasCondition("engaged") && grim.specification.value !== 4) {
|
||||
grim.update({"system.specification.value": 4});
|
||||
}
|
||||
|
||||
if (!this.actor.hasCondition("engaged") && grim.specification.value !== 2) {
|
||||
grim.update({"system.specification.value": 2});
|
||||
}
|
2
scripts/X3vpmNUj9SL2CDnF.js
Normal file
2
scripts/X3vpmNUj9SL2CDnF.js
Normal file
@ -0,0 +1,2 @@
|
||||
let item = args.actor.items.find(i => i.name.includes("Flying Jib"));
|
||||
item.name += ` (Désactivé par ${this.item.name})`;
|
1
scripts/XCAfy460IotarQek.js
Normal file
1
scripts/XCAfy460IotarQek.js
Normal file
@ -0,0 +1 @@
|
||||
return false;
|
11
scripts/YySjPfSAPdMAfjsh.js
Normal file
11
scripts/YySjPfSAPdMAfjsh.js
Normal file
@ -0,0 +1,11 @@
|
||||
let talents = ["Charge Berserk", "Vigilance", "Combat Instinctif", "Assaut féroce", "Endurci", "Résistance à la Magie", "Résistant (Magie)", "Déterminé", "Coup puissant", "Guerrier né"];
|
||||
let currentCareer = this.actor.system.currentCareer;
|
||||
|
||||
if (!currentCareer) return;
|
||||
|
||||
for (let talent of talents) {
|
||||
if (currentCareer.system.talents.includes(talent))
|
||||
continue;
|
||||
currentCareer.system.talents.push(talent);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user