* Downtime: allow moves to be taken individually.
Fixes https://github.com/Foundryborne/daggerheart/issues/374
Some downtime moves require a roll to see how successful they are. In these
cases, the player might want to see how their first move works out before
they select their next one.
This commit updates the downtime dialog to allow for this behaviour:
- The "Take Downtime" button is enabled whenever any moves are selected.
- Clicking the button only closes the dialog when all moves have been made.
To keep track of this, the `nrChoices` object has been expanded to include a
`taken` counter, which is increased whenever a move is taken.
After making one move the selection is reset, but the number of moves
displayed in the dialog header and the number of permitted selections both
take the number of taken moves into account.
* Fix heading in short rest chat message.
Prior to this commit the heading for a short rest chat message was "long
rest".
* Remove unused template context.
* Extract method for repeated calculation.
In the downtime dialog, we need to calculate the number of selected moves in
several places. This commit extracts a method to handle that, which reduces
repetition and hopefully makes the code more readable.
* Refactor: handle button data attrs the same.
A small refactor to handle `button.dataset.move` (which was assigned to a
local const) and `button.dataset.category` (which was accessed directly)
in the same way by assigning them both to local consts.
* Fix right-click on downtime activities on macOS.
On macOS with a single-button mouse (e.g. a laptop trackpad) it's common to
trigger a right-click with ctrl+click.
In Chrome, this triggers both a `contextmenu` event and a regular `click`
event. In the context of downtime actions, this meant that we were
deselecting an action in the `contextmenu` handler but then immediately
re-selecting it again in the `click` handler.
This commit works around the problem by stopping the event from propagating
further. This fixes the bug, but also stops Foundry's default `contextmenu`
handler from firing and preventing the browser context menu from appearing,
so we also have prevent the event's default behaviour from firing.
* Unify healing & damage
* create DHResourceData
* Damages parts roll
* h
* ChatMessage & takeDamage updates
* Adapt healing
* No, there was not a console.log !
* Fixed so that the dropdown for activeEffectAutocomplete never ends up behind dialog
* Downtime can now display both ShortRest and LongRest options depending on character rules
* Initial downtime layout rework
* Fixed styling for downtime tooltip
* Added icon to homebrew menu for DowntimeActions
* Fixed columns if both types of moves are not available
* Changed the lightmode to darkmode
* Added downtime buttons
* .
* Moved extra rest options from rules to bonuses
* Improved dialog width
* Added itemUse macro on drag to hotbar
* Fixed item.type logic
* Added support for actionMacro drag from items
* Added MacroDrag for Attacks
* Fixed so UseItem macros get the img set
* Added RollMode to standalone DamageDialog and to RollDialog. ChatMessage now add ChatSpeaker
* Just a little fix for Damage Action
---------
Co-authored-by: Dapoolp <elcatnet@gmail.com>
* Updated to make use of setup tabs. Ancestry now has primary/secondary features
* Changed so ancestry uses a single Features field
* Revert "Changed so ancestry uses a single Features field"
This reverts commit 0bda6b5dbe.
* Reapply "Changed so ancestry uses a single Features field"
This reverts commit 1febafd441.
* Made it work again the bad way \._./
* Changed so that Feature(Item) has a primary field
* Feature(Item) now has subtype instead of primary as a field
* Fixed experience/evasion
* Moved light styling to appTheme mixing
* Added svg and style rules
* Initial
* Resource setup finished
* Fixed so that costs can be used
* Corrected standard resources
* Actions can only use item resources from their parent item
* Fixed up dice
* Fixed resource dice positioning
* Fixed parsing of resource.max
* Fixed styling on settings tab
* Added manual input for Dice Resources
* Lightmode fixes
* Fixed Feature spellcasting modifier
* Bugfix for item input to resourceDiceDialog
* Item fix for TokenInput
* PR Fixes
* add basic drag drop window
* add better field
* make effects copy onto actor on attachment
* make items from inventory draggable
* working drop from inventory
* remove duplication issue
* add attachment only flag and logic
* add weapons to attachables
* remove debug logs
* try to make it drier
* remove unecessary try catch
* remove extra configs
* remove superfluous comments
* remove spurious defenses
* make drier
* remove unecessary code
* deduplicate and simplify
* its a desert
* standardize to be more similar to class item code
* fix bug of duplicate effects being created
* fix localization string
* fix bug of item equiping and un equiping
* remove this since were not going to be using attachmentonly
* update attachment tab with comments
* remove attachment only logic in favor of just transfer
* change flags
* change armor and weapon to be attachableItem
* change armor and weapon to be attachableItem
* change weapon to use mixin
* add mixin to armor
* move everything to mixin sheet
* refactor code for review comments
* cleanup and somehow git is ignoring some changes
* see if this picks up the changes now
* Import/Export updates
---------
Co-authored-by: psitacus <walther.johnson@ucalgary.ca>
Co-authored-by: WBHarry <williambjrklund@gmail.com>
* Added parsing of effect values from Item data model. Almost finished with itemConfig.
* Added the last to itemConfig
* Fixed armor
* ContextMenu localization fixes
* Better tooltips for tagify
* Corrected resource logic
* Added confirm dialogs to delete
* Localization fix
* Changed Cone template to be 'In Front', acting as a 180 degree cone
* Changed to keep the original Cone function