mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Added immunity for hidden and SRD additions for immunity
This commit is contained in:
parent
397879d39d
commit
f810653059
10 changed files with 131 additions and 21 deletions
|
|
@ -2728,7 +2728,8 @@
|
|||
"rightClickExtand": "Right-Click to extand",
|
||||
"companionPartnerLevelBlock": "The companion needs an assigned partner to level up.",
|
||||
"configureAttribution": "Configure Attribution",
|
||||
"deleteItem": "Delete Item"
|
||||
"deleteItem": "Delete Item",
|
||||
"immune": "Immune"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,10 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
|
|||
: context.canToggleCombat;
|
||||
context.systemStatusEffects = Object.keys(context.statusEffects).reduce((acc, key) => {
|
||||
const effect = context.statusEffects[key];
|
||||
if (effect.systemEffect) acc[key] = effect;
|
||||
if (effect.systemEffect) {
|
||||
const disabled = !effect.isActive && this.actor.system.rules.conditionImmunities[key];
|
||||
acc[key] = { ...effect, disabled };
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
|
|
|||
|
|
@ -59,8 +59,9 @@ export default class DhpAdversary extends BaseDataActor {
|
|||
}),
|
||||
rules: new fields.SchemaField({
|
||||
conditionImmunities: new fields.SchemaField({
|
||||
vulnerable: new fields.BooleanField({ initial: false }),
|
||||
restrained: new fields.BooleanField({ initial: false })
|
||||
hidden: new fields.BooleanField({ initial: false }),
|
||||
restrained: new fields.BooleanField({ initial: false }),
|
||||
vulnerable: new fields.BooleanField({ initial: false })
|
||||
})
|
||||
}),
|
||||
attack: new ActionField({
|
||||
|
|
|
|||
|
|
@ -284,8 +284,9 @@ export default class DhCharacter extends BaseDataActor {
|
|||
})
|
||||
}),
|
||||
conditionImmunities: new fields.SchemaField({
|
||||
vulnerable: new fields.BooleanField({ initial: false }),
|
||||
restrained: new fields.BooleanField({ initial: false })
|
||||
hidden: new fields.BooleanField({ initial: false }),
|
||||
restrained: new fields.BooleanField({ initial: false }),
|
||||
vulnerable: new fields.BooleanField({ initial: false })
|
||||
}),
|
||||
runeWard: new fields.BooleanField({ initial: false }),
|
||||
burden: new fields.SchemaField({
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ export default class DhCompanion extends BaseDataActor {
|
|||
),
|
||||
rules: new fields.SchemaField({
|
||||
conditionImmunities: new fields.SchemaField({
|
||||
vulnerable: new fields.BooleanField({ initial: false }),
|
||||
restrained: new fields.BooleanField({ initial: false })
|
||||
hidden: new fields.BooleanField({ initial: false }),
|
||||
restrained: new fields.BooleanField({ initial: false }),
|
||||
vulnerable: new fields.BooleanField({ initial: false })
|
||||
})
|
||||
}),
|
||||
attack: new ActionField({
|
||||
|
|
|
|||
|
|
@ -239,7 +239,59 @@
|
|||
},
|
||||
"_id": "m6uPm4vujrUjSFPw",
|
||||
"img": "icons/magic/air/fog-gas-smoke-blue-gray.webp",
|
||||
"effects": [],
|
||||
"effects": [
|
||||
{
|
||||
"name": "Levitation",
|
||||
"type": "base",
|
||||
"system": {
|
||||
"rangeDependence": {
|
||||
"enabled": false,
|
||||
"type": "withinRange",
|
||||
"target": "hostile",
|
||||
"range": "melee"
|
||||
}
|
||||
},
|
||||
"_id": "k6iaQVfMZhrpwYQj",
|
||||
"img": "icons/magic/air/fog-gas-smoke-blue-gray.webp",
|
||||
"changes": [
|
||||
{
|
||||
"key": "system.rules.conditionImmunities.restrained",
|
||||
"mode": 5,
|
||||
"value": "1",
|
||||
"priority": null
|
||||
}
|
||||
],
|
||||
"disabled": false,
|
||||
"duration": {
|
||||
"startTime": null,
|
||||
"combat": null,
|
||||
"seconds": null,
|
||||
"rounds": null,
|
||||
"turns": null,
|
||||
"startRound": null,
|
||||
"startTurn": null
|
||||
},
|
||||
"description": "<p>The Skull levitates several feet off the ground and can’t be <em>Restrained</em>.</p>",
|
||||
"origin": null,
|
||||
"tint": "#ffffff",
|
||||
"transfer": true,
|
||||
"statuses": [],
|
||||
"sort": 0,
|
||||
"flags": {},
|
||||
"_stats": {
|
||||
"compendiumSource": null,
|
||||
"duplicateSource": null,
|
||||
"exportSource": null,
|
||||
"coreVersion": "13.351",
|
||||
"systemId": "daggerheart",
|
||||
"systemVersion": "1.2.4",
|
||||
"createdTime": 1763845938979,
|
||||
"modifiedTime": 1763846023794,
|
||||
"lastModifiedBy": "Q4RzhhaPfvLUzzbw"
|
||||
},
|
||||
"_key": "!actors.items.effects!jDmHqGvzg5wjgmxE.m6uPm4vujrUjSFPw.k6iaQVfMZhrpwYQj"
|
||||
}
|
||||
],
|
||||
"folder": null,
|
||||
"sort": 0,
|
||||
"ownership": {
|
||||
|
|
|
|||
|
|
@ -355,7 +355,14 @@
|
|||
"range": "melee"
|
||||
}
|
||||
},
|
||||
"changes": [],
|
||||
"changes": [
|
||||
{
|
||||
"key": "system.rules.conditionImmunities.hidden",
|
||||
"mode": 5,
|
||||
"value": "1",
|
||||
"priority": null
|
||||
}
|
||||
],
|
||||
"disabled": false,
|
||||
"duration": {
|
||||
"startTime": null,
|
||||
|
|
@ -366,7 +373,7 @@
|
|||
"startRound": null,
|
||||
"startTurn": null
|
||||
},
|
||||
"description": "<p> You Glow until the end of the scene and can’t become <em>Hidden</em>. Attack rolls made against you have advantage.</p>",
|
||||
"description": "<p>You Glow until the end of the scene and can’t become <em>Hidden</em>. Attack rolls made against you have advantage.</p>",
|
||||
"tint": "#ffffff",
|
||||
"statuses": [],
|
||||
"sort": 0,
|
||||
|
|
@ -375,12 +382,12 @@
|
|||
"compendiumSource": null,
|
||||
"duplicateSource": null,
|
||||
"exportSource": null,
|
||||
"coreVersion": "13.346",
|
||||
"coreVersion": "13.351",
|
||||
"systemId": "daggerheart",
|
||||
"systemVersion": "0.0.1",
|
||||
"createdTime": 1754079525282,
|
||||
"modifiedTime": 1754079558712,
|
||||
"lastModifiedBy": "MQSznptE5yLT7kj8"
|
||||
"modifiedTime": 1763847816177,
|
||||
"lastModifiedBy": "Q4RzhhaPfvLUzzbw"
|
||||
},
|
||||
"_key": "!actors.items.effects!8mJYMpbLTb8qIOrr.NepVGKOo1lHYjA1F.bYBrgiSwHwYfQyjn"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,12 @@
|
|||
"mode": 2,
|
||||
"value": "10",
|
||||
"priority": null
|
||||
},
|
||||
{
|
||||
"key": "system.rules.conditionImmunities.restrained",
|
||||
"mode": 5,
|
||||
"value": "1",
|
||||
"priority": null
|
||||
}
|
||||
],
|
||||
"disabled": false,
|
||||
|
|
@ -134,7 +140,7 @@
|
|||
"startRound": null,
|
||||
"startTurn": null
|
||||
},
|
||||
"description": "<ul><li><p><span class=\"vertical-card-list\" style=\"box-sizing:border-box;margin:0px 0px 0.25rem;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif\">When you succeed on an attack or Spellcast Roll, gain a +10 bonus to the damage roll.</p></li><li><p><span class=\"vertical-card-list\" style=\"box-sizing:border-box;margin:0px 0px 0.25rem;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif\">When you deal enough damage to defeat a creature within Close range, you absorb them and clear an Armor Slot.</p></li><li><p><span class=\"vertical-card-list\" style=\"box-sizing:border-box;margin:0px 0px 0.25rem;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif\">You can’t be <em style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0)\">Restrained</em>.</p></li><li><p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">Before you make an action roll, you must </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">spend a Hope</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">. If you can’t, you revert to your normal form.</p></li></ul>",
|
||||
"description": "<ul><li><p><span class=\"vertical-card-list\" style=\"box-sizing:border-box;margin:0px 0px 0.25rem;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif\">When you succeed on an attack or Spellcast Roll, gain a +10 bonus to the damage roll.</span></p></li><li><p><span class=\"vertical-card-list\" style=\"box-sizing:border-box;margin:0px 0px 0.25rem;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif\">When you deal enough damage to defeat a creature within Close range, you absorb them and clear an Armor Slot.</span></p></li><li><p><span class=\"vertical-card-list\" style=\"box-sizing:border-box;margin:0px 0px 0.25rem;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);font-family:Montserrat, sans-serif\">You can’t be <em style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0)\">Restrained</em>.</span></p></li><li><p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">Before you make an action roll, you must </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">spend a Hope</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">. If you can’t, you revert to your normal form.</span></p></li></ul>",
|
||||
"tint": "#ffffff",
|
||||
"statuses": [],
|
||||
"sort": 0,
|
||||
|
|
@ -143,12 +149,12 @@
|
|||
"compendiumSource": null,
|
||||
"duplicateSource": null,
|
||||
"exportSource": null,
|
||||
"coreVersion": "13.346",
|
||||
"coreVersion": "13.351",
|
||||
"systemId": "daggerheart",
|
||||
"systemVersion": "0.0.1",
|
||||
"createdTime": 1754120504134,
|
||||
"modifiedTime": 1754340362524,
|
||||
"lastModifiedBy": "Q9NoTaEarn3VMS6Z"
|
||||
"modifiedTime": 1763846303087,
|
||||
"lastModifiedBy": "Q4RzhhaPfvLUzzbw"
|
||||
},
|
||||
"_key": "!items.effects!LzVpMkD5I4QeaIHf.ptBC882plZW39Ld9"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
.theme-light .daggerheart.placeable-hud {
|
||||
.status-effects .effect-control {
|
||||
filter: none;
|
||||
.status-effects {
|
||||
.effect-control {
|
||||
filter: none;
|
||||
}
|
||||
|
||||
.effect-control-container {
|
||||
.effect-control {
|
||||
filter: none;
|
||||
}
|
||||
|
||||
.effect-control-disabled-marker {
|
||||
color: @red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -21,4 +33,25 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status-effects {
|
||||
.effect-control-container {
|
||||
position: relative;
|
||||
|
||||
.effect-control-disabled-marker {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: -1px;
|
||||
left: 1px;
|
||||
color: @medium-red;
|
||||
font-weight: 700;
|
||||
font-size: 2.1em;
|
||||
rotate: 29deg;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,12 @@
|
|||
</button>
|
||||
<div class="palette status-effects" data-palette="effects">
|
||||
{{#each systemStatusEffects as |status|}}
|
||||
<img class="effect-control {{status.cssClass}}" src="{{status.src}}" data-action="effect" data-status-id="{{status.id}}" {{#if status.title}}data-tooltip-text="{{status.title}}"{{/if}}>
|
||||
<div class="effect-control-container" {{#if status.disabled}}data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.immune"}}"{{/if}}>
|
||||
<img class="effect-control {{status.cssClass}} {{#if status.disabled}}disabled{{/if}}" src="{{status.src}}" data-action="effect" data-status-id="{{status.id}}" {{#if status.title}}data-tooltip-text="{{status.title}}"{{/if}}>
|
||||
{{#if status.disabled}}
|
||||
<span class="effect-control-disabled-marker">/</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if genericStatusEffects}}
|
||||
<label class="palette-category-title">{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.genericEffects"}}</label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue