Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7430c2c795 | ||
|
|
39f7548b8d | ||
|
|
c4a8c4b7ba | ||
|
|
263aba596c | ||
|
|
f98ed0b659 | ||
|
|
6159ce0e88 | ||
|
|
e9509a3a24 | ||
|
|
aa069fd885 |
@@ -85,19 +85,6 @@ Template.features.events({
|
|||||||
var featureId = this._id;
|
var featureId = this._id;
|
||||||
Features.update(featureId, {$set: {used: 0}});
|
Features.update(featureId, {$set: {used: 0}});
|
||||||
},
|
},
|
||||||
"tap #proficiencies": function(event){
|
|
||||||
var charId = this._id;
|
|
||||||
GlobalUI.setDetail({
|
|
||||||
template: "textDialog",
|
|
||||||
data: {
|
|
||||||
charId: charId,
|
|
||||||
field: "proficiencies",
|
|
||||||
title: "Proficiencies",
|
|
||||||
color: "q",
|
|
||||||
},
|
|
||||||
heroId: this._id + "proficiencies",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
"tap .enabledCheckbox": function(event){
|
"tap .enabledCheckbox": function(event){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="containerEdit">
|
<template name="containerEdit">
|
||||||
<paper-input id="containerNameInput fullwidth"
|
<paper-input id="containerNameInput"
|
||||||
label="Name"
|
label="Name"
|
||||||
floatinglabel
|
floatinglabel
|
||||||
value={{name}}></paper-input>
|
value={{name}}></paper-input>
|
||||||
|
|||||||
@@ -4,11 +4,7 @@ Template.containerDialog.helpers({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.containerEdit.onRendered(function(){
|
Template.containerDialog.events({
|
||||||
updatePolymerInputs(this);
|
|
||||||
});
|
|
||||||
|
|
||||||
Template.containerEdit.events({
|
|
||||||
"color-change": function(event, instance){
|
"color-change": function(event, instance){
|
||||||
Containers.update(instance.data.containerId, {$set: {color: event.color}});
|
Containers.update(instance.data.containerId, {$set: {color: event.color}});
|
||||||
},
|
},
|
||||||
@@ -20,8 +16,15 @@ Template.containerEdit.events({
|
|||||||
);
|
);
|
||||||
GlobalUI.closeDetail();
|
GlobalUI.closeDetail();
|
||||||
},
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.containerEdit.onRendered(function(){
|
||||||
|
updatePolymerInputs(this);
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.containerEdit.events({
|
||||||
//TODO validate input (integer, non-negative, etc) for these inputs and give validation errors
|
//TODO validate input (integer, non-negative, etc) for these inputs and give validation errors
|
||||||
"change #containerNameInput, input #containerNameInput": function(event){
|
"change #containerNameInput": function(event){
|
||||||
var name = Template.instance().find("#containerNameInput").value;
|
var name = Template.instance().find("#containerNameInput").value;
|
||||||
Containers.update(this._id, {$set: {name: name}});
|
Containers.update(this._id, {$set: {name: name}});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template name="characterSideList">
|
<template name="characterSideList">
|
||||||
{{#if characters.count}}
|
|
||||||
<core-item icon="social:people" label="Characters"></core-item>
|
<core-item icon="social:people" label="Characters"></core-item>
|
||||||
|
{{#if characters.count}}
|
||||||
<div>
|
<div>
|
||||||
{{#each characters}}
|
{{#each characters}}
|
||||||
<div class="singleLineItem">{{name}}</div>
|
<div class="singleLineItem">{{name}}</div>
|
||||||
|
|||||||
7
rpg-docs/client/views/guide/guide.css
Normal file
7
rpg-docs/client/views/guide/guide.css
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.wallOfText h2{
|
||||||
|
margin-top: 24px
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallOfText p{
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<template name="guide">
|
<template name="guide">
|
||||||
|
<div class="wallOfText">
|
||||||
<h1>Dicecloud Beta</h1>
|
<h1>Dicecloud Beta</h1>
|
||||||
<p>Welcome to the Dicecloud beta. Please don't share the link with people you don't actively play with, since the beta is intended to be small, and your experience will probably get laggy if it gets more traffic than I'm expecting.</p>
|
<p>Welcome to the Dicecloud beta. Please don't share the link with people you don't actively play with, since the beta is intended to be small, and your experience will probably get laggy if it gets more traffic than I'm expecting.</p>
|
||||||
<p>The beta is going to start with just the character sheet. You can play D&D without minis and maps, without a pre-written adventure, you can play without a lot of things, but the character sheet is necessary. So I'm starting here and working my way outwards.</p>
|
<p>The beta is going to start with just the character sheet. You can play D&D without minis and maps, without a pre-written adventure, you can play without a lot of things, but the character sheet is necessary. So I'm starting here and working my way outwards.</p>
|
||||||
@@ -10,7 +11,7 @@
|
|||||||
<p>You need to swim through a sunken section of dungeon to fetch the quest's Thing.<br>You'll need to take off your magical Plate Armor of +1 Constitution to swim without sinking, of course. Taking it off will change your armor class, your speed and your constitution, which in turn changes your hitpoints and your constitution saving throw. Working out all those changes in the middle of a game will drag the game to a hault. <br> Fortunately you have a digital character sheet, so it's a matter of dragging your Plate Armor +1 Con from your "equipment" box to your "backpack" box and you're done. Your hitpoints change correctly, your saving throws are up to date, your armor class goes back to reflecting the fact that you have natural armor from being a dragonborn. Your character sheet keeps up and you ultimately get more time to play the game. Huzzah!</p>
|
<p>You need to swim through a sunken section of dungeon to fetch the quest's Thing.<br>You'll need to take off your magical Plate Armor of +1 Constitution to swim without sinking, of course. Taking it off will change your armor class, your speed and your constitution, which in turn changes your hitpoints and your constitution saving throw. Working out all those changes in the middle of a game will drag the game to a hault. <br> Fortunately you have a digital character sheet, so it's a matter of dragging your Plate Armor +1 Con from your "equipment" box to your "backpack" box and you're done. Your hitpoints change correctly, your saving throws are up to date, your armor class goes back to reflecting the fact that you have natural armor from being a dragonborn. Your character sheet keeps up and you ultimately get more time to play the game. Huzzah!</p>
|
||||||
<h2>Creating a Character</h2>
|
<h2>Creating a Character</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>In the <a href={{pathFor route="characterList"}}>character list</a>, click the plus button, floating in the bottom left corner.</li>
|
<li>In the <a href={{pathFor route="characterList"}}>character list</a>, click the plus button, floating in the bottom right corner.</li>
|
||||||
<li>Give your character a name, gender and race, these can be changed later if you change your mind. Then click the Add button</li>
|
<li>Give your character a name, gender and race, these can be changed later if you change your mind. Then click the Add button</li>
|
||||||
<li>Your new character should open, with most of its attributes and abilities at zero.</li>
|
<li>Your new character should open, with most of its attributes and abilities at zero.</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -40,7 +41,7 @@
|
|||||||
<p>Your character currently doesn't have any ability scores, so lets fix that. Whether you roll your abilities or point-buy them, lets add a feature to represent where they came from</p>
|
<p>Your character currently doesn't have any ability scores, so lets fix that. Whether you roll your abilities or point-buy them, lets add a feature to represent where they came from</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Navigate to the <emd>Features</emd> tab</li>
|
<li>Navigate to the <emd>Features</emd> tab</li>
|
||||||
<li>Click the plus button in the bottom left to add a new feature</li>
|
<li>Click the plus button in the bottom right to add a new feature</li>
|
||||||
<li>Give the Feature a name, like <em>Point Buy</em></li>
|
<li>Give the Feature a name, like <em>Point Buy</em></li>
|
||||||
<li>Leave the feature as always enabled, don't limit its uses, and leave the description blank</li>
|
<li>Leave the feature as always enabled, don't limit its uses, and leave the description blank</li>
|
||||||
<li>Click the <em>Add Effect</em> button</li>
|
<li>Click the <em>Add Effect</em> button</li>
|
||||||
@@ -87,4 +88,5 @@
|
|||||||
<li>Change your level and check that the <em>Stats</em> tab gets updated accordingly</li>
|
<li>Change your level and check that the <em>Stats</em> tab gets updated accordingly</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>You can try all sorts of calculations in your effects and in certain other places too. For example if you had some feature that is used a number of times equal to your wisdom modifier or 1, whichever is lower, you could limit its uses to <em>min(1, wisdomMod)</em> and the character sheet will figure it out for you, and update itself if you wisdom modifier happens to change later.</p>
|
<p>You can try all sorts of calculations in your effects and in certain other places too. For example if you had some feature that is used a number of times equal to your wisdom modifier or 1, whichever is lower, you could limit its uses to <em>min(1, wisdomMod)</em> and the character sheet will figure it out for you, and update itself if you wisdom modifier happens to change later.</p>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -9,23 +9,27 @@ evaluate = function(charId, string){
|
|||||||
}
|
}
|
||||||
//ability modifiers
|
//ability modifiers
|
||||||
var abilityMods = [
|
var abilityMods = [
|
||||||
"STRENGTHMOD",
|
"strengthMod",
|
||||||
"DEXTERITYMOD",
|
"dexterityMod",
|
||||||
"CONSTITUTIONMOD",
|
"constitutionMod",
|
||||||
"INTELLIGENCEMOD",
|
"intelligenceMod",
|
||||||
"WISDOMMOD",
|
"wisdomMod",
|
||||||
"CHARISMAMOD",
|
"charismaMod",
|
||||||
];
|
];
|
||||||
if (_.contains(abilityMods, sub.toUpperCase())){
|
if (_.contains(abilityMods, sub)){
|
||||||
var slice = sub.slice(0, -3);
|
var slice = sub.slice(0, -3);
|
||||||
|
try {
|
||||||
return char.abilityMod(slice);
|
return char.abilityMod(slice);
|
||||||
|
} catch (e){
|
||||||
|
return sub;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//class levels
|
//class levels
|
||||||
if (/\w+levels?\b/gi.test(sub)){
|
if (/\w+levels?\b/gi.test(sub)){
|
||||||
//strip out "level"
|
//strip out "level"
|
||||||
var className = sub.replace(/levels?\b/gi, "");
|
var className = sub.replace(/levels?\b/gi, "");
|
||||||
var cls = Classes.findOne({charId: charId, name: className});
|
var cls = Classes.findOne({charId: charId, name: className});
|
||||||
return cls && cls.level;
|
return cls && cls.level || sub;
|
||||||
}
|
}
|
||||||
//character level
|
//character level
|
||||||
if (sub.toUpperCase() === "LEVEL"){
|
if (sub.toUpperCase() === "LEVEL"){
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Meteor.publish("singleCharacter", function(characterId, userId){
|
Meteor.publish("singleCharacter", function(characterId){
|
||||||
|
userId = this.userId;
|
||||||
|
if (!userId) return [];
|
||||||
var char = Characters.findOne({
|
var char = Characters.findOne({
|
||||||
_id: characterId,
|
_id: characterId,
|
||||||
$or: [
|
$or: [
|
||||||
@@ -29,5 +31,7 @@ Meteor.publish("singleCharacter", function(characterId, userId){
|
|||||||
{fields: {username: 1}}
|
{fields: {username: 1}}
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user