Ajout de la commande /voyage et grosse MAJK de la commande /auberge

This commit is contained in:
2026-01-07 15:04:49 +01:00
parent c8119601d8
commit f525b6c07a
1329 changed files with 24138 additions and 4397 deletions

View File

@@ -5,12 +5,12 @@ if (this.actor.hasCondition("dead")) return;
const currentHoled = this.actor.flags.holed.holed || 0;
const openGunPorts = this.actor.itemTypes.vehicleMod.reduce((acc, m) => {
if (!m.name.toLowerCase().includes("gun port"))
if (!m.name.toLowerCase().includes("gun port"))
return acc;
let closed = m.getFlag("wfrp4e-soc", "gunport");
if (!closed) acc++;
return acc;
}, 0);
@@ -20,11 +20,11 @@ this.actor.flags.holed.total = totalHoled;
if (totalHoled >= toughness) {
const speaker = ChatMessage.getSpeaker({actor: this.actor});
this.script.scriptMessage(`
<p><b>${speaker.alias}</b> sank due to having <em>Holed (${totalHoled})</em> rating equal to, or exceeding its <em>Toughness (${toughness })</em></p>
this.script.message(`
<p><b>${speaker.alias}</b> coule en raison d'un score <em>Percé (${totalHoled})</em> égal ou supérieur à sa <em>Robustesse (${toughness })</em></p>
<p>
<em>Holed</em> due to Critical Damage: ${currentHoled}<br/>
<em>Holed</em> due to opened Gun Ports: ${openGunPorts}
<em>Percé</em> en raison de dégâts critiques : ${currentHoled}<br/>
<em>Percé</em> en raison de sabords ouverts : ${openGunPorts}
</p>
`, { flavor: this.effect.name.split("(")[0]});
this.actor.addCondition("dead");