diff --git a/assets/icons/official/combat-values/mana.png b/assets/icons/official/combat-values/mana.png new file mode 100644 index 00000000..4758ebc7 Binary files /dev/null and b/assets/icons/official/combat-values/mana.png differ diff --git a/lang/de.json b/lang/de.json index 2c0dfd5f..55518a83 100644 --- a/lang/de.json +++ b/lang/de.json @@ -149,6 +149,10 @@ "DS4.CooldownDuration100R": "100 Kampfrunden", "DS4.CooldownDuration1D": "1 Tag", "DS4.CooldownDurationD20D": "W20 Tage", + "DS4.ManaCost": "Manakosten", + "DS4.ManaCostDescription": "The Anzahl an Manapunkten, die es kostet, den Zauber zu wirken.", + "DS4.CalculateManaCost": "Manakosten Automatisch Berechnen", + "DS4.CalculateManaCostConfirmationQuestion": "
Die Manakosten des Zaubers werden automatisch an Hand der Tabelle auf Seite 19 der 5. Ausgabe der Slay! berechnet.
Achtung: Dieser Vorgang überschreibt die bestehenden Werte und kann nicht automatisch rückgängig gemacht werden.
", "DS4.SpellMinimumLevel": "Zugangsstufe", "DS4.SpellMinimumLevelDescription": "Die minimale Stufe, ab der ein Zauberwirker den Zauberspruch erlernen kann.", "DS4.SpellCasterClassHealer": "Heiler", @@ -189,6 +193,9 @@ "DS4.CombatValuesRangedAttack": "Schießen", "DS4.CombatValuesSpellcasting": "Zaubern", "DS4.CombatValuesTargetedSpellcasting": "Zielzaubern", + "DS4.CombatValuesMana": "Mana", + "DS4.CombatValuesManaCurrent": "Aktuelles Mana", + "DS4.CombatValuesManaCurrentAbbr": "MP", "DS4.CombatValuesHitPointsSheet": "Lebenskraft", "DS4.CombatValuesDefenseSheet": "Abwehr", "DS4.CombatValuesInitiativeSheet": "Initiative", @@ -197,6 +204,7 @@ "DS4.CombatValuesRangedAttackSheet": "Schießen", "DS4.CombatValuesSpellcastingSheet": "Zaubern", "DS4.CombatValuesTargetedSpellcastingSheet": "Zielzaubern", + "DS4.CombatValuesManaSheet": "Mana", "DS4.CharacterBaseInfoRace": "Volk", "DS4.CharacterBaseInfoClass": "Klasse", "DS4.CharacterBaseInfoHeroClass": "Heldenklasse", @@ -311,9 +319,11 @@ "DS4.TooltipModifier": "Modifikator", "DS4.TooltipEffects": "Effekte", "DS4.SettingUseSlayingDiceForAutomatedChecksName": "Slayende Würfel", - "DS4.SettingUseSlayingDiceForAutomatedChecksHint": "Benutze Slayende Würfel bei automatisierten Proben.", + "DS4.SettingUseSlayingDiceForAutomatedChecksHint": "Verwende Slayende Würfel bei automatisierten Proben.", "DS4.SettingShowSlayerPointsName": "Slayerpunkte", "DS4.SettingShowSlayerPointsHint": "Zeige Slayerpunkte im Charakterbogen an.", + "DS4.SettingUseManaSystemName": "Manasystem", + "DS4.SettingUseManaSystemHint": "Verwende das Manasystem für Zauber.", "DS4.Checks": "Proben", "DS4.ChecksAppraise": "Schätzen", "DS4.ChecksChangeSpell": "Zauber Wechseln", diff --git a/lang/en.json b/lang/en.json index 19973936..0b3d5b3b 100644 --- a/lang/en.json +++ b/lang/en.json @@ -149,6 +149,10 @@ "DS4.CooldownDuration100R": "100 Rounds", "DS4.CooldownDuration1D": "1 Day", "DS4.CooldownDurationD20D": "D20 Days", + "DS4.ManaCost": "Mana Cost", + "DS4.ManaCostDescription": "The amount of mana points casting the spell costs.", + "DS4.CalculateManaCost": "Automatically Calculate Mana Cost", + "DS4.CalculateManaCostConfirmationQuestion": "The mana cost of the spell is automatically calculated using the table on page 19 of the 5th edition of the Slay!.
Warning: This process overwrites the existing values and connot be reverted automatically.
", "DS4.SpellMinimumLevel": "Minimum Level", "DS4.SpellMinimumLevelDescription": "The minimum level at which a spell caster may learn the spell.", "DS4.SpellCasterClassHealer": "Healer", @@ -189,6 +193,9 @@ "DS4.CombatValuesRangedAttack": "Ranged Attack", "DS4.CombatValuesSpellcasting": "Spellcasting", "DS4.CombatValuesTargetedSpellcasting": "Targeted Spellcasting", + "DS4.CombatValuesMana": "Mana", + "DS4.CombatValuesManaCurrent": "Current Mana", + "DS4.CombatValuesManaCurrentAbbr": "MP", "DS4.CombatValuesHitPointsSheet": "Hit Points", "DS4.CombatValuesDefenseSheet": "Defense", "DS4.CombatValuesInitiativeSheet": "Initiative", @@ -197,6 +204,7 @@ "DS4.CombatValuesRangedAttackSheet": "RAT", "DS4.CombatValuesSpellcastingSheet": "Spellcasting", "DS4.CombatValuesTargetedSpellcastingSheet": "TSC", + "DS4.CombatValuesManaSheet": "Mana", "DS4.CharacterBaseInfoRace": "Race", "DS4.CharacterBaseInfoClass": "Class", "DS4.CharacterBaseInfoHeroClass": "Hero Class", @@ -314,6 +322,8 @@ "DS4.SettingUseSlayingDiceForAutomatedChecksHint": "Use Slaying Dice for automated checks.", "DS4.SettingShowSlayerPointsName": "Slayer Points", "DS4.SettingShowSlayerPointsHint": "Show Slayer Points in the character sheet.", + "DS4.SettingUseManaSystemName": "Mana System", + "DS4.SettingUseManaSystemHint": "Use the Mana System for spells.", "DS4.Checks": "Checks", "DS4.ChecksAppraise": "Appraise", "DS4.ChecksChangeSpell": "Change Spell", diff --git a/package.json b/package.json index 76898f6f..61ba020f 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@commitlint/cli": "16.2.1", "@commitlint/config-conventional": "16.2.1", "@guanghechen/rollup-plugin-copy": "1.8.6", - "@league-of-foundry-developers/foundry-vtt-types": "9.249.3", + "@league-of-foundry-developers/foundry-vtt-types": "9.249.4", "@rollup/plugin-typescript": "8.3.0", "@seald-io/nedb": "2.2.1", "@types/fs-extra": "9.0.13", diff --git a/scss/components/actor/_combat_value.scss b/scss/components/actor/_combat_value.scss index 40e30685..5e5a12d9 100644 --- a/scss/components/actor/_combat_value.scss +++ b/scss/components/actor/_combat_value.scss @@ -14,7 +14,7 @@ place-items: center; row-gap: 0.125em; - &__value { + &__total { $combat-values-icons-path: "#{variables.$official-icons-path}/combat-values"; @include mixins.centered-content; @@ -49,6 +49,9 @@ &--targetedSpellcasting { background-image: url("#{$combat-values-icons-path}/targeted-spellcasting.png"); } + &--mana { + background-image: url("#{$combat-values-icons-path}/mana.png"); + } } &__label { diff --git a/scss/components/shared/_form_field_icon_button.scss b/scss/components/shared/_form_field_icon_button.scss new file mode 100644 index 00000000..685d56b2 --- /dev/null +++ b/scss/components/shared/_form_field_icon_button.scss @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * + * SPDX-License-Identifier: MIT + */ + +.ds4-form-field-icon-button { + &__icon { + margin: 0; + } +} diff --git a/scss/components/shared/_form_field_input_extra_slim.scss b/scss/components/shared/_form_field_input_extra_slim.scss new file mode 100644 index 00000000..59594984 --- /dev/null +++ b/scss/components/shared/_form_field_input_extra_slim.scss @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * + * SPDX-License-Identifier: MIT + */ + +.ds4-form-field-input-extra-slim { + &[type="number"], + &[type="text"] { + flex: 0 0 32px !important; // needs to be made more specific to override foundry's style + text-align: center; + } +} diff --git a/scss/ds4.scss b/scss/ds4.scss index acedd839..a6ebcc28 100644 --- a/scss/ds4.scss +++ b/scss/ds4.scss @@ -15,6 +15,8 @@ @use "components/shared/control_button_group"; @use "components/shared/editor"; @use "components/shared/embedded_document_list"; +@use "components/shared/form_field_icon_button"; +@use "components/shared/form_field_input_extra_slim"; @use "components/shared/rollable_image"; @use "components/shared/sheet_body"; @use "components/shared/sheet_form"; diff --git a/spec/item/spell/calculate-spell-price.spec.ts b/spec/item/spell/calculate-spell-price.spec.ts index 56d49f6d..0edb7533 100644 --- a/spec/item/spell/calculate-spell-price.spec.ts +++ b/spec/item/spell/calculate-spell-price.spec.ts @@ -25,6 +25,11 @@ const defaultData: DS4SpellDataSourceData = { unit: "custom", }, cooldownDuration: "0r", + manaCost: { + healer: null, + wizard: null, + sorcerer: null, + }, minimumLevels: { healer: null, wizard: null, diff --git a/src/actor/actor-data-properties-base.ts b/src/actor/actor-data-properties-base.ts index 9aa9e335..7650b32d 100644 --- a/src/actor/actor-data-properties-base.ts +++ b/src/actor/actor-data-properties-base.ts @@ -24,7 +24,7 @@ type DS4ActorDataPropertiesDataAttributes = { type DS4ActorDataPropertiesDataTraits = { [Key in keyof typeof DS4.i18n.traits]: ModifiableDataBaseTotal