Merge pull request #36 from Oliver-Akins/feature/craft-card
Implement the Hero Craft Card
This commit is contained in:
commit
8ebdc506ea
15 changed files with 298 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 124 45"><path d="M57.684.377c-.627-.016-1.63.187-2.633 1.111-1.003.925-.169 1.578-.485 1.569-.549-.016-1.913 1.268-3.511 2.992s-1.222 4.388-1.05 5.14c.173.753.987 1.317.987 1.317s-.218-.972-.297-1.897c-.078-.924.392-1.833 1.27-3.322.877-1.489 1.746-1.92 1.746-1.92s-.367 1.026-.531 1.41-.448 2.813.242 3.409.407.572.258 1.16c-.15.587 0 .79.525 1.465.525.673.47 1.582.611 2.632s.323.948 1.67.885c1.348-.063 1.159.714.446 1.043-.713.33-.508.49-.065 1.377s.654 1.287-1.418 1.242c-6.249-.133-21.563 9.817-25.441 9.684s-9.995-2.105-10.86-2.504c-.864-.399-2.66-1.062-3.435-1.129-.776-.066-1.662-.532-2.77-1.086s-4.084-.338-4.084-.338-.232-.399-.398-.715-.322-.476-.787-.338c-.466.139.021 1.053.021 1.053s-.537.082-.78-.056c-.245-.139-.333-.45-.644-.893-.31-.443-.287-.73-.93-.441-.642.288.2 1.373.2 1.373s-.2.022-.775.244c-.577.221-.178.974-.178.974s-.865-.665-.998-1.086c-.133-.42-.421-.953-1.086-.554s.665 1.884.576 1.884-.53-.154-1.062-.597-.866-.644-1.309-.422.31 1.041 1.219 1.861c.908.82 1.64 1.197 3.258 1.397 1.617.2 2.24 1.196 3.28 1.152 1.042-.044 2.06-.62 4.698-.265 2.637.354 8.51 3.9 8.953 4.232s.466.643.488 1.02c.023.376-.377 1.862-.421 2.216-.045.355-.975 1.153-1.75 1.907-.776.753-1.33 1.86-1.33 2.28 0 .422-.887 1.663-.887 1.663s23.27.489 24.156.467c.887-.023 3.325-2.194 4.522-3.258 1.196-1.064 2.989-3.073 3.283-3.7.294-.626.33-.364.58-.05.25.313.345.203.69.234.344.032.218.032.25.502.03.47.753 1.52 1.505 2.256.752.737 1.88 2.852 2.334 4.106.455 1.253 21.03.753 20.592.22s-1.207-2.978-1.285-3.605c-.079-.627.25-2.036.25-2.506s-.313-1.553-.094-1.568c.22-.016 4.922 6.66 6.176 7.914 1.253 1.253 18.396.392 19.117.377.72-.016.627.313.58-1.223s-1.034-3.574-1.394-4.373-.064-.861.265-1.002c.33-.141 2.273-.847 3.244-1.254s3.87-1.347 5.438-1.582c.863-.13 1.983-.43 3.12-.78.559-.15 1.682-.535 4.089-1.574 3.071-1.325 5.214-3.823 6.363-4.906.265-.22.818-.84 1.746-2.033s.442-.949-.154-.97c-.597-.023-2.498 1.81-2.498 1.81s.044-1.326-.22-2.873c-.266-1.547-.73-.617-.84-.264-.111.354-.067 1.768-.067 1.768s-.774-1.68-.973-1.68-.508.75-.154 1.436c.353.685.441 1.79.441 1.79s-.44-.332-1.015-1.591c-.575-1.26-.795-.132-.729.398s.883 1.613.883 2.188c0 .574-.486.95-1.502.927s-.796-.619-.553-1.26c.243-.64.73-1.944.752-2.519.022-.574-.509-1.28-.885-1.258-.375.022-.309.574-.574 2.01s-2.365 2.475-3.426 3.094c-.827.483-.957.818-1.257 1.152-.578.456-1.311.876-1.684.793-.564-.125-.565.095-.91.408-.345.314-1.221.532-3.133.94 0 0-2.79.345-3.824.408s-2.07-.156-2.916-.752c-.846-.595-1.88-1.004-4.543-.283-2.664.72-4.17.564-4.17.564s-.39-1.512-1.785-3.306-2.586-2.186-2.586-2.186.54-.07 1.55-.125 1.898.548 2.446.877c.548.33.728 1.417.814 1.723.087.305-.148.855-.015.87s.478-1.12.478-1.41-.345-1.286-.455-1.513-.729-.744-.588-.877.698.063 1.207.51c.51.446.791.775.862 2.1.07 1.324-.893 2.09-.698 2.287.196.195 1.584-1.535 1.569-3s-1.05-2.703-1.912-3.495c-.862-.791-2.328-1.066-2.313-1.207.016-.14.385-.556.377-1.425-.008-.87-.745-1.968-1.027-2.336-.282-.369-1.41-1.018-1.15-1.057.258-.04.837.188 1.746.705.908.517 1.396 1.762 1.56 1.691s-.165-1.05-.635-1.92-1.81-1.308-1.81-1.308.312-.163.94-1.096c.626-.932.046-1.7-.071-1.912-.118-.211-.822-.572-.328.04.493.61-.337 1.268-1.434 2.052-1.097.783-3.918.156-3.918.156s-.125.024 0-.916c.126-.94-.596-2.539-2.445-3.949-1.85-1.41-3.448-.282-6.645-.094s-3.95-2.757-5.861-6.174c-1.912-3.416-5.093-3.996-6.049-3.996S58.31.393 57.684.377m21.06 12.541a3.3 3.3 0 0 1 1.844.582c1.208.79 1.01 2.57 1.01 2.57s-1.325-.392-2.547-1.841c-.833-.988-2.155-1.223-2.155-1.223s.568-.069 1.202-.086c.227-.006.44-.01.646-.002m2.465 5.38c.124-.012.623.257 1.277.507.698.266 1.774.277 2.627.343.854.067 1.386.111 2.416 1.086s.287 2.371.287 2.371l-1.33-.056s.312-.388.534-.71c.221-.32.375-1.428-.467-1.76s-.366-.056-.3.52c.067.577-.73 1.075-1.405 1.075-.676 0-1.496-.598-2.205-1.24-1.197-.998-1.531-2.072-1.454-2.127a.04.04 0 0 1 .02-.008" style="display:inline;fill:#000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;paint-order:markers stroke fill"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 124 45"><path d="M57.684.377c-.627-.016-1.63.187-2.633 1.111-1.003.925-.169 1.578-.485 1.569-.549-.016-1.913 1.268-3.511 2.992s-1.222 4.388-1.05 5.14c.173.753.987 1.317.987 1.317s-.218-.972-.297-1.897c-.078-.924.392-1.833 1.27-3.322.877-1.489 1.746-1.92 1.746-1.92s-.367 1.026-.531 1.41-.448 2.813.242 3.409.407.572.258 1.16c-.15.587 0 .79.525 1.465.525.673.47 1.582.611 2.632s.323.948 1.67.885c1.348-.063 1.159.714.446 1.043-.713.33-.508.49-.065 1.377s.654 1.287-1.418 1.242c-6.249-.133-21.563 9.817-25.441 9.684s-9.995-2.105-10.86-2.504c-.864-.399-2.66-1.062-3.435-1.129-.776-.066-1.662-.532-2.77-1.086s-4.084-.338-4.084-.338-.232-.399-.398-.715-.322-.476-.787-.338c-.466.139.021 1.053.021 1.053s-.537.082-.78-.056c-.245-.139-.333-.45-.644-.893-.31-.443-.287-.73-.93-.441-.642.288.2 1.373.2 1.373s-.2.022-.775.244c-.577.221-.178.974-.178.974s-.865-.665-.998-1.086c-.133-.42-.421-.953-1.086-.554s.665 1.884.576 1.884-.53-.154-1.062-.597-.866-.644-1.309-.422.31 1.041 1.219 1.861c.908.82 1.64 1.197 3.258 1.397 1.617.2 2.24 1.196 3.28 1.152 1.042-.044 2.06-.62 4.698-.265 2.637.354 8.51 3.9 8.953 4.232s.466.643.488 1.02c.023.376-.377 1.862-.421 2.216-.045.355-.975 1.153-1.75 1.907-.776.753-1.33 1.86-1.33 2.28 0 .422-.887 1.663-.887 1.663s23.27.489 24.156.467c.887-.023 3.325-2.194 4.522-3.258 1.196-1.064 2.989-3.073 3.283-3.7.294-.626.33-.364.58-.05.25.313.345.203.69.234.344.032.218.032.25.502.03.47.753 1.52 1.505 2.256.752.737 1.88 2.852 2.334 4.106.455 1.253 21.03.753 20.592.22s-1.207-2.978-1.285-3.605c-.079-.627.25-2.036.25-2.506s-.313-1.553-.094-1.568c.22-.016 4.922 6.66 6.176 7.914 1.253 1.253 18.396.392 19.117.377.72-.016.627.313.58-1.223s-1.034-3.574-1.394-4.373-.064-.861.265-1.002c.33-.141 2.273-.847 3.244-1.254s3.87-1.347 5.438-1.582c.863-.13 1.983-.43 3.12-.78.559-.15 1.682-.535 4.089-1.574 3.071-1.325 5.214-3.823 6.363-4.906.265-.22.818-.84 1.746-2.033s.442-.949-.154-.97c-.597-.023-2.498 1.81-2.498 1.81s.044-1.326-.22-2.873c-.266-1.547-.73-.617-.84-.264-.111.354-.067 1.768-.067 1.768s-.774-1.68-.973-1.68-.508.75-.154 1.436c.353.685.441 1.79.441 1.79s-.44-.332-1.015-1.591c-.575-1.26-.795-.132-.729.398s.883 1.613.883 2.188c0 .574-.486.95-1.502.927s-.796-.619-.553-1.26c.243-.64.73-1.944.752-2.519.022-.574-.509-1.28-.885-1.258-.375.022-.309.574-.574 2.01s-2.365 2.475-3.426 3.094c-.827.483-.957.818-1.257 1.152-.578.456-1.311.876-1.684.793-.564-.125-.565.095-.91.408-.345.314-1.221.532-3.133.94 0 0-2.79.345-3.824.408s-2.07-.156-2.916-.752c-.846-.595-1.88-1.004-4.543-.283-2.664.72-4.17.564-4.17.564s-.39-1.512-1.785-3.306-2.586-2.186-2.586-2.186.54-.07 1.55-.125 1.898.548 2.446.877c.548.33.728 1.417.814 1.723.087.305-.148.855-.015.87s.478-1.12.478-1.41-.345-1.286-.455-1.513-.729-.744-.588-.877.698.063 1.207.51c.51.446.791.775.862 2.1.07 1.324-.893 2.09-.698 2.287.196.195 1.584-1.535 1.569-3s-1.05-2.703-1.912-3.495c-.862-.791-2.328-1.066-2.313-1.207.016-.14.385-.556.377-1.425-.008-.87-.745-1.968-1.027-2.336-.282-.369-1.41-1.018-1.15-1.057.258-.04.837.188 1.746.705.908.517 1.396 1.762 1.56 1.691s-.165-1.05-.635-1.92-1.81-1.308-1.81-1.308.312-.163.94-1.096c.626-.932.046-1.7-.071-1.912-.118-.211-.822-.572-.328.04.493.61-.337 1.268-1.434 2.052-1.097.783-3.918.156-3.918.156s-.125.024 0-.916c.126-.94-.596-2.539-2.445-3.949-1.85-1.41-3.448-.282-6.645-.094s-3.95-2.757-5.861-6.174c-1.912-3.416-5.093-3.996-6.049-3.996S58.31.393 57.684.377m21.06 12.541a3.3 3.3 0 0 1 1.844.582c1.208.79 1.01 2.57 1.01 2.57s-1.325-.392-2.547-1.841c-.833-.988-2.155-1.223-2.155-1.223s.568-.069 1.202-.086c.227-.006.44-.01.646-.002m2.465 5.38c.124-.012.623.257 1.277.507.698.266 1.774.277 2.627.343.854.067 1.386.111 2.416 1.086s.287 2.371.287 2.371l-1.33-.056s.312-.388.534-.71c.221-.32.375-1.428-.467-1.76s-.366-.056-.3.52c.067.577-.73 1.075-1.405 1.075-.676 0-1.496-.598-2.205-1.24-1.197-.998-1.531-2.072-1.454-2.127a.04.04 0 0 1 .02-.008" style="paint-order:markers stroke fill"/></svg>
|
||||
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 3.9 KiB |
|
|
@ -18,6 +18,7 @@
|
|||
"AllItemsSheetV1": "RipCrypt Item Sheet",
|
||||
"CombinedHeroSheet": "Hero Sheet",
|
||||
"HeroSummaryCardV1": "Hero Stat Card",
|
||||
"HeroCraftCardV1": "Hero Craft Card",
|
||||
"HeroSkillsCardV1": "Hero Skill Card"
|
||||
},
|
||||
"common": {
|
||||
|
|
@ -51,6 +52,7 @@
|
|||
"fract": "Fract",
|
||||
"focus": "Focus"
|
||||
},
|
||||
"aura": "Aura",
|
||||
"cost": "Cost",
|
||||
"currency": {
|
||||
"gold": "Gold",
|
||||
|
|
@ -60,6 +62,7 @@
|
|||
"damage": "Damage",
|
||||
"delete": "Delete",
|
||||
"description": "Description",
|
||||
"details": "Details",
|
||||
"difficulties": {
|
||||
"easy": "Easy",
|
||||
"normal": "Normal",
|
||||
|
|
@ -75,6 +78,7 @@
|
|||
"equipped": "Equipped",
|
||||
"fate": "Fate",
|
||||
"gear": "Gear",
|
||||
"glimcraft": "Glimcraft",
|
||||
"glory": "Glory",
|
||||
"guts": "Guts",
|
||||
"location": "Location",
|
||||
|
|
@ -149,7 +153,6 @@
|
|||
}
|
||||
},
|
||||
"Apps": {
|
||||
"move-run": "@RipCrypt.common.move • @RipCrypt.common.run",
|
||||
"traits-range": "@RipCrypt.common.traits • @RipCrypt.common.range",
|
||||
"grit-skills": "@RipCrypt.common.abilities.grit Skills",
|
||||
"gait-skills": "@RipCrypt.common.abilities.gait Skills",
|
||||
|
|
@ -188,7 +191,11 @@
|
|||
"set-fate-to": "Set Fate to {ordinal}",
|
||||
"current-tour": "Current Delve Tour",
|
||||
"next-tour": "Next Delve Tour",
|
||||
"prev-tour": "Previous Delve Tour"
|
||||
"prev-tour": "Previous Delve Tour",
|
||||
"auras": {
|
||||
"normal": "The distance of your aura normally",
|
||||
"heavy": "The distance of your aura when using Heavycraft"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import { Logger } from "../../utils/Logger.mjs";
|
|||
const { HandlebarsApplicationMixin } = foundry.applications.api;
|
||||
const { ActorSheetV2 } = foundry.applications.sheets;
|
||||
const { ContextMenu } = foundry.applications.ui;
|
||||
const { deepClone } = foundry.utils;
|
||||
|
||||
export class HeroCraftCardV1 extends GenericAppMixin(HandlebarsApplicationMixin(ActorSheetV2)) {
|
||||
|
||||
|
|
@ -79,12 +80,18 @@ export class HeroCraftCardV1 extends GenericAppMixin(HandlebarsApplicationMixin(
|
|||
ctx = await super._preparePartContext(partId, ctx, opts);
|
||||
ctx.actor = this.document;
|
||||
|
||||
ctx = await HeroCraftCardV1.prepareAura(ctx);
|
||||
ctx = await HeroCraftCardV1.prepareCraft(ctx);
|
||||
|
||||
Logger.debug(`Context:`, ctx);
|
||||
return ctx;
|
||||
};
|
||||
|
||||
static async prepareAura(ctx) {
|
||||
ctx.aura = deepClone(ctx.actor.system.aura);
|
||||
return ctx;
|
||||
};
|
||||
|
||||
static async prepareCraft(ctx) {
|
||||
ctx.craft = {};
|
||||
const aspects = Object.values(gameTerms.Aspects);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import { RichEditor } from "./Apps/RichEditor.mjs";
|
|||
// Util imports
|
||||
import { distanceBetweenFates, nextFate, previousFate } from "./utils/fates.mjs";
|
||||
import { documentSorter } from "./consts.mjs";
|
||||
import { rankToInteger } from "./utils/rank.mjs";
|
||||
|
||||
const { deepFreeze } = foundry.utils;
|
||||
|
||||
|
|
@ -28,6 +29,7 @@ Object.defineProperty(
|
|||
distanceBetweenFates,
|
||||
nextFate,
|
||||
previousFate,
|
||||
rankToInteger,
|
||||
},
|
||||
}),
|
||||
writable: false,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { derivedMaximumBar } from "../helpers.mjs";
|
||||
import { gameTerms } from "../../gameTerms.mjs";
|
||||
import { rankToInteger } from "../../utils/rank.mjs";
|
||||
import { sumReduce } from "../../utils/sumReduce.mjs";
|
||||
|
||||
const { fields } = foundry.data;
|
||||
|
|
@ -122,6 +123,13 @@ export class HeroData extends foundry.abstract.TypeDataModel {
|
|||
prepareBaseData() {
|
||||
super.prepareBaseData();
|
||||
|
||||
// Calculate the person's base Crafting aura
|
||||
const rank = rankToInteger(this.level.rank);
|
||||
this.aura = {
|
||||
normal: ( rank + 1 ) * 2,
|
||||
heavy: ( rank + 2 ) * 2,
|
||||
};
|
||||
|
||||
this.guts.max = 0;
|
||||
|
||||
// The limitations imposed on things like inventory spaces and equipped
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { AllItemSheetV1 } from "../Apps/ItemSheets/AllItemSheetV1.mjs";
|
||||
import { CombinedHeroSheet } from "../Apps/ActorSheets/CombinedHeroSheet.mjs";
|
||||
import { DelveDiceHUD } from "../Apps/DelveDiceHUD.mjs";
|
||||
import { HeroCraftCardV1 } from "../Apps/ActorSheets/HeroCraftCardV1.mjs";
|
||||
import { HeroSkillsCardV1 } from "../Apps/ActorSheets/HeroSkillsCardV1.mjs";
|
||||
import { HeroSummaryCardV1 } from "../Apps/ActorSheets/HeroSummaryCardV1.mjs";
|
||||
import { RipCryptCombatTracker } from "../Apps/sidebar/CombatTracker.mjs";
|
||||
|
|
@ -91,6 +92,11 @@ Hooks.once(`init`, () => {
|
|||
label: `RipCrypt.sheet-names.HeroSkillsCardV1`,
|
||||
themes: HeroSkillsCardV1.themes,
|
||||
});
|
||||
Actors.registerSheet(game.system.id, HeroCraftCardV1, {
|
||||
types: [`hero`],
|
||||
label: `RipCrypt.sheet-names.HeroCraftCardV1`,
|
||||
themes: HeroCraftCardV1.themes,
|
||||
});
|
||||
// #endregion
|
||||
|
||||
// #region Items
|
||||
|
|
|
|||
13
module/utils/rank.mjs
Normal file
13
module/utils/rank.mjs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { gameTerms } from "../gameTerms.mjs";
|
||||
|
||||
/**
|
||||
* Converts a rank's name into an integer form for use in mathematical calculations
|
||||
* that rely on rank.
|
||||
*
|
||||
* @param {Novice|Adept|Expert|Master} rankName The rank to convert into an integer
|
||||
* @returns An integer between 1 and 4
|
||||
*/
|
||||
export function rankToInteger(rankName) {
|
||||
return Object.values(gameTerms.Rank)
|
||||
.findIndex(r => r === rankName) + 1;
|
||||
};
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "ripcrypt",
|
||||
"title": "RipCrypt",
|
||||
"description": "",
|
||||
"description": "A dungeon sprint RPG. Faster than an arrow to the eye. Smoother than a clean blade. Compact with consequences.",
|
||||
"version": "0.0.1",
|
||||
"compatibility": {
|
||||
"minimum": 13,
|
||||
|
|
|
|||
101
templates/Apps/HeroCraftCardV1/content.hbs
Normal file
101
templates/Apps/HeroCraftCardV1/content.hbs
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<div class="HeroCraftCardV1">
|
||||
<div class="col-header">
|
||||
{{rc-i18n "RipCrypt.common.glimcraft"}}
|
||||
</div>
|
||||
<div class="aura-container">
|
||||
<div class="circle-fragment">10</div>
|
||||
<div class="circle-fragment">8</div>
|
||||
<div class="circle-fragment">6</div>
|
||||
<div class="full-circle">4</div>
|
||||
<rc-svg
|
||||
class="caster-silhouette"
|
||||
name="caster-silhouette.v1"
|
||||
var:fill="var(--accent-1)"
|
||||
></rc-svg>
|
||||
<div class="aura-values">
|
||||
<div class="dual-pill">
|
||||
<span class="label" aria-hidden="true">{{rc-i18n "RipCrypt.common.aura"}}</span>
|
||||
<div class="values">
|
||||
<span class="value" data-tooltip="RipCrypt.tooltips.auras.normal">{{aura.normal}}</span>
|
||||
<span class="slash" aria-hidden="true"></span>
|
||||
<span class="value" data-tooltip="RipCrypt.tooltips.auras.heavy">{{aura.heavy}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-aspect="focus" class="col-header aspect-header">
|
||||
<span class="name">{{rc-i18n "RipCrypt.common.aspectNames.focus"}}</span>
|
||||
<span class="small">{{rc-i18n "RipCrypt.common.details"}}</span>
|
||||
</div>
|
||||
<ol data-aspect="focus" class="num-before craft-list">
|
||||
{{#each craft.focus as | craft |}}
|
||||
{{#if craft}}
|
||||
<li data-item-id="{{craft.uuid}}" data-ctx-menu="craft">
|
||||
<span class="name">{{ craft.name }}</span>
|
||||
{{#if craft.use}}
|
||||
<rc-icon
|
||||
name="icons/info-circle"
|
||||
var:size="16px"
|
||||
var:fill="currentColor"
|
||||
data-tooltip="{{ craft.use }}"
|
||||
data-tooltip-direction="UP"
|
||||
></rc-icon>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{else}}
|
||||
<li></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
<div data-aspect="flect" class="col-header aspect-header">
|
||||
<span class="name">{{rc-i18n "RipCrypt.common.aspectNames.flect"}}</span>
|
||||
<span class="small">{{rc-i18n "RipCrypt.common.details"}}</span>
|
||||
</div>
|
||||
<ol data-aspect="flect" class="num-before craft-list">
|
||||
{{#each craft.flect as | craft |}}
|
||||
{{#if craft}}
|
||||
<li data-item-id="{{craft.uuid}}" data-ctx-menu="craft">
|
||||
<span class="name">{{ craft.name }}</span>
|
||||
{{#if craft.use}}
|
||||
<rc-icon
|
||||
name="icons/info-circle"
|
||||
var:size="16px"
|
||||
var:fill="currentColor"
|
||||
data-tooltip="{{ craft.use }}"
|
||||
data-tooltip-direction="UP"
|
||||
></rc-icon>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{else}}
|
||||
<li></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
<div data-aspect="fract" class="col-header aspect-header">
|
||||
<span class="name">{{rc-i18n "RipCrypt.common.aspectNames.fract"}}</span>
|
||||
<span class="small">{{rc-i18n "RipCrypt.common.details"}}</span>
|
||||
</div>
|
||||
<ol data-aspect="fract" class="num-before craft-list">
|
||||
{{#each craft.fract as | craft |}}
|
||||
{{#if craft}}
|
||||
<li data-item-id="{{craft.uuid}}" data-ctx-menu="craft">
|
||||
<span class="name">{{ craft.name }}</span>
|
||||
{{#if craft.use}}
|
||||
<rc-icon
|
||||
name="icons/info-circle"
|
||||
var:size="16px"
|
||||
var:fill="currentColor"
|
||||
data-tooltip="{{ craft.use }}"
|
||||
data-tooltip-direction="UP"
|
||||
></rc-icon>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{else}}
|
||||
<li></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
137
templates/Apps/HeroCraftCardV1/style.css
Normal file
137
templates/Apps/HeroCraftCardV1/style.css
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
.ripcrypt .HeroCraftCardV1 {
|
||||
--col-gap: 8px;
|
||||
|
||||
display: grid;
|
||||
column-gap: var(--col-gap);
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
grid-template-rows: repeat(15, minmax(0, 1fr));
|
||||
|
||||
background: var(--base-background);
|
||||
color: var(--base-text);
|
||||
|
||||
.col-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
background: var(--section-header-background);
|
||||
color: var(--section-header-text);
|
||||
padding: 2px 4px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
label, .label {
|
||||
box-sizing: border-box;
|
||||
padding: 2px 4px;
|
||||
text-transform: uppercase;
|
||||
font-size: var(--font-size-14);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.aura-container {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 2 / span 4;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, minmax(0, 1fr));
|
||||
grid-template-rows: minmax(0, 1fr);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.circle-fragment, .full-circle {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.circle-fragment {
|
||||
border-top-left-radius: 24% 100%;
|
||||
border-bottom-left-radius: 25% 100%;
|
||||
border-left: 2px dashed var(--accent-3);
|
||||
margin-right: -5%;
|
||||
}
|
||||
|
||||
.full-circle {
|
||||
border: 2px dashed var(--accent-3);
|
||||
flex-grow: 0;
|
||||
border-radius: 999px;
|
||||
width: 80%;
|
||||
aspect-ratio: 1;
|
||||
align-self: center;
|
||||
justify-self: center;
|
||||
grid-row: 1;
|
||||
grid-column: 4;
|
||||
}
|
||||
|
||||
.caster-silhouette {
|
||||
grid-column: 4 / span 4;
|
||||
grid-row: 1;
|
||||
position: absolute;
|
||||
left: 2rem;
|
||||
width: 70%;
|
||||
bottom: -10px;
|
||||
}
|
||||
|
||||
.aura-values {
|
||||
grid-row: 1;
|
||||
grid-column: -3 / -1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 3;
|
||||
|
||||
.dual-pill {
|
||||
border-radius: 999px;
|
||||
background: var(--accent-1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 0.25rem;
|
||||
align-items: center;
|
||||
padding-left: 8px;
|
||||
margin-left: 1rem;
|
||||
margin-bottom: 1.2rem;
|
||||
}
|
||||
|
||||
.values {
|
||||
border-radius: 999px;
|
||||
margin: 2px;
|
||||
background: var(--base-background);
|
||||
color: var(--base-text);
|
||||
padding: 0.125rem 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 0.5rem;
|
||||
--slash-color: var(--accent-1);
|
||||
}
|
||||
}
|
||||
|
||||
.craft-list {
|
||||
display: grid;
|
||||
grid-template-rows: subgrid;
|
||||
|
||||
> :nth-child(even) {
|
||||
background: var(--alt-row-background);
|
||||
color: var(--alt-row-text);
|
||||
}
|
||||
}
|
||||
|
||||
span.name {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
[data-aspect="focus"] { --row: 6; --col: 1; }
|
||||
[data-aspect="flect"] { --row: 6; --col: 2; }
|
||||
[data-aspect="fract"] { --row: 11; --col: 1; }
|
||||
|
||||
[data-aspect] {
|
||||
&.aspect-header {
|
||||
z-index: 1;
|
||||
grid-row: var(--row);
|
||||
grid-column: var(--col);
|
||||
}
|
||||
&.craft-list {
|
||||
grid-row: calc(var(--row) + 1) / span 4;
|
||||
grid-column: var(--col);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -351,7 +351,7 @@
|
|||
<span class="max">{{speed.run}}</span>
|
||||
</div>
|
||||
<div aria-hidden="true" class="col-header label">
|
||||
{{rc-i18n "RipCrypt.Apps.move-run"}}
|
||||
{{ rc-i18n "RipCrypt.common.move" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
@import url("./AllItemSheetV1/style.css");
|
||||
@import url("./CombinedHeroSheet/style.css");
|
||||
@import url("./CryptApp/style.css");
|
||||
@import url("./DelveDiceHUD/style.css");
|
||||
@import url("./DicePool/style.css");
|
||||
@import url("./HeroCraftCardV1/style.css");
|
||||
@import url("./HeroSummaryCardV1/style.css");
|
||||
@import url("./HeroSkillsCardV1/style.css");
|
||||
@import url("./RichEditor/style.css");
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@
|
|||
}
|
||||
|
||||
.HeroSummaryCardV1,
|
||||
.HeroSkillsCardV1 {
|
||||
.HeroSkillsCardV1,
|
||||
.HeroCraftCardV1 {
|
||||
padding: 8px;
|
||||
/* height: 270px; */
|
||||
width: 680px;
|
||||
--col-gap: 2px;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
counter-increment: list-index 1;
|
||||
position: relative;
|
||||
padding: 0 4px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
&.num-before > li::before,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,13 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
&.slash {
|
||||
width: 2px;
|
||||
background: var(--slash-color, currentColor);
|
||||
border-radius: 999px;
|
||||
transform: rotate(var(--slash-rotation, 15deg));
|
||||
}
|
||||
|
||||
/* Makes it so that spans are never less than the font size */
|
||||
&:empty::before {
|
||||
content: "\200b";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue