Compare commits

...

334 Commits

Author SHA1 Message Date
Thaum Rystra
058ee2691f Merge branch 'feature-print'
# Conflicts:
#	rpg-docs/package-lock.json
2018-03-03 17:18:16 +02:00
Thaum Rystra
f0cf7f4956 Added QR code and finished page 1 2018-03-03 17:13:36 +02:00
Thaum Rystra
75c8720b04 Moved printed character sheets to their own page
This makes sure the entire printed sheet is rendered before the browser  attempts to print it, solving all manner of errors
2018-03-03 11:13:16 +02:00
Thaum Rystra
f73f2f670f Formatted all existing printed character sheet fields nicely 2018-03-02 21:40:21 +02:00
Thaum Rystra
c6e62e1cfa Added borders to ability scores and AC 2018-03-02 07:25:37 +02:00
Thaum Rystra
67956d9a42 Fixed dropdown boxes being clipped in dialogs, updated Meteor 2018-01-26 18:18:49 +02:00
Stefan Zermatten
64b3ca6066 Added proficiencies to printed sheet; some fixes 2017-12-12 15:54:21 +02:00
Stefan Zermatten
8349f7da9b Merge branch 'master' into feature-print 2017-12-06 09:22:57 +02:00
Stefan Zermatten
0636042878 Added core-js because an error message told me to 2017-11-22 14:34:54 +02:00
Stefan Zermatten
6207ffa516 Updated meteor 2017-11-21 10:53:07 +02:00
Stefan Zermatten
9d33612054 Merge branch 'feature-rate-limiting-api'
closes #141
2017-11-21 08:50:03 +02:00
Stefan Zermatten
face6387a0 Fixed attacks not being added to spells added with multi-add
Fixes #145
2017-11-01 15:55:07 +02:00
Stefan Zermatten
b308595dac Implement both tokens and rate limiting to API
Closes #141, but still needs better UI on failure
2017-10-12 16:24:12 +02:00
Stefan Zermatten
1d2de197a4 Replaced trello with github on home page 2017-09-28 14:04:42 +02:00
Stefan Zermatten
a3d790b47d Merge branch 'feature-manage-user' 2017-09-28 13:47:46 +02:00
Stefan Zermatten
efe6dd87db Added link to change password
closes #78
2017-09-28 13:47:30 +02:00
Stefan Zermatten
5b33a6e783 Fixed username dialog title 2017-09-28 13:22:21 +02:00
Stefan Zermatten
8730fab40b Moved username dialog to own folder 2017-09-28 13:21:14 +02:00
Stefan Zermatten
992776bb40 Merge branch 'feature-onboarding' 2017-09-28 13:18:52 +02:00
Stefan Zermatten
bc9ec4421c Polished onboarding, removed stray logs
closes #102
2017-09-28 13:17:33 +02:00
Stefan Zermatten
4c31ab601c Improved new user experience and fixed errors on character delete 2017-09-28 13:03:54 +02:00
Stefan Zermatten
c4e77c7eae Replaced all paper-tooltip with custom, working version 2017-09-28 11:47:03 +02:00
Stefan Zermatten
2cd6e27f70 Finished basic new user experience 2017-09-28 10:26:45 +02:00
Stefan Zermatten
f6b2dde479 Added basic onboarding steps 2017-09-27 16:19:00 +02:00
Stefan Zermatten
44da62a962 Lowered subscription caching to improve performance 2017-09-26 15:11:03 +02:00
Stefan Zermatten
4e96047e90 Added rate limiting to heavy subscriptions 2017-09-26 14:59:41 +02:00
Stefan Zermatten
212986ac37 Fixed missing charId 2017-09-26 13:54:33 +02:00
Stefan Zermatten
877f516565 Added efficient computation of characters to replace heavy export functionality 2017-09-26 13:36:01 +02:00
Thaum Rystra
750022f0f1 Added missing indices 2017-09-24 04:02:15 +02:00
Stefan Zermatten
614284c73d Updated Meteor and some packages 2017-09-22 12:52:21 +02:00
Stefan Zermatten
6528fc8bab Improved vMix export
closes #138
2017-09-22 11:41:32 +02:00
Stefan Zermatten
020930b2e4 Checked if old hitpoint slider exists before resetting it
closes #135
2017-09-22 11:03:00 +02:00
Stefan Zermatten
dcd76e06e1 Merge branch 'fixbug-137-multiadd-spells-delete-themselves' 2017-09-22 10:43:04 +02:00
Stefan Zermatten
8a58002415 Fixed spells in the library using their library ID's in the spells collection
closes #137
2017-09-22 10:42:34 +02:00
Stefan Zermatten
535fcd77cf Added missing attributes to vmix export 2017-09-13 16:01:05 +02:00
Stefan Zermatten
7c2aed26a4 Fixed vMix export, included vMix parties 2017-09-13 14:01:07 +02:00
Stefan Zermatten
fab052050a Merge branch 'feature-vmix' 2017-09-13 10:01:46 +02:00
Stefan Zermatten
b7bdb141c8 Added basic vMix server side api 2017-09-13 10:01:32 +02:00
Stefan Zermatten
00a050d337 Added basic printing functionality 2017-09-11 09:27:01 +02:00
Stefan Zermatten
0b8fabde14 Merge branch 'enhancement-106' 2017-09-08 10:48:44 +02:00
Stefan Zermatten
3336e177d9 Merge branch 'enhancement-spell-library-style'
closes #106
2017-09-08 10:46:41 +02:00
Stefan Zermatten
2e9440e325 Merge branch 'enhancement-spell-library-style' 2017-09-08 09:47:53 +02:00
Stefan Zermatten
e4ac400cbd Replaced spell library spell selection highlighting with checkboxes
Makes it more intuitive that multiple items can be selected
2017-09-08 09:47:43 +02:00
Stefan Zermatten
f600999c5f Guarded against error when hiding feature description portion of card 2017-09-08 09:46:58 +02:00
Stefan Zermatten
0af905699a Uncommented buffs from spell library 2017-09-08 09:46:00 +02:00
Stefan Zermatten
6e900cfaae Merge pull request #123 from Dumbgenius/spells-improvements
Spells improvements
2017-09-08 08:30:56 +02:00
Stefan Zermatten
1f42d3c622 Merge pull request #128 from Dumbgenius/fix-127
[#127] Arrow library items should give 20 arrows rather than one "Arrows (20)"
2017-09-08 08:29:56 +02:00
Stefan Zermatten
ee453d968f Merge pull request #134 from Dumbgenius/fixbug-attackview-damage-type
attackView now correctly shows damage type
2017-09-07 16:31:26 +02:00
Stefan Zermatten
0850e59b30 Merge pull request #122 from Dumbgenius/feature-22-temp-hp, requires migration
Feature - TempHP as a character attribute,
2017-09-07 16:29:55 +02:00
Stefan Zermatten
f3e44cf033 Moved polymer styling to app-theme 2017-09-07 16:26:09 +02:00
Stefan Zermatten
907f9d15d4 Merge pull request #131 from Dumbgenius/feature-custom-buffs
Feature - custom buffs
2017-09-07 14:42:05 +02:00
Stefan Zermatten
4c3d5d40dd Merge branch 'master' into feature-custom-buffs 2017-09-07 14:41:33 +02:00
Stefan Zermatten
ef0deb20aa Swapped dropdown box for full character list 2017-09-07 14:36:45 +02:00
Stefan Zermatten
b43ee08d75 Fixed some editing bugs on new buffs, improved style 2017-09-07 14:33:59 +02:00
Stefan Zermatten
7e7f1ec997 Merge pull request #132 from Dumbgenius/enhancement-blank-descriptions
Removed blank bit of card on features with no short description
2017-09-07 12:03:32 +02:00
Stefan Zermatten
0f652f5c74 Merge pull request #126 from Dumbgenius/feature-unsharing-characters
Added ability to "unshare" a character.
2017-09-07 12:01:14 +02:00
Stefan Zermatten
3e02875eaf Merge pull request #130 from Dumbgenius/enhancement-85
Added "carried" checkbox to container edit screen (resolves #85)
2017-09-07 11:54:11 +02:00
Stefan Zermatten
b9a5230344 Merge pull request #129 from Dumbgenius/enhancement-84
Added attacks to features (resolves #84)
2017-09-07 11:49:03 +02:00
Stefan Zermatten
28780b96c3 Merge pull request #120 from Dumbgenius/feature-drag-drop-spells
Feature - drag and drop spells
2017-09-07 11:43:34 +02:00
Jacob
bec0b33805 attackView now correctly shows damage type 2017-09-06 18:45:43 +01:00
Jacob
ad9ccbe7ef Removed blank bit of card on features with no short description 2017-09-05 14:31:26 +01:00
Jacob
e2933c2df5 Fixed a couple of places where "Buff" should've been "Condition" 2017-09-05 13:56:15 +01:00
Jacob
87583fdac6 Added buff details to apply buff dialog 2017-09-05 13:48:26 +01:00
Jacob
68e1382aed Buffs/conditions now have a delete button on the list on Stats 2017-09-04 20:36:13 +01:00
Jacob
7b62c82e32 Buff and condition view dialogs now only have the delete button 2017-09-04 20:16:56 +01:00
Jacob
6dd92586a4 Conditions are now separate from buffs, like in #109 2017-09-04 20:16:38 +01:00
Jacob
b3d0db1f02 Merge branch 'master' into feature-custom-buffs 2017-09-04 18:22:04 +01:00
Jacob
5f35c71c9d Added "carried" checkbox to container edit screen
Resolves #85
2017-09-04 15:50:57 +01:00
Jacob
85baf4e5d1 Added attacks to features (resolves #84) 2017-09-04 15:35:52 +01:00
Jacob
15d797131e Fixes #127. Also fixes it for other ammo as well as iron spikes 2017-09-04 15:22:45 +01:00
Stefan Zermatten
06ac9f70c8 Merge pull request #119 from Dumbgenius/srd-fixes
SRD fixes,

Merging this pull request doesn't change the deployed version of DiceCloud, but indicates that the database has been updated using the affected JSON files
2017-09-04 10:50:42 +02:00
Jacob
471a3e274e Refactored code which applies buffs 2017-08-10 02:49:29 +01:00
Jacob
d4031dc4a7 Removed an unnecessary console log 2017-08-09 16:11:09 +01:00
Jacob
18e5ab3f21 Can now set target of buffs
...to "Self only", "Others only", or "Both".
2017-08-09 16:08:19 +01:00
Jacob
c9fe2f17a0 If buff's target is "self", dialog is no longer shown 2017-08-09 15:48:12 +01:00
Jacob
818cb3905f Can now access the name of public characters for buffs
the buffDialog can now access the name of a publicly-available character
so it can display their name as the caster
2017-08-09 15:30:33 +01:00
Jacob
64ef426035 Applying character no longer duplicated in buff apply list 2017-08-09 15:30:25 +01:00
Jacob
2b188f1a8d Merge branch 'master' into feature-custom-buffs
# Conflicts:
#	rpg-docs/client/views/character/inventory/itemDialog/itemDialog.html
#	rpg-docs/client/views/character/spells/spellDialog/spellDialog.html
2017-08-09 15:03:54 +01:00
Jacob
08735ea4f7 Added ability to add/edit buffs 2017-08-09 15:01:20 +01:00
Jacob
bce1b85600 Relocated the buff list to be inline in stats.html 2017-08-09 11:39:18 +01:00
Jacob
0d023e2ba3 Adding conditions now works again 2017-08-09 11:36:45 +01:00
Jacob
dad575de64 Buffs are now split into custom buffs and conditions 2017-08-09 11:20:49 +01:00
Jacob
cb648b4a28 Buffs now display who and what they were applied by. 2017-08-09 11:13:24 +01:00
Jacob
1279137362 Buffs now display attacks and proficiencies in buffDialog 2017-08-09 10:42:34 +01:00
Jacob
3c06529906 buffViewList is now split into "Conditions" and "Buffs" 2017-08-09 10:16:50 +01:00
Jacob
a3b0c6cafd Added a schema/collection pair for CustomBuffs 2017-08-09 10:06:11 +01:00
Jacob
a1d9f7f5bb Added ability to remove self from readers.
Closes #125.
2017-08-09 02:18:46 +01:00
Jacob
3b03e9c71c Spell library now allows you to select multiple spells 2017-07-30 23:27:29 +01:00
Jacob
0eea6f2386 Cantrips now display as "<school> cantrip" rather than "Level 0 <school>"
Also fixed spacing if "(ritual)" tag was not present
2017-07-30 21:20:27 +01:00
Jacob
8f8714d3e5 Altered spacing of headers within baseDialog 2017-07-30 21:14:02 +01:00
Jacob
7c38e8d70a Added newline before At Higher Levels on Healing Word. 2017-07-30 20:22:59 +01:00
Jacob
826859ca3f Added migration to add TempHP to all characters 2017-07-29 22:41:37 +01:00
Jacob
2ca13fbb56 Renamed tempHitPointSlider to extraHitPointSlider in the css 2017-07-29 21:45:02 +01:00
Jacob
6d801e0178 Renamed old "Temporary HP" to "Extra HP" (THP is now the actual attribute) 2017-07-29 21:42:48 +01:00
Jacob
9ddac7d5cd Temporary HP (the attribute) now appears on Stats page 2017-07-29 21:25:05 +01:00
Jacob
7a6f751e30 THP added as a character attribute 2017-07-29 20:09:48 +01:00
Jacob
2389768234 statOrder is now set programatically from an array
This makes it far easier to add new stats, as we don't have to update
every single number manually.
2017-07-29 19:20:26 +01:00
Jacob
c76fe99148 Can now move and copy spells between characters 2017-07-26 21:02:36 +01:00
Jacob
53afaa4f37 CTRL-dragging now copies spells 2017-07-26 19:54:18 +01:00
Jacob
3599b5fbc4 Added basic drag-and-drop functionality between spell lists
Closes #105
2017-07-26 19:23:41 +01:00
Jacob
275fb1ca65 Scrying's tables are now actual Markdown tables 2017-07-21 15:46:33 +01:00
Jacob
d5d937b04a Reincarnate's race table is now an actual Markdown table 2017-07-21 15:38:17 +01:00
Jacob
aa554adbce Teleport's familiarity table is now a table 2017-07-21 15:30:39 +01:00
Jacob
cb739eb207 Removed indents after double-newlines in spells SRD.
They don't actually render in Markdown, and if there was an indent of >=4
spaces it caused the entire next line to be rendered as code (for example
in the Animate Objects spell).
2017-07-21 14:58:29 +01:00
Jacob
66df2ea4aa Animate Objects' stats are now in a table 2017-07-21 14:43:37 +01:00
Stefan Zermatten
73d1419ee9 Merge pull request #114 from Dumbgenius/misc-enhancements
Miscellaneous enhancements
2017-07-21 13:12:22 +02:00
Stefan Zermatten
681ef614c7 Move earth now level 6 2017-07-21 13:03:31 +02:00
Stefan Zermatten
2bdbcb2e79 Fixed speak with animals
#118
2017-07-21 13:02:50 +02:00
Stefan Zermatten
c119fcfbb8 Freezing sphere now level 6
#118
2017-07-21 13:00:28 +02:00
Stefan Zermatten
deb5db8657 Daylight now level 3 2017-07-21 12:59:54 +02:00
Stefan Zermatten
49522580e3 Replaced line breaks with double line breaks in SRD spells 2017-07-21 12:50:50 +02:00
Stefan Zermatten
5b50f20128 Fixed spell attacks from library assignment of default attack bonus 2017-07-21 12:49:04 +02:00
Stefan Zermatten
52fa97c952 removed default values for library attacks where they aren't needed 2017-07-21 12:48:03 +02:00
Stefan Zermatten
e7a5ce8241 Replaced all mentions of saving throws with DC {DC} saving throw 2017-07-21 12:02:17 +02:00
Stefan Zermatten
d1b9043e1f Added change procedure for updating from srd JSON 2017-07-21 11:53:42 +02:00
Stefan Zermatten
9ffc5649f7 Fixed tooltip suffix icons and moved textarea icons outside of textarea 2017-07-21 11:02:02 +02:00
Stefan Zermatten
15e6c12c03 Replaced shitty paper-tooltip with custom css tooltip 2017-07-21 11:01:18 +02:00
Jacob
e89b877326 Merge branch 'fixbug-116' into misc-enhancements 2017-07-20 16:18:49 +01:00
Jacob
aff2f1f438 Parties are now sorted in both character lists. 2017-07-20 16:18:15 +01:00
Jacob
71d1e9e9e8 Added links in the guide to adam-p's Markdown Cheatsheet
and to the original specifaction for Markdown.
2017-07-20 12:21:01 +01:00
Jacob
0696fd8447 Updated the guide to talk about Markdown support as well 2017-07-20 12:10:17 +01:00
Jacob
b2db33e0f3 Added attacks to SRD cantrips
they scale by level: {floor((Level+1)/6)+1}dX
2017-07-20 11:33:44 +01:00
Jacob
0c2842b84a All "At Higher Levels" are now bold and italic, like in the actual PHB 2017-07-19 12:34:01 +01:00
Jacob
789658cfe7 Spells imported from SRD now have attack bonus set by default 2017-07-19 12:31:50 +01:00
Jacob
3be3da777f Now we can use "attackBonus" in spell attacks, make that the default 2017-07-19 12:19:26 +01:00
Jacob
0e53f157d2 Spell attack bonus and DC are now available in spell attacks. 2017-07-19 12:13:49 +01:00
Jacob
24cc4fd2b1 Background proficiencies now correctly open background dialog
Previously, when clicking on non-skill proficiencies from a character's
background, it would open a blank rectangle as its parent dialog. Now, it
correctly opens the Background dialog.
2017-07-18 23:01:14 +01:00
Jacob
1f0ea689dc Multiple instances of the same proficiency are now merged
For tool/language/weapon/armour proficiencies, on the stats/persona page.
2017-07-18 22:33:28 +01:00
Jacob
11adf9da04 Merge branch 'fixbug-107' into misc-enhancements
# Conflicts:
#	rpg-docs/client/views/character/spells/spellDialog/spellDialog.html
2017-07-18 22:05:31 +01:00
Jacob
5ca81056f9 Merge branch 'feature-swap-stat-modifier' into misc-enhancements 2017-07-18 21:58:29 +01:00
Jacob
6fc469f934 Added setting to swap stats and modifiers
Although Schemas.Character was changed, a database migration should
not be required due to the way characterSettings handles it (since
undefined is a falsy value).
2017-07-18 21:58:00 +01:00
Jacob
0c7948afdd Changed all "1 action" casting times to "action" so it displays properly
i.e. it displays as "Evocation action" rather than "Evocation 1 action"
for example

Also did the same for "1 bonus action" -> "bonus action"
2017-07-18 20:24:12 +01:00
Jacob
42ffc79499 Spell list now displays whether a spell requires GP. 2017-07-18 20:22:44 +01:00
Jacob
0240209410 Removed buffViewList that shouldn't have been there 2017-07-18 20:20:04 +01:00
Jacob
c4c1afa669 Merge branch 'guide-update-1.2.8' into misc-enhancements
# Conflicts:
#	rpg-docs/client/views/guide/guide.css
#	rpg-docs/client/views/guide/guide.html
2017-07-18 19:58:35 +01:00
Jacob
47ac090e9d Merge branch 'testing_dg' into misc-enhancements
# Conflicts:
#	rpg-docs/.meteor/packages
2017-07-18 19:56:26 +01:00
Jacob
aadc83391f Adding an attack to a spell now has attack bonus set by the spell list
Default damage is also changed to 1d10 fire for spells
2017-07-18 19:52:12 +01:00
Jacob
54fb398056 Merge branch 'master' into guide-update-1.2.8 2017-07-18 11:11:37 +01:00
Jacob
073094f6dd Merge branch 'master' into fixbug-107 2017-07-18 11:11:14 +01:00
Jacob
bb95fe0d9a Merge branch 'master' into feature-conditions 2017-07-18 11:10:04 +01:00
Jacob
832ed0c1ff A sort of hacky fix to the issue - text wrapping doesn't quite work 2017-07-17 04:43:39 +01:00
Jacob
17a390a8aa Changed Model of Buffs for forwards compatibility
Added a parent attribute and made Buffs a child, so that buffs can be
added to items, spells and features.
2017-07-17 02:41:51 +01:00
Jacob
e65a2db0d2 Changed guide to use Markdown rather than HTML formatting (mostly)
This is both for ease of editing and so that that it can be copied
into the GitHub wiki.

The <iron-icon>s are left in.
2017-07-16 12:07:13 +01:00
Jacob
b3ef43eb70 Added ability to add/remove basic conditions
Conditions are those listed in ./lib/methods/conditions.js
2017-07-16 04:27:32 +01:00
Jacob
be92ef224c Preliminary additions 2017-07-15 19:54:23 +01:00
Jacob
6729bcad64 Updated the guide to reflect more recent updates (1.2.8) 2017-07-15 17:13:06 +01:00
Jacob
7af07e7ba3 Updated the guide to reflect more recent updates. 2017-07-15 17:07:39 +01:00
Jacob
f44914ab84 Added six extra loading hints. 2017-07-15 15:39:51 +01:00
Jacob
59c7eff46a Hit Dice are now called "d6 Hit Dice", etc. rather than just "d6" 2017-07-15 15:17:14 +01:00
Stefan Zermatten
2a332a2965 Merge branch 'feature-parties' 2017-07-14 17:09:47 +02:00
Stefan Zermatten
44a1daf6f8 Grouping characters by party now works
closes #75, finally
2017-07-14 17:09:30 +02:00
Stefan Zermatten
ac23afac5d Stopped characters with poor names from having failed URL's 2017-07-13 17:16:23 +02:00
Stefan Zermatten
a411fb2b43 Fixed migration for failed slug strings 2017-07-13 16:44:23 +02:00
Stefan Zermatten
35b6fe20ae Reset migrations to line up with current DiceCloud server 2017-07-13 16:16:00 +02:00
Stefan Zermatten
54f055d3ef Merge branch 'bugfix-model' 2017-07-13 16:03:23 +02:00
Stefan Zermatten
2bacb296ba Fixed new effects dialog animation
makes some progress on #72
2017-07-13 16:01:43 +02:00
Stefan Zermatten
8b061f7aa9 Improved look and feel of effect editing 2017-07-13 15:53:03 +02:00
Stefan Zermatten
6a84c83644 Made passive scores show up for all skills with bonuses to passive score
closes #56
2017-07-13 13:42:04 +02:00
Stefan Zermatten
3227cd0934 Add character names to the end of their URL's
Closes #21, makes links to characters human readable
2017-07-13 13:14:04 +02:00
Stefan Zermatten
089feae26f Spell slots are now available in calculations
closes #11
2017-07-13 10:56:42 +02:00
Stefan Zermatten
99c72d1e10 Made names optional for all collections
closes #92
2017-07-13 10:39:43 +02:00
Stefan Zermatten
1e67afbe6f Made DC available in spell descriptions as a variable
closes #101
2017-07-13 10:30:16 +02:00
Stefan Zermatten
1cfec1ca45 Allowed carryMultiplier to be a decimal
closes #100
2017-07-13 09:50:20 +02:00
Stefan Zermatten
09d1ac9ba3 Merge branch 'bugfix-improved-initiative' 2017-07-11 08:53:46 +02:00
Stefan Zermatten
834b9cf384 Added passive perception to improved initiative export
closes #97
2017-07-11 08:52:47 +02:00
Stefan Zermatten
37291b347a Fixed vulnerabilities, resistances, immunities export
closes #96
2017-07-11 08:42:21 +02:00
Stefan Zermatten
efdfbeb59e Moved export to lib 2017-07-11 08:12:52 +02:00
Thaum Rystra
a165f9b253 Merge branch 'feature-improved-initiative-export'
closes #95
2017-07-10 21:02:10 +02:00
Thaum Rystra
4a6fca98bc Cleaned up export dialog, fixed copying 2017-07-10 20:59:00 +02:00
Stefan Zermatten
35464128a0 Added basic export for improved initiative 2017-07-10 16:26:38 +02:00
Stefan Zermatten
398f8a8a2a Merge branch 'bugfix-style' 2017-06-28 09:33:20 +02:00
Stefan Zermatten
812a1784b2 Improved display of home page on smaller devices 2017-06-28 09:27:24 +02:00
Stefan Zermatten
8fa9cd0148 Prevented spell titles from overflowing their item in spell lists
closes #83
2017-06-28 09:26:52 +02:00
Stefan Zermatten
0e0662cc9a Added slightly specific rule to let headings wrap
closes #90
2017-06-28 09:26:13 +02:00
Stefan Zermatten
ad4e3f5b20 Stopped inventory items being separated from their containers
hopefully fixes #91
2017-06-28 09:25:25 +02:00
Stefan Zermatten
4cd058e1fe Set max of slider before value
Prevents unnecessary capping of temp HP to 100
Fixes #89
2017-06-08 09:48:51 +02:00
Stefan Zermatten
8f30cee4d3 Hotfixed column layout with translateZ(0) hack 2017-06-07 09:46:38 +02:00
Stefan Zermatten
d7f7eb2e6a Fixed some spells in the library 2017-06-07 09:35:59 +02:00
Stefan Zermatten
a59cf1162f added return value to remove old soft removed docs 2017-05-29 11:58:19 +02:00
Stefan Zermatten
7bc80da99e Moved cron setup to startup 2017-05-29 11:35:30 +02:00
Stefan Zermatten
2ddc520bb6 Added cron job to remove old documents 2017-05-29 11:16:46 +02:00
Stefan Zermatten
d92bb0f4d4 Replace tap event with click event for mini-FABs
fixes #68, probably
2017-05-16 10:36:40 +02:00
Stefan Zermatten
abcfe57add Fixed results not being used when popping dialogs
Fixes #66
2017-05-11 11:08:00 +02:00
Stefan Zermatten
cdae75beef Merge branch 'bugfix-iamastick' 2017-05-10 16:40:05 +02:00
Stefan Zermatten
e7bcc2224c Replaced effects in-line editing with edit dialogs
Closes #41
2017-05-10 16:39:36 +02:00
Stefan Zermatten
b591c66dd5 Back button now closes dialogs
closes #9
2017-05-10 10:38:28 +02:00
Stefan Zermatten
402bc0e5ed Fixed Readme 2017-05-10 10:37:30 +02:00
Stefan Zermatten
ac772531ee Fixed SRD spells not getting a random ID when inserted
fixes #64
fixes #65
2017-05-08 11:21:30 +02:00
Stefan Zermatten
9a3edb07e4 Merge branch 'feature-spell-library' 2017-05-05 11:12:59 +02:00
Stefan Zermatten
fea45d2398 Fixed spell data source 2017-05-05 11:11:56 +02:00
Stefan Zermatten
18aa1b2040 Fixed publications of spell library 2017-05-05 11:11:43 +02:00
Stefan Zermatten
9afe38d043 removed stray log 2017-05-05 10:45:08 +02:00
Stefan Zermatten
5ddbecf97e Added spells library 2017-05-05 10:45:07 +02:00
Stefan Zermatten
7b573ca86e Fixed some dialogs getting stuck on close animation, poisoning future dialogs
closes #63
2017-05-05 10:45:05 +02:00
Stefan Zermatten
a9256fed05 Fixed some dialogs getting stuck on close animation, poisoning future dialogs
closes #63
2017-05-05 10:44:16 +02:00
Stefan Zermatten
8ec10e7a6a Added SRD spell data 2017-05-04 16:19:21 +02:00
Stefan Zermatten
5ee1f0a169 Merge branch 'feature-library' 2017-05-04 14:23:19 +02:00
Stefan Zermatten
b0652b0102 Added SRD tools
#47
2017-05-04 14:22:55 +02:00
Stefan Zermatten
47b68c777d Improved item library dialog UI 2017-05-04 14:19:47 +02:00
Stefan Zermatten
16feaaa6ca Fixed jshint breaking on es6 2017-05-04 14:19:11 +02:00
Stefan Zermatten
8a38c167c0 Removed padding from drawer 2017-05-04 09:41:09 +02:00
Stefan Zermatten
1835d968f3 Merge branch 'bugfix-smallbugs' 2017-04-25 17:16:05 +02:00
Stefan Zermatten
2a9d170647 Added spacing between values and units in the inventory
closes #44 closes #60
2017-04-25 17:12:34 +02:00
Stefan Zermatten
b4649d8c87 Fixed spacing between "weight carried" and "x lbs" 2017-04-25 16:59:54 +02:00
Stefan Zermatten
e50bcca7ce Made feature uses a text field again
Fixes #59
2017-04-25 16:23:16 +02:00
Stefan Zermatten
492b5d4bf1 Removed useless library link 2017-04-24 15:08:46 +02:00
Stefan Zermatten
6add127db4 Merge branch 'feature-library' 2017-04-24 14:57:34 +02:00
Stefan Zermatten
d2762ae4ee Added patreon and github links to drawer 2017-04-24 14:56:40 +02:00
Stefan Zermatten
7996fa4370 Finished implementing basic item library 2017-04-24 14:15:17 +02:00
Thaum Rystra
cd7702cf4f Added library page 2017-04-24 06:05:44 +02:00
Stefan Zermatten
9975a13a70 Removed useless config files 2017-04-21 15:12:34 +02:00
Stefan Zermatten
a459610c09 Added library UI for selecting a library item 2017-04-21 15:10:33 +02:00
Stefan Zermatten
7b6c59fa6c Add apple web app capable meta tag 2017-04-21 11:48:59 +02:00
Stefan Zermatten
357166063a Create License.md 2017-04-21 11:44:11 +02:00
Stefan Zermatten
2540278787 Bumped version 2017-03-09 08:40:21 +02:00
Stefan Zermatten
5ed1977082 Fixed dragging items to characters in the drawer 2017-03-09 08:40:15 +02:00
Stefan Zermatten
a750101765 Fixed app drawer appearing behind content 2017-03-09 08:39:59 +02:00
Stefan Zermatten
aa08a9b57a Fixed links not closing drawer automatically 2017-03-09 08:39:39 +02:00
Stefan Zermatten
a8960e26ec Fixed issue with health bars clamping to 100 2017-03-06 14:50:46 +02:00
Stefan Zermatten
eefb3895ad Bumped version to 1.0.0 2017-03-06 11:37:15 +02:00
Stefan Zermatten
5b1caa7e95 Merge pull request #57 from ThaumRystra/update-meteor-1.4-polymer-1.0
Update to polymer 1.0, Meteor 1.4
2017-03-06 10:36:03 +02:00
Stefan Zermatten
21fdad1054 Added resolution for webcomponentsjs 2017-02-21 09:37:32 +02:00
Stefan Zermatten
c482395426 Fixed FABs not reappearing after dialog close 2017-02-13 09:22:17 +02:00
Stefan Zermatten
cb493a9f16 Firefox now works... mostly 2017-02-13 09:21:55 +02:00
Stefan Zermatten
576c1f953b Firefox now works... barely 2017-02-10 14:01:06 +02:00
Stefan Zermatten
eb4336b3e9 Moved back to differential:vulcanize for imports 2017-01-31 15:26:05 +02:00
Stefan Zermatten
03cb32bf34 Updated color dropdown to Polymer 1 paper-swatch-picker 2017-01-31 13:36:15 +02:00
Stefan Zermatten
a869772238 Updated journal page to Polymer 1 2017-01-31 11:09:57 +02:00
Stefan Zermatten
9c61493a12 Updated persona tab to Polymer 1 2017-01-31 09:58:35 +02:00
Stefan Zermatten
7af3b8e06e Upgraded spells page to Polymer 1 2017-01-30 13:02:22 +02:00
Stefan Zermatten
fd21f4f7d7 Fixed some dialog animation edge cases 2017-01-27 15:34:59 +02:00
Stefan Zermatten
3530eefb2a Added custom tab pages animations 2017-01-27 15:34:09 +02:00
Stefan Zermatten
d710579025 Updated inventory to Polymer 1 2017-01-26 10:23:27 +02:00
Stefan Zermatten
f7a3929c05 Fixed toast 2017-01-25 08:40:30 +02:00
Stefan Zermatten
1af15eff3c Small style and event fixes 2017-01-23 15:08:19 +02:00
Stefan Zermatten
33ca60c2e6 Migrated the Feature page to Polymer 1 2017-01-20 15:45:18 +02:00
Stefan Zermatten
4261776d8c Removed SCSS, using CSS only now
SCSS wasn't being utilized enough to add much value to the build times
2017-01-20 09:06:24 +02:00
Stefan Zermatten
b44fe33b30 Finished upgrading stat tab to Polymer 1 2017-01-20 09:05:16 +02:00
Stefan Zermatten
c4a488a176 Updated useraccounts, character settings to Polymer 1 2017-01-19 15:43:48 +02:00
Stefan Zermatten
137a94f251 Began moving character sheet and related menus to Polymer 1 2017-01-18 15:04:09 +02:00
Stefan Zermatten
817020bea8 Updated hitpoint / temporary hitpoint box to Polymer 1 2017-01-18 11:19:03 +02:00
Stefan Zermatten
420de9b005 Migrated stats tab to Polymer 1.0 2017-01-17 15:01:11 +02:00
Stefan Zermatten
b8fdc27df9 Rebuilt dialog animations with cross-fade effect 2017-01-17 15:00:05 +02:00
Stefan Zermatten
bdc64dfb10 Updated the new character dialog to Polymer 1 2017-01-16 15:34:23 +02:00
Stefan Zermatten
d4bec4f5e7 Cleaned up dialogStack 2017-01-16 15:34:03 +02:00
Stefan Zermatten
041186059c Updated static pages to Polymer 1 2017-01-16 13:48:43 +02:00
Stefan Zermatten
01535a414c Updated character lists to Polymer 1 2017-01-16 13:48:18 +02:00
Stefan Zermatten
d9e180bac0 Simplified toast to just take text 2017-01-13 15:35:08 +02:00
Stefan Zermatten
235089e790 Fixed typos of the app name 2017-01-13 15:34:51 +02:00
Stefan Zermatten
c560d80c26 Updated front page to Polymer 1 2017-01-13 15:34:28 +02:00
Stefan Zermatten
a67b13f659 Updated feedback form to Polymer 1 2017-01-13 13:21:42 +02:00
Stefan Zermatten
c416adc85b Improved the dialog stack animations 2017-01-13 13:21:05 +02:00
Stefan Zermatten
dbbb3739d0 Added a new animated dialog stack
This is to replace the animated-pages hack with Blaze component built for purpose
2017-01-12 15:30:06 +02:00
Stefan Zermatten
38ea89995a Moved views out of private folder 2017-01-12 15:28:59 +02:00
Stefan Zermatten
37268495ae Got some Polymer 1.0 elements working with 1.4
Character sheets now visible, but vulcanize broke, using raw head imports instead
2016-12-22 11:15:30 +02:00
Stefan Zermatten
042b67dd77 Fixed merge conflict 2016-12-20 13:58:32 +02:00
Stefan Zermatten
07cb3859db Merge branch 'update-meteor-1.4' into update-meteor-1.4-polymer-1.0 2016-12-20 13:57:56 +02:00
Stefan Zermatten
b1fdaa726c Removed useless Kadira 2016-12-08 13:52:04 +02:00
Stefan Zermatten
a333b0bdc8 Fixed broken drawer swiping 2016-12-08 13:51:54 +02:00
Stefan Zermatten
c32680a15a Upgraded meteor 2016-12-08 13:51:35 +02:00
Stefan Zermatten
d1950b4598 Bumped changelog for webcomponentsjs update 2016-12-08 09:55:07 +02:00
Greg Williams
af20eb4f3c Updated webcomponentsjs to v0.7.23 2016-11-23 22:03:09 -08:00
Stefan Zermatten
be0283a342 Chrome 54 broke transitions again 2016-10-17 14:51:24 +02:00
Stefan Zermatten
e05561dcf9 Trying a different version of webcomponents 2016-10-03 14:27:57 +02:00
Stefan Zermatten
3c776ed018 added webcomponent dependency resolution 2016-10-03 14:19:48 +02:00
Stefan Zermatten
ebecb46935 Fixed drop-down bug, for now
Expect it to break again in Chrome 54
2016-10-03 14:05:30 +02:00
Stefan Zermatten
7af2e80ec1 Removed Polymer 0.5, started implementing Polymer 1.0 2016-10-03 13:00:27 +02:00
Stefan Zermatten
d83fe917d0 Fixed change logs version numbers 2016-09-19 10:02:25 +02:00
Stefan Zermatten
f526de88a7 Fixed invisible dropdown boxes in Chrome 52. Bumped version 2016-09-08 14:40:47 +02:00
Stefan Zermatten
55adca36d5 Added bower 2016-09-07 10:04:21 +02:00
Stefan Zermatten
be6f54e53a Added Package.json to get Scalingo working 2016-09-07 09:52:14 +02:00
Stefan Zermatten
d41c27c86d Bumped version 2016-06-03 14:49:04 +02:00
Stefan Zermatten
f4397e65ab Global update of packages 2016-06-03 14:43:11 +02:00
Stefan Zermatten
c00c69a0c7 Merge pull request #54 from ThaumRystra/fix-bug-156
closes #54
2016-05-20 09:42:25 +02:00
Robert Perce
6737983782 [#156] add "ritual" after the school in the spell detail view if the spell is, in fact, a ritual. 2016-05-13 11:40:39 -05:00
Stefan Zermatten
78441439c3 Merge pull request #52 from ThaumRystra/user-story-127
Added 'if' function for math.js to use whenever eval-ing input, closes #32
2016-05-04 07:43:21 +02:00
Robert Perce
9b72e1aea2 Added 'if' function for math.js to use whenever eval-ing input 2016-05-03 14:44:40 -05:00
Stefan Zermatten
684eca8603 Merge pull request #51 from ThaumRystra/fix-bug-163
[#163] Changed the x to a × in effectView.js
2016-05-03 11:13:32 +02:00
Stefan Zermatten
868e5f96a4 Update README.md 2016-05-03 09:03:26 +02:00
Stefan Zermatten
6fe368cde7 Updated bourbon and scss 2016-05-03 08:12:44 +02:00
Stefan Zermatten
2ffacb88e0 Included custom vulcanize package in repo 2016-05-03 07:50:12 +02:00
Stefan Zermatten
af3af0e550 Fixed missing bower dependency 2016-05-03 07:48:14 +02:00
Robert Perce
81f50d94c1 [#163] Changed the x to a × in effectView.js 2016-04-22 15:20:32 -05:00
Stefan Zermatten
49e6d51b95 Merge pull request #40 from ThaumRystra/feature-coins-inc-default
Make coins incrementable by default, closes #27
2016-03-09 14:17:23 +02:00
Stefan Zermatten
1e4e1a3b11 Merge pull request #38 from ThaumRystra/feature-base-ability-scores-10
Base ability scores default to 10, closes #36
2016-03-09 13:56:36 +02:00
Stefan Zermatten
4440c88417 Removed grouping from effects
Grouping is currently only used to differentiate effects that have the same parent, but are ambiguous as to which part of that parent they come from, like race or background. Features do not need grouped effects, because there can be no ambiguity.
2016-03-09 12:57:23 +02:00
Connor Petersen
98047ca806 Moved base-10 default to Features.js, cleaned up default Effects, and Features code to be consistent. 2016-03-07 23:21:42 -08:00
Connor Petersen
051cabc712 Cleaned up a little more 2016-03-07 22:53:27 -08:00
Connor Petersen
636fa504f1 Updated to not require caching the id or making a separate update call 2016-03-07 22:51:41 -08:00
Connor Petersen
ff9fc916f6 Added a call to adding a feature and 6 related effects to the newCharacterDialog event handler 2016-02-11 23:29:27 -08:00
Connor Petersen
2206a607b2 Added an update call to default Item adding function to update the showIncrement field to true for coins 2016-02-10 22:11:41 -08:00
Stefan Zermatten
ce224301b2 Fixed layout on chrome 49+, made character names into links 2016-02-01 09:34:22 +02:00
Stefan Zermatten
e6a9911dfc Replaced the head that was accidentally deleted 2015-11-19 12:44:11 +02:00
Stefan Zermatten
8a1871ee18 Fixed character list FAB not staying put 2015-11-19 12:43:54 +02:00
Stefan Zermatten
402f885f85 Specified thaum:vulcanize at 0.5 2015-11-18 08:52:52 +02:00
Stefan Zermatten
d07c118d47 Removed useless public items, removed Appcache, fixed vulcanize 2015-11-17 15:20:33 +02:00
Stefan Zermatten
103d44eeec Merge branch 'feature-fast-render' 2015-11-17 13:59:22 +02:00
Stefan Zermatten
33196c6771 Bumped change log 2015-11-17 13:58:50 +02:00
Stefan Zermatten
80dc862047 Added Appcache 2015-11-17 12:26:55 +02:00
Stefan Zermatten
314da14ad1 Added indexes to charId on character fields 2015-11-02 09:35:05 +02:00
Stefan Zermatten
e5dbe81ac1 Added fast render support to routes which have subscriptions
Closes #18
2015-10-13 08:22:00 +02:00
Stefan Zermatten
7e68ef64cc Merge pull request #16 from ThaumRystra/bugfix-encumberance-meter-swapping
Change character reference to be reactive based on the active, undestroyed template
2015-10-09 08:58:53 +02:00
Connor Petersen
c9d71cad52 Change character reference to be reactive based on the active, undestroyed template 2015-10-08 23:05:57 -07:00
Stefan Zermatten
d79a808c81 Bumped Version 2015-10-05 08:59:25 +02:00
Stefan Zermatten
1016c39bdf Merge branch 'fix-www-route' 2015-10-05 08:59:07 +02:00
Stefan Zermatten
5f4923e049 Added canonical URL 2015-10-05 08:57:50 +02:00
Stefan Zermatten
e83237a728 Added demeteorized to gitignore 2015-10-05 08:57:33 +02:00
Stefan Zermatten
9f323738bf Renamed custom useraccount-polymer package to be more obvious 2015-10-05 08:34:43 +02:00
Stefan Zermatten
1fc76fa50d Removed Vulcanize entirely
There is no version compatible with both Meteor 1.2 and Polymer 0.5, so screw it, clients can deal with a few ms more load time.
2015-10-05 08:34:18 +02:00
Stefan Zermatten
36d5ff0a88 Update Meteor to 1.2
This requires local copies of packages that are broken or not Polymer 0.5

Closes #15
2015-10-03 22:40:04 +02:00
Stefan Zermatten
d05874ed13 Bumped version 2015-10-01 08:06:29 +02:00
Stefan Zermatten
df2521e69c Merge pull request #5 from ThaumRystra/bugfix-unprepared-spell-attacks
Spell child attacks now set their enabled state to match the parent spell prepared state
2015-10-01 08:03:30 +02:00
Stefan Zermatten
3c6a685fe8 Fixed reference to parentId which should be parent.id 2015-10-01 07:45:38 +02:00
Connor Petersen
a77e560284 Spell attacks correctly enable based on preparedness, Model correction with collection hooks 2015-09-30 13:30:59 -07:00
Stefan Zermatten
4cec83918f Updated README.md to remove out of date info 2015-09-28 07:35:10 +02:00
Stefan Zermatten
fec95c51c6 Rolled back changes to spells tab, It wasn't a column-layout 2015-09-25 13:03:14 +02:00
Stefan Zermatten
425c42d049 Bumped version 2015-09-25 12:52:28 +02:00
Stefan Zermatten
ab6f0c4f5b Merge branch 'fix-columns' 2015-09-25 12:51:04 +02:00
Stefan Zermatten
5d6e57b896 Wrap cards in padded divs to make columns behave 2015-09-25 12:49:48 +02:00
Stefan Zermatten
7c0a8125f2 Merge branch 'fix-carry-capacity-effectView' 2015-09-04 13:56:06 +02:00
Stefan Zermatten
7481ef08a8 Carry capacity effects no longer show up as "no stat" when viewed 2015-09-04 13:55:42 +02:00
Stefan Zermatten
b578dd5fb0 Merge branch 'feature-carry-capacity-modifier' 2015-09-03 14:09:51 +02:00
Stefan Zermatten
5d6f934d88 Bumped version 2015-09-03 14:09:23 +02:00
Stefan Zermatten
337f0bfa8a Made sure migration touches every character 2015-09-03 14:09:17 +02:00
Stefan Zermatten
c62784894b Made sure encumbered conditions respect carry capacity 2015-09-03 13:53:00 +02:00
Stefan Zermatten
75fff43d7d Gave an effect menu option for carry capacity 2015-09-03 13:52:40 +02:00
Stefan Zermatten
a9eeeac0df Fixed carry capacity bar 2015-09-03 13:52:22 +02:00
Stefan Zermatten
c8af0ff0a9 Fixed carry capacity table 2015-09-03 13:52:06 +02:00
Stefan Zermatten
9e200db7b9 Made carry capacity an attribute, migrations need testing 2015-08-31 15:51:52 +02:00
Stefan Zermatten
c08cf83096 Bumped version 2015-08-27 12:21:23 +02:00
Stefan Zermatten
d9368b06d0 Merge branch 'bugfix-0.6.8' 2015-08-27 12:07:42 +02:00
Stefan Zermatten
2703367681 Proficiencies now get disabled when their features are disabled 2015-08-27 12:05:56 +02:00
Stefan Zermatten
d419442549 Fixed share dialog not finding usernames or email addresses 2015-08-27 11:59:38 +02:00
Stefan Zermatten
99df01c950 Prevented negative temporary hitpoints being added 2015-08-27 11:43:34 +02:00
364 changed files with 22919 additions and 4866 deletions

14
.codio
View File

@@ -1,14 +0,0 @@
{
// Configure your Run and Preview buttons here.
// Run button configuration
"commands": {
"Run Meteor": "cd rpg-docs \n ROOT_URL=http://period-sheriff.codio.io:3000 meteor"
},
// Preview button configuration
"preview": {
"Prieview": "http://period-sheriff-3000.codio.io",
"Ungit": "https://period-sheriff-9501.codio.io/#/repository?path=/home/codio/workspace"
}
}

View File

@@ -13,7 +13,7 @@
"disallowMixedSpacesAndTabs": "smart",
"disallowTrailingWhitespace": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowMultipleVarDecl": true,
"disallowMultipleVarDecl": false,
"disallowNewlineBeforeBlockStatements": true,
"disallowKeywordsOnNewLine": ["else"],
@@ -53,4 +53,4 @@
"disallowMultipleLineBreaks": true,
"disallowNewlineBeforeBlockStatements": true
}
}

View File

@@ -1,3 +1,4 @@
{
"undef": false
}
"undef": false,
"esversion": 6
}

674
License.md Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,58 +1,13 @@
TODO
====
RPG Docs
========
* Get Polymer installed using bower.
* Install Vulcanize package listed below
* Copy the differential polymer demo to get polymer implemented nicely
* Update Meteor
* Install and use LESS
This is the repo for [DiceCloud](dicecloud.com).
Packages used
=============
Getting started
---------------
* meteor-platform
* Base Meteor.
* [Docs](http://docs.meteor.com/#/full/)
* autopublish
* Publishes everything to the client.
* Must be removed before release
* insecure
* Allows the client the freedom to modify any colleciton.
* Must be removed before release
* iron:router
* Enables pagination and URL's to direct to specific templates.
* [Tutorial](http://www.manuel-schoebel.com/blog/iron-router-tutorial)
* accounts-password
* Lets users create accounts with a simple password
* accounts-ui
* Adds simple UI for logging in
* random
* Somewhat decent cryptographically strong psuedo random number generation.
* [readme](https://atmospherejs.com/meteor/random)
* dburles:collection-helpers
* Adds template-style helpers to collections. [github page](https://github.com/dburles/meteor-collection-helpers)
* reactive-var
* Friendly reactive variables
* [Meteor Docs](http://docs.meteor.com/#/full/reactivevar_pkg)
* cw4gn3r:jquery-event-drag
* Adds jquery drag events
* underscore
* Handy javascript utilities
* [Docs](http://underscorejs.org/)
* aldeed:collection2
* Extends collections with Schemas
* [(gitHub page)](https://github.com/aldeed/meteor-collection2)
* uses [SimpleSchema](https://github.com/aldeed/meteor-simple-schema)
* aldeed:autoform
* Automatically generates bootstrap forms for collection2 Schemas.
* [github](https://github.com/aldeed/meteor-autoform)
* differential:vulcanize
* Bakes all the polymer imports into one file
* [github](https://github.com/Differential/meteor-vulcanize)
************
Resources
=========
[differential's polymer demo](https://github.com/Differential/polymer-demo)
`git clone https://github.com/ThaumRystra/DiceCloud1 dicecloud`
`cd dicecloud`
`cd rpg-docs`
`bower install`
`meteor`

View File

@@ -0,0 +1,719 @@
[
{
"name": "Abacus",
"plural": "Abaci",
"description": "",
"value": 2,
"weight": 2
},
{
"name": "Acid (vial)",
"plural": "Acid (vials)",
"description": "As an action, you can splash the contents of this vial onto a creature within 5 feet of you or throw the vial up to 20 feet, shattering it on impact. In either case, make a ranged attack against a creature or object, treating the acid as an improvised weapon. On a hit, the target takes 2d6 acid damage.",
"value": 25,
"weight": 1
},
{
"name": "Alchemists fire (flask)",
"plural": "Alchemists fire (flasks)",
"description": "This sticky, adhesive fluid ignites when exposed to air. As an action, you can throw this flask up to 20 feet, shattering it on impact. Make a ranged attack against a creature or object, treating the alchemists fire as an improvised weapon. On a hit, the target takes 1d4 fire damage at the start of each of its turns. A creature can end this damage by using its action to make a DC 10 Dexterity check to extinguish the flames.",
"value": 50,
"weight": 1
},
{
"libraryName": "Arrows (20)",
"name": "Arrow",
"plural": "Arrows",
"description": "",
"value": 0.05,
"weight": 0.05,
"quantity": 20
},
{
"libraryName": "Blowgun needles (5)",
"name": "Blowgun needle",
"plural": "Blowgun needles",
"description": "",
"value": 0.2,
"weight": 0.2,
"quantity": 5
},
{
"libraryName": "Crossbow bolts (20)",
"name": "Crossbow bolt",
"plural": "Crossbow bolts",
"description": "",
"value": 0.05,
"weight": 0.075,
"quantity": 20
},
{
"libraryName": "Sling bullets (20)",
"name": "Sling bullet",
"plural": "Sling bullets",
"description": "",
"value": 0.002,
"weight": 0.075,
"quantity": 20
},
{
"name": "Antitoxin (vial)",
"plural": "Antitoxin (vials)",
"description": "A creature that drinks this vial of liquid gains advantage on saving throws against poison for 1 hour. It confers no benefit to undead or constructs.",
"value": 50,
"weight": 0
},
{
"name": "Arcane focus Crystal",
"plural": "Arcane focus Crystals",
"description": "An arcane focus is a special item — an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item — designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.",
"value": 10,
"weight": 1
},
{
"name": "Arcane focus Orb",
"plural": "Arcane focus Orbs",
"description": "An arcane focus is a special item — an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item — designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.",
"value": 20,
"weight": 3
},
{
"name": "Arcane focus Rod",
"plural": "Arcane focus Rods",
"description": "An arcane focus is a special item — an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item — designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.",
"value": 10,
"weight": 2
},
{
"name": "Arcane focus Staff",
"plural": "Arcane focus Staffs",
"description": "An arcane focus is a special item — an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item — designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.",
"value": 5,
"weight": 4
},
{
"name": "Arcane focus Wand",
"plural": "Arcane focus Wands",
"description": "An arcane focus is a special item — an orb, a crystal, a rod, a specially constructed staff, a wand-like length of wood, or some similar item — designed to channel the power of arcane spells. A sorcerer, warlock, or wizard can use such an item as a spellcasting focus.",
"value": 10,
"weight": 1
},
{
"name": "Backpack",
"plural": "Backpacks",
"description": "",
"value": 2,
"weight": 5
},
{
"name": "Ball bearings (bag of 1,000)",
"plural": "Ball bearings (bags of 1,000)",
"description": "As an action, you can spill these tiny metal balls from their pouch to cover a level, square area that is 10 feet on a side. A creature moving across the covered area must succeed on a DC 10 Dexterity saving throw or fall Prone. A creature moving through the area at half speed doesnt need to make the save.",
"value": 1,
"weight": 2
},
{
"name": "Barrel",
"plural": "Barrels",
"description": "",
"value": 2,
"weight": 70
},
{
"name": "Basket",
"plural": "Baskets",
"description": "",
"value": 0.4,
"weight": 2
},
{
"name": "Bedroll",
"plural": "Bedrolls",
"description": "",
"value": 1,
"weight": 7
},
{
"name": "Bell",
"plural": "Bells",
"description": "",
"value": 1,
"weight": 0
},
{
"name": "Blanket",
"plural": "Blankets",
"description": "",
"value": 0.5,
"weight": 3
},
{
"name": "Block and tackle",
"plural": "Block and tackle sets",
"description": "A set of pulleys with a cable threaded through them and a hook to attach to objects, a block and tackle allows you to hoist up to four times the weight you can normally lift.",
"value": 1,
"weight": 5
},
{
"name": "Book",
"plural": "Books",
"description": "A book might contain poetry, historical accounts, information pertaining to a particular field of lore, diagrams and notes on gnomish contraptions, or just about anything else that can be represented using text or pictures. A book of spells is a spellbook.",
"value": 25,
"weight": 5
},
{
"name": "Bottle, glass",
"plural": "Bottles, glass",
"description": "",
"value": 2,
"weight": 2
},
{
"name": "Bucket",
"plural": "Buckets",
"description": "",
"value": 0.05,
"weight": 2
},
{
"name": "Caltrops (bag of 20)",
"plural": "Caltrops (bags of 20)",
"description": "As an action, you can spread a bag of caltrops to cover a square area that is 5 feet on a side. Any creature that enters the area must succeed on a DC 15 Dexterity saving throw or stop moving this turn and take 1 piercing damage. Taking this damage reduces the creatures walking speed by 10 feet until the creature regains at least 1 hit point. A creature moving through the area at half speed doesnt need to make the save.",
"value": 1,
"weight": 2
},
{
"name": "Candle",
"plural": "Candles",
"description": "For 1 hour, a candle sheds bright light in a 5-foot radius and dim light for an additional 5 feet.",
"value": 0.01,
"weight": 0
},
{
"name": "Case, crossbow bolt",
"plural": "Cases, crossbow bolt",
"description": "This wooden case can hold up to twenty crossbow bolts.",
"value": 1,
"weight": 1
},
{
"name": "Case, map or scroll",
"plural": "Cases, map or scroll",
"description": "This cylindrical leather case can hold up to ten rolled-up sheets of paper or five rolled-up sheets of parchment.",
"value": 1,
"weight": 1
},
{
"name": "Chain (10 feet)",
"plural": "Chains (10 feet)",
"description": "A chain has 10 hit points. It can be burst with a successful DC 20 Strength check.",
"value": 5,
"weight": 10
},
{
"name": "Chalk (1 piece)",
"plural": "Pieces of chalk",
"description": "",
"value": 0.01,
"weight": 0
},
{
"name": "Chest",
"plural": "Chests",
"description": "",
"value": 5,
"weight": 25
},
{
"name": "Climbers kit",
"plural": "Climbers kits",
"description": "A climbers kit includes special pitons, boot tips, gloves, and a harness. You can use the climbers kit as an action to anchor yourself; when you do, you cant fall more than 25 feet from the point where you anchored yourself, and you cant climb more than 25 feet away from that point without undoing the anchor.",
"value": 25,
"weight": 12
},
{
"name": "Clothes, common",
"plural": "Clothes, common",
"description": "",
"value": 0.5,
"weight": 3
},
{
"name": "Clothes, costume",
"plural": "Clothes, costume",
"description": "",
"value": 5,
"weight": 4
},
{
"name": "Clothes, fine",
"plural": "Clothes, fine",
"description": "",
"value": 15,
"weight": 6
},
{
"name": "Clothes, travelers",
"plural": "Clothes, travelers",
"description": "",
"value": 2,
"weight": 4
},
{
"name": "Component pouch",
"plural": "Component pouches",
"description": "A component pouch is a small, watertight leather belt pouch that has compartments to hold all the material components and other special items you need to cast your spells, except for those components that have a specific cost (as indicated in a spells description).",
"value": 25,
"weight": 2
},
{
"name": "Crowbar",
"plural": "Crowbars",
"description": "Using a crowbar grants advantage to Strength checks where the crowbars leverage can be applied.",
"value": 2,
"weight": 5
},
{
"name": "Sprig of mistletoe",
"plural": "Sprigs of mistletoe",
"description": "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.",
"value": 1,
"weight": 0
},
{
"name": "Totem",
"plural": "Totems",
"description": "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.",
"value": 1,
"weight": 0
},
{
"name": "Wooden staff",
"plural": "Wooden staffs",
"description": "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.",
"value": 5,
"weight": 4
},
{
"name": "Yew wand",
"plural": "Yew wands",
"description": "A druidic focus might be a sprig of mistletoe or holly, a wand or scepter made of yew or another special wood, a staff drawn whole out of a living tree, or a totem object incorporating feathers, fur, bones, and teeth from sacred animals. A druid can use such an object as a spellcasting focus.",
"value": 10,
"weight": 1
},
{
"name": "Fishing tackle",
"plural": "Fishing tackles",
"description": "This kit includes a wooden rod, silken line, corkwood bobbers, steel hooks, lead sinkers, velvet lures, and narrow netting.",
"value": 1,
"weight": 4
},
{
"name": "Flask",
"plural": "Flasks",
"description": "",
"value": 0.02,
"weight": 1
},
{
"name": "Tankard",
"plural": "Tankards",
"description": "",
"value": 0.02,
"weight": 1
},
{
"name": "Grappling hook",
"plural": "Grappling hooks",
"description": "",
"value": 2,
"weight": 4
},
{
"name": "Hammer",
"plural": "Hammers",
"description": "",
"value": 1,
"weight": 3
},
{
"name": "Hammer, sledge",
"plural": "Hammers, sledge",
"description": "",
"value": 2,
"weight": 10
},
{
"name": "Healers kit",
"plural": "Healers kits",
"description": "This kit is a leather pouch containing bandages, salves, and splints. The kit has ten uses. As an action, you can expend one use of the kit to stabilize a creature that has 0 hit points, without needing to make a Wisdom (Medicine) check.",
"value": 5,
"weight": 3
},
{
"name": "Holy amulet",
"plural": "Holy amulets",
"description": "A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Fantasy-Historical Pantheons lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.",
"value": 5,
"weight": 1
},
{
"name": "Holy emblem",
"plural": "Holy emblems",
"description": "A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Fantasy-Historical Pantheons lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.",
"value": 5,
"weight": 0
},
{
"name": "Holy reliquary",
"plural": "Holy reliquaries",
"description": "A holy symbol is a representation of a god or pantheon. It might be an amulet depicting a symbol representing a deity, the same symbol carefully engraved or inlaid as an emblem on a shield, or a tiny box holding a fragment of a sacred relic. Fantasy-Historical Pantheons lists the symbols commonly associated with many gods in the multiverse. A cleric or paladin can use a holy symbol as a spellcasting focus. To use the symbol in this way, the caster must hold it in hand, wear it visibly, or bear it on a shield.",
"value": 5,
"weight": 2
},
{
"name": "Holy water (flask)",
"plural": "Holy water (flasks)",
"description": "As an action, you can splash the contents of this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. In either case, make a ranged attack against a target creature, treating the holy water as an improvised weapon. If the target is a fiend or undead, it takes 2d6 radiant damage. A cleric or paladin may create holy water by performing a special ritual. The ritual takes 1 hour to perform, uses 25 gp worth of powdered silver, and requires the caster to expend a 1st-level spell slot.",
"value": 25,
"weight": 1
},
{
"name": "Hourglass",
"plural": "Hourglasses",
"description": "",
"value": 25,
"weight": 1
},
{
"name": "Hunting trap",
"plural": "Hunting traps",
"description": "When you use your action to set it, this trap forms a saw-toothed steel ring that snaps shut when a creature steps on a pressure plate in the center. The trap is affixed by a heavy chain to an immobile object, such as a tree or a spike driven into the ground. A creature that steps on the plate must succeed on a DC 13 Dexterity saving throw or take 1d4 piercing damage and stop moving. Thereafter, until the creature breaks free of the trap, its movement is limited by the length of the chain (typically 3 feet long). A creature can use its action to make a DC 13 Strength check, freeing itself or another creature within its reach on a success. Each failed check deals 1 piercing damage to the trapped creature.",
"value": 5,
"weight": 25
},
{
"name": "Ink (1 ounce bottle)",
"plural": "Ink (1 ounce bottles)",
"description": "",
"value": 10,
"weight": 0
},
{
"name": "Ink pen",
"plural": "Ink pens",
"description": "",
"value": 0.02,
"weight": 0
},
{
"name": "Jug",
"plural": "Jugs",
"description": "",
"value": 0.02,
"weight": 4
},
{
"name": "Pitcher",
"plural": "Pitchers",
"description": "",
"value": 0.02,
"weight": 4
},
{
"name": "Ladder (10-foot)",
"plural": "Ladders (10-foot)",
"description": "",
"value": 0.1,
"weight": 25
},
{
"name": "Lamp",
"plural": "Lamps",
"description": "A lamp casts bright light in a 15-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.",
"value": 0.5,
"weight": 1
},
{
"name": "Lantern, bullseye",
"plural": "Lanterns, bullseye",
"description": "A bullseye lantern casts bright light in a 60-foot cone and dim light for an additional 60 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil.",
"value": 10,
"weight": 2
},
{
"name": "Lantern, hooded",
"plural": "Lanterns, hooded",
"description": "A hooded lantern casts bright light in a 30-foot radius and dim light for an additional 30 feet. Once lit, it burns for 6 hours on a flask (1 pint) of oil. As an action, you can lower the hood, reducing the light to dim light in a 5-foot radius.",
"value": 5,
"weight": 2
},
{
"name": "Lock",
"plural": "Locks",
"description": "A key is provided with the lock. Without the key, a creature proficient with thieves tools can pick this lock with a successful DC 15 Dexterity check. Your GM may decide that better locks are available for higher prices.",
"value": 10,
"weight": 1
},
{
"name": "Magnifying glass",
"plural": "Magnifying glasses",
"description": "This lens allows a closer look at small objects. It is also useful as a substitute for flint and steel when starting fires. Lighting a fire with a magnifying glass requires light as bright as sunlight to focus, tinder to ignite, and about 5 minutes for the fire to ignite. A magnifying glass grants advantage on any ability check made to appraise or inspect an item that is small or highly detailed.",
"value": 100,
"weight": 0
},
{
"name": "Manacles",
"plural": "Sets of manacles",
"description": "These metal restraints can bind a Small or Medium creature. Escaping the manacles requires a successful DC 20 Dexterity check. Breaking them requires a successful DC 20 Strength check. Each set of manacles comes with one key. Without the key, a creature proficient with thieves tools can pick the manacles lock with a successful DC 15 Dexterity check. Manacles have 15 hit points.",
"value": 2,
"weight": 6
},
{
"name": "Mess kit",
"plural": "Mess kits",
"description": "This tin box contains a cup and simple cutlery. The box clamps together, and one side can be used as a cooking pan and the other as a plate or shallow bowl.",
"value": 0.2,
"weight": 1
},
{
"name": "Mirror, steel",
"plural": "Mirrors, steel",
"description": "",
"value": 5,
"weight": 0.5
},
{
"name": "Oil (flask)",
"plural": "Oil (flasks)",
"description": "Oil usually comes in a clay flask that holds 1 pint. As an action, you can splash the oil in this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. Make a ranged attack against a target creature or object, treating the oil as an improvised weapon. On a hit, the target is covered in oil. If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil. You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level. If lit, the oil burns for 2 rounds and deals 5 fire damage to any creature that enters the area or ends its turn in the area. A creature can take this damage only once per turn.",
"value": 0.1,
"weight": 1
},
{
"name": "Paper (one sheet)",
"plural": "Sheets of paper",
"description": "",
"value": 0.2,
"weight": 0
},
{
"name": "Parchment (one sheet)",
"plural": "Sheets of parchment",
"description": "",
"value": 0.1,
"weight": 0
},
{
"name": "Perfume (vial)",
"plural": "Perfume (vials)",
"description": "",
"value": 5,
"weight": 0
},
{
"name": "Pick, miners",
"plural": "Picks, miners",
"description": "",
"value": 2,
"weight": 10
},
{
"name": "Piton",
"plural": "Pitons",
"description": "",
"value": 0.05,
"weight": 0.25
},
{
"name": "Poison, basic (vial)",
"plural": "Poison, basic (vials)",
"description": "You can use the poison in this vial to coat one slashing or piercing weapon or up to three pieces of ammunition. Applying the poison takes an action. A creature hit by the poisoned weapon or ammunition must make a DC 10 Constitution saving throw or take 1d4 poison damage. Once applied, the poison retains potency for 1 minute before drying.",
"value": 100,
"weight": 0
},
{
"name": "Pole (10-foot)",
"plural": "Poles (10-foot)",
"description": "",
"value": 0.05,
"weight": 7
},
{
"name": "Pot, iron",
"plural": "Pots, iron",
"description": "",
"value": 2,
"weight": 10
},
{
"name": "Potion of healing",
"plural": "Potions of healing",
"description": "A character who drinks the magical red fluid in this vial regains 2d4 + 2 hit points. Drinking or administering a potion takes an action.",
"value": 50,
"weight": 0.5
},
{
"name": "Pouch",
"plural": "Pouches",
"description": "A cloth or leather pouch can hold up to 20 sling bullets or 50 blowgun needles, among other things. A compartmentalized pouch for holding spell components is called a component pouch (described earlier in this section).",
"value": 0.5,
"weight": 1
},
{
"name": "Quiver",
"plural": "Quivers",
"description": "A quiver can hold up to 20 arrows.",
"value": 1,
"weight": 1
},
{
"name": "Ram, portable",
"plural": "Rams, portable",
"description": "You can use a portable ram to break down doors. When doing so, you gain a +4 bonus on the Strength check. One other character can help you use the ram, giving you advantage on this check.",
"value": 4,
"weight": 35
},
{
"name": "Rations (1 day)",
"plural": "Days of rations",
"description": "Rations consist of dry foods suitable for extended travel, including jerky, dried fruit, hardtack, and nuts.",
"value": 0.5,
"weight": 2
},
{
"name": "Robes",
"plural": "Robes",
"description": "",
"value": 1,
"weight": 4
},
{
"name": "Rope, hempen (50 feet)",
"plural": "Ropes, hempen (50 feet)",
"description": "Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.",
"value": 1,
"weight": 10
},
{
"name": "Rope, silk (50 feet)",
"plural": "Ropes, silk (50 feet)",
"description": "Rope, whether made of hemp or silk, has 2 hit points and can be burst with a DC 17 Strength check.",
"value": 10,
"weight": 5
},
{
"name": "Sack",
"plural": "Sacks",
"description": "",
"value": 0.01,
"weight": 0.5
},
{
"name": "Scale, merchants",
"plural": "Scales, merchants",
"description": "A scale includes a small balance, pans, and a suitable assortment of weights up to 2 pounds. With it, you can measure the exact weight of small objects, such as raw precious metals or trade goods, to help determine their worth.",
"value": 5,
"weight": 3
},
{
"name": "Sealing wax",
"plural": "Sealing waxes",
"description": "",
"value": 0.5,
"weight": 0
},
{
"name": "Shovel",
"plural": "Shovels",
"description": "",
"value": 2,
"weight": 5
},
{
"name": "Signal whistle",
"plural": "Signal whistles",
"description": "",
"value": 0.05,
"weight": 0
},
{
"name": "Signet ring",
"plural": "Signet rings",
"description": "",
"value": 5,
"weight": 0
},
{
"name": "Soap",
"plural": "Soaps",
"description": "",
"value": 0.02,
"weight": 0
},
{
"name": "Spellbook",
"plural": "Spellbooks",
"description": "Essential for wizards, a spellbook is a leather-bound tome with 100 blank vellum pages suitable for recording spells.",
"value": 50,
"weight": 3
},
{
"libraryName": "Spikes, iron (10)",
"name": "Spike, iron",
"plural": "Spikes, iron",
"description": "",
"value": 0.1,
"weight": 0.5,
"quantity": 10
},
{
"name": "Spyglass",
"plural": "Spyglasses",
"description": "Objects viewed through a spyglass are magnified to twice their size.",
"value": 1000,
"weight": 1
},
{
"name": "Tent, two-person",
"plural": "Tents, two-person",
"description": "A simple and portable canvas shelter, a tent sleeps two.",
"value": 2,
"weight": 20
},
{
"name": "Tinderbox",
"plural": "Tinderboxes",
"description": "This small container holds flint, fire steel, and tinder (usually dry cloth soaked in light oil) used to kindle a fire. Using it to light a torch — or anything else with abundant, exposed fuel — takes an action. Lighting any other fire takes 1 minute.",
"value": 0.5,
"weight": 1
},
{
"name": "Torch",
"plural": "Torches",
"description": "A torch burns for 1 hour, providing bright light in a 20-foot radius and dim light for an additional 20 feet. If you make a melee attack with a burning torch and hit, it deals 1 fire damage.",
"value": 0.01,
"weight": 1
},
{
"name": "Vial",
"plural": "Vials",
"description": "",
"value": 1,
"weight": 0
},
{
"name": "Waterskin",
"plural": "Waterskins",
"description": "",
"value": 0.2,
"weight": 5
},
{
"name": "Whetstone",
"plural": "Whetstones",
"description": "",
"value": 0.01,
"weight": 1
}
]

244
dataSources/srd/armor.json Normal file
View File

@@ -0,0 +1,244 @@
[
{
"name": "Padded Armor",
"value": 5,
"weight": 8,
"description": "Padded armor consists of quilted layers of cloth and batting.",
"effects": [
{
"operation": "base",
"value": 11,
"stat": "armor"
},
{
"operation": "disadvantage",
"stat": "stealth"
}
]
},
{
"name": "Leather Armor",
"value": 10,
"weight": 10,
"description": "The breastplate and shoulder protectors of this armor are made of leather that has been stiffened by being boiled in oil. The rest of the armor is made of softer and more flexible materials.",
"effects": [
{
"operation": "base",
"value": 11,
"stat": "armor"
}
]
},
{
"name": "Studded leather Armor",
"value": 45,
"weight": 13,
"description": "Made from tough but flexible leather, studded leather is reinforced with close-set rivets or spikes.",
"effects": [
{
"operation": "base",
"value": 12,
"stat": "armor"
}
]
},
{
"name": "Hide Armor",
"value": 10,
"weight": 12,
"description": "This crude armor consists of thick furs and pelts. It is commonly worn by barbarian tribes, evil humanoids, and other folk who lack access to the tools and materials needed to create better armor.",
"effects": [
{
"operation": "base",
"value": 12,
"stat": "armor"
},
{
"operation": "max",
"value": 2,
"stat": "dexterityArmor"
}
]
},
{
"name": "Chain shirt",
"value": 50,
"weight": 20,
"description": "Made of interlocking metal rings, a chain shirt is worn between layers of clothing or leather. This armor offers modest protection to the wearers upper body and allows the sound of the rings rubbing against one another to be muffled by outer layers.",
"effects": [
{
"operation": "base",
"value": 13,
"stat": "armor"
},
{
"operation": "max",
"value": 2,
"stat": "dexterityArmor"
}
]
},
{
"name": "Scale mail",
"value": 50,
"weight": 45,
"description": "This armor consists of a coat and leggings (and perhaps a separate skirt) of leather covered with overlapping pieces of metal, much like the scales of a fish. The suit includes gauntlets.",
"effects": [
{
"operation": "base",
"value": 14,
"stat": "armor"
},
{
"operation": "disadvantage",
"stat": "stealth"
},
{
"operation": "max",
"value": 2,
"stat": "dexterityArmor"
}
]
},
{
"name": "Breastplate",
"value": 400,
"weight": 20,
"description": "This armor consists of a fitted metal chest piece worn with supple leather. Although it leaves the legs and arms relatively unprotected, this armor provides good protection for the wearers vital organs while leaving the wearer relatively unencumbered.",
"effects": [
{
"operation": "base",
"value": 14,
"stat": "armor"
},
{
"operation": "max",
"value": 2,
"stat": "dexterityArmor"
}
]
},
{
"name": "Half plate",
"value": 750,
"weight": 40,
"description": "Half plate consists of shaped metal plates that cover most of the wearers body. It does not include leg protection beyond simple greaves that are attached with leather straps.",
"effects": [
{
"operation": "base",
"value": 15,
"stat": "armor"
},
{
"operation": "max",
"value": 2,
"stat": "dexterityArmor"
},
{
"operation": "disadvantage",
"stat": "stealth"
}
]
},
{
"name": "Ring mail",
"value": 30,
"weight": 40,
"description": "This armor is leather armor with heavy rings sewn into it. The rings help reinforce the armor against blows from swords and axes. Ring mail is inferior to chain mail, and its usually worn only by those who cant afford better armor.",
"effects": [
{
"operation": "base",
"value": 14,
"stat": "armor"
},
{
"operation": "mul",
"value": 0,
"stat": "dexterityArmor"
},
{
"operation": "disadvantage",
"stat": "stealth"
}
]
},
{
"name": "Chain mail",
"value": 75,
"weight": 55,
"description": "Made of interlocking metal rings, chain mail includes a layer of quilted fabric worn underneath the mail to prevent chafing and to cushion the impact of blows. The suit includes gauntlets.",
"effects": [
{
"operation": "base",
"value": 16,
"stat": "armor"
},
{
"operation": "mul",
"value": 0,
"stat": "dexterityArmor"
},
{
"operation": "disadvantage",
"stat": "stealth"
}
]
},
{
"name": "Splint Armor",
"value": 200,
"weight": 60,
"description": "This armor is made of narrow vertical strips of metal riveted to a backing of leather that is worn over cloth padding. Flexible chain mail protects the joints.",
"effects": [
{
"operation": "base",
"value": 17,
"stat": "armor"
},
{
"operation": "mul",
"value": 0,
"stat": "dexterityArmor"
},
{
"operation": "disadvantage",
"stat": "stealth"
}
]
},
{
"name": "Plate Armor",
"value": 1500,
"weight": 65,
"description": "Plate consists of shaped, interlocking metal plates to cover the entire body. A suit of plate includes gauntlets, heavy leather boots, a visored helmet, and thick layers of padding underneath the armor. Buckles and straps distribute the weight over the body.",
"effects": [
{
"operation": "base",
"value": 18,
"stat": "armor"
},
{
"operation": "mul",
"value": 0,
"stat": "dexterityArmor"
},
{
"operation": "disadvantage",
"stat": "stealth"
}
]
},
{
"name": "Shield",
"value": 10,
"weight": 6,
"description": "A shield is made from wood or metal and is carried in one hand. Wielding a shield increases your Armor Class by 2. You can benefit from only one shield at a time.",
"effects": [
{
"operation": "add",
"value": 2,
"stat": "armor"
}
]
}
]

4798
dataSources/srd/spells.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
// This all gets run in the console by an admin.
// Probably a good idea to reset the server after running big updates
// Only do if the library doesn't exist yet
id = Libraries.insert({
_id: "SRDLibraryGA3XWsd",
owner: Meteor.userId(),
name: "SRD Library",
});
// First copy-paste the JSON into your console like `items = <pasted JSON>`
// First import, don't do this if the library is already populated
_.each(items, (item) => {
item.settings = {category: }; // "adventuringGear", "armor", "weapons", "tools"
item.library = "SRDLibraryGA3XWsd"
LibraryItems.insert(item)
});
_.each(spells, (spell) => {
spell.library = "SRDLibraryGA3XWsd"
LibrarySpells.insert(spell)
});
// Update the library using names as keys
// Make sure you're subscribed to all item categories
handles = _.map(["weapons", "armor", "adventuringGear", "tools"],
category => Meteor.subscribe("standardLibraryItems", category)
);
// Wait until all the handles are ready
handles.map(h => h.ready()); // must reaturn [...true]
_.each(items, (item) => {
var existingItem = LibraryItems.findOne({
library: "SRDLibraryGA3XWsd",
name: item.name,
});
if (!existingItem) return;
_.each(item.attacks, attack => Schemas.LibraryAttacks.clean(attack));
LibraryItems.update(existingItem._id, {$set: item});
});
// Make sure you're subscribed to all spell categories
handles = _.map([0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
category => Meteor.subscribe("standardLibrarySpells", category)
);
// Wait until all the handles are ready
handles.map(h => h.ready()); // must reaturn [...true]
_.each(spells, (spell) => {
var existingSpell = LibrarySpells.findOne({
library: "SRDLibraryGA3XWsd",
name: spell.name,
});
if (!existingSpell) return;
_.each(spell.attacks, attack => Schemas.LibraryAttacks.clean(attack));
LibrarySpells.update(existingSpell._id, {$set: spell});
});

247
dataSources/srd/tools.json Normal file
View File

@@ -0,0 +1,247 @@
[
{
"name": "Alchemists supplies",
"plural": "Alchemists supplies",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 50,
"weight": 8
},
{
"name": "Brewers supplies",
"plural": "Brewers supplies",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 20,
"weight": 9
},
{
"name": "Calligraphers supplies",
"plural": "Calligraphers supplies",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 10,
"weight": 5
},
{
"name": "Carpenters tools",
"plural": "Carpenters tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 8,
"weight": 6
},
{
"name": "Cartographers tools",
"plural": "Cartographers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 15,
"weight": 6
},
{
"name": "Cobblers tools",
"plural": "Cobblers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 5,
"weight": 5
},
{
"name": "Cooks utensils",
"plural": "Cooks utensils",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 1,
"weight": 8
},
{
"name": "Glassblowers tools",
"plural": "Glassblowers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 30,
"weight": 5
},
{
"name": "Jewelers tools",
"plural": "Jewelers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 25,
"weight": 2
},
{
"name": "Leatherworkers tools",
"plural": "Leatherworkers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 5,
"weight": 5
},
{
"name": "Masons tools",
"plural": "Masons tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 10,
"weight": 8
},
{
"name": "Painters supplies",
"plural": "Painters supplies",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 10,
"weight": 5
},
{
"name": "Potters tools",
"plural": "Potters tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 10,
"weight": 3
},
{
"name": "Smiths tools",
"plural": "Smiths tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 20,
"weight": 8
},
{
"name": "Tinkers tools",
"plural": "Tinkers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 50,
"weight": 10
},
{
"name": "Weavers tools",
"plural": "Weavers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 1,
"weight": 5
},
{
"name": "Woodcarvers tools",
"plural": "Woodcarvers tools",
"description": "These special tools include the items needed to pursue a craft or trade. The table shows examples of the most common types of tools, each providing items related to a single craft. Proficiency with a set of artisans tools lets you add your proficiency bonus to any ability checks you make using the tools in your craft. Each type of artisans tools requires a separate proficiency.",
"value": 1,
"weight": 5
},
{
"name": "Dice set",
"plural": "Dice sets",
"description": "This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.",
"value": 0.1,
"weight": 0
},
{
"name": "Playing card set",
"plural": "Playing card sets",
"description": "This item encompasses a wide range of game pieces, including dice and decks of cards (for games such as Three-Dragon Ante). A few common examples appear on the Tools table, but other kinds of gaming sets exist. If you are proficient with a gaming set, you can add your proficiency bonus to ability checks you make to play a game with that set. Each type of gaming set requires a separate proficiency.",
"value": 0.5,
"weight": 0
},
{
"name": "Bagpipes",
"plural": "Bagpipes",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 30,
"weight": 6
},
{
"name": "Drum",
"plural": "Drums",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 6,
"weight": 3
},
{
"name": "Dulcimer",
"plural": "Dulcimers",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 25,
"weight": 10
},
{
"name": "Flute",
"plural": "Flutes",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 2,
"weight": 1
},
{
"name": "Lute",
"plural": "Lutes",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 35,
"weight": 2
},
{
"name": "Lyre",
"plural": "Lyres",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 30,
"weight": 2
},
{
"name": "Horn",
"plural": "Horns",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 3,
"weight": 2
},
{
"name": "Pan flute",
"plural": "Pan flutes",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 12,
"weight": 2
},
{
"name": "Shawm",
"plural": "Shawms",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 2,
"weight": 1
},
{
"name": "Viol",
"plural": "Viols",
"description": "If you have proficiency with a given musical instrument, you can add your proficiency bonus to any ability checks you make to play music with the instrument. A bard can use a musical instrument as a spellcasting focus.",
"value": 30,
"weight": 1
},
{
"name": "Disguise Kit",
"plural": "Disguise Kits",
"description": "This pouch of cosmetics, hair dye, and small props lets you create disguises that change your physical appearance. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a visual disguise.",
"value": 25,
"weight": 3
},
{
"name": "Forgery Kit",
"plural": "Forgery Kits",
"description": "This small box contains a variety of papers and parchments, pens and inks, seals and sealing wax, gold and silver leaf, and other supplies necessary to create convincing forgeries of physical documents. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to create a physical forgery of a document.",
"value": 15,
"weight": 5
},
{
"name": "Herbalism Kit",
"plural": "Herbalism Kits",
"description": "This kit contains a variety of instruments such as clippers, mortar and pestle, and pouches and vials used by herbalists to create remedies and potions. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to identify or apply herbs. Also, proficiency with this kit is required to create antitoxin and potions of healing.",
"value": 5,
"weight": 3
},
{
"name": "Navigators tools",
"plural": "Navigators tools",
"description": "This set of instruments is used for navigation at sea. Proficiency with navigators tools lets you chart a ships course and follow navigation charts. In addition, these tools allow you to add your proficiency bonus to any ability check you make to avoid getting lost at sea.",
"value": 25,
"weight": 2
},
{
"name": "Thieves tools",
"plural": "Thieves tools",
"description": "This set of tools includes a small file, a set of lock picks, a small mirror mounted on a metal handle, a set of narrow-bladed scissors, and a pair of pliers. Proficiency with these tools lets you add your proficiency bonus to any ability checks you make to disarm traps or open locks.",
"value": 25,
"weight": 1
},
{
"name": "Poisoner's Kit",
"plural": "Poisoner's Kits",
"description": "A poisoners kit includes the vials, chemicals, and other equipment necessary for the creation of poisons. Proficiency with this kit lets you add your proficiency bonus to any ability checks you make to craft or use poisons.",
"value": 50,
"weight": 2
}
]

View File

@@ -0,0 +1,481 @@
[
{
"name": "Club",
"value": 0.1,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d4 + {strengthMod}",
"details": "Light",
"damageType": "bludgeoning"
}
]
},
{
"name": "Dagger",
"value": 2,
"weight": 1,
"attacks": [
{
"attackBonus": "max(strengthMod, dexterityMod) + proficiencyBonus",
"damage": "1d4 + {max(strengthMod, dexterityMod)}",
"details": "Finesse, light, thrown (range 20/60)",
"damageType": "piercing"
}
]
},
{
"name": "Greatclub",
"value": 0.2,
"weight": 10,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d8 + {strengthMod}",
"details": "Two-handed",
"damageType": "bludgeoning"
}
]
},
{
"name": "Handaxe",
"value": 5,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d6 + {strengthMod}",
"details": "Light, thrown (range 20/60)",
"damageType": "slashing"
}
]
},
{
"name": "Javelin",
"value": 0.5,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d6 + {strengthMod}",
"details": "Thrown (range 30/120)",
"damageType": "piercing"
}
]
},
{
"name": "Light hammer",
"value": 2,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d4 + {strengthMod}",
"details": "Light, thrown (range 20/60)",
"damageType": "bludgeoning"
}
]
},
{
"name": "Mace",
"value": 5,
"weight": 4,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d6 + {strengthMod}",
"damageType": "bludgeoning"
}
]
},
{
"name": "Quarterstaff",
"value": 0.5,
"weight": 4,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d6 + {strengthMod}",
"details": "Versatile (1d8)",
"damageType": "bludgeoning"
}
]
},
{
"name": "Sickle",
"value": 1,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d4 + {strengthMod}",
"details": "Light",
"damageType": "slashing"
}
]
},
{
"name": "Spear",
"value": 1,
"weight": 3,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d6 + {strengthMod}",
"details": "Thrown (range 20/60), versatile (1d8)",
"damageType": "piercing"
}
]
},
{
"name": "Crossbow, light",
"value": 25,
"weight": 5,
"attacks": [
{
"attackBonus": "dexterityMod + proficiencyBonus",
"damage": "1d8 + {dexterityMod}",
"details": "Ammunition (range 80/320), loading, two-handed",
"damageType": "piercing"
}
]
},
{
"name": "Dart",
"value": 0.05,
"weight": 0.25,
"attacks": [
{
"attackBonus": "max(strengthMod, dexterityMod) + proficiencyBonus",
"damage": "1d4 + {max(strengthMod, dexterityMod)}",
"details": "Finesse, thrown (range 20/60)",
"damageType": "piercing"
}
]
},
{
"name": "Shortbow",
"value": 25,
"weight": 2,
"attacks": [
{
"attackBonus": "dexterityMod + proficiencyBonus",
"damage": "1d6 + {dexterityMod}",
"details": "Ammunition (range 80/320), two-handed",
"damageType": "piercing"
}
]
},
{
"name": "Sling",
"value": 0.1,
"weight": 0,
"attacks": [
{
"attackBonus": "dexterityMod + proficiencyBonus",
"damage": "1d4 + {dexterityMod}",
"details": "Ammunition (range 30/120)",
"damageType": "bludgeoning"
}
]
},
{
"name": "Battleaxe",
"value": 10,
"weight": 4,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d8 + {strengthMod}",
"details": "Versatile (1d10)",
"damageType": "slashing"
}
]
},
{
"name": "Flail",
"value": 10,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d8 + {strengthMod}",
"damageType": "bludgeoning"
}
]
},
{
"name": "Glaive",
"value": 20,
"weight": 6,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d10 + {strengthMod}",
"details": "Heavy, reach, two-handed",
"damageType": "slashing"
}
]
},
{
"name": "Greataxe",
"value": 30,
"weight": 7,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d12 + {strengthMod}",
"details": "Heavy, two-handed",
"damageType": "slashing"
}
]
},
{
"name": "Greatsword",
"value": 50,
"weight": 6,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "2d6 + {strengthMod}",
"details": "Heavy, two-handed",
"damageType": "slashing"
}
]
},
{
"name": "Halberd",
"value": 20,
"weight": 6,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d10 + {strengthMod}",
"details": "Heavy, reach, two-handed",
"damageType": "slashing"
}
]
},
{
"name": "Lance",
"value": 10,
"weight": 6,
"description": "You have disadvantage when you use a lance to attack a target within 5 feet of you. Also, a lance requires two hands to wield when you arent mounted.",
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d12 + {strengthMod}",
"details": "Reach, special",
"damageType": "piercing"
}
]
},
{
"name": "Longsword",
"value": 15,
"weight": 3,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d8 + {strengthMod}",
"details": "Versatile (1d10)",
"damageType": "slashing"
}
]
},
{
"name": "Maul",
"value": 10,
"weight": 10,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "2d6 + {strengthMod}",
"details": "Heavy, two-handed",
"damageType": "bludgeoning"
}
]
},
{
"name": "Morningstar",
"value": 15,
"weight": 4,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d8 + {strengthMod}",
"damageType": "piercing"
}
]
},
{
"name": "Pike",
"value": 5,
"weight": 18,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d10 + {strengthMod}",
"details": "Heavy, reach, two-handed",
"damageType": "piercing"
}
]
},
{
"name": "Rapier",
"value": 25,
"weight": 2,
"attacks": [
{
"attackBonus": "max(strengthMod, dexterityMod) + proficiencyBonus",
"damage": "1d8 + {max(strengthMod, dexterityMod)}",
"details": "Finesse",
"damageType": "piercing"
}
]
},
{
"name": "Scimitar",
"value": 25,
"weight": 3,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d6 + {strengthMod}",
"details": "Finesse, light",
"damageType": "slashing"
}
]
},
{
"name": "Shortsword",
"value": 10,
"weight": 2,
"attacks": [
{
"attackBonus": "max(strengthMod, dexterityMod) + proficiencyBonus",
"damage": "1d6 + {max(strengthMod, dexterityMod)}",
"details": "Finesse, light",
"damageType": "piercing"
}
]
},
{
"name": "Trident",
"value": 5,
"weight": 4,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d6 + {strengthMod}",
"details": "Thrown (range 20/60), versatile (1d8)",
"damageType": "piercing"
}
]
},
{
"name": "War pick",
"value": 5,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d8 + {strengthMod}",
"damageType": "piercing"
}
]
},
{
"name": "Warhammer",
"value": 15,
"weight": 2,
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "1d8 + {strengthMod}",
"details": "Versatile (1d10)",
"damageType": "bludgeoning"
}
]
},
{
"name": "Whip",
"value": 2,
"weight": 3,
"attacks": [
{
"attackBonus": "max(strengthMod, dexterityMod) + proficiencyBonus",
"damage": "1d4 + {max(strengthMod, dexterityMod)}",
"details": "Finesse, reach",
"damageType": "slashing"
}
]
},
{
"name": "Blowgun",
"value": 10,
"weight": 1,
"attacks": [
{
"attackBonus": "dexterityMod + proficiencyBonus",
"damage": "1 + {dexterityMod}",
"details": "Ammunition (range 25/100), loading",
"damageType": "piercing"
}
]
},
{
"name": "Crossbow, hand",
"value": 75,
"weight": 3,
"attacks": [
{
"attackBonus": "dexterityMod + proficiencyBonus",
"damage": "1d6 + {dexterityMod}",
"details": "Ammunition (range 30/120), light, loading",
"damageType": "piercing"
}
]
},
{
"name": "Crossbow, heavy",
"value": 50,
"weight": 18,
"attacks": [
{
"attackBonus": "dexterityMod + proficiencyBonus",
"damage": "1d10 + {dexterityMod}",
"details": "Ammunition (range 100/400), heavy, loading, two-handed",
"damageType": "piercing"
}
]
},
{
"name": "Longbow",
"value": 50,
"weight": 2,
"attacks": [
{
"attackBonus": "dexterityMod + proficiencyBonus",
"damage": "1d8 + {dexterityMod}",
"details": "Ammunition (range 150/600), heavy, two-handed",
"damageType": "piercing"
}
]
},
{
"name": "Net",
"value": 1,
"weight": 3,
"description": "A Large or smaller creature hit by a net is Restrained until it is freed. A net has no effect on creatures that are formless, or creatures that are Huge or larger. A creature can use its action to make a DC 10 Strength check, freeing itself or another creature within its reach on a success. Dealing 5 slashing damage to the net (AC 10) also frees the creature without harming it, ending the effect and destroying the net.\n\nWhen you use an action, bonus action, or reaction to attack with a net, you can make only one attack regardless of the number of attacks you can normally make.",
"attacks": [
{
"attackBonus": "strengthMod + proficiencyBonus",
"damage": "0",
"details": "Special, thrown (range 5/15)",
"damageType": "bludgeoning"
}
]
}
]

5
rpg-docs/.gitignore vendored
View File

@@ -1,6 +1,9 @@
.meteor/local
.meteor/meteorite
.demeteorized
settings.json
public/components
public/_imports.html
nohup.out
dump
node_modules
dump

View File

@@ -6,3 +6,12 @@ notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package

View File

@@ -1 +0,0 @@

View File

@@ -3,16 +3,13 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-platform
iron:router
accounts-password
accounts-ui
random
accounts-password@1.5.0
accounts-ui@1.2.0
random@1.0.10
dburles:collection-helpers
reactive-var
underscore
reactive-var@1.0.11
underscore@1.0.10
aldeed:collection2
differential:vulcanize
matb33:collection-hooks
zimme:collection-softremovable
momentjs:moment
@@ -20,12 +17,40 @@ dburles:mongo-collection-instances
percolate:migrations
ecwyne:mathjs
useraccounts:polymer
accounts-google
accounts-google@1.3.0
splendido:accounts-meld
email
fourseven:scss@2.1.1
wolves:bourbon
email@1.2.3
meteorhacks:subs-manager
meteorhacks:kadira
chuangbo:marked
reywood:iron-router-ga
meteor-base@1.2.0
mobile-experience@1.0.5
mongo@1.3.1
blaze-html-templates
session@1.1.7
jquery@1.11.10
tracker@1.1.3
logging@1.1.19
reload@1.1.11
ejson@1.1.0
spacebars
check@1.2.5
useraccounts:iron-routing
wizonesolutions:canonical
standard-minifier-js@2.2.0
shell-server@0.3.0
seba:minifiers-autoprefixer
nikogosovd:multiple-uihooks
templates:array
ecmascript@0.9.0
es5-shim@4.6.15
differential:vulcanize
reactive-dict@1.2.0
percolate:synced-cron
ongoworks:speakingurl
service-configuration@1.0.11
google-config-ui@1.0.0
dynamic-import@0.2.0
ddp-rate-limiter@1.0.7
rate-limit@1.0.8
iron:router

View File

@@ -1 +1 @@
METEOR@1.1.0.2
METEOR@1.6.0.1

View File

@@ -1,96 +1,134 @@
accounts-base@1.2.0
accounts-google@1.0.4
accounts-oauth@1.1.5
accounts-password@1.1.1
accounts-ui@1.1.5
accounts-ui-unstyled@1.1.7
aldeed:collection2@2.3.3
aldeed:simple-schema@1.3.3
autoupdate@1.2.1
base64@1.0.3
binary-heap@1.0.3
blaze@2.1.2
blaze-tools@1.0.3
boilerplate-generator@1.0.3
callback-hook@1.0.3
check@1.0.5
chuangbo:marked@0.3.5
coffeescript@1.0.6
dburles:collection-helpers@1.0.3
dburles:mongo-collection-instances@0.3.3
ddp@1.1.0
deps@1.0.7
differential:vulcanize@0.0.5
accounts-base@1.4.2
accounts-google@1.3.1
accounts-oauth@1.1.15
accounts-password@1.5.0
accounts-ui@1.2.0
accounts-ui-unstyled@1.3.0
aldeed:collection2@2.10.0
aldeed:collection2-core@1.2.0
aldeed:schema-deny@1.1.0
aldeed:schema-index@1.1.1
aldeed:simple-schema@1.5.3
allow-deny@1.1.0
autoupdate@1.3.12
babel-compiler@6.24.7
babel-runtime@1.1.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.2
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.3.1
caching-compiler@1.1.11
caching-html-compiler@1.1.2
callback-hook@1.0.10
check@1.2.5
chuangbo:marked@0.3.5_1
coffeescript@1.11.1_4
dburles:collection-helpers@1.1.0
dburles:mongo-collection-instances@0.3.5
ddp@1.4.0
ddp-client@2.2.0
ddp-common@1.3.0
ddp-rate-limiter@1.0.7
ddp-server@2.1.1
deps@1.0.12
diff-sequence@1.0.7
differential:vulcanize@3.0.0
dynamic-import@0.2.1
ecmascript@0.9.0
ecmascript-runtime@0.5.0
ecmascript-runtime-client@0.5.0
ecmascript-runtime-server@0.5.0
ecwyne:mathjs@0.25.0
ejson@1.0.6
email@1.0.6
fastclick@1.0.3
fourseven:scss@2.1.1
geojson-utils@1.0.3
google@1.1.5
html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
id-map@1.0.3
iron:controller@1.0.7
iron:core@1.0.7
iron:dynamic-template@1.0.7
iron:layout@1.0.7
iron:location@1.0.7
iron:middleware-stack@1.0.7
iron:router@1.0.7
iron:url@1.0.7
jquery@1.11.3_2
json@1.0.3
lai:collection-extensions@0.1.3
launch-screen@1.0.2
less@1.0.14
livedata@1.0.13
localstorage@1.0.3
logging@1.0.7
matb33:collection-hooks@0.7.13
meteor@1.1.6
meteor-platform@1.2.2
meteorhacks:kadira@2.21.0
meteorhacks:meteorx@1.3.1
meteorhacks:subs-manager@1.3.0
minifiers@1.1.5
minimongo@1.0.8
mobile-status-bar@1.0.3
momentjs:moment@2.10.3
mongo@1.1.0
mongo-livedata@1.0.8
npm-bcrypt@0.7.8_2
oauth@1.1.4
oauth2@1.1.3
observe-sequence@1.0.6
ordered-dict@1.0.3
percolate:migrations@0.7.5
random@1.0.3
reactive-dict@1.1.0
reactive-var@1.0.5
reload@1.1.3
retry@1.0.3
reywood:iron-router-ga@0.6.0
routepolicy@1.0.5
service-configuration@1.0.4
session@1.1.0
sha@1.0.3
softwarerero:accounts-t9n@1.0.9
spacebars@1.0.6
spacebars-compiler@1.0.6
ejson@1.1.0
email@1.2.3
es5-shim@4.6.15
geojson-utils@1.0.10
google-config-ui@1.0.0
google-oauth@1.2.5
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.3.0
id-map@1.0.9
iron:controller@1.0.12
iron:core@1.0.11
iron:dynamic-template@1.0.12
iron:layout@1.0.12
iron:location@1.0.11
iron:middleware-stack@1.1.0
iron:router@1.1.2
iron:url@1.1.0
jquery@1.11.10
lai:collection-extensions@0.2.1_1
launch-screen@1.1.1
less@2.7.12
livedata@1.0.18
localstorage@1.2.0
logging@1.1.19
matb33:collection-hooks@0.8.4
mdg:validation-error@0.5.1
meteor@1.8.2
meteor-base@1.2.0
meteorhacks:subs-manager@1.6.4
minifier-css@1.2.16
minifier-js@2.2.2
minimongo@1.4.3
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modules@0.11.3
modules-runtime@0.9.2
momentjs:moment@2.20.1
mongo@1.3.1
mongo-dev-server@1.1.0
mongo-id@1.0.6
nikogosovd:multiple-uihooks@0.1.8
npm-bcrypt@0.9.3
npm-mongo@2.2.34
oauth@1.2.1
oauth2@1.2.0
observe-sequence@1.0.16
ongoworks:speakingurl@9.0.0
ordered-dict@1.0.9
percolate:migrations@0.9.8
percolate:synced-cron@1.3.2
promise@0.10.1
raix:eventemitter@0.1.3
random@1.0.10
rate-limit@1.0.8
reactive-dict@1.2.0
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
reywood:iron-router-ga@0.7.1
routepolicy@1.0.12
seba:minifiers-autoprefixer@1.0.1
service-configuration@1.0.11
session@1.1.7
sha@1.0.9
shell-server@0.3.1
softwarerero:accounts-t9n@1.3.11
spacebars@1.0.15
spacebars-compiler@1.1.3
splendido:accounts-emails-field@1.2.0
splendido:accounts-meld@1.3.0
srp@1.0.3
templating@1.1.1
tracker@1.0.7
ui@1.0.6
underscore@1.0.3
url@1.0.4
useraccounts:core@1.9.1
useraccounts:polymer@1.9.1
webapp@1.2.0
webapp-hashing@1.0.3
wolves:bourbon@1.0.0
zimme:collection-behaviours@1.0.4
zimme:collection-softremovable@1.0.4
splendido:accounts-meld@1.3.1
srp@1.0.10
standard-minifier-js@2.2.3
templates:array@1.0.3
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
tracker@1.1.3
ui@1.0.13
underscore@1.0.10
url@1.1.0
useraccounts:core@1.14.2
useraccounts:iron-routing@1.14.2
useraccounts:polymer@1.14.2
webapp@1.4.0
webapp-hashing@1.0.9
wizonesolutions:canonical@0.0.5
zimme:collection-behaviours@1.1.3
zimme:collection-softremovable@1.0.5

View File

@@ -1,8 +1,42 @@
Parties = new Mongo.Collection("parties");
Schemas.Party = new SimpleSchema({
//each character/monster can only be in one party at a time
//each party can only be in a single instance at a time
name: {
type: String,
defaultValue: "New Party",
trim: false,
optional: true,
},
characters: {
type: [String],
regEx: SimpleSchema.RegEx.Id,
index: 1,
defaultValue: [],
},
owner: {
type: String,
regEx: SimpleSchema.RegEx.Id,
},
});
Parties.attachSchema(Schemas.Party);
Parties.allow({
insert: function(userId, doc) {
return userId && doc.owner === userId;
},
update: function(userId, doc, fields, modifier) {
return userId && doc.owner === userId;
},
remove: function(userId, doc) {
return userId && doc.owner === userId;
},
fetch: ["owner"],
});
Parties.deny({
update: function(userId, docs, fields, modifier) {
// can't change owners
return _.contains(fields, "owner");
}
});

View File

@@ -7,13 +7,16 @@ Schemas.Action = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
optional: true,
trim: false,
},
description: {
type: String,
optional: true,
trim: false,
},
type: {

View File

@@ -7,10 +7,12 @@ Schemas.Attack = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
defaultValue: "New Attack",
optional: true,
trim: false,
},
details: {
@@ -69,5 +71,17 @@ Attacks.attachSchema(Schemas.Attack);
Attacks.attachBehaviour("softRemovable");
makeChild(Attacks, ["name", "enabled"]); //children of lots of things
Attacks.after.insert(function (userId, attack) {
//Check to see if this attack's parent is a spell, if so, mirror prepared state to enabled
if (attack.parent.collection === "Spells") {
var parentSpell = Spells.findOne(attack.parent.id);
if (parentSpell.prepared === "unprepared") {
Attacks.update(attack._id, {$set: {enabled: false}});
} else if (parentSpell.prepared === "prepared" || "always") {
Attacks.update(attack._id, {$set: {enabled: true}});
}
}
});
Attacks.allow(CHARACTER_SUBSCHEMA_ALLOW);
Attacks.deny(CHARACTER_SUBSCHEMA_DENY);

View File

@@ -4,9 +4,11 @@ Schemas.Buff = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
optional: true,
trim: false,
},
description: {
@@ -21,7 +23,7 @@ Schemas.Buff = new SimpleSchema({
type: {
type: String,
allowedValues: [
"inate",
"inate", //this should be "innate", but changing it could be problematic
"custom",
],
},
@@ -40,12 +42,26 @@ Schemas.Buff = new SimpleSchema({
allowedValues: _.pluck(colorOptions, "key"),
defaultValue: "q",
},
appliedBy: { //the charId of whoever applied the buff
type: String,
regEx: SimpleSchema.RegEx.Id,
},
appliedByDetails: {//the name and collection of the thing that applied the buff
type: Object,
optional: true,
},
"appliedByDetails.name": {
type: String,
},
"appliedByDetails.collection": {
type: String,
},
});
Buffs.attachSchema(Schemas.Buff);
Buffs.attachBehaviour("softRemovable");
makeParent(Buffs, ["name", "enabled"]); //parents of effects
makeParent(Buffs, ["name", "enabled"]); //parents of effects, attacks, proficiencies
Buffs.allow(CHARACTER_SUBSCHEMA_ALLOW);
Buffs.deny(CHARACTER_SUBSCHEMA_DENY);

View File

@@ -4,6 +4,7 @@ Characters = new Mongo.Collection("characters");
Schemas.Character = new SimpleSchema({
//strings
name: {type: String, defaultValue: "", trim: false, optional: true},
urlName: {type: String, defaultValue: "-", trim: false, optional: true},
alignment: {type: String, defaultValue: "", trim: false, optional: true},
gender: {type: String, defaultValue: "", trim: false, optional: true},
race: {type: String, defaultValue: "", trim: false, optional: true},
@@ -26,6 +27,7 @@ Schemas.Character = new SimpleSchema({
//stats
hitPoints: {type: Schemas.Attribute},
tempHP: {type: Schemas.Attribute},
experience: {type: Schemas.Attribute},
proficiencyBonus: {type: Schemas.Attribute},
speed: {type: Schemas.Attribute},
@@ -33,6 +35,7 @@ Schemas.Character = new SimpleSchema({
age: {type: Schemas.Attribute},
ageRate: {type: Schemas.Attribute},
armor: {type: Schemas.Attribute},
carryMultiplier: {type: Schemas.Attribute},
//resources
level1SpellSlots: {type: Schemas.Attribute},
@@ -161,9 +164,9 @@ Schemas.Character = new SimpleSchema({
//permissions
party: {type: String, regEx: SimpleSchema.RegEx.Id, optional: true},
owner: {type: String, regEx: SimpleSchema.RegEx.Id},
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
owner: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: [], index: 1},
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: [], index: 1},
color: {
type: String,
allowedValues: _.pluck(colorOptions, "key"),
@@ -182,7 +185,13 @@ Schemas.Character = new SimpleSchema({
type: String,
defaultValue: "whitelist",
allowedValues: ["whitelist", "public"],
index: 1,
},
"settings.swapStatAndModifier": {type: Boolean, defaultValue: false},
"settings.exportFeatures": {type: Boolean, defaultValue: true},
"settings.exportAttacks": {type: Boolean, defaultValue: true},
"settings.exportDescription": {type: Boolean, defaultValue: true},
"settings.newUserExperience": {type: Boolean, optional: true},
});
Characters.attachSchema(Schemas.Character);
@@ -253,7 +262,10 @@ var attributeBase = preventLoop(function(charId, statName){
var result = (base + add) * mul;
if (result < min) result = min;
if (result > max) result = max;
// Don't round carry multiplier
if (statName === "carryMultiplier"){
return result;
}
return Math.floor(result);
});
@@ -273,6 +285,7 @@ if (Meteor.isClient) {
//create a local memoize with a argument concatenating hash function
var memoize = function(f) {
if (Meteor.isServer) return f;
return Tracker.memoize(f, function() {
return _.reduce(arguments, function(memo, arg) {
return memo + arg;
@@ -286,6 +299,7 @@ Characters.calculate = {
var fieldSelector = {};
fieldSelector[fieldName] = 1;
var char = Characters.findOne(charId, {fields: fieldSelector});
if (!char) return;
var field = char[fieldName];
if (field === undefined){
throw new Meteor.Error(
@@ -319,6 +333,7 @@ Characters.calculate = {
},
attributeValue: memoize(function(charId, attributeName){
var attribute = Characters.calculate.getField(charId, attributeName);
if (!attribute) return;
//base value
var value = Characters.calculate.attributeBase(charId, attributeName);
//plus adjustment
@@ -330,6 +345,7 @@ Characters.calculate = {
}),
skillMod: memoize(preventLoop(function(charId, skillName){
var skill = Characters.calculate.getField(charId, skillName);
if (!skill) return;
//get the final value of the ability score
var ability = Characters.calculate.attributeValue(charId, skill.ability);
@@ -381,7 +397,6 @@ Characters.calculate = {
return prof && prof.value || 0;
}),
passiveSkill: memoize(function(charId, skillName){
var skill = Characters.calculate.getField(charId, skillName);
var mod = +Characters.calculate.skillMod(charId, skillName);
var value = 10 + mod;
Effects.find(
@@ -442,13 +457,13 @@ Characters.calculate = {
}),
};
var depreciated = function() {
//var err = new Error("this function has been depreciated");
var deprecated = function() {
//var err = new Error("this function has been deprecated");
var name = "";
if (Template.instance()){
name = Template.instance().view.name;
}
var logString = "this function has been depreciated \n";
var logString = "this function has been deprecated \n";
if (name){
logString += "View: " + name + "\n\n";
}
@@ -463,56 +478,56 @@ Characters.helpers({
//returns the value stored in the field requested
//will set up dependencies on just that field
getField : function(fieldName){
depreciated();
deprecated();
return Characters.calculate.getField(this._id, fieldName);
},
//returns the value of a field
fieldValue : function(fieldName){
depreciated();
deprecated();
return Characters.calculate.fieldValue(this._id, fieldName);
},
attributeValue: function(attributeName){
depreciated();
deprecated();
return Characters.calculate.attributeValue(this._id, attributeName);
},
attributeBase: function(attributeName){
depreciated();
deprecated();
return Characters.calculate.attributeBase(this._id, attributeName);
},
skillMod: function(skillName){
depreciated();
deprecated();
return Characters.calculate.skillMod(this._id, skillName);
},
proficiency: function(skillName){
depreciated();
deprecated();
return Characters.calculate.proficiency(this._id, skillName);
},
passiveSkill: function(skillName){
depreciated();
deprecated();
return Characters.calculate.passiveSkill(this._id, skillName);
},
advantage: function(skillName){
depreciated();
deprecated();
return Characters.calculate.advantage(this._id, skillName);
},
abilityMod: function(attribute){
depreciated();
deprecated();
return Characters.calculate.abilityMod(this._id, attribute);
},
passiveAbility: function(attribute){
depreciated();
deprecated();
return Characters.calculate.passiveAbility(this._id, attribute);
},
xpLevel: function(){
depreciated();
deprecated();
return Characters.calculate.xpLevel(this._id);
},
level: function(){
depreciated();
deprecated();
return Characters.calculate.level(this._id);
},
experience: function(){
depreciated();
deprecated();
return Characters.calculate.experience(this._id);
},
});
@@ -524,6 +539,7 @@ if (Meteor.isServer){
Attacks .remove({charId: character._id});
Buffs .remove({charId: character._id});
Classes .remove({charId: character._id});
CustomBuffs .remove({charId: character._id});
Effects .remove({charId: character._id});
Experiences .remove({charId: character._id});
Features .remove({charId: character._id});
@@ -533,6 +549,19 @@ if (Meteor.isServer){
Items .remove({charId: character._id});
Containers .remove({charId: character._id});
});
Characters.after.update(function(userId, doc, fieldNames, modifier, options) {
if (_.contains(fieldNames, "name")){
var urlName = getSlug(doc.name, {maintainCase: true}) || "-";
Characters.update(doc._id, {$set: {urlName}});
}
});
Characters.before.insert(function(userId, doc) {
doc.urlName = getSlug(doc.name, {maintainCase: true}) || "-";
// The first character a user creates should have the new user experience
if (!Characters.find({owner: userId}).count()){
doc.settings.newUserExperience = true;
}
});
}
Characters.allow({

View File

@@ -1,8 +1,8 @@
Classes = new Mongo.Collection("classes");
Schemas.Class = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true, trim: false},
level: {type: Number},
createdAt: {
type: Date,

View File

@@ -0,0 +1,42 @@
Conditions = new Mongo.Collection("conditions");
Schemas.Conditions = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
optional: true,
trim: false,
},
description: {
type: String,
optional: true,
trim: false,
},
"lifeTime.total": {
type: Number,
defaultValue: 0, //0 is infinite
min: 0,
},
"lifeTime.spent": {
type: Number,
defaultValue: 0,
min: 0,
},
color: {
type: String,
allowedValues: _.pluck(colorOptions, "key"),
defaultValue: "q",
},
});
Conditions.attachSchema(Schemas.Conditions);
Conditions.attachBehaviour("softRemovable");
makeParent(Conditions, ["name"]); //parents of effects, attacks, proficiencies
Conditions.allow(CHARACTER_SUBSCHEMA_ALLOW);
Conditions.deny(CHARACTER_SUBSCHEMA_DENY);

View File

@@ -0,0 +1,53 @@
CustomBuffs = new Mongo.Collection("customBuffs");
Schemas.CustomBuff = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
optional: true,
trim: false,
},
description: {
type: String,
optional: true,
trim: false,
},
target: {
type: String,
allowedValues: [
"self",
"others",
"both"
],
defaultValue: "self",
},
enabled: {
type: Boolean,
autoValue: function(){
return false;
//enabled is ALWAYS false on these, so that its children are also not enabled, so that the buff templates have no effects.
},
},
"lifeTime.total": {
type: Number,
defaultValue: 0, //0 is infinite
min: 0,
},
//the id of the feature, buff or item that creates this buff
parent: {
type: Schemas.Parent,
},
});
CustomBuffs.attachSchema(Schemas.CustomBuff);
CustomBuffs.attachBehaviour("softRemovable");
makeParent(CustomBuffs, ["name", "enabled"]); //parents of effects, attacks, proficiencies. Since this represents a template, "enabled" is always false.
makeChild(CustomBuffs); //children of lots of things
CustomBuffs.allow(CHARACTER_SUBSCHEMA_ALLOW);
CustomBuffs.deny(CHARACTER_SUBSCHEMA_DENY);

View File

@@ -8,6 +8,7 @@ Schemas.Effect = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
@@ -58,59 +59,74 @@ Schemas.Effect = new SimpleSchema({
Effects.attachSchema(Schemas.Effect);
if (Meteor.isServer) Characters.after.insert(function(userId, char) {
Effects.insert({
charId: char._id,
name: "Constitution modifier for each level",
stat: "hitPoints",
operation: "add",
calculation: "level * constitutionMod",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Proficiency bonus by level",
stat: "proficiencyBonus",
operation: "add",
calculation: "floor(level / 4 + 1.75)",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Dexterity Armor Bonus",
stat: "armor",
operation: "add",
calculation: "dexterityArmor",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Armor",
stat: "armor",
operation: "base",
value: 10,
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
});
Effects.attachBehaviour("softRemovable");
makeChild(Effects, ["enabled"]); //children of lots of things
Effects.allow(CHARACTER_SUBSCHEMA_ALLOW);
Effects.deny(CHARACTER_SUBSCHEMA_DENY);
//give characters default character effects
Characters.after.insert(function(userId, char) {
if (Meteor.isServer) {
Effects.insert({
charId: char._id,
name: "Constitution modifier for each level",
stat: "hitPoints",
operation: "add",
calculation: "level * constitutionMod",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Proficiency bonus by level",
stat: "proficiencyBonus",
operation: "add",
calculation: "floor(level / 4 + 1.75)",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Dexterity Armor Bonus",
stat: "armor",
operation: "add",
calculation: "dexterityArmor",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Armor",
stat: "armor",
operation: "base",
value: 10,
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
Effects.insert({
charId: char._id,
name: "Natural Carrying Capacity",
stat: "carryMultiplier",
operation: "base",
value: "1",
parent: {
id: char._id,
collection: "Characters",
group: "Inate",
},
});
}
});

View File

@@ -1,8 +1,8 @@
Experiences = new Mongo.Collection("experience");
Schemas.Experience = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, defaultValue: "New Experience", trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true, trim: false, defaultValue: "New Experience"},
description: {type: String, optional: true, trim: false},
value: {type: Number, defaultValue: 0},
dateAdded: {

View File

@@ -1,8 +1,8 @@
Features = new Mongo.Collection("features");
Schemas.Feature = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true, trim: false},
description: {type: String, optional: true, trim: false},
uses: {type: String, optional: true, trim: false},
used: {type: Number, defaultValue: 0},
@@ -35,3 +35,81 @@ makeParent(Features, ["name", "enabled"]); //parents of effects and attacks
Features.allow(CHARACTER_SUBSCHEMA_ALLOW);
Features.deny(CHARACTER_SUBSCHEMA_DENY);
//give characters default feature of base ability scores of 10
Characters.after.insert(function(userId, char) {
if (Meteor.isServer){
var featureId = Features.insert({
name: "Base Ability Scores",
charId: char._id,
enabled: true,
alwaysEnabled: true,
});
Effects.insert({
stat: "strength",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "dexterity",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "constitution",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "intelligence",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "wisdom",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
Effects.insert({
stat: "charisma",
charId: char._id,
parent: {
id: featureId,
collection: "Features",
},
operation: "base",
value: 10,
enabled: true,
});
}
});

View File

@@ -1,8 +1,8 @@
Notes = new Mongo.Collection("notes");
Schemas.Note = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true, trim: false},
description: {type: String, optional: true, trim: false},
color: {
type: String,

View File

@@ -4,6 +4,7 @@ Schemas.Proficiency = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1,
},
name: {
type: String,
@@ -30,7 +31,7 @@ Schemas.Proficiency = new SimpleSchema({
Proficiencies.attachSchema(Schemas.Proficiency);
Proficiencies.attachBehaviour("softRemovable");
makeChild(Proficiencies);
makeChild(Proficiencies, ["enabled"]);
Proficiencies.allow(CHARACTER_SUBSCHEMA_ALLOW);
Proficiencies.deny(CHARACTER_SUBSCHEMA_DENY);

View File

@@ -1,8 +1,8 @@
SpellLists = new Mongo.Collection("spellLists");
Schemas.SpellLists = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true, trim: false},
description: {type: String, optional: true, trim: false},
saveDC: {type: String, optional: true, trim: false},
attackBonus: {type: String, optional: true, trim: false},

View File

@@ -1,7 +1,7 @@
Spells = new Mongo.Collection("spells");
Schemas.Spell = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
prepared: {
type: String,
defaultValue: "prepared",
@@ -9,6 +9,7 @@ Schemas.Spell = new SimpleSchema({
},
name: {
type: String,
optional: true,
trim: false,
defaultValue: "New Spell",
},
@@ -64,5 +65,188 @@ Spells.attachBehaviour("softRemovable");
makeChild(Spells); //children of spell lists
makeParent(Spells, ["name", "enabled"]); //parents of attacks
Spells.after.update(function (userId, spell, fieldNames) {
//Update prepared state of spell and child attacks to be enabled or not
if (_.contains(fieldNames, "prepared")) {
var childAttacks = Attacks.find({"parent.id": spell._id}).fetch();
if (spell.prepared === "unprepared") {
_.each(childAttacks, function(attack){
Attacks.update(attack._id, {$set: {enabled: false}});
});
} else if (spell.prepared === "prepared" || "always") {
_.each(childAttacks, function(attack){
Attacks.update(attack._id, {$set: {enabled: true}});
});
}
}
});
Spells.allow(CHARACTER_SUBSCHEMA_ALLOW);
Spells.deny(CHARACTER_SUBSCHEMA_DENY);
var checkMovePermission = function(spellId, parent, destinationOnly) {
var spell = Spells.findOne(spellId);
if (!spell)
throw new Meteor.Error("No such spell",
"An spell could not be found to move");
//handle permissions
var permission;
if (!destinationOnly) { //if we're not modifying the origin, only the destination
permission = Meteor.call("canWriteCharacter", spell.charId);
if (!permission){
throw new Meteor.Error("Access denied",
"Not permitted to move spells from this character");
}
}
if (parent.collection === "Characters"){
permission = Meteor.call("canWriteCharacter", parent.id);
if (!permission){
throw new Meteor.Error("Access denied",
"Not permitted to move spells to this character");
}
} else {
var parentCollectionObject = global[parent.collection];
var parentObject = null;
if (parentCollectionObject)
parentObject = parentCollectionObject.findOne(
parent.id, {fields: {_id: 1, charId: 1}}
);
if (!parentObject) throw new Meteor.Error(
"Invalid parent",
"The destination parent " + parent.id +
" does not exist in the collection " + parent.collection
);
if (parentObject.charId){
permission = Meteor.call("canWriteCharacter", parentObject.charId);
if (!permission){
throw new Meteor.Error("Access denied",
"Not permitted to move spells to this character");
}
}
}
};
var moveSpell = function(spellId, targetCollection, targetId) {
var spell = Spells.findOne(spellId);
if (!spell) return;
targetCollection = targetCollection || spell.parent.collection;
targetId = targetId || spell.parent.id;
if (Meteor.isServer) {
checkMovePermission(spellId, {collection: targetCollection, id: targetId}, false);
}
if (targetCollection == "Characters") { //then we are copying the spell to a different character.
targetList = SpellLists.findOne({"charId": targetId});
targetListId = targetList && targetList._id;
if (!targetListId) {
targetListId = SpellLists.insert({ //create a spell list if we don't already have one
name: "New SpellList",
charId: targetId,
saveDC: "8 + intelligenceMod + proficiencyBonus",
attackBonus: "intelligenceMod + proficiencyBonus",
});
}
Spells.update(
spellId,
{$set: {
charId: targetId,
"parent.collection": "SpellLists",
"parent.id": targetListId,
}}
);
}
else { //we are moving the spell within the same character
//update the spell provided the update will actually change something
if (
spell.parent.collection !== targetCollection ||
spell.parent.id !== targetId
){
Spells.update(
spellId,
{$set: {
"parent.collection": targetCollection,
"parent.id": targetId,
}}
);
}
}
};
var copySpell = function(spellId, targetCollection, targetId) {
var spell = Spells.findOne(spellId);
if (!spell) return;
targetCollection = targetCollection || spell.parent.collection;
targetId = targetId || spell.parent.id;
if (Meteor.isServer) {
checkMovePermission(spellId, {collection: targetCollection, id: targetId}, true); //we're only reading from the source character
}
if (targetCollection == "Characters") { //then we are copying the spell to a different character.
targetList = SpellLists.findOne({"charId": targetId});
targetListId = targetList && targetList._id;
if (!targetListId) {
targetListId = SpellLists.insert({ //create a spell list if we don't already have one
name: "New SpellList",
charId: targetId,
saveDC: "8 + intelligenceMod + proficiencyBonus",
attackBonus: "intelligenceMod + proficiencyBonus",
});
}
newSpell = _.clone(spell);
delete newSpell._id;
newSpellId = Spells.insert(newSpell); //add a new copy of the spell
Spells.update(
newSpellId,
{$set: {
charId: targetId,
"parent.collection": "SpellLists",
"parent.id": targetListId,
}}
);
}
else { //else we are copying the spell within the same character
newSpell = _.clone(spell);
delete newSpell._id;
newSpellId = Spells.insert(newSpell); //add a new copy of the spell
Spells.update(
newSpellId,
{$set: {
"parent.collection": targetCollection,
"parent.id": targetId,
}}
);
}
};
Meteor.methods({
moveSpellToList: function(spellId, spellListId) {
check(spellId, String);
check(spellListId, String);
moveSpell(spellId, "SpellLists", spellListId);
},
copySpellToList: function(spellId, spellListId) {
check(spellId, String);
check(spellListId, String);
copySpell(spellId, "SpellLists", spellListId);
},
moveSpellToCharacter: function(spellId, charId) {
check(spellId, String);
check(charId, String);
moveSpell(spellId, "Characters", charId);
},
copySpellToCharacter: function(spellId, charId) {
check(spellId, String);
check(charId, String);
copySpell(spellId, "Characters", charId);
},
});

View File

@@ -1,10 +1,10 @@
TemporaryHitPoints = new Mongo.Collection("temporaryHitPoints");
Schemas.TemporaryHitPoints = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
name: {type: String, optional: true},
maximum: {type: Number, defaultValue: 0},
used: {type: Number, defaultValue: 0},
maximum: {type: Number, defaultValue: 0, min: 0, max: 500},
used: {type: Number, defaultValue: 0, min: 0, max: 500},
deleteOnZero:{type: Boolean, defaultValue: false},
dateAdded: {
type: Date,

View File

@@ -2,8 +2,8 @@
Containers = new Mongo.Collection("containers");
Schemas.Container = new SimpleSchema({
name: {type: String, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, optional: true, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
isCarried: {type: Boolean},
weight: {type: Number, min: 0, defaultValue: 0, decimal: true},
value: {type: Number, min: 0, defaultValue: 0, decimal: true},

View File

@@ -1,10 +1,10 @@
Items = new Mongo.Collection("items");
Schemas.Item = new SimpleSchema({
name: {type: String, defaultValue: "New Item", trim: false},
name: {type: String, optional: true, trim: false, defaultValue: "New Item"},
plural: {type: String, optional: true, trim: false},
description:{type: String, optional: true, trim: false},
charId: {type: String, regEx: SimpleSchema.RegEx.Id}, //id of owner
charId: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1}, //id of owner
quantity: {type: Number, min: 0, defaultValue: 1},
weight: {type: Number, min: 0, defaultValue: 0, decimal: true},
value: {type: Number, min: 0, defaultValue: 0, decimal: true},
@@ -24,18 +24,18 @@ var checkMovePermission = function(itemId, parent) {
var item = Items.findOne(itemId);
if (!item)
throw new Meteor.Error("No such item",
"An item could not be found to move");
"An item could not be found to move");
//handle permissions
var permission = Meteor.call("canWriteCharacter", item.charId);
if (!permission){
throw new Meteor.Error("Access denied",
"Not permitted to move items from this character");
"Not permitted to move items from this character");
}
if (parent.collection === "Characters"){
permission = Meteor.call("canWriteCharacter", parent.id);
if (!permission){
throw new Meteor.Error("Access denied",
"Not permitted to move items to this character");
"Not permitted to move items to this character");
}
} else {
var parentCollectionObject = global[parent.collection];
@@ -53,7 +53,7 @@ var checkMovePermission = function(itemId, parent) {
permission = Meteor.call("canWriteCharacter", parentObject.charId);
if (!permission){
throw new Meteor.Error("Access denied",
"Not permitted to move items to this character");
"Not permitted to move items to this character");
}
}
}
@@ -228,6 +228,9 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
Items.insert({
name: "Silver piece",
@@ -241,6 +244,9 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
Items.insert({
name: "Copper piece",
@@ -254,6 +260,9 @@ Characters.after.insert(function(userId, char) {
id: containerId,
collection: "Containers",
},
settings: {
showIncrement: true,
},
});
}
});

View File

@@ -0,0 +1,47 @@
Libraries = new Mongo.Collection("library");
Schemas.Library = new SimpleSchema({
name: {type: String},
owner: {type: String, regEx: SimpleSchema.RegEx.Id},
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
public: {type: Boolean, defaultValue: false},
});
Libraries.attachSchema(Schemas.Library);
Libraries.allow({
insert(userId, doc) {
return userId && doc.owner === userId;
},
update(userId, doc, fields, modifier) {
return canEdit(userId, doc);
},
remove(userId, doc) {
return canEdit(userId, doc);
},
fetch: ["owner", "writers"],
});
Libraries.deny({
// For now, only admins can manage libraries
insert(userId, doc){
var user = Meteor.users.findOne(userId);
return !user || !_.contains(user.roles, "admin");
},
update(userId, doc, fields, modifier) {
// Can't change owners
return _.contains(fields, "owner")
},
fetch: [],
});
const canEdit = function(userId, library){
if (!userId || !library) return;
return library.owner === userId || _.contains(library.writers, userId);
};
Libraries.canEdit = function(userId, libraryId){
const library = Libraries.findOne(libraryId);
return canEdit(userId, library);
};

View File

@@ -0,0 +1,41 @@
Schemas.LibraryAttacks = new SimpleSchema({
name: {
type: String,
defaultValue: "New Attack",
trim: false,
},
details: {
type: String,
optional: true,
trim: false,
},
attackBonus: {
type: String,
optional: true,
trim: false,
},
damage: {
type: String,
optional: true,
trim: false,
},
damageType: {
type: String,
allowedValues: [
"bludgeoning",
"piercing",
"slashing",
"acid",
"cold",
"fire",
"force",
"lightning",
"necrotic",
"poison",
"psychic",
"radiant",
"thunder",
],
defaultValue: "slashing",
},
});

View File

@@ -0,0 +1,40 @@
Schemas.LibraryEffects = new SimpleSchema({
name: {
type: String,
optional: true, //TODO make necessary if there is no owner
trim: false,
},
operation: {
type: String,
defaultValue: "add",
allowedValues: [
"base",
"proficiency",
"add",
"mul",
"min",
"max",
"advantage",
"disadvantage",
"passiveAdd",
"fail",
"conditional",
],
},
// Effects either have a value OR a calculation
value: {
type: Number,
decimal: true,
optional: true,
},
calculation: {
type: String,
optional: true,
trim: false,
},
//which stat the effect is applied to
stat: {
type: String,
optional: true,
},
});

View File

@@ -0,0 +1,44 @@
LibraryItems = new Mongo.Collection("libraryItems");
Schemas.LibraryItems = new SimpleSchema({
libraryName:{type: String, optional: true, trim: false},
name: {type: String, defaultValue: "New Item", trim: false},
plural: {type: String, optional: true, trim: false},
description:{type: String, optional: true, trim: false},
quantity: {type: Number, min: 0, defaultValue: 1},
weight: {type: Number, min: 0, defaultValue: 0, decimal: true},
value: {type: Number, min: 0, defaultValue: 0, decimal: true},
requiresAttunement: {type: Boolean, defaultValue: false},
library: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
"settings.category": {
type: String,
optional: true,
allowedValues: [
"adventuringGear", "armor", "weapons", "tools",
],
},
"settings.showIncrement": {
type: Boolean,
defaultValue: false,
},
effects: {type: [Schemas.LibraryEffects], defaultValue: []},
attacks: {type: [Schemas.LibraryAttacks], defaultValue: []},
});
LibraryItems.attachSchema(Schemas.LibraryItems);
LibraryItems.allow({
insert(userId, doc) {
return Libraries.canEdit(userId, doc.library);
},
update(userId, doc, fields, modifier) {
return Libraries.canEdit(userId, doc.library);
},
remove(userId, doc) {
return Libraries.canEdit(userId, doc.library);
},
fetch: ["library"],
});

View File

@@ -0,0 +1,66 @@
LibrarySpells = new Mongo.Collection("librarySpells");
Schemas.LibrarySpells = new SimpleSchema({
name: {
type: String,
trim: false,
defaultValue: "New Spell",
},
description: {
type: String,
optional: true,
trim: false,
},
castingTime: {
type: String,
optional: true,
defaultValue: "action",
trim: false,
},
range: {
type: String,
optional: true,
trim: false,
},
duration: {
type: String,
optional: true,
trim: false,
defaultValue: "Instantaneous",
},
"components.verbal": {type: Boolean, defaultValue: false},
"components.somatic": {type: Boolean, defaultValue: false},
"components.concentration": {type: Boolean, defaultValue: false},
"components.material": {type: String, optional: true},
ritual: {
type: Boolean,
defaultValue: false,
},
level: {
type: Number,
defaultValue: 1,
},
school: {
type: String,
defaultValue: "Abjuration",
allowedValues: magicSchools,
},
library: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
effects: {type: [Schemas.LibraryEffects], defaultValue: []},
attacks: {type: [Schemas.LibraryAttacks], defaultValue: []},
});
LibrarySpells.attachSchema(Schemas.LibrarySpells);
LibrarySpells.allow({
insert(userId, doc) {
return Libraries.canEdit(userId, doc.library);
},
update(userId, doc, fields, modifier) {
return Libraries.canEdit(userId, doc.library);
},
remove(userId, doc) {
return Libraries.canEdit(userId, doc.library);
},
fetch: ["library"],
});

View File

@@ -17,8 +17,8 @@ Schemas.Report = new SimpleSchema({
},
type: {
type: String,
allowedValues: ["bug", "change", "feature", "general"],
defaultValue: "bug",
allowedValues: ["General Feedback", "Bug", "Suggested Change", "Feature Request"],
defaultValue: "General Feedback",
},
//the immediate impact of doing this action (eg. -1 rages)
severity: {

View File

@@ -1,3 +1,75 @@
Schemas.UserProfile = new SimpleSchema({
username: {
type: String,
optional: true,
},
});
Schemas.User = new SimpleSchema({
username: {
type: String,
optional: true,
},
profile: {
type: Schemas.UserProfile,
optional: true,
},
emails: {
type: Array,
optional: true,
},
"emails.$": {
type: Object,
},
"emails.$.address": {
type: String,
regEx: SimpleSchema.RegEx.Email,
},
"emails.$.verified": {
type: Boolean,
},
registered_emails: {
type: Array,
optional: true,
},
"registered_emails.$": {
type: Object,
blackbox: true,
},
createdAt: {
type: Date
},
services: {
type: Object,
optional: true,
blackbox: true,
},
roles: {
type: Object,
optional: true,
blackbox: true,
},
roles: {
type: Array,
optional: true,
},
"roles.$": {
type: String
},
// In order to avoid an 'Exception in setInterval callback' from Meteor
heartbeat: {
type: Date,
optional: true,
},
apiKey: {
type: String,
index: 1,
optional: true,
},
});
Meteor.users.attachSchema(Schemas.User);
Meteor.users.allow({
update: function(userId, doc, fields, modifier) {
if (
@@ -21,3 +93,13 @@ Meteor.users.allow({
}
}
});
if (Meteor.isServer) Meteor.methods({
generateMyApiKey() {
var user = Meteor.users.findOne(this.userId);
if (!user) return;
if (user && user.apiKey) return;
var apiKey = Random.id(30);
Meteor.users.update(this.userId, {$set: {apiKey}});
},
});

53
rpg-docs/Routes/API.js Normal file
View File

@@ -0,0 +1,53 @@
Router.map(function() {
this.route("vmixCharacter", {
path: "/vmix-character/:_id/",
where: "server",
action: function() {
this.response.setHeader("Content-Type", "application/json");
var query = this.params.query;
var key = query && query.key;
ifKeyValid(key, this.response, () =>
this.response.end(vMixCharacter(this.params._id))
);
},
});
this.route("vmixParty", {
path: "/vmix-party/:_id/",
where: "server",
action: function() {
this.response.setHeader("Content-Type", "application/json");
var query = this.params.query;
var key = query && query.key;
ifKeyValid(key, this.response, () =>
this.response.end(vMixParty(this.params._id))
);
},
});
});
var ifKeyValid = function(apiKey, response, callback){
if (!apiKey){
response.writeHead(403, "You must use an api key to access this api");
response.end();
} else if (!isKeyValid(apiKey)){
response.writeHead(403, "API key is invalid");
response.end();
} else if (isRateLimited(apiKey)){
response.writeHead(429, "Too many requests");
response.end();
} else {
rateLimiter.increment({apiKey})
callback();
}
};
var isKeyValid = function(apiKey){
return !!Meteor.users.findOne({apiKey});
};
var rateLimiter = new RateLimiter();
rateLimiter.addRule({apiKey: String}, 2, 10000);
var isRateLimited = function(apiKey){
return !rateLimiter.check({apiKey}).allowed;
};

View File

@@ -24,23 +24,35 @@ Router.map(function() {
this.route("characterList", {
path: "/characterList",
waitOn: function(){
return subsManager.subscribe("characterList", Meteor.userId());
},
data: {
characters: function(){
return Characters.find({}, {fields: {_id: 1}, sort: {name: 1}});
}
return subsManager.subscribe("characterList");
},
onAfterAction: function() {
document.title = appName;
document.title = appName + " - Characters";
},
fastRender: true,
});
this.route("characterSheetNaked", {
path: "/character/:_id/",
waitOn: function(){
return [
subsManager.subscribe("singleCharacter", this.params._id),
];
},
action: function(){
var _id = this.params._id
var character = Characters.findOne(_id);
var urlName = character && character.urlName;
var path = `\/character\/${_id}\/${urlName || "-"}`;
Router.go(path,{},{replaceState:true});
},
});
this.route("characterSheet", {
path: "/character/:_id",
path: "/character/:_id/:urlName",
waitOn: function(){
return [
subsManager.subscribe("singleCharacter", this.params._id, Meteor.userId()),
subsManager.subscribe("singleCharacter", this.params._id),
];
},
data: function() {
@@ -63,6 +75,47 @@ Router.map(function() {
window.ga && window.ga("send", "pageview", "/character");
this.next();
},
fastRender: true,
});
this.route("printedCharacterSheet", {
path: "/character/:_id/:urlName/print",
waitOn: function(){
return [
subsManager.subscribe("singleCharacter", this.params._id),
];
},
data: function() {
var data = Characters.findOne(
{_id: this.params._id},
{fields: {_id: 1, name: 1, color: 1, writers: 1, readers: 1}}
);
return data;
},
onAfterAction: function() {
var char = Characters.findOne({_id: this.params._id}, {fields: {name: 1}});
var name = char && char.name;
if (name){
document.title = name + " - Printing";
}
},
//analytics
trackPageView: false,
onRun: function() {
window.ga && window.ga("send", "pageview", "/print-character");
this.next();
},
});
this.route("library", {
path: "/library",
waitOn: function(){
return subsManager.subscribe("standardLibraries");
},
onAfterAction: function() {
document.title = appName + " - Library";
},
fastRender: true,
});
this.route("loading", {
@@ -91,6 +144,7 @@ Router.map(function() {
onAfterAction: function() {
document.title = appName;
},
fastRender: true,
});
this.route("/guide", {

View File

@@ -2,7 +2,9 @@
"name": "RPG Docs",
"version": "0.0.0",
"homepage": "",
"authors": ["Stefan Zermatten"],
"authors": [
"Stefan Zermatten"
],
"license": "none",
"private": true,
"ignore": [
@@ -13,13 +15,16 @@
"tests"
],
"dependencies": {
"polymer": "Polymer/polymer#~0.5.5",
"core-elements": "Polymer/core-elements#~0.5.5",
"paper-elements": "Polymer/paper-elements#~0.5.5"
"polymer": "Polymer/polymer#^1.0.0",
"iron-elements": "PolymerElements/iron-elements#^1.0.0",
"platinum-elements": "PolymerElements/platinum-elements#^1.0.1",
"neon-elements": "PolymerElements/neon-elements#^1.0.0",
"paper-elements": "PolymerElements/paper-elements#^1.0.7",
"app-elements": "PolymerElements/app-elements#^0.10.1",
"marked-element": "PolymerElements/marked-element#^1.2.0",
"paper-swatch-picker": "PolymerElements/paper-swatch-picker#~1.0.2"
},
"resolutions": {
"core-component-page": "^0.5.0",
"polymer": "^0.5.0",
"webcomponentsjs": "^0.5.0"
"webcomponentsjs": "0.7.24"
}
}
}

View File

@@ -0,0 +1,174 @@
// jscs:disable
// https://github.com/chunksnbits/jquery-quickfit
(function ($) {
var Quickfit, QuickfitHelper, defaults, pluginName;
pluginName = 'quickfit';
defaults = {
min: 8,
max: 12,
tolerance: 0.02,
truncate: false,
width: null,
sampleNumberOfLetters: 10,
sampleFontSize: 12
};
QuickfitHelper = (function () {
var sharedInstance = null;
QuickfitHelper.instance = function (options) {
if (!sharedInstance) {
sharedInstance = new QuickfitHelper(options);
}
return sharedInstance;
};
function QuickfitHelper(options) {
this.options = options;
this.item = $('<span id="meassure"></span>');
this.item.css({
position: 'absolute',
left: '-1000px',
top: '-1000px',
'font-size': "" + this.options.sampleFontSize + "px"
});
$('body').append(this.item);
this.meassures = {};
}
QuickfitHelper.prototype.getMeassure = function (letter) {
var currentMeassure;
currentMeassure = this.meassures[letter];
if (!currentMeassure) {
currentMeassure = this.setMeassure(letter);
}
return currentMeassure;
};
QuickfitHelper.prototype.setMeassure = function (letter) {
var currentMeassure, index, sampleLetter, text, _ref;
text = '';
sampleLetter = letter === ' ' ? '&nbsp;' : letter;
for (index = 0, _ref = this.options.sampleNumberOfLetters - 1; 0 <= _ref ? index <= _ref : index >= _ref; 0 <= _ref ? index++ : index--) {
text += sampleLetter;
}
this.item.html(text);
currentMeassure = this.item.width() / this.options.sampleNumberOfLetters / this.options.sampleFontSize;
this.meassures[letter] = currentMeassure;
return currentMeassure;
};
return QuickfitHelper;
})();
Quickfit = (function () {
function Quickfit(element, options) {
this.$element = element;
this.options = $.extend({}, defaults, options);
this.$element = $(this.$element);
this._defaults = defaults;
this._name = pluginName;
this.quickfitHelper = QuickfitHelper.instance(this.options);
}
Quickfit.prototype.fit = function () {
var elementWidth;
if (!this.options.width) {
elementWidth = this.$element.width();
this.options.width = elementWidth - this.options.tolerance * elementWidth;
}
if (this.text = this.$element.attr('data-quickfit')) {
this.previouslyTruncated = true;
} else {
this.text = this.$element.text();
}
this.calculateFontSize();
if (this.options.truncate) this.truncate();
return {
$element: this.$element,
size: this.fontSize
};
};
Quickfit.prototype.calculateFontSize = function () {
var letter, textWidth, i;
textWidth = 0;
for (i = 0; i < this.text.length; ++i) {
letter = this.text.charAt(i);
textWidth += this.quickfitHelper.getMeassure(letter);
}
this.targetFontSize = parseInt(this.options.width / textWidth);
return this.fontSize = Math.max(this.options.min, Math.min(this.options.max, this.targetFontSize));
};
Quickfit.prototype.truncate = function () {
var index, lastLetter, letter, textToAdd, textWidth;
if (this.fontSize > this.targetFontSize) {
textToAdd = '';
textWidth = 3 * this.quickfitHelper.getMeassure('.') * this.fontSize;
index = 0;
while (textWidth < this.options.width && index < this.text.length) {
letter = this.text[index++];
if (lastLetter) textToAdd += lastLetter;
textWidth += this.fontSize * this.quickfitHelper.getMeassure(letter);
lastLetter = letter;
}
if (textToAdd.length + 1 === this.text.length) {
textToAdd = this.text;
} else {
textToAdd += '...';
}
this.textWasTruncated = true;
return this.$element.attr('data-quickfit', this.text).html(textToAdd);
} else {
if (this.previouslyTruncated) {
return this.$element.html(this.text);
}
}
};
return Quickfit;
})();
return $.fn.quickfit = function (options) {
var measurements = [];
// Separate measurements from repaints
// First calculate all measurements...
var $elements = this.each(function () {
var measurement = new Quickfit(this, options).fit();
measurements.push(measurement);
return measurement.$element;
});
// ... then apply the measurements.
for (var i = 0; i < measurements.length; i++) {
var measurement = measurements[i];
measurement.$element.css({ fontSize: measurement.size + 'px' });
}
return $elements;
};
})(jQuery, window);

View File

@@ -1,14 +1,17 @@
this.GlobalUI = (function() {
function GlobalUI() {}
GlobalUI.dialog = {};
var toast;
GlobalUI.toast = function(opts) {
var toast;
toast = $("[global-toast]")[0];
toast.text = opts.text;
Session.set("global.ui.toastTemplate", opts.template);
Session.set("global.ui.toastData", opts.data);
if (!toast) toast = $("#global-toast")[0];
if (_.isObject(opts)){
toast.text = opts.text;
Session.set("global.ui.toastTemplate", opts.template);
Session.set("global.ui.toastData", opts.data);
} else {
toast.text = opts;
Session.set("global.ui.toastTemplate");
Session.set("global.ui.toastData");
}
return toast.show();
};
@@ -18,147 +21,18 @@ this.GlobalUI = (function() {
template: "undoToast",
data: {
id: id,
collection: collection
}
collection: collection,
},
});
};
GlobalUI.setDialog = function(opts) {
this.dialog = $("[global-dialog]")[0];
Session.set("global.ui.dialogHeader", opts.heading);
Session.set("global.ui.dialogData", opts.data);
Session.set("global.ui.dialogTemplate", opts.template);
Session.set("global.ui.dialogFullOnMobile", opts.fullOnMobile !== null);
};
GlobalUI.showDialog = function(opts) {
this.dialog = $("[global-dialog]")[0];
Session.set("global.ui.dialogHeader", opts.heading);
Session.set("global.ui.dialogData", opts.data);
Session.set("global.ui.dialogTemplate", opts.template);
Session.set("global.ui.dialogFullOnMobile", opts.fullOnMobile !== null);
return Tracker.afterFlush((function(_this) {
return function() {
return _this.dialog.open();
};
})(this));
};
GlobalUI.closeDialog = function() {
return this.dialog.close();
};
//To show a detail, first animate the click, with raising z-depth
//then call this function with a template and data
//the element should have a hero-id of detail-main
GlobalUI.showDetail = function(opts) {
Session.set("global.ui.detailData", opts.data);
Session.set("global.ui.detailTemplate", opts.template);
Session.set("global.ui.detailHeroId", opts.heroId);
Session.set("global.ui.detailShow", true);
};
//if setting the detail rather than showing it,
//the template should contain the following in template.rendered
//
//if (!this.alreadyRendered){
// Session.set("global.ui.detailShow", true);
// this.alreadyRendered = true;
//}
GlobalUI.setDetail = function(opts) {
Session.set("global.ui.detailData", opts.data);
Session.set("global.ui.detailTemplate", opts.template);
Session.set("global.ui.detailHeroId", opts.heroId);
if (window.history && window.history.pushState) {
history.replaceState({detail: "closed", opts: opts}, "Detail Dialog");
history.pushState({detail: "opened", opts: opts}, "Detail Dialog");
}
};
var throttleBack = _.throttle(function() {
history.back();
}, 100, {trailing: false});
GlobalUI.closeDetail = function() {
if (window.history && history.pushState && history.state.detail === "opened") {
throttleBack();
} else {
Session.set("global.ui.detailShow", false);
}
};
GlobalUI.popStateHandler = function(e) {
var state = e.originalEvent.state;
if (state) {
if (state.detail === "closed") {
Session.set("global.ui.detailShow", false);
} else if (state.detail === "opened") {
var opts = state.opts;
Session.set("global.ui.detailData", opts.data);
Session.set("global.ui.detailTemplate", opts.template);
Session.set("global.ui.detailHeroId", opts.heroId);
}
}
};
return GlobalUI;
})();
Template.layout.helpers({
globalDialogTemplate: function() {
return Session.get("global.ui.dialogTemplate");
},
globalDialogData: function() {
return Session.get("global.ui.dialogData");
},
globalDialogFullOnMobile: function() {
return Session.get("global.ui.dialogFullOnMobile");
},
globalDialogHeader: function() {
return Session.get("global.ui.dialogHeader");
},
globalDetailSelected: function() {
return Session.get("global.ui.detailShow") ? 1 : 0;
},
globalDetailTemplate: function() {
return Session.get("global.ui.detailTemplate");
},
globalDetailData: function() {
return Session.get("global.ui.detailData");
},
globalToastTemplate: function() {
return Session.get("global.ui.toastTemplate");
},
globalToastData: function() {
return Session.get("global.ui.toastData");
}
});
Template.layout.events({
"core-overlay-close-completed [global-dialog]": function(e) {
Session.set("global.ui.dialogTemplate", null);
Session.set("global.ui.dialogData", null);
return Session.set("global.ui.dialogFullOnMobile", null);
},
"core-animated-pages-transition-end [detail-pages]": function(e) {
var detailOpened = Session.get("global.ui.detailShow");
if (!detailOpened) {
Session.set("global.ui.detailData", null);
Session.set("global.ui.detailTemplate", null);
Session.set("global.ui.detailHeroId", null);
}
},
"core-animated-pages-transition-prepare": function(e) {
var detailOpened = Session.get("global.ui.detailShow");
if (detailOpened) {
//set up the transition
} else {
//undo hack
$("#mainContentSection").removeClass("fake-selected");
}
},
"tap #screenDim": function(e) {
GlobalUI.closeDetail();
}
},
});

View File

@@ -3,7 +3,8 @@ Template.registerHelper("canEditCharacter", function(charId) {
});
canEditCharacter = function(charId) {
var char = Characters.findOne(charId)
var char = Characters.findOne(charId);
if (!char) return false;
var userId = Meteor.userId();
return char.owner === userId ||
_.contains(char.writers, userId);

View File

@@ -0,0 +1,3 @@
Template.registerHelper("characterPath", function(char) {
return `\/character\/${char._id}\/${char.urlName || "-"}`;
});

View File

@@ -23,3 +23,15 @@ Template.registerHelper("evaluateSignedSpaced", function(charId, string) {
Template.registerHelper("evaluateString", function(charId, string) {
return evaluateString(charId, string);
});
Template.registerHelper("evaluateSpellString", function(charId, spellListId, string) {
return evaluateSpellString(charId, spellListId, string);
});
Template.registerHelper("evaluateShortString", function(charId, string) {
if (_.isString(string)){
return evaluateString(
charId, string.split(/^( *[-*_]){3,} *(?:\n+|$)/m)[0]
);
}
});

View File

@@ -1,32 +1,26 @@
openParentDialog = function(parent, charId, heroId) {
var detail;
openParentDialog = function({
parent, charId, element, returnElement, callback,
}) {
let template;
let data;
if (parent.collection === "Characters" && parent.group === "racial") {
detail = {
template: "raceDialog",
data: {charId: parent.id},
};
template = "raceDialog";
data = {charId: parent.id};
} else if (parent.collection === "Features") {
detail = {
template: "featureDialog",
data: {featureId: parent.id},
};
template = "featureDialog";
data = {featureId: parent.id};
} else if (parent.collection === "Classes") {
detail = {
template: "classDialog",
data: {classId: parent.id},
};
template = "classDialog";
data = {classId: parent.id};
} else if (parent.collection === "Items") {
detail = {
template: "itemDialog",
data: {itemId: parent.id},
};
template = "itemDialog";
data = {itemId: parent.id};
} else if (parent.collection === "Spells") {
detail = {
template: "spellDialog",
data: {spellId: parent.id},
};
template = "spellDialog";
data = {spellId: parent.id};
} else if (parent.collection === "Buffs") {
template = "buffDialog";
data = {buffId: parent.id};
}
detail.heroId = heroId;
detail.charId = charId;
GlobalUI.setDetail(detail);
pushDialogStack({template, data, element, returnElement, callback});
};

View File

@@ -10,13 +10,13 @@ Template.registerHelper("valueString", function(value) {
var resultArray = [];
if (gp > 0) {
resultArray.push(gp + "gp");
resultArray.push(gp + " gp");
}
if (sp > 0) {
resultArray.push(sp + "sp");
resultArray.push(sp + " sp");
}
if (cp > 0) {
resultArray.push(cp + "cp");
resultArray.push(cp + " cp");
}
//build string with correct spacing
@@ -36,18 +36,18 @@ Template.registerHelper("longValueString", function(value) {
//sp
var gp = Math.floor(value);
if (gp > 0) {
resultArray.push(gp + "gp");
resultArray.push(gp + " gp");
}
//sp
var sp = Math.floor(10 * (value % 1));
if (sp > 0 || resultArray.length) {
resultArray.push(sp + "sp");
resultArray.push(sp + " sp");
}
//cp
var cp = 10 * ((value * 10) % 1);
cp = Math.round(cp * 1000) / 1000;
if (cp > 0 || resultArray.length) {
resultArray.push(cp + "cp");
resultArray.push(cp + " cp");
}
//build string with correct spacing

View File

@@ -0,0 +1,24 @@
/**
* Take in a map like this:
* {
* "#someId": {
* proprty1() { return someReactiveValue()}
* }
* }
* and bind the properties to the DOM on autorun.
*
* Useful for polymer components where you need to set the order of property updating
* or alter properties that don't bind well to their attributes
*/
Blaze.Template.prototype.binding = function(bindingMap){
this.onRendered(function(){
_.each(bindingMap, (propertyMap, cssPattern) => {
node = this.find(cssPattern);
_.each(propertyMap, (func, property) => {
this.autorun(() => {
node[property] = func && func.call && func.call(this, node);
});
});
});
});
};

View File

@@ -0,0 +1,195 @@
improvedInitiativeJson = function(charId, options){
options = options || {
features: true,
attacks: true,
description: true,
};
var char = Characters.findOne(charId);
if (!char) return;
var baseValue = function(attributeName){
return Characters.calculate.attributeBase(charId, attributeName);
};
var skillMod = function(skillName){
return Characters.calculate.skillMod(charId, skillName);
};
var damageMods = getDamageMods(charId);
return JSON.stringify({
"Id": char._id,
"Name": char.name,
"Source": "DiceCloud",
"Type": char.race,
"HP": {
"Value": baseValue("hitPoints"),
"Notes": getHitDiceString(charId) || "",
},
"AC": {
"Value": baseValue("armor"),
"Notes": getArmorString(charId) || "",
},
"InitiativeModifier": skillMod("initiative"),
"Speed": ["" + baseValue("speed")],
"Abilities": {
"Str": baseValue("strength"),
"Dex": baseValue("dexterity"),
"Con": baseValue("constitution"),
"Cha": baseValue("charisma"),
"Int": baseValue("intelligence"),
"Wis": baseValue("wisdom"),
},
"DamageVulnerabilities": damageMods.vulnerabilities,
"DamageResistances": damageMods.resistances,
"DamageImmunities": damageMods.immunities,
"ConditionImmunities": [],
"Saves": [
{"Name": "Str", "Modifier": skillMod("strengthSave")},
{"Name": "Dex", "Modifier": skillMod("dexteritySave")},
{"Name": "Con", "Modifier": skillMod("constitutionSave")},
{"Name": "Int", "Modifier": skillMod("intelligenceSave")},
{"Name": "Wis", "Modifier": skillMod("wisdomSave")},
{"Name": "Cha", "Modifier": skillMod("charismaSave")},
],
"Skills": getSkills(charId),
"Senses": [
"passive Perception " +
Characters.calculate.passiveSkill(charId, "perception")
],
"Languages": getLanguages(charId),
"Challenge": "",
"Traits": options.features ? getTraits(charId) : [],
"Actions": options.attacks ? getActions(charId) : [],
"Reactions": [],
"LegendaryActions": [],
"Description": options.description ? char.description : "",
"Player": Meteor.user().username,
}, null, 2);
}
var getHitDiceString = function(charId){
var d6 = Characters.calculate.attributeBase(charId, "d6HitDice");
var d8 = Characters.calculate.attributeBase(charId, "d8HitDice");
var d10 = Characters.calculate.attributeBase(charId, "d10HitDice");
var d12 = Characters.calculate.attributeBase(charId, "d12HitDice");
var con = Characters.calculate.abilityMod(charId,"constitution");
var string = "" +
(d6 ? `${d6}d6 + ` : "") +
(d8 ? `${d8}d8 + ` : "") +
(d10 ? `${d10}d10 + ` : "") +
(d12 ? `${d12}d12 + ` : "") +
con;
}
var getArmorString = function(charId){
var bases = Effects.find({
charId: charId,
stat: "armor",
operation: "base",
enabled: true,
}).map(e => ({
ame: e.name,
value: evaluateEffect(charId, e),
}));
var base = bases.length && _.max(bases, b => b.value).name || "";
var effects = Effects.find({
charId: charId,
stat: "armor",
operation: {$ne: "base"},
enabled: true,
}).map(e => e.name);
var strings = base ? [base] : [];
strings = strings.concat(effects);
return strings.join(", ");
}
var getDamageMods = function(charId){
// jscs:disable maximumLineLength
var multipliers = [
{name: "Acid", value: Characters.calculate.attributeValue(charId, "acidMultiplier")},
{name: "Bludgeoning", value: Characters.calculate.attributeValue(charId, "bludgeoningMultiplier")},
{name: "Cold", value: Characters.calculate.attributeValue(charId, "coldMultiplier")},
{name: "Fire", value: Characters.calculate.attributeValue(charId, "fireMultiplier")},
{name: "Force", value: Characters.calculate.attributeValue(charId, "forceMultiplier")},
{name: "Lightning", value: Characters.calculate.attributeValue(charId, "lightningMultiplier")},
{name: "Necrotic", value: Characters.calculate.attributeValue(charId, "necroticMultiplier")},
{name: "Piercing", value: Characters.calculate.attributeValue(charId, "piercingMultiplier")},
{name: "Poison", value: Characters.calculate.attributeValue(charId, "poisonMultiplier")},
{name: "Psychic", value: Characters.calculate.attributeValue(charId, "psychicMultiplier")},
{name: "Radiant", value: Characters.calculate.attributeValue(charId, "radiantMultiplier")},
{name: "Slashing", value: Characters.calculate.attributeValue(charId, "slashingMultiplier")},
{name: "Thunder", value: Characters.calculate.attributeValue(charId, "thunderMultiplier")},
];
// jscs:enable maximumLineLength
multipliers = _.groupBy(multipliers, "value");
var names = o => o.name;
return {
"immunities": _.map(multipliers["0"], names),
"resistances": _.map(multipliers["0.5"], names),
"vulnerabilities": _.map(multipliers["2"], names),
};
}
var getSkills = function(charId){
var allSkills = [
{name: "acrobatics", attribute: "dexterity"},
{name: "animalHandling", attribute: "wisdom"},
{name: "arcana", attribute: "intelligence"},
{name: "athletics", attribute: "strength"},
{name: "deception", attribute: "charisma"},
{name: "history", attribute: "intelligence"},
{name: "insight", attribute: "wisdom"},
{name: "intimidation", attribute: "charisma"},
{name: "investigation", attribute: "intelligence"},
{name: "medicine", attribute: "wisdom"},
{name: "nature", attribute: "intelligence"},
{name: "perception", attribute: "wisdom"},
{name: "performance", attribute: "charisma"},
{name: "persuasion", attribute: "charisma"},
{name: "religion", attribute: "intelligence"},
{name: "sleightOfHand", attribute: "dexterity"},
{name: "stealth", attribute: "dexterity"},
{name: "survival", attribute: "wisdom"},
];
var skills = [];
_.each(allSkills, skill => {
var value = Characters.calculate.skillMod(charId, skill.name);
var mod = Characters.calculate.abilityMod(charId, skill.attribute);
if (value !== mod){
skills.push({Name: skill.name, Modifier: value});
}
});
return skills;
};
var getLanguages = function(charId){
return Proficiencies.find({
charId,
enabled: true,
type: "language",
}).map(l => l.name);
};
var getTraits = function(charId){
return Features.find(
{charId: charId},
{sort: {color: 1, name: 1}}
).map(f => ({
Name: f.name,
// evaluateShortString helper
Content: evaluateString(
charId, f.description && f.description.split(/^( *[-*_]){3,} *(?:\n+|$)/m)[0]
) || "",
Usage: "",
}));
}
var getActions = function(charId){
return Attacks.find(
{charId, enabled: true},
{sort: {color: 1, name: 1}}
).map(a => ({
Name: a.name,
Content: `+${evaluate(charId, a.attackBonus)} to hit, ` +
`${evaluateString(charId, a.damage)} ${a.damageType} damage, ` +
`${a.details}`,
Usage: "",
}));
}

View File

@@ -0,0 +1,12 @@
Session.setDefault("isPrinting", false);
if (window.matchMedia) {
var mediaQueryList = window.matchMedia("print");
mediaQueryList.addListener(function(mql) {
if (mql.matches) {
Session.set("isPrinting", true);
Tracker.flush();
} else {
Session.set("isPrinting", false);
}
});
}

View File

@@ -0,0 +1,17 @@
removeDuplicateProficiencies = function(proficiencies) {
dict = {};
proficiencies.forEach(function(prof) {
if (prof.name in dict) { //if we have already gone over another proficiency for the same thing
if (dict[prof.name].value < prof.value) {
dict[prof.name] = prof; //then take the new one if it's higher, otherwise leave it
}
} else {
dict[prof.name] = prof; //if it wasn't already there, store it
}
});
profs = []
_.forEach(dict, function(prof) {
profs.push(prof);
})
return profs;
};

View File

@@ -0,0 +1,28 @@
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
var lastTime = 0;
var vendors = ["ms", "moz", "webkit", "o"];
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"];
window.cancelAnimationFrame = window[vendors[x] + "CancelAnimationFrame"] ||
window[vendors[x] + "CancelRequestAnimationFrame"];
}
if (!window.requestAnimationFrame)
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
timeToCall);
lastTime = currTime + timeToCall;
return id;
};
if (!window.cancelAnimationFrame)
window.cancelAnimationFrame = function(id) {
clearTimeout(id);
};

View File

@@ -0,0 +1,17 @@
@keyframes bounce {
from {
transform: translate(0px,0px);
}
to {
transform: translate(0px,-16px);
}
}
.bounce{
animation-name: bounce;
animation-duration: 0.3s;
animation-direction: alternate;
animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
animation-delay: 0s;
animation-iteration-count: infinite;
}

View File

@@ -0,0 +1,87 @@
/*Column layout*/
.column-container {
column-fill: balance;
column-gap: 0px;
column-width: 304px;
padding: 4px;
transform: translateZ(0);
}
.column-container.thin-columns {
column-count: 4;
column-width: 240px;
}
.column-container > div {
padding: 4px;
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
/*Cards*/
.card {
background: white;
border-radius: 2px;
position: initial;
}
.card .top {
cursor: pointer;
padding: 16px;
border-radius: 2px 2px 0 0;
}
.card .top.white {
cursor: auto;
padding: 16px;
border-bottom: rgba(0,0,0,0.12) solid 1px;
}
.card .bottom {
padding: 16px;
border-radius: 0 0 2px 2px;
}
.card .bottom.list {
padding: 16px 0;
}
.card .bottom.list .paper-font-subhead {
color: rgba(0,0,0,0.54);
font-size: 14px;
font-weight: 500;
letter-spacing: 0.010em;
padding: 12px 16px 12px 16px;
}
.card .bottom.text {
white-space: pre-wrap;
}
.card .left {
padding: 16px;
border-radius: 2px 0 0 2px;
text-align: center;
min-width: 72px;
}
.card .right {
padding: 16px;
border-radius: 0 2px 2px 0;
}
.card .left paper-icon-button {
display: block;
height: 32px;
padding: 0;
width: 32px;
}
.card .left paper-icon-button[disabled] {
color: rgba(255, 255, 255, 0.2);
}
.card img, .card iron-image {
max-width: 100%;
}

View File

@@ -1,96 +0,0 @@
@import "bourbon/bourbon";
$thickColumnWidth: 304px;
$thinColumnWidth: 240px;
//Column layouts of cards
.column-container {
@include column-fill(balance);
@include column-gap(8px);
@include column-width($thickColumnWidth);
padding: 8px;
&.thin-columns {
@include column-count(4);
@include column-width($thinColumnWidth);
}
}
//Cards
.card {
background: white;
border-radius: 2px;
.column-container & {
margin-bottom: 8px;
width: 100%;
//hack to stop flickering
-webkit-backface-visibility: hidden;
-webkit-transform: translateX(0);
//stop breaking over column divide
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
//Fixes extra margin at top of columns
display: inline-block;
}
.top {
cursor: pointer;
padding: 16px;
border-radius: 2px 2px 0 0;
&.white {
cursor: auto;
padding: 16px;
border-bottom: rgba(0,0,0,0.12) solid 1px;
}
paper-checkbox::shadow #ink[checked] {
color: #ffffff;
}
paper-checkbox::shadow #ink {
color: #ffffff;
}
paper-checkbox::shadow #checkbox.checked {
background-color: #ffffff;
background-color: rgba(255,255,255,0.27);
border-color: #ffffff;
border-color: rgba(255,255,255,0.27);
}
paper-checkbox::shadow #checkbox {
border-color: #ffffff;
border-color: rgba(255,255,255,0.54);
}
}
.bottom {
padding: 16px;
border-radius: 0 0 2px 2px;
&.list {
padding: 0 0 16px 0;
.subhead {
color: rgba(0,0,0,0.54);
font-size: 14px;
font-weight: 500;
letter-spacing: 0.010em;
padding: 12px 16px 12px 16px;
}
}
&.text {
white-space: pre-wrap;
}
}
.left {
padding: 16px;
border-radius: 2px 0 0 2px;
text-align: center;
min-width: 72px;
}
.right {
padding: 16px;
border-radius: 0 2px 2px 0;
}
}
/* undo pointer cursor on detail box heading */
#globalDetail.card .top {
cursor: auto;
}

View File

@@ -70,6 +70,10 @@
background-color: #9E9E9E;
}
.blue-grey {
background-color: #607D8B;
}
.app-grey {
background-color: #424242;
}
@@ -80,4 +84,4 @@
.black {
background-color: #262626;
}
}

View File

@@ -0,0 +1,43 @@
/*
List items
*/
.item-slot {
background-color: rgb(232, 232, 232);
background-color: rgba(0, 0, 0, 0.1);
}
.item {
background: white;
cursor: pointer;
font-size: 16px;
height: 40px;
margin: 1px 0 1px 0;
padding: 0 16px 0 16px;
position: relative;
transition: box-shadow 0.3s ease, opacity 0.5s ease-in-out;
}
.item > .itemName {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item.small {
height: 32px;
}
.item.tall {
height: 56px;
}
.item.flexible {
height: auto;
padding-top: 16px;
padding-bottom: 16px;
}
.item iron-icon, .item paper-icon-button {
color: #747474;
color: rgba(0,0,0,0.54);
}

View File

@@ -1,37 +0,0 @@
/*
List items
*/
.item-slot {
background-color: rgb(232, 232, 232);
background-color: rgba(0, 0, 0, 0.1);
}
.item {
background: white;
cursor: pointer;
font-size: 16px;
height: 40px;
margin: 1px 0 1px 0;
padding: 0 16px 0 16px;
position: relative;
transition: box-shadow 0.3s ease, opacity 0.5s ease-in-out;
&.small {
height: 32px;
}
&.tall {
height: 56px;
}
&.flexible {
height: auto;
padding-top: 16px;
padding-bottom: 16px;
}
&[hero], &:active{
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.37);
z-index: 10;
}
core-icon, paper-icon-button {
color: #747474;
color: rgba(0,0,0,0.54);
}
}

View File

@@ -1,7 +1,4 @@
@import "bourbon/bourbon";
@import "colors";
//apply a natural box layout model to all elements
/*apply a natural box layout model to all elements*/
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
@@ -19,17 +16,7 @@ body {
background-color: #E0E0E0;
}
//fix tabs and core-toolbar having box shadow
core-toolbar {
box-shadow: none;
}
//give drawer panel a shadow always
core-header-panel[drawer] {
box-shadow: 2px 0px 5px 0px rgba(0,0,0,0.2);
}
//Paragraphs
/*Paragraphs*/
p {
margin-bottom: 8px;
}
@@ -46,14 +33,48 @@ hr {
text-align: center;
}
//FABs
.floatyButton {
position: absolute;
bottom: 24px;
right: 24px;
.avatar {
display: inline-block;
box-sizing: border-box;
width: 40px;
height: 40px;
border-radius: 50%;
font-size: 26px;
font-color: rgba(255, 255, 255, 0.58) !important;
}
//Buttons
/*
temporary fix for https://github.com/PolymerElements/paper-item/issues/71
*/
paper-icon-item::shadow #contentIcon {
flex-shrink: 0;
}
/*FABs*/
.floatyButton {
position: fixed;
bottom: 24px;
right: 24px;
/* stop the fab from flashing during animation */
transform: scale(1) translateZ(0px);
z-index: 3;
}
paper-fab {
background-color: #d13b2e;
}
paper-fab.keyboard-focus {
background: #630c05;
}
.red-button:not([disabled]) {
background: #d23f31;
color: #fff;
margin-top: 16px;
}
/*Buttons*/
paper-button {
color: #000;
color: rgba(0,0,0,0.87);
@@ -63,7 +84,12 @@ paper-button {
text-transform: uppercase;
}
//Style shortcuts
dicecloud-selector paper-item {
white-space: nowrap;
overflow: hidden;
}
/*Style shortcuts*/
.scroll-y {
overflow-y: auto;
}

View File

@@ -1,20 +0,0 @@
.card .left paper-icon-button {
display: block;
height: 32px;
padding: 0;
width: 32px;
}
.card .left paper-icon-button[disabled] {
color: rgba(255, 255, 255, 0.2);
}
.card .left paper-icon-button /deep/ core-icon {
height: 32px;
width: 32px;
}
/*fix paper-dropdowns*/
body /deep/ core-menu {
overflow-x: hidden !important;
}

View File

@@ -0,0 +1,15 @@
td {
padding: 8px;
}
.strengthTable{
width: 100%;
}
.strengthTable td:nth-child(2){
text-align: right;
}
.summaryTable td:nth-child(3){
text-align: right;
}

View File

@@ -1,21 +0,0 @@
td {
padding: 8px;
}
.strengthTable{
width: 100%;
td{
&:nth-child(2) {
text-align: right;
}
&:nth-child(3) {
width: 250px;
}
}
}
.summaryTable {
&:nth-child(3){
text-align: right;
}
}

View File

@@ -1,68 +0,0 @@
#detailScreenFiller {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
display: flex;
justify-content: center;
align-items: center;
}
#screenDim {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: grey;
background-color: rgba(0,0,0,0.35);
}
#fadeDummy {
pointer-events: none;
}
.detailContent {
padding: 24px;
}
html /deep/ .red-button:not([disabled]) {
background: #d23f31;
color: #fff;
margin-top: 16px;
}
#globalDetail {
background-color: white;
width: 624px;
height: 500px;
border-radius: 2px;
}
#globalDetail core-toolbar {
border-radius: 2px 2px 0 0;
}
@media (max-width: 640px) {
#globalDetail core-toolbar {
border-radius: 0;
}
}
@media (max-width: 640px) {
#globalDetail {
top: 0 !important;
left: 0 !important;
width: 100%;
height: 100%;
margin: 0;
border-radius: 0;
}
}
.not-selected [hero] {
visibility: hidden;
}

View File

@@ -1,113 +1,68 @@
.display2 {
font-size: 45px;
font-weight: 400;
color: #000;
color: rgba(0,0,0,0.54);
letter-spacing: 0;
body .paper-font-display4, body .paper-font-display3, body .paper-font-title, body .paper-font-caption{
white-space: normal;
}
.white-text .display2{
.white-text {
color: #dedede;
color: rgba(255,255,255,0.87);
}
.white-text .paper-font-display2{
color: #8a8a8a;
color: rgba(255,255,255,0.54);
}
.display1 {
font-size: 34px;
font-weight: 400;
color: #000;
color: rgba(0,0,0,0.54);
letter-spacing: 0;
}
.white-text .display1, .white-text.display1{
.white-text .paper-font-display1, .white-text.paper-font-display1{
color: #8a8a8a;
color: rgba(255,255,255,0.54);
}
h1, .headline {
font-size: 24px;
font-weight: 400;
margin: 0;
color: #000;
color: rgba(0,0,0,0.87);
letter-spacing: 0;
}
.white-text h1, .white-text .headline, .white-text.headline{
.white-text h1, .white-text .paper-font-headline, .white-text.paper-font-headline{
color: #dedede;
color: rgba(255,255,255,0.87);
}
h2, .title {
font-size: 20px;
font-weight: 500;
margin: 0;
color: #000;
color: rgba(0,0,0,0.87);
letter-spacing: 0.005em;
}
.white-text h2, .white-text .title, .white-text.title{
.white-text h2, .white-text .paper-font-title, .white-text.paper-font-title{
color: #dedede;
color: rgba(255,255,255,0.87);
}
h3, .subhead {
font-size: 16px;
font-weight: 400;
margin: 0;
color: #000;
color: rgba(0,0,0,0.87);
letter-spacing: 0.010em;
}
.white-text h3, .white-text .subhead{
.white-text h3, .white-text .paper-font-subhead{
color: #dedede;
color: rgba(255,255,255,0.87);
}
.body2 {
font-size: 14px;
font-weight: 500;
color: #000;
color: rgba(0,0,0,0.87);
letter-spacing: 0.010em;
}
.white-text .body2{
.white-text .paper-font-body2{
color: #dedede;
color: rgba(255,255,255,0.87);
}
p, .body1, body {
font-size: 14px;
font-weight: 400;
margin: 0;
color: #000;
color: rgba(0,0,0,0.87);
letter-spacing: 0.010em;
}
.white-text p, .white-text .body1{
.white-text p, .white-text .paper-font-body1{
color: #dedede;
color: rgba(255,255,255,0.87);
}
.caption{
font-size: 12px;
font-weight: 400;
color: #000;
color: rgba(0,0,0,0.54);
letter-spacing: 0.020em;
}
.white-text .caption{
.white-text .paper-font-caption{
color: #8a8a8a;
color: rgba(255,255,255,0.54);
}
html /deep/ .white-text{
color: #fff;
}
.black54 {
color: #444;
color: #757575;
color: rgba(0,0,0,0.54);
}
.white54 {
color: #eee;
color: #8a8a8a;
color: rgba(255,255,255,0.54);
}
.black87 {
color: #212121;
color: rgba(0,0,0,0.87);
}
.white87 {
color: #dedede;
color: rgba(255,255,255,0.87);
}

View File

@@ -1,39 +1,33 @@
<template name="attackEdit">
<div layout horizontal>
<div layout vertical flex>
<div layout horizontal>
<div class="layout horizontal">
<div class="layout vertical flex">
<div class="layout horizontal wrap">
<!--attackBonus-->
<paper-input class="attackBonusInput"
label="Attack Bonus"
floatinglabel
value={{attackBonus}}
flex></paper-input>
<paper-input class="attackBonusInput flex" label="Attack Bonus" value={{attackBonus}}
style="flex-basis: 200px; margin-right: 16px;">
{{> formulaSuffix}}
</paper-input>
<!--details-->
<paper-input class="detailInput"
label="Details"
floatinglabel
value={{details}}></paper-input>
<paper-input class="detailInput" label="Details" value={{details}} style="flex-basis: 200px;">
</paper-input>
</div>
<div layout horizontal>
<div class="layout horizontal wrap">
<!--damageBonus-->
<paper-input class="damageInput"
label="Damage"
floatinglabel
value={{damage}}
flex></paper-input>
<paper-input class="damageInput flex" label="Damage" value={{damage}}
style="flex-basis: 200px; margin-right: 16px;">
{{> bracketSuffix}}
</paper-input>
<!--DamageType-->
<paper-dropdown-menu class="damageTypeDropdown" label="Damage Type">
<paper-dropdown layered class="dropdown">
<core-menu class="menu" selected={{damageType}}>
{{#each damageTypes}}
<paper-item name={{this}} class="containerMenuItem">{{this}}</paper-item>
{{/each}}
</core-menu>
</paper-dropdown>
<paper-dropdown-menu label="Damage Type" dynamic-align>
<dicecloud-selector class="dropdown-content damageTypeDropdown" selected={{damageType}}>
{{#each damageTypes}}
<paper-item name={{this}} class="containerMenuItem">{{this}}</paper-item>
{{/each}}
</dicecloud-selector>
</paper-dropdown-menu>
</div>
</div>
<!--Delete Button-->
<paper-icon-button class="deleteAttack" role="button" tabindex="0" icon="delete" aria-label="Delete"></paper-icon-button>
<paper-icon-button class="deleteAttack" icon="delete"></paper-icon-button>
</div>
</template>
</template>

View File

@@ -15,7 +15,7 @@ var damageTypes = [
];
Template.attackEdit.events({
"tap .deleteAttack": function(event, instance) {
"click .deleteAttack": function(event, instance) {
Attacks.softRemoveNode(this._id);
GlobalUI.deletedToast(this._id, "Attacks", "Attack");
},
@@ -31,9 +31,8 @@ Template.attackEdit.events({
var value = event.currentTarget.value;
Attacks.update(this._id, {$set: {details: value}});
},
"core-select .damageTypeDropdown": function(event) {
"iron-select .damageTypeDropdown": function(event) {
var detail = event.originalEvent.detail;
if (!detail.isSelected) return;
var value = detail.item.getAttribute("name");
if (value == this.damageType) return;
Attacks.update(this._id, {$set: {damageType: value}});
@@ -44,7 +43,4 @@ Template.attackEdit.helpers({
damageTypes: function() {
return damageTypes;
},
DAMAGE_DICE: function() {
return DAMAGE_DICE;
},
});

View File

@@ -3,7 +3,7 @@
{{#if attacks.count}}
<hr style="margin: 16px 0 16px 0;">
<div id="attacks">
<h2>Attacks</h2>
<div class="paper-font-title">Attacks</div>
{{#each attacks}}
{{>attackEdit}}
{{/each}}

View File

@@ -7,12 +7,32 @@ Template.attackEditList.helpers({
Template.attackEditList.events({
"tap #addAttackButton": function() {
if (typeof this.isSpell !== 'undefined' && this.isSpell) {
var parentSpell = Spells.findOne({"_id": this.parentId})
if (parentSpell && parentSpell.parent.collection == "SpellLists") {
var spellList = SpellLists.findOne({"_id":parentSpell.parent.id});
if (spellList && spellList.attackBonus) {
Attacks.insert({
charId: this.charId,
parent: {
id: this.parentId,
collection: this.parentCollection
},
attackBonus: "attackBonus",
damage: "1d10",
damageType: "fire",
});
return;
}
}
}
Attacks.insert({
charId: this.charId,
parent: {
id: this.parentId,
collection: this.parentCollection
}
},
});
},
});

View File

@@ -1,15 +1,15 @@
<template name="attackView">
<div class="attackView" layout horizontal>
<div class="headline" style="margin-right: 16px;" layout horizontal center>
{{evaluateSigned charId attackBonus}}
<div class="attackView layout horizontal">
<div class="paper-font-headline layout horizontal center" style="margin-right: 16px;">
{{evaluateAttackBonus charId attack}}
</div>
<div layout vertical>
<div class="layout vertical">
<div>
{{evaluateString charId damage}}&nbsp;{{damageType}}
{{evaluateDamage charId attack}}&nbsp;{{attack.damageType}}
</div>
{{#if details}}
<div class="caption">
{{details}}
{{#if attack.details}}
<div class="paper-font-caption">
{{attack.details}}
</div>
{{/if}}
</div>

View File

@@ -0,0 +1,28 @@
Template.attackView.helpers ({
evaluateAttackBonus: function(charId, attack) {
if (attack.parent.collection == "Spells") {
var spell = Spells.findOne(attack.parent.id);
if (spell) {
bonus = evaluate(charId, attack.attackBonus, {"spellListId": spell.parent.id});
}
} else {
var bonus = evaluate(charId, attack.attackBonus);
}
if (_.isFinite(bonus)) {
return bonus > 0 ? "+" + bonus : "" + bonus;
} else {
return bonus;
}
},
evaluateDamage: function(charId, attack) {
if (attack.parent.collection == "Spells") {
var spell = Spells.findOne(attack.parent.id);
if (spell) {
return evaluateSpellString(charId, spell.parent.id, attack.damage);
}
} else {
return evaluateString(charId, attack.damage);
}
},
})

View File

@@ -2,10 +2,10 @@
{{#if attacks.count}}
<hr style="margin: 16px 0 16px 0;">
<div class="attacks">
<h2 class="spaceAfter">Attacks</h2>
{{#each attacks}}
{{> attackView}}
<div class="spaceAfter paper-font-title">Attacks</div>
{{#each attack in attacks}}
{{> attackView attack=attack charId=charId}}
{{/each}}
</div>
{{/if}}
</template>
</template>

View File

@@ -0,0 +1,33 @@
<!-- data is the CustomBuff -->
<template name="applyBuffDialog">
<div class="fit layout vertical applyBuffDialog">
<app-header fixed effects="waterfall">
<app-toolbar>
Apply Buff
</app-toolbar>
</app-header>
<div class="flex layout horizontal" style="height:100%">
<div class="flex" style="margin-right: 16px; height: 100%; max-width: 240px; overflow-y: auto;">
{{> characterPicker selfId=buff.charId includeSelf=canApplyToSelf writableOnly=true}}
</div>
<div class="flex buff-description" style="height: 100%; overflow-y: auto">
<hr style="margin: 16px 0 16px 0;">
{{#if buff.description}}
<div>{{#markdown}}{{evaluateString buff.charId buff.description}}{{/markdown}}</div>
<hr style="margin: 16px 0 16px 0;">
{{/if}}
{{> effectsViewList charId=buff.charId parentId=buff._id}}
{{> proficiencyViewList charId=buff.charId parentId=buff._id}}
{{> attacksViewList charId=buff.charId parentId=buff._id}}
</div>
</div>
<div class="buttons layout horizontal end-justified">
<paper-button id="cancelButton">
Cancel
</paper-button>
<paper-button id="applyButton" disabled={{cantApply}}>
Apply
</paper-button>
</div>
</div>
</template>

View File

@@ -0,0 +1,32 @@
Template.applyBuffDialog.onCreated(function(){
this.selectedTarget = new ReactiveVar("default");
});
Template.applyBuffDialog.helpers({
cantApply: function() {
return this.buff.target === "others" && Template.instance().selectedTarget.get() === "default"; //this is the only case where we can't apply a buff
},
canApplyToSelf: function() {
return this.buff.target !== "others"; //i.e. it is "self" or "both"
},
});
Template.applyBuffDialog.events({
"iron-select .characterPicker": function(event){
var detail = event.originalEvent.detail;
var value = detail.item.getAttribute("name");
Template.instance().selectedTarget.set(value);
},
"click #applyButton": function(event, instance){
var targetId = Template.instance().selectedTarget.get();
if (targetId === "default") {
if (this.buff.target === "others") return; //since we have "Select a character" selected
targetId = this.buff.charId; //otherwise, the default is to target self
}
popDialogStack(targetId);
},
"click #cancelButton": function(event, instance){
popDialogStack();
},
});

View File

@@ -1,15 +1,23 @@
<template name="buffDialog">
{{#with buff}}
{{#baseDialog title=name class=colorClass hideEdit=true}}
{{#baseDialog title=name class="white" hideColor=true startEditing=true editOnly=true}}
{{> buffDetails}}
{{else}}
{{> buffDetails}}
{{/baseDialog}}
{{/with}}
</template>
<template name="buffDetails">
<div>
{{appliedBy}}
</div>
<hr style="margin: 16px 0 16px 0;">
{{#if description}}
<div class="pre-wrap">{{evaluateString charId description}}</div>
<div>{{#markdown}}{{evaluateString charId description}}{{/markdown}}</div>
<hr style="margin: 16px 0 16px 0;">
{{/if}}
{{> effectsViewList charId=charId parentId=_id}}
{{> proficiencyViewList charId=charId parentId=_id}}
{{> attacksViewList charId=charId parentId=_id}}
</template>

View File

@@ -1,5 +1,50 @@
Template.buffDialog.onCreated(function(){
var buff = Buffs.findOne(this.buffId);
Meteor.subscribe("singleCharacterName", buff.charId); //so we can access the names of public characters
});
Template.buffDialog.helpers({
buff: function(){
return Buffs.findOne(this.buffId);
},
});
Template.buffDialog.events({
"click #deleteButton": function(event, instance){
Buffs.softRemoveNode(instance.data.buffId);
popDialogStack();
},
});
const typeDict = {
"Features": "feature",
"Items": "item",
"Spells": "spell",
}; //really, we should only need these three
Template.buffDetails.helpers({
appliedBy: function() {
if (this.type == "inate") {
return "Innate.";
} else {
var myName = Characters.findOne(this.charId).name;
var applierCharacter = Characters.findOne(this.appliedBy) || {name: "???"}
// "???" indicates that either we do not have read access to the buff-giver, or that the buff-giver does not exist.
if (applierCharacter.name === myName) {
var charName = "your "
} else {
if (applierCharacter.name && applierCharacter.name[applierCharacter.name.length - 1] === 's') {
var charName = applierCharacter.name + "' ";
} else {
var charName = applierCharacter.name + "'s ";
}
}
var type = typeDict[this.appliedByDetails.collection] + " ";
var applierThing = this.appliedByDetails.name;
return "Applied by " + charName + type + applierThing + ".";
}
},
});

View File

@@ -0,0 +1,15 @@
<template name="buffListItem">
<div class="item buffListItem layout horizontal center">
<div class="flex">
{{buff.name}}
</div>
{{#if canEditCharacter buff.charId}}
<paper-icon-button class="deleteButton"
role="button"
tabindex="0"
icon="delete">
</paper-icon-button>
{{/if}}
</div>
</template>

View File

@@ -0,0 +1,21 @@
Template.buffListItem.helpers({
name: function() {
return this.buff.name
}
});
Template.buffListItem.events({
"click .buffListItem": function(event){
var buffId = this.buff._id;
var charId = this.buff.charId;
pushDialogStack({
template: "buffDialog",
data: {buffId: buffId, charId: charId},
element: event.currentTarget,
});
},
"tap .deleteButton": function(event){
event.stopPropagation();
Buffs.remove(this.buff._id);
},
});

View File

@@ -0,0 +1,11 @@
.condition-library-dialog .item.selected {
background-color: #e4e4e4;
}
.condition-library-dialog table {
border-collapse: collapse;
}
.condition-library-dialog .library-condition td, tr {
position: relative;
}

View File

@@ -0,0 +1,34 @@
<template name="conditionLibraryDialog">
<div class="fit condition-library-dialog layout vertical">
<app-toolbar class="app-grey white-text">
<paper-icon-button id="backButton"
icon="arrow-back">
</paper-icon-button>
<div main-title>Conditions</div>
</app-toolbar>
<div class="flex scroll-y">
<div class="conditions" style="padding:8px">
<table style="width: 100%">
<tbody>
{{#each condition in conditions}}
{{>libraryCondition condition=condition selected=(isSelected condition)}}
{{/each}}
</tbody>
</table>
</div>
</div>
<div class="layout horizontal end-justified">
<paper-button class="cancelButton">Cancel</paper-button>
<paper-button class="okButton">OK</paper-button>
</div>
</div>
</template>
<template name="libraryCondition">
<tr class="item library-condition {{#if selected}}selected{{/if}}">
<td class="conditionName">
{{conditionName condition}}
<paper-ripple></paper-ripple>
</td>
</tr>
</template>

View File

@@ -0,0 +1,166 @@
Template.conditionLibraryDialog.onCreated(function(){
this.selectedCondition = new ReactiveVar();
});
Template.conditionLibraryDialog.helpers({
conditions: function(){
return Object.keys(LIBRARY_CONDITIONS)
},
isSelected(condition){
const selected = Template.instance().selectedCondition.get();
return selected && selected === condition;
},
});
Template.conditionLibraryDialog.events({
"click .cancelButton": function(event, template){
popDialogStack();
},
"click .okButton": function(event, template){
popDialogStack(template.selectedCondition.get());
},
"click .library-condition": function(event, template){
template.selectedCondition.set(this.condition);
},
"click #backButton": function(event, template){
popDialogStack();
},
});
Template.libraryCondition.helpers({
conditionName: function(name){
return LIBRARY_CONDITIONS[name].buff.name;
},
})
LIBRARY_CONDITIONS = {
//Conditions
blind: {
buff: {
name: "Blind",
description: "A blinded creature cant see and automatically fails any ability check that requires sight.\n\nAttack rolls against the creature have advantage, and the creatures attack rolls have disadvantage.",
},
},
deaf: {
buff: {
name: "Deaf",
description: "A deafened creature cant hear and automatically fails any ability check that requires hearing.",
},
},
frightened: {
buff: {
name: "Frightened",
description: "A frightened creature has disadvantage on ability checks and attack rolls while the source of its fear is within line of sight.\n\nThe creature cant willingly move closer to the source of its fear.",
}
},
grappled: {
buff:{
name: "Grappled",
description: "A grappled creatures speed becomes 0, and it cant benefit from any bonus to its speed.\n\nThe condition ends if the grappler is incapacitated.\n\nThe condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunder wave spell.",
},
},
incapacitated: {
buff: {
name: "Incapacitated",
description: "An incapacitated creature cant take actions or reactions.",
}
},
invisible: {
buff: {
name: "Invisible",
description: "An invisible creature is impossible to see without the aid of magic or a special sense. For the purpose of hiding, the creature is heavily obscured. The creatures location can be detected by any noise it makes or any tracks it leaves.\n\nAttack rolls against the creature have disadvantage, and the creatures attack rolls have advantage.",
}
},
paralyzed: {
buff: {
name: "Paralyzed",
description: "A paralyzed creature is **incapacitated** and cant move or speak.\n\nAttack rolls against the creature have advantage.\n\nAny attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature.",
},
},
petrified: {
buff: {
name: "Petrified",
description: "A petrified creature is transformed, along with any nonmagical object it is wearing or carrying, into a solid inanimate substance (usually stone). Its weight increases by a factor of ten, and it ceases aging.\n\nA petrified creature is **incapacitated** and cant move or speak, and is unaware of its surroundings.\n\nAttack rolls against the creature have advantage.\n\nThe creature is immune to poison and disease, although a poison or disease already in its system is suspended, not neutralized.",
},
},
poisoned: {
buff: {
name: "Poisoned",
description: "A poisoned creature has disadvantage on attack rolls and ability checks.",
},
},
prone: {
buff: {
name: "Prone",
description: "A prone creatures only movement option is to crawl, unless it stands up and thereby ends the condition.\n\nThe creature has disadvantage on attack rolls.\n\nAn attack roll against the creature has advantage if the attacker is within 5 feet of the creature. Otherwise, the attack roll has disadvantage.",
}
},
restrained: {
buff: {
name: "Restrained",
description: "A restrained creatures speed becomes 0, and it cant benefit from any bonus to its speed.\n\nAttack rolls against the creature have advantage, and the creatures attack rolls have disadvantage.\n\nThe creature has disadvantage on Dexterity saving throws.",
},
},
stunned: {
buff: {
name: "Stunned",
description: "A stunned creature is **incapacitated**, cant move, and can speak only falteringly\n\nThe creature automatically fails Strength and Dexterity saving throws.\n\nAttack rolls against the creature have advantage.",
},
},
unconscious: {
buff: {
name: "Unconscious",
description: "An unconscious creature is **incapacitated**, cant move or speak, and is unaware of its surroundings.\n\nThe creature drops whatever its holding and falls **prone**.\n\nThe creature automatically fails Strength and Dexterity saving throws.\n\nAttack rolls against the creature have advantage.\n\nAny attack that hits the creature is a critical hit if the attacker is within 5 feet of the creature.",
},
},
exhaustion1: {
buff: {
name: "Exhaustion - 1",
description: "Disadvantage on ability checks\n\nFinishing a long rest reduces a creatures exhaustion level by 1, provided that the creature has also ingested some food and drink.",
},
},
exhaustion2: {
buff: {
name: "Exhaustion - 2",
description: "Speed halved",
},
},
exhaustion3: {
buff: {
name: "Exhaustion - 3",
description: "Disadvantage on attack rolls and saving throws",
},
},
exhaustion4: {
buff: {
name: "Exhaustion - 4",
description: "Hit point maximum halved",
},
},
exhaustion5: {
buff: {
name: "Exhaustion - 5",
description: "Speed reduced to 0",
},
},
exhaustion6: {
buff: {
name: "Exhaustion - 6",
description: "You have died of exhaustion",
},
},
};

View File

@@ -0,0 +1,15 @@
<template name="conditionView">
<div class="item conditionView layout horizontal center">
<div class="flex">
{{condition.name}}
</div>
{{#if canEditCharacter condition.charId}}
<paper-icon-button class="deleteButton"
role="button"
tabindex="0"
icon="delete">
</paper-icon-button>
{{/if}}
</div>
</template>

View File

@@ -0,0 +1,15 @@
Template.conditionView.events({
"click .conditionView": function(event){
var condition = this.condition;
var charId = Template.parentData()._id;
pushDialogStack({
template: "conditionViewDialog",
data: {condition: condition},
element: event.currentTarget,
});
},
"tap .deleteButton": function(event){
event.stopPropagation();
Conditions.remove(this.condition._id);
},
});

View File

@@ -0,0 +1,14 @@
<template name="conditionViewDialog">
{{#baseDialog title=condition.name class="white" hideColor=true startEditing=true editOnly=true}}}
{{> conditionDetails condition=condition}}
{{else}}
{{> conditionDetails condition=condition}}
{{/baseDialog}}
</template>
<template name="conditionDetails">
{{#if condition.description}}
<div>{{#markdown}}{{evaluateString condition.charId condition.description}}{{/markdown}}</div>
{{/if}}
{{> effectsViewList charId=condition.charId parentId=condition._id}}
</template>

View File

@@ -0,0 +1,6 @@
Template.conditionViewDialog.events({
"click #deleteButton": function(event, instance){
Conditions.remove(instance.data.condition._id);
popDialogStack();
},
});

View File

@@ -0,0 +1,29 @@
<template name="customBuffEdit">
{{#baseEditDialog title=buff.name hideColor=true}}
<!--name-->
<paper-input id="buffNameInput" class="fullwidth" label="Name" value={{buff.name}}></paper-input>
<div class="layout horizontal center wrap justified">
<paper-dropdown-menu class=flex label="Target" style="flex-basis: 150px; max-width: 200px;">
<dicecloud-selector selected={{buff.target}} class="dropdown-content target-dropdown">
<paper-item name="self" style="width: 150px;">
Self only
</paper-item>
<paper-item name="others">
Others only
</paper-item>
<paper-item name="both">
Both
</paper-item>
</dicecloud-selector>
</paper-dropdown-menu>
</div>
<!--description-->
<paper-textarea label="Description" id="buffDescriptionInput" value={{buff.description}}></paper-textarea>
{{> effectsEditList parentId=buff._id parentCollection="CustomBuffs" charId=buff.charId name=name enabled=false}}
{{> attackEditList parentId=buff._id parentCollection="CustomBuffs" charId=buff.charId name=name enabled=false}}
{{> proficiencyEditList parentId=buff._id parentCollection="CustomBuffs" charId=buff.charId enabled=false}}
{{/baseEditDialog}}
</template>

View File

@@ -0,0 +1,47 @@
Template.customBuffEdit.helpers({
buff(){
return CustomBuffs.findOne(this.customBuffId);
},
});
const debounce = (f) => _.debounce(f, 300);
Template.customBuffEdit.events({
"input #buffNameInput": debounce(function(event){
const input = event.currentTarget;
var name = input.value;
if (!name){
input.invalid = true;
input.errorMessage = "Name is required";
} else {
input.invalid = false;
CustomBuffs.update(this.customBuffId, {
$set: {name: name}
}, {
removeEmptyStrings: false,
trimStrings: false,
});
}
}),
"input #buffDescriptionInput": debounce(function(event){
var description = event.currentTarget.value;
CustomBuffs.update(this.customBuffId, {
$set: {description: description}
}, {
removeEmptyStrings: false,
trimStrings: false,
});
}),
"iron-select .target-dropdown": function(event){
var detail = event.originalEvent.detail;
var value = detail.item.getAttribute("name");
const buff = CustomBuffs.findOne(this.customBuffId);
if (value === buff.target) return;
CustomBuffs.update(this.customBuffId, {$set: {target: value}});
},
"click #deleteButton": function(event, instance){
CustomBuffs.softRemoveNode(instance.data.customBuffId);
GlobalUI.deletedToast(instance.data.customBuffId, "Buffs", "Buff");
popDialogStack();
},
});

View File

@@ -0,0 +1,30 @@
<!--needs to be given charId, parentId and parentCollection-->
<template name="customBuffEditList">
{{#if buffs.count}}
<div class="buffs">
<div class="paper-font-title" style="margin-bottom: 8px;">
Buffs
</div>
<table class="wideTable" style="width: 100%;">
{{#each buff in buffs}}
{{> customBuffEditListItem buff=buff}}
{{/each}}
</table>
</div>
{{/if}}
<paper-button id="addBuffButton"
class="red-button"
raised>
Add Buff
</paper-button>
</template>
<template name="customBuffEditListItem">
<div class="buff layout horizontal center" data-id={{buff._id}}>
{{> customBuffView buff=buff}}
<div>
<paper-icon-button class="edit-buff" icon="create">
</paper-icon-button>
</div>
</div>
</template>

View File

@@ -0,0 +1,41 @@
Template.customBuffEditList.helpers({
buffs: function(){
var selector = {
"parent.id": this.parentId,
"charId": this.charId,
};
return CustomBuffs.find(selector);
}
});
Template.customBuffEditList.events({
"tap #addBuffButton": function(event, instance){
if (!_.isBoolean(this.enabled)) {
this.enabled = true;
}
const customBuffId = CustomBuffs.insert({
name: this.name || "New Buff",
charId: this.charId,
parent: {
id: this.parentId,
collection: this.parentCollection,
},
});
pushDialogStack({
template: "customBuffEdit",
data: {customBuffId},
element: event.currentTarget,
returnElement: () => instance.find(`tr.buff[data-id='${customBuffId}']`),
});
},
});
Template.customBuffEditListItem.events({
"tap .edit-buff": function(event, template){
pushDialogStack({
template: "customBuffEdit",
data: {customBuffId: this.buff._id},
element: event.currentTarget.parentElement.parentElement,
});
},
});

View File

@@ -0,0 +1,8 @@
<template name="customBuffView">
<div class="flex">{{buff.name}}</div>
<div class="flex">
{{#if canEditCharacter buff.charId}}
<paper-button class="apply-buff-button">Apply{{toSelf}}</paper-button>
{{/if}}
</div>
</template>

View File

@@ -0,0 +1,82 @@
const applyBuff = function(targetId, buff) {
var parent = global[buff.parent.collection].findOne(buff.parent.id);
//insert new buff
newBuffId = Buffs.insert({
charId: targetId,
name: buff.name,
description: buff.description,
lifeTime: {total: buff.lifeTime.total},
type: "custom",
appliedBy: buff.charId,
appliedByDetails: {
name: parent.name,
collection: buff.parent.collection,
},
});
//insert children
Attacks.find({"parent.id": buff._id}).forEach(function(doc){
temp = _.clone(doc);
temp.parent.id = newBuffId;
temp.parent.collection = "Buffs";
delete temp._id;
Attacks.insert(temp);
});
Effects.find({"parent.id": buff._id}).forEach(function(doc){
temp = _.clone(doc);
temp.parent.id = newBuffId;
temp.parent.collection = "Buffs";
delete temp._id;
Effects.insert(temp);
});
Proficiencies.find({"parent.id": buff._id}).forEach(function(doc){
temp = _.clone(doc);
temp.parent.id = newBuffId;
temp.parent.collection = "Buffs";
delete temp._id;
Proficiencies.insert(temp);
});
let target;
if (targetId == buff.charId) {
target = "self";
} else {
target = Characters.findOne(targetId) || {};
target = target && target.name || "target"
}
GlobalUI.toast(`${buff.name || "Buff"} applied to ${target}`);
};
Template.customBuffView.helpers({
toSelf: function() {
if (this.buff.target === "self") {
return " to self";
} else {
return "";
}
}
});
Template.customBuffView.events({
"click .apply-buff-button": function(){
if (this.buff.target !== "self") {
pushDialogStack({
template: "applyBuffDialog",
data: {buff: this.buff},
element: event.currentTarget,
callback: (targetId) => {
if (!targetId) return;
applyBuff(targetId, this.buff);
},
});
} else {
var targetId = this.buff.charId;
applyBuff(targetId, this.buff);
}
},
});

View File

@@ -0,0 +1,14 @@
<template name="customBuffViewList">
{{#if buffs.count}}
<div class="buffs">
<div class="paper-font-title" style="margin-bottom: 8px;">
Buffs
</div>
{{#each buff in buffs}}
<div class="layout horizontal center">
{{> customBuffView buff=buff}}
</div>
{{/each}}
</div>
{{/if}}
</template>

View File

@@ -0,0 +1,9 @@
Template.customBuffViewList.helpers({
buffs: function(){
var selector = {
"parent.id": this.parentId,
"charId": this.charId,
};
return CustomBuffs.find(selector);
}
});

View File

@@ -1,27 +1,27 @@
<template name="characterSettings">
{{#with character}}
<div style="height: 100px;">
<table style="width: 100%;">
<tr>
<td>Hide Spells tab</td>
<td>
<paper-toggle-button id="hideSpellcasting"
checked={{settings.hideSpellcasting}}
touch-action="pan-y">
</paper-toggle-button>
</td>
</tr>
<tr>
<td>Use variant encumbrance</td>
<td>
<paper-toggle-button id="variantEncumbrance"
checked={{settings.useVariantEncumbrance}}
touch-action="pan-y">
</paper-toggle-button>
</td>
</tr>
</table>
<div class="fit layout vertical">
<app-header-layout has-scrolling-region class="feedback flex">
<app-header fixed effects="waterfall">
<app-toolbar>
<div main-title>Character Settings</div>
</app-toolbar>
</app-header>
<div class="form flex">
<paper-toggle-button id="hideSpellcasting" checked={{settings.hideSpellcasting}}>
Hide Spells tab
</paper-toggle-button>
<paper-toggle-button id="variantEncumbrance" checked={{settings.useVariantEncumbrance}}>
Use variant encumbrance
</paper-toggle-button>
<paper-toggle-button id="swapStatAndModifier" checked={{settings.swapStatAndModifier}}>
Swap stats and modifiers on Stats page
</paper-toggle-button>
</div>
</app-header-layout>
<div class="buttons layout horizontal end-justified">
<paper-button class="doneButton"> Done </paper-button>
</div>
</div>
{{/with}}
<paper-button id="doneButton" affirmative> Done </paper-button>
</template>

View File

@@ -23,4 +23,16 @@ Template.characterSettings.events({
);
}
},
"change #swapStatAndModifier": function(event, instance){
var value = instance.find("#swapStatAndModifier").checked;
if (this.settings.swapStatAndModifier !== value){
Characters.update(
this._id,
{$set: {"settings.swapStatAndModifier": value}}
);
}
},
"click .doneButton": function(event, instance){
popDialogStack();
},
});

View File

@@ -1,9 +1,20 @@
<template name="deleteCharacterConfirmation">
<div>
Deleting a character cannot be undone.<br>
To continue type "{{name}}" into the box below.<br>
<paper-input id="nameInput" label="type the characters's name here" style="width: 100%;"></paper-input><br>
<paper-button id="deleteButton" style={{getStyle}} disabled={{cantDelete}}>Delete Character</paper-button>
<div class="fit layout vertical">
<app-header-layout has-scrolling-region class="feedback flex">
<app-header fixed effects="waterfall">
<app-toolbar>
<div main-title>Delete Character</div>
</app-toolbar>
</app-header>
<div class="form flex">
Deleting a character cannot be undone.<br>
To continue type "{{name}}" into the box below.<br>
<paper-input id="nameInput" label="type the characters's name here" style="width: 100%;"></paper-input><br>
<paper-button id="deleteButton" style={{getStyle}} disabled={{cantDelete}}>Delete Character</paper-button>
</div>
</app-header-layout>
<div class="buttons layout horizontal end-justified">
<paper-button class="cancelButton"> Cancel </paper-button>
</div>
</div>
<paper-button id="cancelButton" affirmative> Cancel </paper-button>
</template>
</template>

Some files were not shown because too many files have changed in this diff Show More