Secret & rolls
This commit is contained in:
parent
a0402183f5
commit
2e54ee67a9
12
README.md
12
README.md
|
|
@ -6,7 +6,7 @@ or et sang du livre et fournit :
|
|||
|
||||
- les caractéristiques et statistiques dérivées de Ravenous ;
|
||||
- toutes les compétences générales officielles, les compétences maison et leurs modificateurs ;
|
||||
- les attaques et défenses sous forme de sections répétables et de jets Roll20 ;
|
||||
- les attaques et protections sous forme de sections répétables, avec jets de défense et calcul des dégâts dans Roll20 ;
|
||||
- une page de santé détaillée par localisation (PV, protection et armure), ainsi que toutes les résistances physiques et élémentaires ;
|
||||
- les potions, nourritures et effets temporaires en texte libre, publiables dans
|
||||
le chat ;
|
||||
|
|
@ -88,3 +88,13 @@ bac à sable de feuille ou dans une partie de test.
|
|||
Pour utiliser **Défendre** depuis la carte d'une attaque, sélectionnez d'abord
|
||||
le token du défenseur. La macro utilise alors sa compétence d'Esquive ou de
|
||||
Parade et son modificateur temporaire, sans ajouter la caractéristique associée.
|
||||
Le bouton **Jets secrets** dans l'en-tête envoie les jets du personnage
|
||||
uniquement au maître de jeu. Les actions Défendre et Subir suivent le réglage
|
||||
du token défenseur sélectionné.
|
||||
|
||||
Avant d'utiliser **Subir** depuis une attaque, cochez dans l'onglet Santé les
|
||||
résistances applicables et, dans l'onglet Combat, les protections couvrant la
|
||||
localisation. Les résistances cochées se cumulent et retirent chacune deux DMG
|
||||
par point. Une protection cochée ne compte que si son intégrité est supérieure
|
||||
à zéro ; le calcul retire alors sa Protection ainsi que la Force finale du
|
||||
défenseur sélectionné.
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@
|
|||
"max_tier_exclusive": 5,
|
||||
"techniques": 232,
|
||||
"skills": 26,
|
||||
"content_hash": "3803ef310b5b"
|
||||
"content_hash": "190eaeab27cc"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
.identity-grid { display:grid; grid-template-columns:2fr 2fr 1fr; gap:8px; margin-top:6px; }
|
||||
.identity-grid label,.ravenous-sheet label { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
|
||||
.motto { color:var(--dark-gold); font-style:italic; text-align:center; }
|
||||
.motto>span { display:block; }
|
||||
.secret-rolls { display:flex; justify-content:center; align-items:center; gap:6px; margin-top:7px; color:var(--blood)!important; font-style:normal; }
|
||||
.secret-rolls input { margin:0; }
|
||||
.tabs { display:flex; margin:14px 0; border-bottom:2px solid var(--gold); }
|
||||
.tabs button { flex:1; padding:8px 5px; border:0; color:var(--muted); background:transparent; font-size:11px; }
|
||||
.tabs button:hover { color:var(--blood); background:var(--accent); }
|
||||
|
|
@ -83,6 +86,13 @@
|
|||
.attack-thresholds { display:flex; flex-basis:100%; gap:7px; align-items:end; padding:6px 8px; background:var(--accent); border-left:3px solid var(--gold); }
|
||||
.attack-thresholds>span { flex:1; color:var(--muted); font-size:9px; text-transform:uppercase; }
|
||||
.attack-thresholds label { width:75px; }
|
||||
.protection-card .active { width:62px; }
|
||||
.damage-resistance-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
|
||||
.damage-resistance-grid label { display:flex; align-items:center; gap:6px; padding:7px; background:var(--light); border-left:3px solid var(--gold); }
|
||||
.damage-summary { display:flex; gap:8px; align-items:center; margin-top:8px; padding:8px; background:var(--accent); }
|
||||
.damage-summary span { flex:1; color:var(--muted); font-size:10px; text-transform:uppercase; }
|
||||
.damage-summary output { margin-left:6px; color:var(--blood); font:bold 16px "Cinzel",Georgia,serif; }
|
||||
.damage-summary button { padding:6px 10px; color:white; border:0; background:var(--blood); }
|
||||
.callout { padding:9px 12px; color:var(--muted); background:var(--accent); border-left:3px solid var(--gold); font-style:italic; }
|
||||
.consumable-card label:not(.active) { width:105px; }
|
||||
.active { display:flex; align-items:center; gap:5px; padding:5px; }
|
||||
|
|
@ -111,7 +121,8 @@
|
|||
.sheet-rolltemplate-ravenous .sheet-template-row,.sheet-rolltemplate-ravenous .sheet-template-notes { padding:5px 9px; border-top:1px solid #c9bda4; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-actions { display:flex; gap:6px; padding:7px 9px; border-top:1px solid #c9bda4; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-actions a { flex:1; padding:5px 7px; color:#fbf9f3; border:1px solid #70582f; border-radius:2px; background:#7a2424; font:bold 11px Georgia,serif; text-align:center; text-decoration:none; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-calculation { padding:4px 9px 7px; color:#716957; border-top:1px solid #c9bda4; font-size:10px; font-style:italic; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-row b { color:#7a2424; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-notes { color:#716957; font-style:italic; }
|
||||
|
||||
@media (max-width:760px) { .ravenous-sheet { min-width:0; padding:9px; }.hero { grid-template-columns:60px 1fr; }.motto { display:none; }.stat-grid { grid-template-columns:repeat(2,1fr); }.dashboard { grid-template-columns:repeat(2,1fr); }.derived-grid { grid-template-columns:repeat(3,1fr); }.tabs { flex-wrap:wrap; }.tabs button { flex-basis:33%; }.skill-head { display:none; }.skill-row,.custom-skill-row { grid-template-columns:28px 1fr 70px 45px 45px 45px; }.skill-row select,.custom-skill-row select { max-width:70px; }.location-head,.location-row { grid-template-columns:minmax(105px,1.5fr) repeat(5,minmax(54px,1fr)); gap:3px; }.resistance-grid { grid-template-columns:repeat(2,1fr); } }
|
||||
@media (max-width:760px) { .ravenous-sheet { min-width:0; padding:9px; }.hero { grid-template-columns:60px 1fr; }.motto { display:none; }.stat-grid { grid-template-columns:repeat(2,1fr); }.dashboard { grid-template-columns:repeat(2,1fr); }.derived-grid { grid-template-columns:repeat(3,1fr); }.tabs { flex-wrap:wrap; }.tabs button { flex-basis:33%; }.skill-head { display:none; }.skill-row,.custom-skill-row { grid-template-columns:28px 1fr 70px 45px 45px 45px; }.skill-row select,.custom-skill-row select { max-width:70px; }.location-head,.location-row { grid-template-columns:minmax(105px,1.5fr) repeat(5,minmax(54px,1fr)); gap:3px; }.resistance-grid,.damage-resistance-grid { grid-template-columns:repeat(2,1fr); } }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<div class="ravenous-sheet">
|
||||
<input type="hidden" name="attr_sheet_version" value="1">
|
||||
<input type="hidden" name="attr_roll_whisper" value="">
|
||||
<header class="hero">
|
||||
<div class="sigil" aria-hidden="true">R</div>
|
||||
<div class="identity">
|
||||
|
|
@ -10,7 +11,7 @@
|
|||
<label>Stade<input type="number" name="attr_stage" value="1" min="0"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="motto">La chasse laisse des marques.</div>
|
||||
<div class="motto"><span>La chasse laisse des marques.</span><label class="secret-rolls">Jets secrets<input type="checkbox" name="attr_secret_rolls" value="1"></label></div>
|
||||
</header>
|
||||
|
||||
<nav class="tabs" aria-label="Sections de la feuille">
|
||||
|
|
@ -89,6 +90,13 @@
|
|||
<div class="resistance-grid">
|
||||
<label>Abyssal<input type="number" name="attr_resist_abyssal" value="0"></label><label>Céleste<input type="number" name="attr_resist_celestial" value="0"></label><label>Altérations<input type="number" name="attr_resist_alterations" value="0"></label><label>Mentale<input type="number" name="attr_resist_mental" value="0"></label><label>Fatigue<input type="number" name="attr_resist_fatigue" value="0"></label><label>Sangressence<input type="number" name="attr_resist_sangressence" value="0"></label><label>Néant<input type="number" name="attr_resist_void" value="0"></label><label>Transcendantale<input type="number" name="attr_resist_transcendental" value="0"></label>
|
||||
</div>
|
||||
<div class="section-title"><span>✦</span><h2>Réductions appliquées</h2></div>
|
||||
<p class="callout">Cochez tous les types applicables aux prochains dégâts. Chaque point de résistance sélectionné retire 2 DMG et les résistances se cumulent.</p>
|
||||
<div class="damage-resistance-grid">
|
||||
<label><input type="checkbox" name="attr_damage_apply_slash" value="1">Tranchant</label><label><input type="checkbox" name="attr_damage_apply_pierce" value="1">Perçant</label><label><input type="checkbox" name="attr_damage_apply_blunt" value="1">Contondant</label><label><input type="checkbox" name="attr_damage_apply_fire" value="1">Feu</label><label><input type="checkbox" name="attr_damage_apply_earth" value="1">Terre</label><label><input type="checkbox" name="attr_damage_apply_wood" value="1">Bois</label><label><input type="checkbox" name="attr_damage_apply_magma" value="1">Magma</label><label><input type="checkbox" name="attr_damage_apply_water" value="1">Eau</label><label><input type="checkbox" name="attr_damage_apply_wind" value="1">Vent</label><label><input type="checkbox" name="attr_damage_apply_ice" value="1">Glace</label><label><input type="checkbox" name="attr_damage_apply_lightning" value="1">Foudre</label><label><input type="checkbox" name="attr_damage_apply_abyssal" value="1">Abyssal</label><label><input type="checkbox" name="attr_damage_apply_celestial" value="1">Céleste</label>
|
||||
</div>
|
||||
<div class="damage-summary"><span>Résistance cumulée <output name="attr_damage_resistance_total">0</output></span><span>Protection active <output name="attr_active_protection_total">0</output></span><button type="action" name="act_clear_damage_resistances">Tout décocher</button></div>
|
||||
<input type="hidden" name="attr_active_protection_count" value="0">
|
||||
</section>
|
||||
|
||||
<section class="page page-skills">
|
||||
|
|
@ -330,6 +338,7 @@
|
|||
<button class="attack-roll" type="action" name="act_attack" title="Effectuer cette attaque" aria-label="Effectuer cette attaque"></button>
|
||||
<button class="attack-followup" type="action" name="act_defend" aria-label="Défendre contre cette attaque"></button>
|
||||
<button class="attack-followup" type="action" name="act_damage" aria-label="Calculer les dégâts de cette attaque"></button>
|
||||
<button class="attack-followup" type="action" name="act_take_damage" aria-label="Appliquer les réductions du défenseur"></button>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Arme / attaque">
|
||||
<label>Dés<input type="number" name="attr_dice" value="1" min="0"></label>
|
||||
<label>Seuil<input type="number" name="attr_threshold" value="6"></label>
|
||||
|
|
@ -342,16 +351,18 @@
|
|||
<div class="attack-thresholds"><span>Seuils défensifs</span><label>Esq.<input type="number" name="attr_dodge_threshold" value="6"></label><label>Par.<input type="number" name="attr_parry_threshold" value="6"></label><label>Repos.<input type="number" name="attr_reposition_threshold" value="0"></label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="section-title"><span>◇</span><h2>Défenses</h2></div>
|
||||
<fieldset class="repeating_defenses">
|
||||
<div class="combat-card defense-card">
|
||||
<button type="roll" name="roll_defense" value="&{template:ravenous} {{title=@{name}}} {{subtitle=Défense · @{character_name}}} {{pool=[[@{dice}]]d10}} {{threshold=[[@{base_threshold}+@{skill}+@{temp}]]}} {{result=[[@{dice}d10<@{base_threshold}+@{skill}+@{temp}]]}} {{details=@{notes}}}"></button>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Parade, esquive…">
|
||||
<label>Dés<input type="number" name="attr_dice" value="1"></label>
|
||||
<label>Seuil attaque<input type="number" name="attr_base_threshold" value="6"></label>
|
||||
<label>Comp.<input type="number" name="attr_skill" value="0"></label>
|
||||
<label>Temp.<input type="number" name="attr_temp" value="0"></label>
|
||||
<textarea name="attr_notes" placeholder="Équipement requis, zone, circonstances…"></textarea>
|
||||
<div class="section-title"><span>◇</span><h2>Protections</h2></div>
|
||||
<p class="callout">Cochez les protections couvrant la localisation touchée. Seules celles ayant encore de l'intégrité participent au calcul.</p>
|
||||
<fieldset class="repeating_protections">
|
||||
<div class="combat-card protection-card">
|
||||
<label class="active">Active<input type="checkbox" name="attr_active" value="1"></label>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Armure, bouclier, protection naturelle…">
|
||||
<label>Protection<input type="number" name="attr_protection" value="0" min="0"></label>
|
||||
<label>Int.<input type="number" name="attr_integrity" value="0" min="0"></label>
|
||||
<label>Int. max<input type="number" name="attr_integrity_max" value="0" min="0"></label>
|
||||
<label>Parade<input type="number" name="attr_parry" value="0"></label>
|
||||
<label>Esquive<input type="number" name="attr_dodge" value="0"></label>
|
||||
<textarea name="attr_effects" placeholder="Discrétion, camouflage, résistances supplémentaires, effets…"></textarea>
|
||||
</div>
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
@ -361,7 +372,7 @@
|
|||
<p class="callout">Décrivez librement l'effet du consommable puis utilisez le bouton ▶ pour l'annoncer dans le chat.</p>
|
||||
<fieldset class="repeating_consumables">
|
||||
<div class="consumable-card">
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Utiliser dans le chat" value="&{template:ravenous} {{title=@{name}}} {{subtitle=@{kind} · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Utiliser dans le chat" value="@{roll_whisper}&{template:ravenous} {{title=@{name}}} {{subtitle=@{kind} · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<select name="attr_kind"><option value="Nourriture">Nourriture</option><option value="Potion">Potion</option><option value="Autre">Autre</option></select>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Nom du consommable">
|
||||
<label>Qté<input type="number" name="attr_quantity" value="1" min="0"></label>
|
||||
|
|
@ -372,7 +383,7 @@
|
|||
<div class="section-title small"><span>✧</span><h3>Effets temporaires</h3></div>
|
||||
<fieldset class="repeating_modifiers">
|
||||
<div class="modifier-card">
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Afficher dans le chat" value="&{template:ravenous} {{title=@{name}}} {{subtitle=Effet temporaire · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Afficher dans le chat" value="@{roll_whisper}&{template:ravenous} {{title=@{name}}} {{subtitle=Effet temporaire · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Bénédiction, blessure, terrain…">
|
||||
<input type="text" name="attr_duration" placeholder="Durée / fin">
|
||||
<textarea name="attr_description" placeholder="Effet et conditions…"></textarea>
|
||||
|
|
@ -387,7 +398,7 @@
|
|||
<fieldset class="repeating_techniques">
|
||||
<div class="technique-card">
|
||||
<input type="hidden" name="attr_source_key">
|
||||
<div class="tech-title"><button class="activate-technique" type="roll" name="roll_activate" title="Activer dans le chat" value="&{template:ravenous} {{title=@{name}}} {{subtitle=@{school} · Tier @{tier} · @{type}}} {{cost=Sang @{blood} · Jauge @{gauge} · @{other}}} {{details=@{effect}}}">▶</button><input type="text" name="attr_name"><label>Acquise<input type="checkbox" name="attr_owned" value="1"></label></div>
|
||||
<div class="tech-title"><button class="activate-technique" type="roll" name="roll_activate" title="Activer dans le chat" value="@{roll_whisper}&{template:ravenous} {{title=@{name}}} {{subtitle=@{school} · Tier @{tier} · @{type}}} {{cost=Sang @{blood} · Jauge @{gauge} · @{other}}} {{details=@{effect}}}">▶</button><input type="text" name="attr_name"><label>Acquise<input type="checkbox" name="attr_owned" value="1"></label></div>
|
||||
<div class="tech-meta"><input type="text" name="attr_school"><label>Tier<input type="text" name="attr_tier"></label><label>Niv.<input type="text" name="attr_level"></label><label>Sang<input type="text" name="attr_blood"></label><label>Jauge<input type="text" name="attr_gauge"></label><label>Autre<input type="text" name="attr_other"></label><input type="text" name="attr_type"></div>
|
||||
<textarea name="attr_effect" rows="3"></textarea>
|
||||
</div>
|
||||
|
|
@ -395,7 +406,28 @@
|
|||
</section>
|
||||
</div>
|
||||
|
||||
<rolltemplate class="sheet-rolltemplate-ravenous"><div class="sheet-template"><div class="sheet-template-title">{{title}}</div>{{#subtitle}}<div class="sheet-template-subtitle">{{subtitle}}</div>{{/subtitle}}{{#skillcheck}}<div class="sheet-template-skill-result">{{computed::outcome}}</div><div class="sheet-template-row"><b>Dé</b> {{roll}}</div><div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div><div class="sheet-template-row"><b>Marge (seuil − dé)</b> {{computed::margin}}</div>{{/skillcheck}}{{#attackcheck}}<div class="sheet-template-result">{{computed::attack_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{attack_roll}}</div>{{/attackcheck}}{{#defense}}<div class="sheet-template-skill-result">{{computed::defense_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{defense_roll}}</div>{{/defense}}{{#finalsuccesses}}<div class="sheet-template-row"><b>Succès restants</b> {{computed::finalsuccesses}}</div>{{/finalsuccesses}}{{#result}}{{^attackcheck}}<div class="sheet-template-result">{{result}}</div>{{/attackcheck}}{{/result}}{{#pool}}<div class="sheet-template-row"><b>Réserve</b> {{pool}}</div>{{/pool}}{{#threshold}}{{^skillcheck}}<div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div>{{/skillcheck}}{{/threshold}}{{#damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{computed::damage}}</div>{{/damagecalc}}{{#damage}}{{^damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{damage}}</div>{{/damagecalc}}{{/damage}}{{#breakdamage}}<div class="sheet-template-row"><b>AB</b> {{breakdamage}}</div>{{/breakdamage}}{{#thresholds}}<div class="sheet-template-row"><b>Défenses</b> {{thresholds}}</div>{{/thresholds}}{{#buttons}}<div class="sheet-template-actions">{{buttons}}</div>{{/buttons}}{{#cost}}<div class="sheet-template-row"><b>Coût</b> {{cost}}</div>{{/cost}}{{#duration}}<div class="sheet-template-row"><b>Durée</b> {{duration}}</div>{{/duration}}{{#details}}<div class="sheet-template-notes">{{details}}</div>{{/details}}</div></rolltemplate>
|
||||
<rolltemplate class="sheet-rolltemplate-ravenous">
|
||||
<div class="sheet-template">
|
||||
<div class="sheet-template-title">{{title}}</div>
|
||||
{{#subtitle}}<div class="sheet-template-subtitle">{{subtitle}}</div>{{/subtitle}}
|
||||
{{#skillcheck}}<div class="sheet-template-skill-result">{{computed::outcome}}</div><div class="sheet-template-row"><b>Dé</b> {{roll}}</div><div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div><div class="sheet-template-row"><b>Marge (seuil − dé)</b> {{computed::margin}}</div>{{/skillcheck}}
|
||||
{{#attackcheck}}<div class="sheet-template-result">{{computed::attack_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{attack_roll}}</div>{{/attackcheck}}
|
||||
{{#defense}}<div class="sheet-template-skill-result">{{computed::defense_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{defense_roll}}</div>{{/defense}}
|
||||
{{#finalsuccesses}}<div class="sheet-template-row"><b>Succès restants</b> {{computed::finalsuccesses}}</div>{{/finalsuccesses}}
|
||||
{{#result}}{{^attackcheck}}<div class="sheet-template-result">{{result}}</div>{{/attackcheck}}{{/result}}
|
||||
{{#pool}}<div class="sheet-template-row"><b>Réserve</b> {{pool}}</div>{{/pool}}
|
||||
{{#threshold}}{{^skillcheck}}<div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div>{{/skillcheck}}{{/threshold}}
|
||||
{{#damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{computed::damage}}</div>{{/damagecalc}}
|
||||
{{#damage}}{{^damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{damage}}</div>{{/damagecalc}}{{/damage}}
|
||||
{{#damagebreakdown}}<div class="sheet-template-calculation">Calcul : {{computed::incoming_damage}} − {{computed::resistance_reduction}} (resist) − {{computed::protection_reduction}} (armor) = {{computed::damage}}</div>{{/damagebreakdown}}
|
||||
{{#breakdamage}}<div class="sheet-template-row"><b>AB</b> {{breakdamage}}</div>{{/breakdamage}}
|
||||
{{#thresholds}}<div class="sheet-template-row"><b>Défenses</b> {{thresholds}}</div>{{/thresholds}}
|
||||
{{#buttons}}<div class="sheet-template-actions">{{buttons}}</div>{{/buttons}}
|
||||
{{#cost}}<div class="sheet-template-row"><b>Coût</b> {{cost}}</div>{{/cost}}
|
||||
{{#duration}}<div class="sheet-template-row"><b>Durée</b> {{duration}}</div>{{/duration}}
|
||||
{{#details}}<div class="sheet-template-notes">{{details}}</div>{{/details}}
|
||||
</div>
|
||||
</rolltemplate>
|
||||
|
||||
<script type="text/worker">
|
||||
const CHARACTERISTICS = ["force","agilite","perception","intelligence","volonte","psy","chance","charisme"];
|
||||
|
|
@ -410,12 +442,33 @@ const attackDamage = (attack, defenseSuccesses = 0) => {
|
|||
const damage = finalSuccesses > 0 ? attack.baseDamage + (finalSuccesses - 1) * attack.damagePerSuccess : 0;
|
||||
return {finalSuccesses, damage};
|
||||
};
|
||||
const DAMAGE_RESISTANCES = ["slash","pierce","blunt","fire","earth","wood","magma","water","wind","ice","lightning","abyssal","celestial"];
|
||||
|
||||
const performSkillRoll = (title, threshold) => getAttrs(["character_name","skill_die"], values => {
|
||||
const recalculateDamageResistances = () => {
|
||||
const attrs = DAMAGE_RESISTANCES.flatMap(type => [`resist_${type}`, `damage_apply_${type}`]);
|
||||
getAttrs(attrs, values => {
|
||||
const total = DAMAGE_RESISTANCES.reduce((sum, type) => sum + (values[`damage_apply_${type}`] === "1" ? number(values[`resist_${type}`]) : 0), 0);
|
||||
setAttrs({damage_resistance_total: total}, {silent:true});
|
||||
});
|
||||
};
|
||||
|
||||
const recalculateProtections = () => getSectionIDs("protections", ids => {
|
||||
const attrs = ids.flatMap(id => [`repeating_protections_${id}_active`,`repeating_protections_${id}_integrity`,`repeating_protections_${id}_protection`]);
|
||||
getAttrs(attrs, values => {
|
||||
let total = 0; let count = 0;
|
||||
ids.forEach(id => {
|
||||
const prefix = `repeating_protections_${id}_`;
|
||||
if (values[prefix+"active"] === "1" && number(values[prefix+"integrity"]) > 0) { total += number(values[prefix+"protection"]); count += 1; }
|
||||
});
|
||||
setAttrs({active_protection_total:total, active_protection_count:count}, {silent:true});
|
||||
});
|
||||
});
|
||||
|
||||
const performSkillRoll = (title, threshold) => getAttrs(["character_name","skill_die","roll_whisper"], values => {
|
||||
const die = Math.max(1, Math.floor(number(values.skill_die) || 10));
|
||||
const target = Math.floor(number(threshold));
|
||||
const expression = `1d${die}cs1cf${die + 1}`;
|
||||
const command = `&{template:ravenous} {{title=${templateText(title)}}} {{subtitle=${templateText(values.character_name)}}} {{skillcheck=1}} {{roll=[[${expression}]]}} {{threshold=[[${target}]]}} {{margin=[[0]]}} {{outcome=[[0]]}}`;
|
||||
const command = `${values.roll_whisper || ""}&{template:ravenous} {{title=${templateText(title)}}} {{subtitle=${templateText(values.character_name)}}} {{skillcheck=1}} {{roll=[[${expression}]]}} {{threshold=[[${target}]]}} {{margin=[[0]]}} {{outcome=[[0]]}}`;
|
||||
startRoll(command, results => {
|
||||
const rolled = results.results.roll.result;
|
||||
const margin = target - rolled;
|
||||
|
|
@ -427,10 +480,10 @@ const performSkillRoll = (title, threshold) => getAttrs(["character_name","skill
|
|||
on("clicked:repeating_attacks:attack", event => {
|
||||
const prefix = event.sourceAttribute.replace(/attack$/, "");
|
||||
const fields = ["name","dice","threshold","temp","base_damage","damage_per_success","break_damage","rmax","dodge_threshold","parry_threshold","reposition_threshold","notes"];
|
||||
getAttrs(["character_name", ...fields.map(field => prefix + field)], values => {
|
||||
getAttrs(["character_name","roll_whisper", ...fields.map(field => prefix + field)], values => {
|
||||
const get = field => values[prefix + field];
|
||||
const command = `&{template:ravenous} {{title=${templateText(get("name") || "Attaque")}}} {{subtitle=Attaque · ${templateText(values.character_name)}}} {{attackcheck=1}} {{attack_successes=[[0]]}} {{attack_roll=[[${number(get("dice"))}d10<${number(get("threshold")) + number(get("temp"))}]]}} {{pool=[[${number(get("dice"))}]]d10}} {{threshold=[[${number(get("threshold"))}+${number(get("temp"))}]]}} {{damage=${number(get("base_damage"))} + ${number(get("damage_per_success"))}/R}} {{breakdamage=${number(get("break_damage"))}}} {{thresholds=Esq. ${number(get("dodge_threshold"))} · Par. ${number(get("parry_threshold"))} · Repos. ${number(get("reposition_threshold"))}}} {{buttons=[Défendre](~${prefix}defend) [Dégâts](~${prefix}damage)}} {{details=RMax ${number(get("rmax"))} · ${templateText(get("notes"))}}}`;
|
||||
startRoll(command, results => {
|
||||
const command = `&{template:ravenous} {{title=${templateText(get("name") || "Attaque")}}} {{subtitle=Attaque · ${templateText(values.character_name)}}} {{attackcheck=1}} {{attack_successes=[[0]]}} {{attack_roll=[[${number(get("dice"))}d10<${number(get("threshold")) + number(get("temp"))}]]}} {{pool=[[${number(get("dice"))}]]d10}} {{threshold=[[${number(get("threshold"))}+${number(get("temp"))}]]}} {{damage=${number(get("base_damage"))} + ${number(get("damage_per_success"))}/R}} {{breakdamage=${number(get("break_damage"))}}} {{thresholds=Esq. ${number(get("dodge_threshold"))} · Par. ${number(get("parry_threshold"))} · Repos. ${number(get("reposition_threshold"))}}} {{buttons=[Défendre](~${prefix}defend) [Dégâts](~${prefix}damage) [Subir](~${prefix}take_damage)}} {{details=RMax ${number(get("rmax"))} · ${templateText(get("notes"))}}}`;
|
||||
startRoll(`${values.roll_whisper || ""}${command}`, results => {
|
||||
const successes = results.results.attack_roll.result;
|
||||
attackRolls[results.rollId] = {successes, baseDamage: number(get("base_damage")), damagePerSuccess: number(get("damage_per_success")), breakDamage: number(get("break_damage")), rmax: number(get("rmax"))};
|
||||
finishRoll(results.rollId, {attack_successes: successes});
|
||||
|
|
@ -448,7 +501,7 @@ on("clicked:repeating_attacks:defend", event => {
|
|||
const attack = attackRolls[event.originalRollId];
|
||||
const damageFields = attack ? ` {{damagecalc=1}} {{finalsuccesses=[[0]]}} {{damage=[[0]]}} {{breakdamage=${attack.breakDamage}}}` : "";
|
||||
const command = `&{template:ravenous} {{title=Défense · ${templateText(values[prefix+"name"] || "Attaque")}}} {{subtitle=@{selected|character_name}}} {{defense=1}} {{defense_successes=[[0]]}} {{pool=[[?{Nombre de dés|1}]]d10}} {{threshold=[[${defenseQuery}+?{Bonus|0}]]}} {{defense_roll=[[?{Nombre de dés|1}d10<${defenseQuery}+?{Bonus|0}]]}}${damageFields}`;
|
||||
startRoll(command, results => {
|
||||
startRoll(`@{selected|roll_whisper}${command}`, results => {
|
||||
const defenseSuccesses = results.results.defense_roll.result;
|
||||
const computed = {defense_successes: defenseSuccesses};
|
||||
if (attack) {
|
||||
|
|
@ -463,9 +516,9 @@ on("clicked:repeating_attacks:defend", event => {
|
|||
|
||||
on("clicked:repeating_attacks:damage", event => {
|
||||
const prefix = event.sourceAttribute.replace(/damage$/, "");
|
||||
getAttrs([prefix+"name",prefix+"base_damage",prefix+"damage_per_success",prefix+"break_damage",prefix+"rmax"], values => {
|
||||
getAttrs(["roll_whisper",prefix+"name",prefix+"base_damage",prefix+"damage_per_success",prefix+"break_damage",prefix+"rmax"], values => {
|
||||
const command = `&{template:ravenous} {{title=Dégâts · ${templateText(values[prefix+"name"] || "Attaque")}}} {{damagecalc=1}} {{remaining=[[?{Succès restants|1}]]}} {{finalsuccesses=[[0]]}} {{damage=[[0]]}} {{breakdamage=${number(values[prefix+"break_damage"])}}}`;
|
||||
startRoll(command, results => {
|
||||
startRoll(`${values.roll_whisper || ""}${command}`, results => {
|
||||
const remaining = Math.max(0, Math.floor(results.results.remaining.result));
|
||||
const finalSuccesses = Math.min(remaining, Math.max(0, Math.floor(number(values[prefix+"rmax"]))));
|
||||
const damage = finalSuccesses > 0 ? number(values[prefix+"base_damage"]) + (finalSuccesses - 1) * number(values[prefix+"damage_per_success"]) : 0;
|
||||
|
|
@ -474,6 +527,22 @@ on("clicked:repeating_attacks:damage", event => {
|
|||
});
|
||||
});
|
||||
|
||||
on("clicked:repeating_attacks:take_damage", event => {
|
||||
const prefix = event.sourceAttribute.replace(/take_damage$/, "");
|
||||
getAttrs([prefix+"name",prefix+"base_damage",prefix+"damage_per_success",prefix+"break_damage",prefix+"rmax"], values => {
|
||||
const command = `&{template:ravenous} {{title=Subir · ${templateText(values[prefix+"name"] || "Attaque")}}} {{subtitle=@{selected|character_name}}} {{damagecalc=1}} {{damagebreakdown=1}} {{remaining=[[?{Succès restants|1}]]}} {{selected_resistance=[[@{selected|damage_resistance_total}]]}} {{selected_protection=[[@{selected|active_protection_total}]]}} {{selected_protection_count=[[@{selected|active_protection_count}]]}} {{selected_strength=[[@{selected|force_total}]]}} {{finalsuccesses=[[0]]}} {{incoming_damage=[[0]]}} {{resistance_reduction=[[0]]}} {{protection_reduction=[[0]]}} {{damage=[[0]]}} {{breakdamage=${number(values[prefix+"break_damage"])}}}`;
|
||||
startRoll(`@{selected|roll_whisper}${command}`, results => {
|
||||
const remaining = Math.max(0, Math.floor(results.results.remaining.result));
|
||||
const finalSuccesses = Math.min(remaining, Math.max(0, Math.floor(number(values[prefix+"rmax"]))));
|
||||
const incoming = finalSuccesses > 0 ? number(values[prefix+"base_damage"]) + (finalSuccesses - 1) * number(values[prefix+"damage_per_success"]) : 0;
|
||||
const resistanceReduction = results.results.selected_resistance.result * 2;
|
||||
const hasProtection = results.results.selected_protection_count.result > 0;
|
||||
const protectionReduction = hasProtection ? results.results.selected_protection.result + results.results.selected_strength.result : 0;
|
||||
finishRoll(results.rollId, {finalsuccesses:finalSuccesses, incoming_damage:incoming, resistance_reduction:resistanceReduction, protection_reduction:protectionReduction, damage:Math.max(0, incoming - resistanceReduction - protectionReduction)});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
const recalculate = () => {
|
||||
const modifiers = ["torque_modifier","speed_modifier","half_speed_modifier","run_speed_modifier","swim_speed_modifier","fly_speed_modifier","hp_modifier","jauge_max_modifier","fatigue_max_modifier","toxicite_max_modifier","satiete_max_modifier","actions_max_modifier"];
|
||||
getAttrs([...CHARACTERISTICS, ...CHARACTERISTICS.map(k => `${k}_manual`), "stage", ...modifiers], values => {
|
||||
|
|
@ -531,6 +600,14 @@ const recalculateCustomSkills = () => getSectionIDs("customskills", ids => {
|
|||
});
|
||||
|
||||
on("sheet:opened change:force change:agilite change:perception change:intelligence change:volonte change:psy change:chance change:charisme change:stage change:force_manual change:agilite_manual change:perception_manual change:intelligence_manual change:volonte_manual change:psy_manual change:chance_manual change:charisme_manual change:torque_modifier change:speed_modifier change:half_speed_modifier change:run_speed_modifier change:swim_speed_modifier change:fly_speed_modifier change:hp_modifier change:jauge_max_modifier change:fatigue_max_modifier change:toxicite_max_modifier change:satiete_max_modifier change:actions_max_modifier", recalculate);
|
||||
on("sheet:opened change:secret_rolls", () => getAttrs(["secret_rolls"], values => setAttrs({roll_whisper:values.secret_rolls === "1" ? "/w gm " : ""}, {silent:true})));
|
||||
on(`sheet:opened ${DAMAGE_RESISTANCES.flatMap(type => [`change:resist_${type}`,`change:damage_apply_${type}`]).join(" ")}`, recalculateDamageResistances);
|
||||
on("sheet:opened change:repeating_protections", recalculateProtections);
|
||||
on("clicked:clear_damage_resistances", () => {
|
||||
const update = {};
|
||||
DAMAGE_RESISTANCES.forEach(type => update[`damage_apply_${type}`] = "0");
|
||||
setAttrs(update, {}, recalculateDamageResistances);
|
||||
});
|
||||
on("change:repeating_customskills", event => {
|
||||
const prefix = event.sourceAttribute.replace(/[^_]+$/, "");
|
||||
getAttrs([prefix+"characteristic", prefix+"rank", prefix+"temp", ...CHARACTERISTICS.map(k => `${k}_total`)], values => {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
.identity-grid { display:grid; grid-template-columns:2fr 2fr 1fr; gap:8px; margin-top:6px; }
|
||||
.identity-grid label,.ravenous-sheet label { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
|
||||
.motto { color:var(--dark-gold); font-style:italic; text-align:center; }
|
||||
.motto>span { display:block; }
|
||||
.secret-rolls { display:flex; justify-content:center; align-items:center; gap:6px; margin-top:7px; color:var(--blood)!important; font-style:normal; }
|
||||
.secret-rolls input { margin:0; }
|
||||
.tabs { display:flex; margin:14px 0; border-bottom:2px solid var(--gold); }
|
||||
.tabs button { flex:1; padding:8px 5px; border:0; color:var(--muted); background:transparent; font-size:11px; }
|
||||
.tabs button:hover { color:var(--blood); background:var(--accent); }
|
||||
|
|
@ -83,6 +86,13 @@
|
|||
.attack-thresholds { display:flex; flex-basis:100%; gap:7px; align-items:end; padding:6px 8px; background:var(--accent); border-left:3px solid var(--gold); }
|
||||
.attack-thresholds>span { flex:1; color:var(--muted); font-size:9px; text-transform:uppercase; }
|
||||
.attack-thresholds label { width:75px; }
|
||||
.protection-card .active { width:62px; }
|
||||
.damage-resistance-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
|
||||
.damage-resistance-grid label { display:flex; align-items:center; gap:6px; padding:7px; background:var(--light); border-left:3px solid var(--gold); }
|
||||
.damage-summary { display:flex; gap:8px; align-items:center; margin-top:8px; padding:8px; background:var(--accent); }
|
||||
.damage-summary span { flex:1; color:var(--muted); font-size:10px; text-transform:uppercase; }
|
||||
.damage-summary output { margin-left:6px; color:var(--blood); font:bold 16px "Cinzel",Georgia,serif; }
|
||||
.damage-summary button { padding:6px 10px; color:white; border:0; background:var(--blood); }
|
||||
.callout { padding:9px 12px; color:var(--muted); background:var(--accent); border-left:3px solid var(--gold); font-style:italic; }
|
||||
.consumable-card label:not(.active) { width:105px; }
|
||||
.active { display:flex; align-items:center; gap:5px; padding:5px; }
|
||||
|
|
@ -111,7 +121,8 @@
|
|||
.sheet-rolltemplate-ravenous .sheet-template-row,.sheet-rolltemplate-ravenous .sheet-template-notes { padding:5px 9px; border-top:1px solid #c9bda4; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-actions { display:flex; gap:6px; padding:7px 9px; border-top:1px solid #c9bda4; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-actions a { flex:1; padding:5px 7px; color:#fbf9f3; border:1px solid #70582f; border-radius:2px; background:#7a2424; font:bold 11px Georgia,serif; text-align:center; text-decoration:none; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-calculation { padding:4px 9px 7px; color:#716957; border-top:1px solid #c9bda4; font-size:10px; font-style:italic; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-row b { color:#7a2424; }
|
||||
.sheet-rolltemplate-ravenous .sheet-template-notes { color:#716957; font-style:italic; }
|
||||
|
||||
@media (max-width:760px) { .ravenous-sheet { min-width:0; padding:9px; }.hero { grid-template-columns:60px 1fr; }.motto { display:none; }.stat-grid { grid-template-columns:repeat(2,1fr); }.dashboard { grid-template-columns:repeat(2,1fr); }.derived-grid { grid-template-columns:repeat(3,1fr); }.tabs { flex-wrap:wrap; }.tabs button { flex-basis:33%; }.skill-head { display:none; }.skill-row,.custom-skill-row { grid-template-columns:28px 1fr 70px 45px 45px 45px; }.skill-row select,.custom-skill-row select { max-width:70px; }.location-head,.location-row { grid-template-columns:minmax(105px,1.5fr) repeat(5,minmax(54px,1fr)); gap:3px; }.resistance-grid { grid-template-columns:repeat(2,1fr); } }
|
||||
@media (max-width:760px) { .ravenous-sheet { min-width:0; padding:9px; }.hero { grid-template-columns:60px 1fr; }.motto { display:none; }.stat-grid { grid-template-columns:repeat(2,1fr); }.dashboard { grid-template-columns:repeat(2,1fr); }.derived-grid { grid-template-columns:repeat(3,1fr); }.tabs { flex-wrap:wrap; }.tabs button { flex-basis:33%; }.skill-head { display:none; }.skill-row,.custom-skill-row { grid-template-columns:28px 1fr 70px 45px 45px 45px; }.skill-row select,.custom-skill-row select { max-width:70px; }.location-head,.location-row { grid-template-columns:minmax(105px,1.5fr) repeat(5,minmax(54px,1fr)); gap:3px; }.resistance-grid,.damage-resistance-grid { grid-template-columns:repeat(2,1fr); } }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<div class="ravenous-sheet">
|
||||
<input type="hidden" name="attr_sheet_version" value="1">
|
||||
<input type="hidden" name="attr_roll_whisper" value="">
|
||||
<header class="hero">
|
||||
<div class="sigil" aria-hidden="true">R</div>
|
||||
<div class="identity">
|
||||
|
|
@ -10,7 +11,7 @@
|
|||
<label>Stade<input type="number" name="attr_stage" value="1" min="0"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="motto">La chasse laisse des marques.</div>
|
||||
<div class="motto"><span>La chasse laisse des marques.</span><label class="secret-rolls">Jets secrets<input type="checkbox" name="attr_secret_rolls" value="1"></label></div>
|
||||
</header>
|
||||
|
||||
<nav class="tabs" aria-label="Sections de la feuille">
|
||||
|
|
@ -89,6 +90,13 @@
|
|||
<div class="resistance-grid">
|
||||
<label>Abyssal<input type="number" name="attr_resist_abyssal" value="0"></label><label>Céleste<input type="number" name="attr_resist_celestial" value="0"></label><label>Altérations<input type="number" name="attr_resist_alterations" value="0"></label><label>Mentale<input type="number" name="attr_resist_mental" value="0"></label><label>Fatigue<input type="number" name="attr_resist_fatigue" value="0"></label><label>Sangressence<input type="number" name="attr_resist_sangressence" value="0"></label><label>Néant<input type="number" name="attr_resist_void" value="0"></label><label>Transcendantale<input type="number" name="attr_resist_transcendental" value="0"></label>
|
||||
</div>
|
||||
<div class="section-title"><span>✦</span><h2>Réductions appliquées</h2></div>
|
||||
<p class="callout">Cochez tous les types applicables aux prochains dégâts. Chaque point de résistance sélectionné retire 2 DMG et les résistances se cumulent.</p>
|
||||
<div class="damage-resistance-grid">
|
||||
<label><input type="checkbox" name="attr_damage_apply_slash" value="1">Tranchant</label><label><input type="checkbox" name="attr_damage_apply_pierce" value="1">Perçant</label><label><input type="checkbox" name="attr_damage_apply_blunt" value="1">Contondant</label><label><input type="checkbox" name="attr_damage_apply_fire" value="1">Feu</label><label><input type="checkbox" name="attr_damage_apply_earth" value="1">Terre</label><label><input type="checkbox" name="attr_damage_apply_wood" value="1">Bois</label><label><input type="checkbox" name="attr_damage_apply_magma" value="1">Magma</label><label><input type="checkbox" name="attr_damage_apply_water" value="1">Eau</label><label><input type="checkbox" name="attr_damage_apply_wind" value="1">Vent</label><label><input type="checkbox" name="attr_damage_apply_ice" value="1">Glace</label><label><input type="checkbox" name="attr_damage_apply_lightning" value="1">Foudre</label><label><input type="checkbox" name="attr_damage_apply_abyssal" value="1">Abyssal</label><label><input type="checkbox" name="attr_damage_apply_celestial" value="1">Céleste</label>
|
||||
</div>
|
||||
<div class="damage-summary"><span>Résistance cumulée <output name="attr_damage_resistance_total">0</output></span><span>Protection active <output name="attr_active_protection_total">0</output></span><button type="action" name="act_clear_damage_resistances">Tout décocher</button></div>
|
||||
<input type="hidden" name="attr_active_protection_count" value="0">
|
||||
</section>
|
||||
|
||||
<section class="page page-skills">
|
||||
|
|
@ -119,6 +127,7 @@
|
|||
<button class="attack-roll" type="action" name="act_attack" title="Effectuer cette attaque" aria-label="Effectuer cette attaque"></button>
|
||||
<button class="attack-followup" type="action" name="act_defend" aria-label="Défendre contre cette attaque"></button>
|
||||
<button class="attack-followup" type="action" name="act_damage" aria-label="Calculer les dégâts de cette attaque"></button>
|
||||
<button class="attack-followup" type="action" name="act_take_damage" aria-label="Appliquer les réductions du défenseur"></button>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Arme / attaque">
|
||||
<label>Dés<input type="number" name="attr_dice" value="1" min="0"></label>
|
||||
<label>Seuil<input type="number" name="attr_threshold" value="6"></label>
|
||||
|
|
@ -131,16 +140,18 @@
|
|||
<div class="attack-thresholds"><span>Seuils défensifs</span><label>Esq.<input type="number" name="attr_dodge_threshold" value="6"></label><label>Par.<input type="number" name="attr_parry_threshold" value="6"></label><label>Repos.<input type="number" name="attr_reposition_threshold" value="0"></label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="section-title"><span>◇</span><h2>Défenses</h2></div>
|
||||
<fieldset class="repeating_defenses">
|
||||
<div class="combat-card defense-card">
|
||||
<button type="roll" name="roll_defense" value="&{template:ravenous} {{title=@{name}}} {{subtitle=Défense · @{character_name}}} {{pool=[[@{dice}]]d10}} {{threshold=[[@{base_threshold}+@{skill}+@{temp}]]}} {{result=[[@{dice}d10<@{base_threshold}+@{skill}+@{temp}]]}} {{details=@{notes}}}"></button>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Parade, esquive…">
|
||||
<label>Dés<input type="number" name="attr_dice" value="1"></label>
|
||||
<label>Seuil attaque<input type="number" name="attr_base_threshold" value="6"></label>
|
||||
<label>Comp.<input type="number" name="attr_skill" value="0"></label>
|
||||
<label>Temp.<input type="number" name="attr_temp" value="0"></label>
|
||||
<textarea name="attr_notes" placeholder="Équipement requis, zone, circonstances…"></textarea>
|
||||
<div class="section-title"><span>◇</span><h2>Protections</h2></div>
|
||||
<p class="callout">Cochez les protections couvrant la localisation touchée. Seules celles ayant encore de l'intégrité participent au calcul.</p>
|
||||
<fieldset class="repeating_protections">
|
||||
<div class="combat-card protection-card">
|
||||
<label class="active">Active<input type="checkbox" name="attr_active" value="1"></label>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Armure, bouclier, protection naturelle…">
|
||||
<label>Protection<input type="number" name="attr_protection" value="0" min="0"></label>
|
||||
<label>Int.<input type="number" name="attr_integrity" value="0" min="0"></label>
|
||||
<label>Int. max<input type="number" name="attr_integrity_max" value="0" min="0"></label>
|
||||
<label>Parade<input type="number" name="attr_parry" value="0"></label>
|
||||
<label>Esquive<input type="number" name="attr_dodge" value="0"></label>
|
||||
<textarea name="attr_effects" placeholder="Discrétion, camouflage, résistances supplémentaires, effets…"></textarea>
|
||||
</div>
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
@ -150,7 +161,7 @@
|
|||
<p class="callout">Décrivez librement l'effet du consommable puis utilisez le bouton ▶ pour l'annoncer dans le chat.</p>
|
||||
<fieldset class="repeating_consumables">
|
||||
<div class="consumable-card">
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Utiliser dans le chat" value="&{template:ravenous} {{title=@{name}}} {{subtitle=@{kind} · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Utiliser dans le chat" value="@{roll_whisper}&{template:ravenous} {{title=@{name}}} {{subtitle=@{kind} · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<select name="attr_kind"><option value="Nourriture">Nourriture</option><option value="Potion">Potion</option><option value="Autre">Autre</option></select>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Nom du consommable">
|
||||
<label>Qté<input type="number" name="attr_quantity" value="1" min="0"></label>
|
||||
|
|
@ -161,7 +172,7 @@
|
|||
<div class="section-title small"><span>✧</span><h3>Effets temporaires</h3></div>
|
||||
<fieldset class="repeating_modifiers">
|
||||
<div class="modifier-card">
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Afficher dans le chat" value="&{template:ravenous} {{title=@{name}}} {{subtitle=Effet temporaire · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<button class="use-effect" type="roll" name="roll_use" title="Afficher dans le chat" value="@{roll_whisper}&{template:ravenous} {{title=@{name}}} {{subtitle=Effet temporaire · @{character_name}}} {{duration=@{duration}}} {{details=@{description}}}">▶</button>
|
||||
<input class="grow" type="text" name="attr_name" placeholder="Bénédiction, blessure, terrain…">
|
||||
<input type="text" name="attr_duration" placeholder="Durée / fin">
|
||||
<textarea name="attr_description" placeholder="Effet et conditions…"></textarea>
|
||||
|
|
@ -176,7 +187,7 @@
|
|||
<fieldset class="repeating_techniques">
|
||||
<div class="technique-card">
|
||||
<input type="hidden" name="attr_source_key">
|
||||
<div class="tech-title"><button class="activate-technique" type="roll" name="roll_activate" title="Activer dans le chat" value="&{template:ravenous} {{title=@{name}}} {{subtitle=@{school} · Tier @{tier} · @{type}}} {{cost=Sang @{blood} · Jauge @{gauge} · @{other}}} {{details=@{effect}}}">▶</button><input type="text" name="attr_name"><label>Acquise<input type="checkbox" name="attr_owned" value="1"></label></div>
|
||||
<div class="tech-title"><button class="activate-technique" type="roll" name="roll_activate" title="Activer dans le chat" value="@{roll_whisper}&{template:ravenous} {{title=@{name}}} {{subtitle=@{school} · Tier @{tier} · @{type}}} {{cost=Sang @{blood} · Jauge @{gauge} · @{other}}} {{details=@{effect}}}">▶</button><input type="text" name="attr_name"><label>Acquise<input type="checkbox" name="attr_owned" value="1"></label></div>
|
||||
<div class="tech-meta"><input type="text" name="attr_school"><label>Tier<input type="text" name="attr_tier"></label><label>Niv.<input type="text" name="attr_level"></label><label>Sang<input type="text" name="attr_blood"></label><label>Jauge<input type="text" name="attr_gauge"></label><label>Autre<input type="text" name="attr_other"></label><input type="text" name="attr_type"></div>
|
||||
<textarea name="attr_effect" rows="3"></textarea>
|
||||
</div>
|
||||
|
|
@ -184,7 +195,28 @@
|
|||
</section>
|
||||
</div>
|
||||
|
||||
<rolltemplate class="sheet-rolltemplate-ravenous"><div class="sheet-template"><div class="sheet-template-title">{{title}}</div>{{#subtitle}}<div class="sheet-template-subtitle">{{subtitle}}</div>{{/subtitle}}{{#skillcheck}}<div class="sheet-template-skill-result">{{computed::outcome}}</div><div class="sheet-template-row"><b>Dé</b> {{roll}}</div><div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div><div class="sheet-template-row"><b>Marge (seuil − dé)</b> {{computed::margin}}</div>{{/skillcheck}}{{#attackcheck}}<div class="sheet-template-result">{{computed::attack_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{attack_roll}}</div>{{/attackcheck}}{{#defense}}<div class="sheet-template-skill-result">{{computed::defense_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{defense_roll}}</div>{{/defense}}{{#finalsuccesses}}<div class="sheet-template-row"><b>Succès restants</b> {{computed::finalsuccesses}}</div>{{/finalsuccesses}}{{#result}}{{^attackcheck}}<div class="sheet-template-result">{{result}}</div>{{/attackcheck}}{{/result}}{{#pool}}<div class="sheet-template-row"><b>Réserve</b> {{pool}}</div>{{/pool}}{{#threshold}}{{^skillcheck}}<div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div>{{/skillcheck}}{{/threshold}}{{#damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{computed::damage}}</div>{{/damagecalc}}{{#damage}}{{^damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{damage}}</div>{{/damagecalc}}{{/damage}}{{#breakdamage}}<div class="sheet-template-row"><b>AB</b> {{breakdamage}}</div>{{/breakdamage}}{{#thresholds}}<div class="sheet-template-row"><b>Défenses</b> {{thresholds}}</div>{{/thresholds}}{{#buttons}}<div class="sheet-template-actions">{{buttons}}</div>{{/buttons}}{{#cost}}<div class="sheet-template-row"><b>Coût</b> {{cost}}</div>{{/cost}}{{#duration}}<div class="sheet-template-row"><b>Durée</b> {{duration}}</div>{{/duration}}{{#details}}<div class="sheet-template-notes">{{details}}</div>{{/details}}</div></rolltemplate>
|
||||
<rolltemplate class="sheet-rolltemplate-ravenous">
|
||||
<div class="sheet-template">
|
||||
<div class="sheet-template-title">{{title}}</div>
|
||||
{{#subtitle}}<div class="sheet-template-subtitle">{{subtitle}}</div>{{/subtitle}}
|
||||
{{#skillcheck}}<div class="sheet-template-skill-result">{{computed::outcome}}</div><div class="sheet-template-row"><b>Dé</b> {{roll}}</div><div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div><div class="sheet-template-row"><b>Marge (seuil − dé)</b> {{computed::margin}}</div>{{/skillcheck}}
|
||||
{{#attackcheck}}<div class="sheet-template-result">{{computed::attack_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{attack_roll}}</div>{{/attackcheck}}
|
||||
{{#defense}}<div class="sheet-template-skill-result">{{computed::defense_successes}} réussite(s)</div><div class="sheet-template-row"><b>Jet</b> {{defense_roll}}</div>{{/defense}}
|
||||
{{#finalsuccesses}}<div class="sheet-template-row"><b>Succès restants</b> {{computed::finalsuccesses}}</div>{{/finalsuccesses}}
|
||||
{{#result}}{{^attackcheck}}<div class="sheet-template-result">{{result}}</div>{{/attackcheck}}{{/result}}
|
||||
{{#pool}}<div class="sheet-template-row"><b>Réserve</b> {{pool}}</div>{{/pool}}
|
||||
{{#threshold}}{{^skillcheck}}<div class="sheet-template-row"><b>Seuil</b> {{threshold}}</div>{{/skillcheck}}{{/threshold}}
|
||||
{{#damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{computed::damage}}</div>{{/damagecalc}}
|
||||
{{#damage}}{{^damagecalc}}<div class="sheet-template-row"><b>DMG</b> {{damage}}</div>{{/damagecalc}}{{/damage}}
|
||||
{{#damagebreakdown}}<div class="sheet-template-calculation">Calcul : {{computed::incoming_damage}} − {{computed::resistance_reduction}} (resist) − {{computed::protection_reduction}} (armor) = {{computed::damage}}</div>{{/damagebreakdown}}
|
||||
{{#breakdamage}}<div class="sheet-template-row"><b>AB</b> {{breakdamage}}</div>{{/breakdamage}}
|
||||
{{#thresholds}}<div class="sheet-template-row"><b>Défenses</b> {{thresholds}}</div>{{/thresholds}}
|
||||
{{#buttons}}<div class="sheet-template-actions">{{buttons}}</div>{{/buttons}}
|
||||
{{#cost}}<div class="sheet-template-row"><b>Coût</b> {{cost}}</div>{{/cost}}
|
||||
{{#duration}}<div class="sheet-template-row"><b>Durée</b> {{duration}}</div>{{/duration}}
|
||||
{{#details}}<div class="sheet-template-notes">{{details}}</div>{{/details}}
|
||||
</div>
|
||||
</rolltemplate>
|
||||
|
||||
<script type="text/worker">
|
||||
const CHARACTERISTICS = ["force","agilite","perception","intelligence","volonte","psy","chance","charisme"];
|
||||
|
|
@ -199,12 +231,33 @@ const attackDamage = (attack, defenseSuccesses = 0) => {
|
|||
const damage = finalSuccesses > 0 ? attack.baseDamage + (finalSuccesses - 1) * attack.damagePerSuccess : 0;
|
||||
return {finalSuccesses, damage};
|
||||
};
|
||||
const DAMAGE_RESISTANCES = ["slash","pierce","blunt","fire","earth","wood","magma","water","wind","ice","lightning","abyssal","celestial"];
|
||||
|
||||
const performSkillRoll = (title, threshold) => getAttrs(["character_name","skill_die"], values => {
|
||||
const recalculateDamageResistances = () => {
|
||||
const attrs = DAMAGE_RESISTANCES.flatMap(type => [`resist_${type}`, `damage_apply_${type}`]);
|
||||
getAttrs(attrs, values => {
|
||||
const total = DAMAGE_RESISTANCES.reduce((sum, type) => sum + (values[`damage_apply_${type}`] === "1" ? number(values[`resist_${type}`]) : 0), 0);
|
||||
setAttrs({damage_resistance_total: total}, {silent:true});
|
||||
});
|
||||
};
|
||||
|
||||
const recalculateProtections = () => getSectionIDs("protections", ids => {
|
||||
const attrs = ids.flatMap(id => [`repeating_protections_${id}_active`,`repeating_protections_${id}_integrity`,`repeating_protections_${id}_protection`]);
|
||||
getAttrs(attrs, values => {
|
||||
let total = 0; let count = 0;
|
||||
ids.forEach(id => {
|
||||
const prefix = `repeating_protections_${id}_`;
|
||||
if (values[prefix+"active"] === "1" && number(values[prefix+"integrity"]) > 0) { total += number(values[prefix+"protection"]); count += 1; }
|
||||
});
|
||||
setAttrs({active_protection_total:total, active_protection_count:count}, {silent:true});
|
||||
});
|
||||
});
|
||||
|
||||
const performSkillRoll = (title, threshold) => getAttrs(["character_name","skill_die","roll_whisper"], values => {
|
||||
const die = Math.max(1, Math.floor(number(values.skill_die) || 10));
|
||||
const target = Math.floor(number(threshold));
|
||||
const expression = `1d${die}cs1cf${die + 1}`;
|
||||
const command = `&{template:ravenous} {{title=${templateText(title)}}} {{subtitle=${templateText(values.character_name)}}} {{skillcheck=1}} {{roll=[[${expression}]]}} {{threshold=[[${target}]]}} {{margin=[[0]]}} {{outcome=[[0]]}}`;
|
||||
const command = `${values.roll_whisper || ""}&{template:ravenous} {{title=${templateText(title)}}} {{subtitle=${templateText(values.character_name)}}} {{skillcheck=1}} {{roll=[[${expression}]]}} {{threshold=[[${target}]]}} {{margin=[[0]]}} {{outcome=[[0]]}}`;
|
||||
startRoll(command, results => {
|
||||
const rolled = results.results.roll.result;
|
||||
const margin = target - rolled;
|
||||
|
|
@ -216,10 +269,10 @@ const performSkillRoll = (title, threshold) => getAttrs(["character_name","skill
|
|||
on("clicked:repeating_attacks:attack", event => {
|
||||
const prefix = event.sourceAttribute.replace(/attack$/, "");
|
||||
const fields = ["name","dice","threshold","temp","base_damage","damage_per_success","break_damage","rmax","dodge_threshold","parry_threshold","reposition_threshold","notes"];
|
||||
getAttrs(["character_name", ...fields.map(field => prefix + field)], values => {
|
||||
getAttrs(["character_name","roll_whisper", ...fields.map(field => prefix + field)], values => {
|
||||
const get = field => values[prefix + field];
|
||||
const command = `&{template:ravenous} {{title=${templateText(get("name") || "Attaque")}}} {{subtitle=Attaque · ${templateText(values.character_name)}}} {{attackcheck=1}} {{attack_successes=[[0]]}} {{attack_roll=[[${number(get("dice"))}d10<${number(get("threshold")) + number(get("temp"))}]]}} {{pool=[[${number(get("dice"))}]]d10}} {{threshold=[[${number(get("threshold"))}+${number(get("temp"))}]]}} {{damage=${number(get("base_damage"))} + ${number(get("damage_per_success"))}/R}} {{breakdamage=${number(get("break_damage"))}}} {{thresholds=Esq. ${number(get("dodge_threshold"))} · Par. ${number(get("parry_threshold"))} · Repos. ${number(get("reposition_threshold"))}}} {{buttons=[Défendre](~${prefix}defend) [Dégâts](~${prefix}damage)}} {{details=RMax ${number(get("rmax"))} · ${templateText(get("notes"))}}}`;
|
||||
startRoll(command, results => {
|
||||
const command = `&{template:ravenous} {{title=${templateText(get("name") || "Attaque")}}} {{subtitle=Attaque · ${templateText(values.character_name)}}} {{attackcheck=1}} {{attack_successes=[[0]]}} {{attack_roll=[[${number(get("dice"))}d10<${number(get("threshold")) + number(get("temp"))}]]}} {{pool=[[${number(get("dice"))}]]d10}} {{threshold=[[${number(get("threshold"))}+${number(get("temp"))}]]}} {{damage=${number(get("base_damage"))} + ${number(get("damage_per_success"))}/R}} {{breakdamage=${number(get("break_damage"))}}} {{thresholds=Esq. ${number(get("dodge_threshold"))} · Par. ${number(get("parry_threshold"))} · Repos. ${number(get("reposition_threshold"))}}} {{buttons=[Défendre](~${prefix}defend) [Dégâts](~${prefix}damage) [Subir](~${prefix}take_damage)}} {{details=RMax ${number(get("rmax"))} · ${templateText(get("notes"))}}}`;
|
||||
startRoll(`${values.roll_whisper || ""}${command}`, results => {
|
||||
const successes = results.results.attack_roll.result;
|
||||
attackRolls[results.rollId] = {successes, baseDamage: number(get("base_damage")), damagePerSuccess: number(get("damage_per_success")), breakDamage: number(get("break_damage")), rmax: number(get("rmax"))};
|
||||
finishRoll(results.rollId, {attack_successes: successes});
|
||||
|
|
@ -237,7 +290,7 @@ on("clicked:repeating_attacks:defend", event => {
|
|||
const attack = attackRolls[event.originalRollId];
|
||||
const damageFields = attack ? ` {{damagecalc=1}} {{finalsuccesses=[[0]]}} {{damage=[[0]]}} {{breakdamage=${attack.breakDamage}}}` : "";
|
||||
const command = `&{template:ravenous} {{title=Défense · ${templateText(values[prefix+"name"] || "Attaque")}}} {{subtitle=@{selected|character_name}}} {{defense=1}} {{defense_successes=[[0]]}} {{pool=[[?{Nombre de dés|1}]]d10}} {{threshold=[[${defenseQuery}+?{Bonus|0}]]}} {{defense_roll=[[?{Nombre de dés|1}d10<${defenseQuery}+?{Bonus|0}]]}}${damageFields}`;
|
||||
startRoll(command, results => {
|
||||
startRoll(`@{selected|roll_whisper}${command}`, results => {
|
||||
const defenseSuccesses = results.results.defense_roll.result;
|
||||
const computed = {defense_successes: defenseSuccesses};
|
||||
if (attack) {
|
||||
|
|
@ -252,9 +305,9 @@ on("clicked:repeating_attacks:defend", event => {
|
|||
|
||||
on("clicked:repeating_attacks:damage", event => {
|
||||
const prefix = event.sourceAttribute.replace(/damage$/, "");
|
||||
getAttrs([prefix+"name",prefix+"base_damage",prefix+"damage_per_success",prefix+"break_damage",prefix+"rmax"], values => {
|
||||
getAttrs(["roll_whisper",prefix+"name",prefix+"base_damage",prefix+"damage_per_success",prefix+"break_damage",prefix+"rmax"], values => {
|
||||
const command = `&{template:ravenous} {{title=Dégâts · ${templateText(values[prefix+"name"] || "Attaque")}}} {{damagecalc=1}} {{remaining=[[?{Succès restants|1}]]}} {{finalsuccesses=[[0]]}} {{damage=[[0]]}} {{breakdamage=${number(values[prefix+"break_damage"])}}}`;
|
||||
startRoll(command, results => {
|
||||
startRoll(`${values.roll_whisper || ""}${command}`, results => {
|
||||
const remaining = Math.max(0, Math.floor(results.results.remaining.result));
|
||||
const finalSuccesses = Math.min(remaining, Math.max(0, Math.floor(number(values[prefix+"rmax"]))));
|
||||
const damage = finalSuccesses > 0 ? number(values[prefix+"base_damage"]) + (finalSuccesses - 1) * number(values[prefix+"damage_per_success"]) : 0;
|
||||
|
|
@ -263,6 +316,22 @@ on("clicked:repeating_attacks:damage", event => {
|
|||
});
|
||||
});
|
||||
|
||||
on("clicked:repeating_attacks:take_damage", event => {
|
||||
const prefix = event.sourceAttribute.replace(/take_damage$/, "");
|
||||
getAttrs([prefix+"name",prefix+"base_damage",prefix+"damage_per_success",prefix+"break_damage",prefix+"rmax"], values => {
|
||||
const command = `&{template:ravenous} {{title=Subir · ${templateText(values[prefix+"name"] || "Attaque")}}} {{subtitle=@{selected|character_name}}} {{damagecalc=1}} {{damagebreakdown=1}} {{remaining=[[?{Succès restants|1}]]}} {{selected_resistance=[[@{selected|damage_resistance_total}]]}} {{selected_protection=[[@{selected|active_protection_total}]]}} {{selected_protection_count=[[@{selected|active_protection_count}]]}} {{selected_strength=[[@{selected|force_total}]]}} {{finalsuccesses=[[0]]}} {{incoming_damage=[[0]]}} {{resistance_reduction=[[0]]}} {{protection_reduction=[[0]]}} {{damage=[[0]]}} {{breakdamage=${number(values[prefix+"break_damage"])}}}`;
|
||||
startRoll(`@{selected|roll_whisper}${command}`, results => {
|
||||
const remaining = Math.max(0, Math.floor(results.results.remaining.result));
|
||||
const finalSuccesses = Math.min(remaining, Math.max(0, Math.floor(number(values[prefix+"rmax"]))));
|
||||
const incoming = finalSuccesses > 0 ? number(values[prefix+"base_damage"]) + (finalSuccesses - 1) * number(values[prefix+"damage_per_success"]) : 0;
|
||||
const resistanceReduction = results.results.selected_resistance.result * 2;
|
||||
const hasProtection = results.results.selected_protection_count.result > 0;
|
||||
const protectionReduction = hasProtection ? results.results.selected_protection.result + results.results.selected_strength.result : 0;
|
||||
finishRoll(results.rollId, {finalsuccesses:finalSuccesses, incoming_damage:incoming, resistance_reduction:resistanceReduction, protection_reduction:protectionReduction, damage:Math.max(0, incoming - resistanceReduction - protectionReduction)});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
const recalculate = () => {
|
||||
const modifiers = ["torque_modifier","speed_modifier","half_speed_modifier","run_speed_modifier","swim_speed_modifier","fly_speed_modifier","hp_modifier","jauge_max_modifier","fatigue_max_modifier","toxicite_max_modifier","satiete_max_modifier","actions_max_modifier"];
|
||||
getAttrs([...CHARACTERISTICS, ...CHARACTERISTICS.map(k => `${k}_manual`), "stage", ...modifiers], values => {
|
||||
|
|
@ -320,6 +389,14 @@ const recalculateCustomSkills = () => getSectionIDs("customskills", ids => {
|
|||
});
|
||||
|
||||
on("sheet:opened change:force change:agilite change:perception change:intelligence change:volonte change:psy change:chance change:charisme change:stage change:force_manual change:agilite_manual change:perception_manual change:intelligence_manual change:volonte_manual change:psy_manual change:chance_manual change:charisme_manual change:torque_modifier change:speed_modifier change:half_speed_modifier change:run_speed_modifier change:swim_speed_modifier change:fly_speed_modifier change:hp_modifier change:jauge_max_modifier change:fatigue_max_modifier change:toxicite_max_modifier change:satiete_max_modifier change:actions_max_modifier", recalculate);
|
||||
on("sheet:opened change:secret_rolls", () => getAttrs(["secret_rolls"], values => setAttrs({roll_whisper:values.secret_rolls === "1" ? "/w gm " : ""}, {silent:true})));
|
||||
on(`sheet:opened ${DAMAGE_RESISTANCES.flatMap(type => [`change:resist_${type}`,`change:damage_apply_${type}`]).join(" ")}`, recalculateDamageResistances);
|
||||
on("sheet:opened change:repeating_protections", recalculateProtections);
|
||||
on("clicked:clear_damage_resistances", () => {
|
||||
const update = {};
|
||||
DAMAGE_RESISTANCES.forEach(type => update[`damage_apply_${type}`] = "0");
|
||||
setAttrs(update, {}, recalculateDamageResistances);
|
||||
});
|
||||
on("change:repeating_customskills", event => {
|
||||
const prefix = event.sourceAttribute.replace(/[^_]+$/, "");
|
||||
getAttrs([prefix+"characteristic", prefix+"rank", prefix+"temp", ...CHARACTERISTICS.map(k => `${k}_total`)], values => {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class BuildTests(unittest.TestCase):
|
|||
self.assertNotIn("{{SKILL_ROWS}}", sheet)
|
||||
self.assertNotIn("<body", sheet.lower())
|
||||
self.assertIn('<script type="text/worker">', sheet)
|
||||
for section in ("customskills", "attacks", "defenses", "locations", "consumables", "modifiers", "techniques"):
|
||||
for section in ("customskills", "attacks", "protections", "locations", "consumables", "modifiers", "techniques"):
|
||||
self.assertIn(f'class="repeating_{section}"', sheet)
|
||||
|
||||
def test_technique_tier_limit_comes_from_typst_config(self):
|
||||
|
|
@ -93,6 +93,15 @@ class BuildTests(unittest.TestCase):
|
|||
self.assertIn("Esquive (${dodgeThreshold} + @{selected|esquive} + @{selected|esquive_temp})", sheet)
|
||||
self.assertIn('d10<${number(get("threshold")) + number(get("temp"))}', sheet)
|
||||
self.assertIn("d10<${defenseQuery}+?{Bonus|0}", sheet)
|
||||
self.assertIn('name="act_take_damage"', sheet)
|
||||
self.assertIn("clicked:repeating_attacks:take_damage", sheet)
|
||||
self.assertIn("damage_resistance_total", sheet)
|
||||
self.assertIn("active_protection_total", sheet)
|
||||
self.assertIn("resistanceReduction", sheet)
|
||||
self.assertIn("{{computed::resistance_reduction}} (resist) − {{computed::protection_reduction}} (armor)", sheet)
|
||||
self.assertIn('name="attr_secret_rolls"', sheet)
|
||||
self.assertIn('values.secret_rolls === "1" ? "/w gm " : ""', sheet)
|
||||
self.assertIn("@{selected|roll_whisper}", sheet)
|
||||
|
||||
def test_techniques_are_chat_activatable_and_typst_free(self):
|
||||
sheet = (ROOT / "build/ravenous.html").read_text()
|
||||
|
|
|
|||
Loading…
Reference in New Issue