Sync to v7.2.0
This commit is contained in:
@ -6,13 +6,14 @@ if (!currentCareer) return
|
||||
|
||||
|
||||
let inCurrentCareer = currentCareer.system.skills.includes(skill);
|
||||
if (existingSkill && inCurrentCareer)
|
||||
let craftsmanAdded = this.actor.getFlag("wfrp4e", "craftsmanAdded") || {};
|
||||
if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])
|
||||
{
|
||||
existingSkill.system.advances.costModifier = -5;
|
||||
}
|
||||
else
|
||||
{
|
||||
craftsmanAdded[skill] = true;
|
||||
currentCareer.system.skills.push(skill);
|
||||
}
|
||||
|
||||
|
||||
setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded)
|
||||
}
|
@ -6,13 +6,16 @@ if (!currentCareer) return
|
||||
|
||||
|
||||
let inCurrentCareer = currentCareer.system.skills.includes(skill);
|
||||
if (existingSkill && inCurrentCareer)
|
||||
let perfectPitchAdded = this.actor.getFlag("wfrp4e", "perfectPitchAdded") || {};
|
||||
if (existingSkill && inCurrentCareer && !perfectPitchAdded[existingSkill.name])
|
||||
{
|
||||
existingSkill.system.advances.costModifier = -5;
|
||||
}
|
||||
else
|
||||
{
|
||||
perfectPitchAdded[skill] = true;
|
||||
currentCareer.system.skills.push(skill);
|
||||
setProperty(this.actor, "flags.wfrp4e.perfectPitchAdded", perfectPitchAdded)
|
||||
}
|
||||
|
||||
|
||||
|
19
scripts/IzoOmDywGLqLNljN.js
Normal file
19
scripts/IzoOmDywGLqLNljN.js
Normal file
@ -0,0 +1,19 @@
|
||||
let skill = `Langue (Magick)`
|
||||
let currentCareer = this.actor.system.currentCareer;
|
||||
let existingSkill = this.actor.itemTypes.skill.find(i => i.name == skill);
|
||||
|
||||
if (!currentCareer) return
|
||||
|
||||
|
||||
let inCurrentCareer = currentCareer.system.skills.includes(skill);
|
||||
let witchAdded = actor.getFlag("wfrp4e", "witchAdded") || {};
|
||||
if (existingSkill && inCurrentCareer && !witchAdded[existingSkill.name])
|
||||
{
|
||||
existingSkill.system.advances.costModifier = -5;
|
||||
}
|
||||
else
|
||||
{
|
||||
witchAdded[skill] = true;
|
||||
currentCareer.system.skills.push(skill);
|
||||
setProperty(this.actor, "flags.wfrp4e.witchAdded", witchAdded)
|
||||
}
|
@ -15,25 +15,25 @@ if (wounds.value > 0)
|
||||
{
|
||||
wounds.value = wounds.max
|
||||
}
|
||||
message += `<b>${this.actor.name}</b> récupère ${regen} Blessures.`
|
||||
message += `<b>${this.actor.name}</b> regagne ${regen} Blessures.`
|
||||
|
||||
if (regen == 10)
|
||||
{
|
||||
message += `<br>En plus, il guérit d'une Blessure Critique.`
|
||||
B }
|
||||
message += `<br>Et guéri une Blessure Critique.`
|
||||
}
|
||||
}
|
||||
else if (regen >= 8)
|
||||
{
|
||||
message += `<b>${this.actor.name}</b> résultat de ${regen} et récupère 1 Blessure.`
|
||||
message += `<b>${this.actor.name}</b> a obtenu ${regen} et récupère 1 Blessure.`
|
||||
wounds.value += 1
|
||||
if (regen == 10)
|
||||
{
|
||||
message += `<br>En plus, il guérit d'une Blessure Critique.`
|
||||
message += `<br>Et guéri une Blessure Critique.`
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message += `<b>${this.actor.name}</b> Résultat de ${regen} - Aucun effet.`
|
||||
message += `<b>${this.actor.name}</b> Résultat de régénération de ${regen} - Aucun effet.`
|
||||
}
|
||||
|
||||
await this.actor.update({ "system.status.wounds": wounds })
|
||||
|
@ -1,6 +1,4 @@
|
||||
if (args.test.result.hitloc.result == "head")
|
||||
{
|
||||
args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40
|
||||
|
||||
if (args.test.result.hitloc.result == "head" && args.test.result.critical){
|
||||
args.test.result.critModifier = args.test.result.critModifier ? args.test.result.critModifier + 40 : 40
|
||||
args.test.result.critical += ` (+${args.test.result.critModifier})`
|
||||
}
|
||||
|
5
scripts/Uvk1X7sEhvv77YkD.js
Normal file
5
scripts/Uvk1X7sEhvv77YkD.js
Normal file
@ -0,0 +1,5 @@
|
||||
if (!args.flags.distractingApplied)
|
||||
{
|
||||
args.fields.modifier -= 20;
|
||||
args.flags.distractingApplied = true;
|
||||
}
|
1
scripts/mXvtf3qhJjshpopX.js
Normal file
1
scripts/mXvtf3qhJjshpopX.js
Normal file
@ -0,0 +1 @@
|
||||
return ["weapon", "cast", "channelling"].includes(args.type)
|
53
scripts/zXh8rgMxWoCLTxVd.js
Normal file
53
scripts/zXh8rgMxWoCLTxVd.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 = '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});
|
Reference in New Issue
Block a user