Sync to latest WFRP release
This commit is contained in:
1
scripts/0FNOq4J1AdPd2A0q.js
Normal file
1
scripts/0FNOq4J1AdPd2A0q.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.skill?.name.includes(game.i18n.localize("NAME.Row")) && !args.skill?.name.includes(game.i18n.localize("NAME.Sail"));
|
||||
4
scripts/0J1yHP1jkGR9y89H.js
Normal file
4
scripts/0J1yHP1jkGR9y89H.js
Normal file
@@ -0,0 +1,4 @@
|
||||
if (!this.item.system.properties.qualities.fast)
|
||||
this.item.system.qualities.value.push({name : 'fast'});
|
||||
if (!this.item.system.properties.qualities.magical)
|
||||
this.item.system.qualities.value.push({name : 'magical'});
|
||||
9
scripts/0YKQGbsKdHSmYGE7.js
Normal file
9
scripts/0YKQGbsKdHSmYGE7.js
Normal file
@@ -0,0 +1,9 @@
|
||||
if (args.skill?.name != game.i18n.localize("NAME.Gossip"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
args.data.reversal = {allowed : true, if: "success"}; // Kind of a kludge here, the talent Tests has a specific condition, but the description simply says "any gossip test can be reversed" so check it here instead of submission
|
||||
}
|
||||
|
||||
7
scripts/0mrUnxzufYgsR0Ph.js
Normal file
7
scripts/0mrUnxzufYgsR0Ph.js
Normal file
@@ -0,0 +1,7 @@
|
||||
this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {
|
||||
await test.roll()
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("stunned")
|
||||
}
|
||||
})
|
||||
18
scripts/11ir8nibM5HD69na.js
Normal file
18
scripts/11ir8nibM5HD69na.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const balanced = game.i18n.localize("WFRP4E.YenluiBalanced");
|
||||
const light = game.i18n.localize("WFRP4E.YenluiLight");
|
||||
const dark = game.i18n.localize("WFRP4E.YenluiDark");
|
||||
|
||||
let newName, newDescription;
|
||||
|
||||
if (this.effect.name === game.i18n.localize("WFRP4E.YenluiDark")) {
|
||||
newName = game.i18n.localize("WFRP4E.YenluiBalanced");
|
||||
newDescription = game.i18n.localize("WFRP4E.YenluiBalancedDesc");
|
||||
} else if (this.effect.name === game.i18n.localize("WFRP4E.YenluiBalanced")) {
|
||||
newName = game.i18n.localize("WFRP4E.YenluiLight");
|
||||
newDescription = game.i18n.localize("WFRP4E.YenluiLightDesc");
|
||||
}
|
||||
|
||||
if (newName) {
|
||||
await this.effect.update({name: newName});
|
||||
await this.item.update({name: newName, "system.description.value": newDescription});
|
||||
}
|
||||
1
scripts/1A87vGLh2PXH0rG0.js
Normal file
1
scripts/1A87vGLh2PXH0rG0.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.skill?.name.includes(game.i18n.localize("NAME.Language"));
|
||||
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")})`
|
||||
3
scripts/1XAilPQEyMWVPA5z.js
Normal file
3
scripts/1XAilPQEyMWVPA5z.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const qualities = foundry.utils.deepClone(args.item.system.qualities.value);
|
||||
qualities.push({name:"fine", value: 1});
|
||||
args.item?.update({"system.qualities.value": qualities});
|
||||
19
scripts/1kB2su7hLRYDhZ2H.js
Normal file
19
scripts/1kB2su7hLRYDhZ2H.js
Normal file
@@ -0,0 +1,19 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name})
|
||||
await test.roll();
|
||||
if (!test.succeeded)
|
||||
{
|
||||
let item = await fromUuid("Compendium.wfrp4e-core.items.ZhMADOqoo0y8Q9bx")
|
||||
let data = item.toObject();
|
||||
if (this.item.system.location.key == "rLeg")
|
||||
{
|
||||
data.system.location.value = "Orteil Droit"
|
||||
data.system.location.key = "rToe";
|
||||
}
|
||||
else if (this.item.system.location.key == "lLeg")
|
||||
{
|
||||
data.system.location.value = "Orteil Gauche"
|
||||
data.system.location.key = "lToe";
|
||||
}
|
||||
this.actor.createEmbeddedDocuments("Item", [data])
|
||||
}
|
||||
this.effect.delete();
|
||||
7
scripts/1mNkLj9JYNr3ofC6.js
Normal file
7
scripts/1mNkLj9JYNr3ofC6.js
Normal file
@@ -0,0 +1,7 @@
|
||||
this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`}).then(async test => {
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("stunned", 3)
|
||||
}
|
||||
})
|
||||
1
scripts/1wKVvxRTHOyV4Qdv.js
Normal file
1
scripts/1wKVvxRTHOyV4Qdv.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.skill?.name?.includes(game.i18n.localize("NAME.Sail"))
|
||||
1
scripts/22bW97lkvCqisfHX.js
Normal file
1
scripts/22bW97lkvCqisfHX.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.type != "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling"))
|
||||
5
scripts/23HgjCB1oecxANvA.js
Normal file
5
scripts/23HgjCB1oecxANvA.js
Normal file
@@ -0,0 +1,5 @@
|
||||
if (args.item.range && args.item.range.bands)
|
||||
{
|
||||
args.item.range.bands[game.i18n.localize("Long Range")].modifier = 0
|
||||
args.item.range.bands[game.i18n.localize("Extreme")].modifier /= 2
|
||||
}
|
||||
6
scripts/23PDHNZEnihcEvdK.js
Normal file
6
scripts/23PDHNZEnihcEvdK.js
Normal file
@@ -0,0 +1,6 @@
|
||||
if (args.test.result.castOutcome == "success" && args.test.spell.system.lore.value.includes("high"))
|
||||
{
|
||||
this.effect.update({name: this.effect.setSpecifier(parseInt(this.effect.specifier - 1))})
|
||||
|
||||
this.script.message("La valeur de Protection est maintenant de " + (this.effect.specifier - 1), {flavor: this.effect.sourceItem.name})
|
||||
}
|
||||
1
scripts/2AdSBXw7IwCiqawQ.js
Normal file
1
scripts/2AdSBXw7IwCiqawQ.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth"));
|
||||
1
scripts/2NLINicPQWbuvp2n.js
Normal file
1
scripts/2NLINicPQWbuvp2n.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.item?.name != game.i18n.localize("NAME.Navigation")
|
||||
9
scripts/2VNnVrtktdGUqXEV.js
Normal file
9
scripts/2VNnVrtktdGUqXEV.js
Normal file
@@ -0,0 +1,9 @@
|
||||
if (args.totalWoundLoss > 0)
|
||||
{
|
||||
let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
if (test.failed && parseInt(args.sourceTest?.result.SL) > 0)
|
||||
{
|
||||
args.actor.addCondition("stunned", parseInt(args.sourceTest?.attackerTest.result.SL))
|
||||
}
|
||||
}
|
||||
19
scripts/2W9uMTT6iJhfQ044.js
Normal file
19
scripts/2W9uMTT6iJhfQ044.js
Normal file
@@ -0,0 +1,19 @@
|
||||
let skill = `${game.i18n.localize("NAME.Trade")} (${this.item.parenthesesText})`
|
||||
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.concat(currentCareer.system.addedSkills).includes(skill);
|
||||
let craftsmanAdded = this.actor.getFlag("wfrp4e", "craftsmanAdded") || {};
|
||||
if (existingSkill && inCurrentCareer && !craftsmanAdded[existingSkill.name])
|
||||
{
|
||||
existingSkill.system.advances.costModifier = -5;
|
||||
}
|
||||
else
|
||||
{
|
||||
craftsmanAdded[skill] = true;
|
||||
currentCareer.system.addedSkills.push(skill);
|
||||
foundry.utils.setProperty(this.actor, "flags.wfrp4e.craftsmanAdded", craftsmanAdded)
|
||||
}
|
||||
4
scripts/2WSN306tL4apjRtD.js
Normal file
4
scripts/2WSN306tL4apjRtD.js
Normal file
@@ -0,0 +1,4 @@
|
||||
let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
|
||||
let data = item.toObject();
|
||||
data.name = data.name += ` (${game.i18n.localize("SPEC.Hearing")})`
|
||||
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
|
||||
1
scripts/2hzDv8ROulOe1elK.js
Normal file
1
scripts/2hzDv8ROulOe1elK.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name.includes(game.i18n.localize("NAME.Lore"));
|
||||
20
scripts/2sDH6RvoOAR40oqH.js
Normal file
20
scripts/2sDH6RvoOAR40oqH.js
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
if (!["Goblin", "Orc"].includes(this.actor.system.details.species.value)) {
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), { appendTitle: ` - ${this.effect.name}` })
|
||||
await test.roll();
|
||||
if (test.failed) {
|
||||
let infection = await fromUuid("Compendium.wfrp4e-core.items.Item.1hQuVFZt9QnnbWzg")
|
||||
this.actor.createEmbeddedDocuments("Item", [infection])
|
||||
}
|
||||
}
|
||||
|
||||
// Since wounds change when the effect is deleted, need to wait until after
|
||||
// the max wounds have been recalculated to apply damage
|
||||
warhammer.utility.sleep(1000).then(async () => {
|
||||
let roll = await new Roll("1d10").roll({allowInteractive : false});
|
||||
|
||||
roll.toMessage(this.script.getChatData());
|
||||
this.script.message(await this.actor.applyBasicDamage(roll.total, { damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_ALL, suppressMsg: true }))
|
||||
|
||||
})
|
||||
18
scripts/2vTVR0quRZQtjNfQ.js
Normal file
18
scripts/2vTVR0quRZQtjNfQ.js
Normal file
@@ -0,0 +1,18 @@
|
||||
let currentCareer = this.actor.system.currentCareer;
|
||||
if (!currentCareer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
let talents = [game.i18n.localize("NAME.AA"),
|
||||
`${game.i18n.localize("NAME.ArcaneMagic")} (${game.i18n.localize("SPEC.Any")})`,
|
||||
game.i18n.localize("NAME.ChaosMagic") + " " + "(Tzeentch)",
|
||||
game.i18n.localize("NAME.FastHands"),
|
||||
game.i18n.localize("NAME.ID"),
|
||||
game.i18n.localize("NAME.MagicalSense"),
|
||||
game.i18n.localize("NAME.PettyMagic"),
|
||||
game.i18n.localize("NAME.SecondSight"),
|
||||
game.i18n.localize("NAME.WarWizard"),
|
||||
game.i18n.localize("NAME.Witch")].filter(t => !currentCareer.system.talents.includes(t))
|
||||
|
||||
currentCareer.system.talents = currentCareer.system.talents.concat(talents)
|
||||
3
scripts/2z6DazIpsfiRZHdl.js
Normal file
3
scripts/2z6DazIpsfiRZHdl.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const qualities = foundry.utils.deepClone(args.item.system.qualities.value);
|
||||
qualities.push({name:"lightweight"});
|
||||
args.item?.update({"system.qualities.value": qualities});
|
||||
3
scripts/2zpYzKVDNE5y9RLL.js
Normal file
3
scripts/2zpYzKVDNE5y9RLL.js
Normal file
@@ -0,0 +1,3 @@
|
||||
return !args.actor?.has(game.i18n.localize("NAME.Swarm")) ||
|
||||
![game.wfrp4e.config.actorSizeNums.tiny, game.wfrp4e.config.actorSizeNums.ltl]
|
||||
.includes(args.actor?.sizeNum)
|
||||
14
scripts/32EPIAz7Qm71ut3m.js
Normal file
14
scripts/32EPIAz7Qm71ut3m.js
Normal file
@@ -0,0 +1,14 @@
|
||||
if (Number(this.actor.system.details.age.value) > 870) {
|
||||
if (["t", "wp", "fel"].includes(args.characteristic))
|
||||
args.fields.slBonus -= 3;
|
||||
if (["ag", "dex", "int"].includes(args.characteristic))
|
||||
args.fields.slBonus -= 2;
|
||||
} else if (Number(this.actor.system.details.age.value) > 350) {
|
||||
if (["t", "wp"].includes(args.characteristic))
|
||||
args.fields.slBonus -= 2;
|
||||
if (["fel"].includes(args.characteristic))
|
||||
args.fields.slBonus -= 1;
|
||||
} else {
|
||||
if (["t", "wp"].includes(args.characteristic))
|
||||
args.fields.slBonus -= 1;
|
||||
}
|
||||
1
scripts/3AbonnSVfoSlGye8.js
Normal file
1
scripts/3AbonnSVfoSlGye8.js
Normal file
@@ -0,0 +1 @@
|
||||
this.effect.updateSource({name: this.effect.setSpecifier("9")});
|
||||
44
scripts/3JEzEzF1SeYA9lsV.js
Normal file
44
scripts/3JEzEzF1SeYA9lsV.js
Normal file
@@ -0,0 +1,44 @@
|
||||
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.locations, this.effect.img), 1, "Choose Location");
|
||||
if (choice[0])
|
||||
{
|
||||
this.effect.updateSource({name : `${this.effect.name} (${choice[0].name})`})
|
||||
this.effect.updateSource({"flags.wfrp4e.location" : choice[0].id})
|
||||
}
|
||||
|
||||
let location = choice[0].id;
|
||||
|
||||
if (["lArm", "rArm"].includes(location))
|
||||
{
|
||||
let dropped = this.actor.itemTypes.weapon.filter(i => i.isEquipped & i.system.usesHands.includes(location));
|
||||
|
||||
if (dropped.length)
|
||||
{
|
||||
this.script.notification(`Dropped ${dropped.map(i => i.name).join(", ")}!`)
|
||||
for(let weapon of dropped)
|
||||
{
|
||||
await weapon.system.toggleEquip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (location == "body")
|
||||
{
|
||||
await this.actor.addCondition("fatigued");
|
||||
test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("prone");
|
||||
}
|
||||
}
|
||||
|
||||
if (location == "head")
|
||||
{
|
||||
await this.actor.addCondition("stunned");
|
||||
test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("unconscious");
|
||||
}
|
||||
}
|
||||
2
scripts/3VhUyqNY18PzeMKG.js
Normal file
2
scripts/3VhUyqNY18PzeMKG.js
Normal file
@@ -0,0 +1,2 @@
|
||||
args.abort = true;
|
||||
this.script.notification("Impossible d'attaquer cette cible !");
|
||||
1
scripts/3hfMQkUKYI4rCuBy.js
Normal file
1
scripts/3hfMQkUKYI4rCuBy.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name != game.i18n.localize("NAME.CharmAnimal") && !args.skill?.name.includes(game.i18n.localize("NAME.AnimalTraining"));
|
||||
1
scripts/3plV9WFqs2prfAdp.js
Normal file
1
scripts/3plV9WFqs2prfAdp.js
Normal file
@@ -0,0 +1 @@
|
||||
return !["NAME.Evaluate", "NAME.Gamble"].map(i => game.i18n.localize(i)).includes(args.skill?.name)
|
||||
4
scripts/3sfD1nedXLzuYoXJ.js
Normal file
4
scripts/3sfD1nedXLzuYoXJ.js
Normal file
@@ -0,0 +1,4 @@
|
||||
if (this.actor.hasCondition("surprised"))
|
||||
{
|
||||
this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "average"}, skipTargets: true, appendTitle : " - " + this.effect.name}).then(test => test.roll())
|
||||
}
|
||||
1
scripts/3z3m1pmw03DbQzcb.js
Normal file
1
scripts/3z3m1pmw03DbQzcb.js
Normal file
@@ -0,0 +1 @@
|
||||
return this.effect.name !== game.i18n.localize("WFRP4E.YenluiLight")
|
||||
1
scripts/454x3Q95pLvZm0Kx.js
Normal file
1
scripts/454x3Q95pLvZm0Kx.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.ConsumeAlcohol");
|
||||
1
scripts/49smPAj5J0INSFPI.js
Normal file
1
scripts/49smPAj5J0INSFPI.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.item?.system.isRanged;
|
||||
1
scripts/4FGKZk2f0xrmIDnp.js
Normal file
1
scripts/4FGKZk2f0xrmIDnp.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name != game.i18n.localize("NAME.Research") && !args.skill?.name?.includes(game.i18n.localize("NAME.Language"));
|
||||
1
scripts/4WQ25VsJSUZ2DeRB.js
Normal file
1
scripts/4WQ25VsJSUZ2DeRB.js
Normal file
@@ -0,0 +1 @@
|
||||
this.actor.addEffectItems("Compendium.wfrp4e-core.items.Item.EO05HX7jql0g605A", this.effect, {"system.specification.value": this.actor.system.characteristics.ag.value});
|
||||
1
scripts/4ZR7p8G3OzOBWx0L.js
Normal file
1
scripts/4ZR7p8G3OzOBWx0L.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name !== game.i18n.localize("NAME.Endurance");
|
||||
10
scripts/4fnTKgl0HW9ZrWyJ.js
Normal file
10
scripts/4fnTKgl0HW9ZrWyJ.js
Normal file
@@ -0,0 +1,10 @@
|
||||
this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty : "average"}}).then(async test =>
|
||||
{
|
||||
await test.roll()
|
||||
if (test.failed)
|
||||
{
|
||||
let char = Math.ceil(CONFIG.Dice.randomUniform() * 2) == 2 ? "s" : "t";
|
||||
this.script.message(`<strong>${this.actor.name}</strong> perd 1 point de ${game.wfrp4e.config.characteristics[char]}`)
|
||||
this.actor.update({[`system.characteristics.${char}.initial`] : this.actor.system.characteristics[char].initial - 1})
|
||||
}
|
||||
})
|
||||
1
scripts/4iuTz0uInAfMaoGl.js
Normal file
1
scripts/4iuTz0uInAfMaoGl.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name?.includes(game.i18n.localize("NAME.Language")) || args.type == "cast"
|
||||
7
scripts/4pQW4WLyhjbZR85k.js
Normal file
7
scripts/4pQW4WLyhjbZR85k.js
Normal file
@@ -0,0 +1,7 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}, context : {failure: "1 Corruption Point Gained"}})
|
||||
await test.roll();
|
||||
if (test.failed && this.actor.type == "character")
|
||||
{
|
||||
this.actor.update({"system.status.corruption.value" : parseInt(this.actor.status.corruption.value) + 1})
|
||||
this.script.message("Gain de 1 point de Corruption", {whisper : ChatMessage.getWhisperRecipients("GM")})
|
||||
}
|
||||
10
scripts/4rb7LfMq9CTnlrpn.js
Normal file
10
scripts/4rb7LfMq9CTnlrpn.js
Normal file
@@ -0,0 +1,10 @@
|
||||
if (args.totalWoundLoss > 0)
|
||||
{
|
||||
let test = await args.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : " - " + this.effect.name})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
args.totalWoundLoss += 5;
|
||||
args.modifiers.other.push({label : this.effect.name, value : 5})
|
||||
}
|
||||
}
|
||||
1
scripts/52mwb33mGrQjq89B.js
Normal file
1
scripts/52mwb33mGrQjq89B.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name != game.i18n.localize("NAME.Research");
|
||||
1
scripts/5Fe1ELaS6Gnvy0Cj.js
Normal file
1
scripts/5Fe1ELaS6Gnvy0Cj.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) || args.type == "channelling" || args.skill?.name == game.i18n.localize("NAME.Charm") || args.skill?.name.includes(`${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})`) || args.type == "cast"
|
||||
1
scripts/5QR83whGk4ZyuJcA.js
Normal file
1
scripts/5QR83whGk4ZyuJcA.js
Normal file
@@ -0,0 +1 @@
|
||||
await this.effect.update({duration:{rounds: this.actor.system.characteristics.ws.bonus}});
|
||||
9
scripts/5QjaPBFbv5rIYpla.js
Normal file
9
scripts/5QjaPBFbv5rIYpla.js
Normal file
@@ -0,0 +1,9 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty : "average"}, appendTitle : " - Wounded"})
|
||||
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)
|
||||
})
|
||||
}
|
||||
1
scripts/5o1XiceC4rutjMms.js
Normal file
1
scripts/5o1XiceC4rutjMms.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.item?.name.includes(game.i18n.localize("NAME.Stealth"))
|
||||
2
scripts/5rlneScoI5feQ3Di.js
Normal file
2
scripts/5rlneScoI5feQ3Di.js
Normal file
@@ -0,0 +1,2 @@
|
||||
const traits = this.actor.itemTypes.trait.filter(t => ["bestial", "skittish"].includes(s.name.toLowerCase()));
|
||||
trait.system.disabled = true;
|
||||
1
scripts/5sI9iYh5j2nx2XyT.js
Normal file
1
scripts/5sI9iYh5j2nx2XyT.js
Normal file
@@ -0,0 +1 @@
|
||||
return !([game.i18n.localize("NAME.AnimalCare"), game.i18n.localize("NAME.CharmAnimal")].includes(args.item?.name) || args.item?.name.includes(game.i18n.localize("NAME.Ride")) || args.item?.name.includes(game.i18n.localize("NAME.AnimalTraining")));
|
||||
8
scripts/6JrUjs3g5x6bFnj3.js
Normal file
8
scripts/6JrUjs3g5x6bFnj3.js
Normal file
@@ -0,0 +1,8 @@
|
||||
let bite = await fromUuid("Compendium.wfrp4e-core.items.pLW9SVX0TVTYPiPv")
|
||||
let sense = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
|
||||
let biteData = bite.toObject();
|
||||
let senseData = sense.toObject();
|
||||
|
||||
biteData.system.specification.value = 6 - this.actor.characteristics.s.bonus;
|
||||
senseData.name = senseData.name += game.i18n.localize("SPEC.Smell")
|
||||
this.actor.createEmbeddedDocuments("Item", [biteData, senseData], {fromEffect : this.effect.id})
|
||||
6
scripts/6V3qHON3mcerlBlB.js
Normal file
6
scripts/6V3qHON3mcerlBlB.js
Normal file
@@ -0,0 +1,6 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("prone");
|
||||
}
|
||||
11
scripts/6ZS1rQLkNvMDO0Fp.js
Normal file
11
scripts/6ZS1rQLkNvMDO0Fp.js
Normal file
@@ -0,0 +1,11 @@
|
||||
let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)
|
||||
if (args.test.isFumble && roll == 1 && !args.test.result.misfire)
|
||||
{
|
||||
args.test.result.misfire = game.i18n.localize("Misfire") + " (Rolled 1)"
|
||||
args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)
|
||||
}
|
||||
else if (args.test.isFumble && roll != 1)
|
||||
{
|
||||
args.test.result.other.push("Misfire Roll: " + roll)
|
||||
}
|
||||
|
||||
6
scripts/6a5nBENmfxy93vGY.js
Normal file
6
scripts/6a5nBENmfxy93vGY.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const deduct = this.effect.setFlag("wfrp4e", "failed");
|
||||
|
||||
if (!deduct) return;
|
||||
|
||||
this.actor.system.characteristics.ws.modifier -= 20;
|
||||
this.actor.system.characteristics.bs.modifier -= 20;
|
||||
6
scripts/6fElmBxTjdAaubbK.js
Normal file
6
scripts/6fElmBxTjdAaubbK.js
Normal file
@@ -0,0 +1,6 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields: {difficulty: "average"}});
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("prone")
|
||||
}
|
||||
1
scripts/6qUKKep5vhFYmo1J.js
Normal file
1
scripts/6qUKKep5vhFYmo1J.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.type == "channelling" || args.skill?.name.includes(game.i18n.localize("NAME.Channelling"))
|
||||
1
scripts/6tjn0RH4VyOPFneS.js
Normal file
1
scripts/6tjn0RH4VyOPFneS.js
Normal file
@@ -0,0 +1 @@
|
||||
return ["NAME.Row", "NAME.Swim"].map(i => game.i18n.localize(i)).includes(args.skill?.name);
|
||||
1
scripts/715G1Bf0haOHvmYQ.js
Normal file
1
scripts/715G1Bf0haOHvmYQ.js
Normal file
@@ -0,0 +1 @@
|
||||
return !(args.skill?.name == game.i18n.localize("NAME.Bribery") || args.skill?.name.includes(game.i18n.localize("NAME.Stealth")))
|
||||
21
scripts/7BgJe9YkbHTh3ucm.js
Normal file
21
scripts/7BgJe9YkbHTh3ucm.js
Normal file
@@ -0,0 +1,21 @@
|
||||
if (args.totalWoundLoss <= 0) return;
|
||||
|
||||
const test = await this.actor.setupSkill(
|
||||
game.i18n.localize("NAME.Endurance"),
|
||||
{
|
||||
fields: {difficulty: "difficult"},
|
||||
skipTargets: true,
|
||||
appendTitle: ` — ${this.effect.name}`,
|
||||
},
|
||||
);
|
||||
|
||||
await test.roll();
|
||||
|
||||
if (test.failed) {
|
||||
const item = await fromUuid("Compendium.wfrp4e-core.items.Item.kKccDTGzWzSXCBOb");
|
||||
const data = item.toObject();
|
||||
|
||||
data.system.duration.active = true;
|
||||
|
||||
args.actor.createEmbeddedDocuments("Item", [data]);
|
||||
}
|
||||
4
scripts/7Ck0fkzE4WQ62qVe.js
Normal file
4
scripts/7Ck0fkzE4WQ62qVe.js
Normal file
@@ -0,0 +1,4 @@
|
||||
if (args.item.type == "skill" && args.item.name == `${game.i18n.localize("NAME.Melee")} (${game.i18n.localize("SPEC.Basic")})`)
|
||||
{
|
||||
args.item.system.modifier.value += 20;
|
||||
}
|
||||
1
scripts/7H6wYyJ6cpaoc2QQ.js
Normal file
1
scripts/7H6wYyJ6cpaoc2QQ.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.Cool");
|
||||
1
scripts/7VAhXHov6pR1SkgD.js
Normal file
1
scripts/7VAhXHov6pR1SkgD.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.item?.name == game.i18n.localize("NAME.Endurance");
|
||||
1
scripts/7e8FgQUF2oANANmx.js
Normal file
1
scripts/7e8FgQUF2oANANmx.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.MeleeBrawling") || args.item?.weaponGroup?.value == "brawling"
|
||||
6
scripts/7szLG4VALuuy1cPm.js
Normal file
6
scripts/7szLG4VALuuy1cPm.js
Normal file
@@ -0,0 +1,6 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
await this.actor.addCondition("fatigued")
|
||||
}
|
||||
1
scripts/84IB8CWa55XzoAkv.js
Normal file
1
scripts/84IB8CWa55XzoAkv.js
Normal file
@@ -0,0 +1 @@
|
||||
return ([game.i18n.localize("NAME.AnimalCare"), game.i18n.localize("NAME.CharmAnimal")].includes(args.item?.name) || args.item?.name.includes(game.i18n.localize("NAME.Ride")) || args.item?.name.includes(game.i18n.localize("NAME.AnimalTraining")));
|
||||
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");
|
||||
}
|
||||
16
scripts/8ByuHnUZ4RNTdGVv.js
Normal file
16
scripts/8ByuHnUZ4RNTdGVv.js
Normal file
@@ -0,0 +1,16 @@
|
||||
let strLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)
|
||||
let tghLoss = Math.ceil(CONFIG.Dice.randomUniform() * 10)
|
||||
|
||||
if (!this.actor.has("Undead") && !this.actor.has("Daemonic"))
|
||||
{
|
||||
this.actor.setupSkill(game.i18n.localize("NAME.Cool"), { appendTitle: " - " + this.effect.name, fields: { difficulty: "average" }, context: { failure: `Lost ${strLoss} Strength and ${tghLoss} Toughness` } }).then(async test => {
|
||||
await test.roll();
|
||||
if (test.failed) {
|
||||
this.actor.update({ "system.characteristics.s.initial": this.actor.system.characteristics.s.initial - strLoss, "system.characteristics.t.initial": this.actor.system.characteristics.t.initial - tghLoss })
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
else {
|
||||
this.script.notification(`<strong>${this.actor.name}</strong> est immunisé contre ${this.effect.name}`)
|
||||
}
|
||||
12
scripts/8Gan2EeGExBFSxmp.js
Normal file
12
scripts/8Gan2EeGExBFSxmp.js
Normal file
@@ -0,0 +1,12 @@
|
||||
let damage = this.effect.sourceTest.result.damage;
|
||||
|
||||
if (this.actor.sizeNum >= game.wfrp4e.config.actorSizeNums.lrg)
|
||||
damage += 7; // goes from +8 to +15;
|
||||
|
||||
if (this.actor.has(game.i18n.localize("NAME.Unstable")))
|
||||
damage *= 2;
|
||||
|
||||
this.actor.applyDamage(damage, {
|
||||
loc: "roll",
|
||||
createMessage: this.script.getChatData()
|
||||
});
|
||||
1
scripts/8N3Uqjq1ZxPxo4pk.js
Normal file
1
scripts/8N3Uqjq1ZxPxo4pk.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.skill?.name?.includes(game.i18n.localize("NAME.Lore"))
|
||||
1
scripts/8OwUgwZI8hOJt2hG.js
Normal file
1
scripts/8OwUgwZI8hOJt2hG.js
Normal file
@@ -0,0 +1 @@
|
||||
args.fields.modifier += ((this.effect.sourceTest?.result.slOver * 10) || 10)
|
||||
5
scripts/8RNziYGGb4sp3BGQ.js
Normal file
5
scripts/8RNziYGGb4sp3BGQ.js
Normal file
@@ -0,0 +1,5 @@
|
||||
if (!args.test.weapon?.name.includes("Drakefire"))
|
||||
{
|
||||
args.test.result.misfire = game.i18n.localize("Misfire");
|
||||
args.test.result.misfireDamage = (0, eval)(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.weapon.system.Damage);
|
||||
}
|
||||
11
scripts/8ZAUBSH9CM9OTpTL.js
Normal file
11
scripts/8ZAUBSH9CM9OTpTL.js
Normal file
@@ -0,0 +1,11 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Perception"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "easy"}});
|
||||
await test.roll();
|
||||
|
||||
if (test.succeeded)
|
||||
{
|
||||
this.actor.addCondition("stunned")
|
||||
}
|
||||
else if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("poisoned", 2);
|
||||
}
|
||||
1
scripts/93K85NnVwjVNXlZq.js
Normal file
1
scripts/93K85NnVwjVNXlZq.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.skill?.name.includes(game.i18n.localize("NAME.Trade"));
|
||||
31
scripts/97yDvwmUqkwHktQj.js
Normal file
31
scripts/97yDvwmUqkwHktQj.js
Normal file
@@ -0,0 +1,31 @@
|
||||
let data = this.effect.getFlag("wfrp4e", "handOfGlory");
|
||||
let changes = [];
|
||||
|
||||
if (!data)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.characteristic == "movement")
|
||||
{
|
||||
changes = [{key: "system.details.move.value", mode: 2, value: 2}]
|
||||
}
|
||||
else
|
||||
{
|
||||
let currentTotal = this.actor.system.characteristics[data.characteristic].value;
|
||||
let newTotal = this.actor.system.characteristics[data.characteristic].value + data.roll;
|
||||
let bonusOffset = Math.floor(currentTotal / 10) - Math.floor(newTotal / 10); // e.g. 37 + 15 bonus = 52, calculation bonus modifier should be -2
|
||||
|
||||
changes = changes.concat({
|
||||
key: `system.characteristics.${data.characteristic}.modifier`,
|
||||
mode: 2,
|
||||
value: data.roll
|
||||
},
|
||||
{
|
||||
key: `system.characteristics.${data.characteristic}.calculationBonusModifier`,
|
||||
mode: 2,
|
||||
value: bonusOffset
|
||||
})
|
||||
}
|
||||
|
||||
this.effect.updateSource({changes});
|
||||
1
scripts/9EVj4bmZJex45Mt7.js
Normal file
1
scripts/9EVj4bmZJex45Mt7.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name != game.i18n.localize("NAME.Athletics");
|
||||
4
scripts/9JnPK1jNUEso7Pv8.js
Normal file
4
scripts/9JnPK1jNUEso7Pv8.js
Normal file
@@ -0,0 +1,4 @@
|
||||
let item = await fromUuid("Compendium.wfrp4e-core.items.9h82z72XGo9tfgQS")
|
||||
let data = item.toObject();
|
||||
data.name += ` (${game.i18n.localize("SPEC.Smell")})`
|
||||
this.actor.createEmbeddedDocuments("Item", [data], {fromEffect : this.effect.id})
|
||||
1
scripts/9RFoasDcFnYZ1txR.js
Normal file
1
scripts/9RFoasDcFnYZ1txR.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.Perception");
|
||||
12
scripts/9fK07tqqZyPg7dpx.js
Normal file
12
scripts/9fK07tqqZyPg7dpx.js
Normal file
@@ -0,0 +1,12 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty: "veasy"}})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.script.notification("Gained a <strong>Festering Wound</strong>")
|
||||
let item = await fromUuid("Compendium.wfrp4e-core.items.kKccDTGzWzSXCBOb")
|
||||
this.actor.createEmbeddedDocuments("Item", [item.toObject()])
|
||||
}
|
||||
else
|
||||
{
|
||||
this.script.notification("Avoided a <strong>Festering Wound</strong>")
|
||||
}
|
||||
15
scripts/A3fvV69RS1lYgma0.js
Normal file
15
scripts/A3fvV69RS1lYgma0.js
Normal file
@@ -0,0 +1,15 @@
|
||||
if (this.actor.type == "character")
|
||||
this.actor.corruptionDialog("minor")
|
||||
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name})
|
||||
await test.roll();
|
||||
if(test.failed)
|
||||
{
|
||||
await this.actor.addCondition("unconscious");
|
||||
let secondTest = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "easy"}, skipTargets: true, appendTitle : " - Despair"})
|
||||
await secondTest.roll();
|
||||
if(secondTest.failed)
|
||||
{
|
||||
await this.actor.addCondition("fatigued");
|
||||
}
|
||||
}
|
||||
1
scripts/ACgKpKrEEHoNGG0h.js
Normal file
1
scripts/ACgKpKrEEHoNGG0h.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) && args.type != "channelling"
|
||||
22
scripts/AHZ8f7dfN8jNsYk6.js
Normal file
22
scripts/AHZ8f7dfN8jNsYk6.js
Normal file
@@ -0,0 +1,22 @@
|
||||
let token = this.actor.getActiveTokens()[0];
|
||||
let target = args.data.targets[0];
|
||||
let weapon = args.weapon;
|
||||
|
||||
if(!target || !token)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
let distance = canvas.grid.measureDistances([{ ray: new foundry.canvas.geometry.Ray({ x: token.center.x, y: token.center.y }, { x: target.center.x, y: target.center.y }) }], { gridSpaces: true })[0]
|
||||
let currentBand
|
||||
|
||||
for (let band in weapon.range.bands)
|
||||
{
|
||||
if (distance >= weapon.range.bands[band].range[0] && distance <= weapon.range.bands[band].range[1])
|
||||
{
|
||||
currentBand = band;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return [game.i18n.localize("Long Range"), game.i18n.localize("Extreme")].includes(currentBand)
|
||||
10
scripts/AHt3D7EHKWBcL3vu.js
Normal file
10
scripts/AHt3D7EHKWBcL3vu.js
Normal file
@@ -0,0 +1,10 @@
|
||||
if (this.item.system.protects[args.loc] && (args.sourceItem?.system.isMagical || args.sourceItem?.type == "trait"))
|
||||
{
|
||||
const heatBased = await foundry.applications.api.DialogV2.confirm({window : {title : this.effect.name}, content : "Apply protection from heat-based attacks?"})
|
||||
|
||||
if (heatBased)
|
||||
{
|
||||
args.applyAP = true;
|
||||
args.modifiers.other.push({label : this.effect.name, value : -1 * this.item.system.currentAP[args.loc], details : this.item.name});
|
||||
}
|
||||
}
|
||||
1
scripts/ALuPRzf85dmkEfLo.js
Normal file
1
scripts/ALuPRzf85dmkEfLo.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.Intuition");
|
||||
1
scripts/AMxezwtYnWCF6Oza.js
Normal file
1
scripts/AMxezwtYnWCF6Oza.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == `${game.i18n.localize("NAME.Ranged")} (${game.i18n.localize("SPEC.Blackpowder")})`
|
||||
1
scripts/AV2Kj6jgmIc45zKi.js
Normal file
1
scripts/AV2Kj6jgmIc45zKi.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name.includes(game.i18n.localize("NAME.Stealth"));
|
||||
1
scripts/B6ZbY3bxTPg6nCng.js
Normal file
1
scripts/B6ZbY3bxTPg6nCng.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.Bribery");
|
||||
11
scripts/B950b0XnIUYCdVwu.js
Normal file
11
scripts/B950b0XnIUYCdVwu.js
Normal file
@@ -0,0 +1,11 @@
|
||||
let test = await args.actor.setupSkill(game.i18n.localize("NAME.Cool"), {skipTargets: true, appendTitle : " - " + this.effect.name})
|
||||
await test.roll();
|
||||
|
||||
if (test.succeeded)
|
||||
{
|
||||
if (args.totalWoundLoss <= parseInt(test.result.SL))
|
||||
{
|
||||
args.abort = `<strong>${this.effect.name}</strong>: Attaque déviée et retournée contre l'attaquant !`
|
||||
}
|
||||
args.modifiers.other.push({label : this.effect.name, value : -1 * parseInt(test.result.SL)})
|
||||
}
|
||||
6
scripts/BAOv7moTxsKlT3JS.js
Normal file
6
scripts/BAOv7moTxsKlT3JS.js
Normal file
@@ -0,0 +1,6 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Cool"), {fields : {difficulty : "easy"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("broken")
|
||||
}
|
||||
2
scripts/BNJRV66jlrp51qZK.js
Normal file
2
scripts/BNJRV66jlrp51qZK.js
Normal file
@@ -0,0 +1,2 @@
|
||||
args.abort = true;
|
||||
this.script.notification(game.i18n.localize("SCRIPT.Sightstep"));
|
||||
15
scripts/BtyFhdGMKiMamGhM.js
Normal file
15
scripts/BtyFhdGMKiMamGhM.js
Normal file
@@ -0,0 +1,15 @@
|
||||
let test = await args.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
let damage = parseInt(this.effect.sourceTest.result.SL)
|
||||
|
||||
if (test.succeded)
|
||||
{
|
||||
damage = damage + 8 - parseInt(test.result.SL)
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
damage = damage + 10
|
||||
this.actor.addCondition("entangled", 3)
|
||||
}
|
||||
this.script.message(await this.actor.applyBasicDamage(damage, {loc : "roll", suppressMsg: true}))
|
||||
1
scripts/C4LZnaX0MYgwrszj.js
Normal file
1
scripts/C4LZnaX0MYgwrszj.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.type !== "channelling" && !args.skill?.name.includes(game.i18n.localize("NAME.Channelling")) && args.skill?.name !== `${game.i18n.localize("NAME.Language")} (${game.i18n.localize("SPEC.Magick")})` && args.skill?.name !== game.i18n.localize("NAME.OutdoorSurvival");
|
||||
14
scripts/C8Q4jf6LSyA3lQHS.js
Normal file
14
scripts/C8Q4jf6LSyA3lQHS.js
Normal file
@@ -0,0 +1,14 @@
|
||||
let damage = this.effect.sourceTest.result.damage;
|
||||
|
||||
damage += 7; // goes from +8 to +15;
|
||||
|
||||
if (this.actor.sizeNum >= game.wfrp4e.config.actorSizeNums.lrg)
|
||||
damage += 22; // goes from +15 to +30;
|
||||
|
||||
if (this.actor.has(game.i18n.localize("NAME.Unstable")))
|
||||
damage *= 2;
|
||||
|
||||
this.actor.applyDamage(damage, {
|
||||
loc: "roll",
|
||||
createMessage: this.script.getChatData()
|
||||
});
|
||||
2
scripts/CCK1iIfPmB398ziT.js
Normal file
2
scripts/CCK1iIfPmB398ziT.js
Normal file
@@ -0,0 +1,2 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Athletics"), {fields : {difficulty : "difficult"}, skipTargets: true, appendTitle : " - Walking"})
|
||||
test.roll();
|
||||
1
scripts/CiFeduksZJ6PRulx.js
Normal file
1
scripts/CiFeduksZJ6PRulx.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == `${game.i18n.localize("NAME.Ride")} (${game.i18n.localize("SPEC.Horse")})` || (args.context.dodge && this.actor.isMounted);
|
||||
14
scripts/CkE8NZOhzPkuRrKJ.js
Normal file
14
scripts/CkE8NZOhzPkuRrKJ.js
Normal file
@@ -0,0 +1,14 @@
|
||||
let item = await fromUuid("Compendium.wfrp4e-core.items.MnMZv7ZXoRqoH9dS")
|
||||
let data = item.toObject();
|
||||
data.system.location.key = this.item.system.location.key
|
||||
this.actor.createEmbeddedDocuments("Item", [data])
|
||||
|
||||
|
||||
|
||||
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {fields: {difficulty: "hard"}, skipTargets: true, appendTitle : ` - ${this.effect.name}`})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
this.actor.addCondition("unconscious")
|
||||
}
|
||||
1
scripts/DTiHS6RfwhF4THbf.js
Normal file
1
scripts/DTiHS6RfwhF4THbf.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name != game.i18n.localize("NAME.Drive") && !args.skill?.name.includes(game.i18n.localize("NAME.Ride"));
|
||||
7
scripts/DsE6rTSzxEn6uWMz.js
Normal file
7
scripts/DsE6rTSzxEn6uWMz.js
Normal file
@@ -0,0 +1,7 @@
|
||||
let test = await this.actor.setupSkill(game.i18n.localize("NAME.Endurance"), {skipTargets: true, appendTitle : ` - ${this.effect.name}`, fields : {difficulty : "average"}})
|
||||
await test.roll();
|
||||
if (test.failed)
|
||||
{
|
||||
await this.actor.addCondition("blinded");
|
||||
await this.actor.addCondition("fatigued")
|
||||
}
|
||||
1
scripts/DuM5l2Yb4bdvDeaG.js
Normal file
1
scripts/DuM5l2Yb4bdvDeaG.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name != game.i18n.localize("NAME.Athletics")
|
||||
1
scripts/DxQnamsb2AuW0p2e.js
Normal file
1
scripts/DxQnamsb2AuW0p2e.js
Normal file
@@ -0,0 +1 @@
|
||||
return !args.skill?.name.includes(game.i18n.localize("NAME.Lore"));
|
||||
1
scripts/E0OhL9ZO8vb8A4qq.js
Normal file
1
scripts/E0OhL9ZO8vb8A4qq.js
Normal file
@@ -0,0 +1 @@
|
||||
args.actor.system.characteristics.t.initial += 30;
|
||||
9
scripts/E2FhOfZzu2CqTSeA.js
Normal file
9
scripts/E2FhOfZzu2CqTSeA.js
Normal file
@@ -0,0 +1,9 @@
|
||||
let damage = this.effect.sourceTest.result.damage;
|
||||
|
||||
await this.actor.applyDamage(damage - 3, {
|
||||
loc: "roll",
|
||||
damageType: game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP,
|
||||
createMessage: this.script.getChatData(),
|
||||
});
|
||||
|
||||
await this.actor.addCondition("ablaze", 1);
|
||||
1
scripts/E4CHDe1xfmcV3oGv.js
Normal file
1
scripts/E4CHDe1xfmcV3oGv.js
Normal file
@@ -0,0 +1 @@
|
||||
return args.skill?.name == game.i18n.localize("NAME.Navigation");
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user