Revision: 345
Author: todd.chambery
Date: Sun Oct 4 19:32:37 2009
Log: skill stuff
http://code.google.com/p/charactermanager/source/detail?r=345
Modified:
/trunk/charmgrjs/common.js
/trunk/charmgrjs/main.js
/trunk/charmgrjs/races.js
/trunk/charmgrjs/skills.js
=======================================
--- /trunk/charmgrjs/common.js Sat Oct 3 13:23:43 2009
+++ /trunk/charmgrjs/common.js Sun Oct 4 19:32:37 2009
@@ -200,7 +200,9 @@
armordata = armor.first( {
id : char_armor[i].armor_id
});
- armor_bonus += parseInt(armordata.armor_bonus);
+ if(armordata.bon != '-') {
+ armor_bonus += parseInt(armordata.bon);
+ }
if(armordata.max_dex_bonus != '-') {
max_dex_bonus = (max_dex_bonus == null ?
parseInt(armordata.max_dex_bonus) : Math.min(max_dex_bonus,
parseInt(armordata.max_dex_bonus)));
}
@@ -278,7 +280,9 @@
autoOpen : false,
title : title
});
+// $("tr:even").css("background-color", "#EFF1F1");
$("#mydialog").dialog('open');
+
return false;
}
=======================================
--- /trunk/charmgrjs/main.js Sat Oct 3 13:23:43 2009
+++ /trunk/charmgrjs/main.js Sun Oct 4 19:32:37 2009
@@ -339,8 +339,8 @@
});
$('#armor_' + j + '_name').text(
armor_data.name);
// populate with char overrides
- $('#armor_' + j + '_bon').text(armor_data.armor_bonus);
- $('#armor_' + j + '_acp').text(armor_data.armor_check_penalty);
+ $('#armor_' + j + '_bon').text(armor_data.bon);
+ $('#armor_' + j + '_acp').text(armor_data.acp);
$('#armor_' + j + '_note').text(chardata.armor[j]['notes']);
}
=======================================
--- /trunk/charmgrjs/races.js Thu Sep 17 09:11:56 2009
+++ /trunk/charmgrjs/races.js Sun Oct 4 19:32:37 2009
@@ -26,7 +26,7 @@
'Dex': 2,
'Con': -2
},
- skills: {},
+ skills: { 28 : 2 },
size: "medium",
favored_class: 10
}, {
@@ -37,7 +37,7 @@
'Con': 2,
'Str': -2
},
- skills: {},
+ skills: { 28 : 2 },
size: "small",
favored_class: 1
}, {
@@ -45,7 +45,8 @@
name: "Half-Elf",
shortname: "H-E",
abilities: {},
- skills: {skill_id: 7, mod: 2},
+ skills: { 7 : 2,
+ 28: 1 },
size: "medium",
favored_class: -1
}, {
@@ -68,7 +69,7 @@
'Dex': 2,
'Str': -2
},
- skills: {},
+ skills: { 28 : 2 },
size: "small",
favored_class: 8
}]);
=======================================
--- /trunk/charmgrjs/skills.js Sun Oct 4 15:06:05 2009
+++ /trunk/charmgrjs/skills.js Sun Oct 4 19:32:37 2009
@@ -28,7 +28,7 @@
}
}
- var race_mod = (race.skills['skill_id'] ==
skill.id ?
race.skills['mod'] : 0);
+ var race_mod = (race.skills[
skill.id] != null ?
race.skills[
skill.id] : 0);
var ranks = calc_ranks(chardata.class_id, char_skill_points, skill);
@@ -161,7 +161,9 @@
name: "Decipher Script",
class_data: ["x", "C", "x", "x", "x", "x", "x", "x", "C", "x", "C"],
synergies: [],
- feats: {84: 2},
+ feats: {
+ 84: 2
+ },
untrained: "No",
ability_id: 2,
detail: "<p class=sub>Use this skill to piece together the meaning of
ancient runes carved into the wall of an abandoned temple, to get the gist
of an intercepted letter written in the Infernal language, to follow the
directions on a treasure map written in a forgotten alphabet, or to
interpret the mysterious glyphs painted on a cave wall. <p
class=sub><b>Check</b>: You can decipher writing in an unfamiliar language
or a message written in an incomplete or archaic form. The base DC is 20
for the simplest messages, 25 for standard texts, and 30 or higher for
intricate, exotic, or very old writing. <p class=sub>If the check succeeds,
you understand the general content of a piece of writing about one page
long (or the equivalent). If the check fails, the DM makes a DC 5 Wisdom
check for your to see if you avoid drawing a false conclusion about the
text. (Success means that you do not draw a false conclusion; failure means
that you do.) <p class=sub>The DM secretly makes both the Decipher Script
check and (if necessary) the Wisdom check, so that you can't tell
whether the conclusion you draw is true or false. <p
class=sub><b>Action</b>: Deciphering the equivalent of a single page of
script takes 1 minute (ten consecutive full-round actions). <p
class=sub><b>Try Again</b>: No. <p class=sub><b>Special</b>: A character
with the Diligent feat gets a +2 bonus on Decipher Script checks. <p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Decipher Script,
you get a +2 bonus on Use Magic Device checks involving scrolls."
@@ -172,8 +174,8 @@
// TODO - diplomacy synergies are context dependent
synergies: [2, 25],
feats: {
- 99: 2
-},
+ 99: 2
+ },
untrained: "Yes",
ability_id: 4,
detail: "Use this skill to persuade the chamberlain to let you see the
king, to negotiate peace between feuding barbarian tribes, or to convince
the ogre mages that have captured you that they should ransom you back to
your friends instead of twisting your limbs off one by one. Diplomacy
includes etiquette, social grace, tact, subtlety, and a way with words. A
skilled character knows the formal and informal rules of conduct, social
expectations, proper forms of address, and so on. This skill represents the
ability to give others the right impression of oneself, to negotiate
effectively, and to influence others. <p class=sub><b>Check</b>: You can
change the attitudes of others (nonplayer characters) with a successful
Diplomacy check; see the Influencing NPC Attitudes sidebar, below, for
basic DCs. (The <i>Dungeon Master's Guide</i> has more information on
influencing NPCs.) In negotiations, participants roll opposed Diplomacy
checks, and the winner gains the advantage. Opposed checks also resolve
situations when two advocates or diplomats plead opposite cases in a
hearing before a third party. <p class=sub><b>Action</b>: Changing
others' attitudes with Diplomacy generally takes at least 1 full minute
(10 consecutive full-round actions). In some situations, this time
requirement may greatly increase. A rushed Diplomacy check (such as an
attempt to head off a fight between two angry warriors) can be made as a
full-round action, but you take a -10 penalty on the check. <p
class=sub><b>Try Again</b>: Optional, but not recommended because retries
usually do not work. Even if the initial Diplomacy check succeeds, the
other character can be persuaded only so far, and a retry may do more harm
than good. If the initial check fails, the other character has probably
become more firmly committed to his position, and a retry is futile. <p
class=sub><b>Special</b>: A half-elf has a +2 racial bonus on Diplomacy
checks, thanks to her ability to relate well to others. <p class=sub>If you
have the Negotiator feat, you get a +2 bonus on Diplomacy checks. <p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Bluff, Knowledge
(nobility and royalty), or Sense Motive, you get a +2 bonus on Diplomacy
checks."
@@ -183,8 +185,8 @@
class_data: ["x", "x", "x", "x", "x", "x", "x", "x", "C", "x", "x"],
synergies: [],
feats: {
- 100: 2
-},
+ 100: 2
+ },
untrained: "No",
ability_id: 2,
detail: "<p class=sub>Use this skill to disarm a trap, jam a lock (in
either the open or closed position), or rig a wagon wheel to fall off. You
can examine a fairly simple or fairly small mechanical device and disable
it. The effort requires at least a simple tool of the appropriate sort (a
pick, pry bar, saw, file, etc.). Attempting a Disable Device check without
a set of thieves’ tools (page 130) carries a -2 circumstance penalty,
even if a simple tool is employed. The use of masterwork thieves’ tools
enables you to make the check with a +2 circumstance bonus. <p
class=sub><b>Check</b>: Your DM makes the Disable Device check for you
secretly, so that you don’t necessarily know whether you’ve succeeded.
The DC depends on how tricky the device is. Disabling (or rigging or
jamming) a fairly simple device has a DC of 10; more intricate and complex
devices have higher DCs. <p class=sub>If the check succeeds, you disable
the device. If it fails by 4 or less, you have failed but can try again. If
you fail by 5 or more, something goes wrong. If the device is a trap, you
spring it. If you’re attempting some sort of sabotage, you think the
device is disabled, but it still works normally. <p class=sub>You also can
rig simple devices such as saddles or wagon wheels to work normally for a
while and then fail or fall off some time later (usually after 1d4 rounds
or minutes of use). <table><tr><td>Device</td><td>Time</td><td>Disable
Device </sup></td><td>Example</td></tr> <tr><td>Simple</td><td>1
round</td><td>10</td><td>Jam a lock</td></tr><tr><td>Tricky</td><td>1d4
rounds</td><td>15</td><td>Sabotage a wagon
wheel</td></tr><tr><td>Difficult</td><td>2d4
rounds</td><td>20</td><td>Disarm a trap, reset a
trap</td></tr><tr><td>Wicked</td><td>2d4 rounds</td><td>25</td><td>Disarm a
complex trap, cleverly sabotage a clockwork device</td></tr><sup>1</sup> If
you attempt to leave behind no trace of your tampering, add 5 to the DC. <p
class=sub><b>Action</b>: The amount of time needed to make a Disable Device
check depends on the task, as noted above. Disabling a simple device takes
1 round and is a full-round action. An intricate or complex device requires
1d4 or 2d4 rounds. <p class=sub><b>Try Again</b>: Varies. You can retry if
you have missed the check by 4 or less, though you must be aware that you
have failed in order to try again. <p class=sub><b>Special</b>: If you have
the Nimble Fingers feat, you get a +2 bonus on Disable Device checks. <p
class=sub>A rogue who beats a trap’s DC by 10 or more can study the trap,
figure out how it works, and bypass it (along with her companions) without
disarming it. <p class=sub><b>Restriction</b>: Rogues (and other characters
with the trapfinding class feature) can disarm magic traps. A magic trap
generally has a DC of 25 + the spell level of the magic used to create it.
For instance, disarming a trap set by the casting of <i>explosive runes</i>
has a AC of 28 because explosive runes is a 3rd-level spell. <p
class=sub>The spells <i>fire trap</i>, <i>glyph of warding</i>,
<i>symbol</i>, and <i>teleportation circle</i> also create traps that a
rogue can disarm with a successful Disable Device check. <i>Spike
growth</i> and <i>spike stones</i>, however, create magic traps against
which Disable Device checks do not succeed. See the individual spell
descriptions in Chapter 11: Spells for details."
@@ -195,7 +197,7 @@
synergies: [2],
feats: {
81: 2
-},
+ },
untrained: "Yes",
ability_id: 4,
detail: "Use this skill to change your appearance or someone
else's. The effort requires at least a few props, some makeup, and some
time. The use of a disguise kit (page 130) provides a +2 circumstance bonus
to a Disguise check. A disguise can include an apparent change of height or
weight of no more than one-tenth the original. <p class=sub>You can also
use Disguise to impersonate people, either individuals or types. For
example, you might, with little or no actual disguise, make yourself seem
like a traveller even if you're a local. <p class=sub>Check: Your
Disguise check result determines how good the disguise is, and it is
opposed by others' Spot check results. If you don't draw any
attention to yourself, others do not get to make Spot checks. If you come
to the attention of people who are suspicious (such as a guard who is
watching commoners walking through a city gate), the DM can assume that
such observers are taking 10 on their Spot checks. <p class=sub>The
effectiveness of your disguise depends in part on how much you're
attempting to change your appearance.<table><tr><td
class=header>Disguise</td><td class=header>Disguise Check
Modifier</td></tr><tr><td>Minor details
only</td><td>+5</td></tr><tr><td>Disguised as different
gender<sup>1</sup></td><td>-2</td></tr><tr><td>Disguised as different
race<sup>1</sup></td><td>-2</td></tr><tr><td>Disguised as different age
category<sup>1</sup></td><td>-2<sup>2</sup></td></tr></table><sup>1</sup>
These modifiers are cumulative; use any that apply.<br/><sup>2</sup> Per
step of difference between your actual age category and your disguised age
category. The steps are: young (younger than adulthood), adulthood, middle
age, old, and venerable. <p class=sub>If you are impersonating a particular
individual, those who know what that person looks like get a bonus on their
Spot checks according to the table below. Furthermore, they are
automatically considered to be suspicious of you, so opposed checks are
always called for. <table><tr><td class=header>Familiarity</td><td
class=header>Viewer's Spot Check Bonus</td></tr><tr><td>Recognizes on
sight</td><td>+4</td></tr><tr><td>Friends or
associates</td><td>+6</td></tr> <tr><td>Close
friends</td><td>+8</td></tr><tr><td>Intimate</td><td>+10</td></tr></table><p
class=sub>Usually, an individual makes a Spot check to see through your
disguise immediately upon meeting you and each hour thereafter. If you
casually meet many different creatures, each for a short time, check once
per day or hour, using an average Spot modifier for the group. For example,
if you are trying to pass for a merchant at a bazaar, the DM can make one
Spot check per hour for the people you encounter, using a +1 bonus on the
check to represent the average for the crowd (most people with no Spot
ranks and a few with good Spot modifiers). <p class=sub><b>Action</b>:
Creating a disguise requires 1d3×10 minutes of work. <p class=sub><b>Try
Again</b>: Yes. You may try to redo a failed disguise, but once others know
that a disguise was attempted, they'll be more suspicious. <p
class=sub><b>Special</b>: Magic that alters your form, such as <i>alter
self</i>, <i>disguise self</i>, <i>polymorph</i>, or <i>shapechange</i>,
grants you a +10 bonus on Disguise checks (see the individual spell
descriptions in Chapter 11: Spells). You must succeed on a Disguise check
with a +10 bonus to duplicate the appearance of a specific individual using
the veil spell. Divination magic that allows people to see through
illusions (such as true seeing) does not penetrate a mundane disguise, but
it can negate the magical component of a magically enhanced one. <p
class=sub>You must make a Disguise check when you cast a simulacrum spell
(page 279), to determine how good the likeness is. <p class=sub>If you have
the Deceptive feat, you get a +2 bonus on Disguise checks. <p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Bluff, you get a
+2 bonus on Disguise checks when you know that you're being observed
and you try to act in character."
@@ -303,7 +305,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "See Knowledge (arcana).<p class=sub>If you have 5 or more
ranks in Knowledge (architecture and engineering), you get a +2 bonus on
Search checks made to find secret doors or hidden compartments."
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge
(architecture and engineering), you get a +2 bonus on Search checks made to
find secret doors or hidden compartments."
}, {
id: 20,
name: "Knowledge (dungeoneering)",
@@ -311,7 +313,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge
(dungeoneering), you get a +2 bonus on Survival checks made while
underground. "
}, {
id: 21,
name: "Knowledge (geography)",
@@ -319,7 +321,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge
(geography), you get a +2 bonus on Survival checks made to keep from
getting lost or to avoid natural hazards."
}, {
id: 22,
name: "Knowledge (history)",
@@ -327,7 +329,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge
(history), you get a +2 bonus on bardic knowledge checks (see page 28)."
}, {
id: 23,
name: "Knowledge (local)",
@@ -335,7 +337,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge (local),
you get a +2 bonus on Gather Information checks."
}, {
id: 24,
name: "Knowledge (nature)",
@@ -343,7 +345,7 @@
synergies: [40],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge
(nature), you get a +2 bonus on Survival checks made in aboveground natural
environments (aquatic, desert, forest, hill, marsh, mountains, or
plains).<p class=sub>If you have 5 or more ranks in Survival, you get a +2
bonus on Knowledge (nature) checks."
}, {
id: 25,
name: "Knowledge (nobility and royalty)",
@@ -351,7 +353,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge
(nobility and royalty), you get a +2 bonus on Diplomacy checks. "
}, {
id: 26,
name: "Knowledge (religion)",
@@ -359,7 +361,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge
(religion), you get a +2 bonus on turning checks against undead (see page
159). "
}, {
id: 27,
name: "Knowledge (the planes)",
@@ -367,7 +369,7 @@
synergies: [],
untrained: "No",
ability_id: 2,
- detail: "description"
+ detail: "See Knowledge (arcana) for full description.<p
class=sub><b>Synergy</b>: If you have 5 or more ranks in Knowledge (the
planes), you get a +2 bonus on Survival checks made while on other planes. "
}, {
id: 28,
name: "Listen",
@@ -378,7 +380,7 @@
},
untrained: "Yes",
ability_id: 5,
- detail: "description"
+ detail: "Use this skill to hear approaching enemies, to detect someone
sneaking up on you from behind, or to eavesdrop on someone else's
conversation. <p class=sub><b>Check</b>: Your Listen check is either made
against a DC that reflects how quiet the noise is that you might hear, or
it is opposed by your target's Move Silently check. <p class=sub>Your
DM may decide to make the Listen check for you, so that you don't know
whether not hearing anything means that nothing is there, or that you
failed the check. <table class=box> <tr class=header><td>Listen</td><td>DC
Sound</td></tr> <tr><td align=center>-10</td><td>A battle</td></tr> <tr><td
align=center>0</td><td>People talking<sup>1</sup></td></tr><tr><td
align=center>5</td><td>A person in medium armor walking at a slow pace (10
ft./round) trying not to make any noise.</td></tr> <tr><td
align=center>10</td><td>An unarmored person walking at a slow pace (15
ft./round) trying not to make any noise</td></tr> <tr><td
align=center>15</td><td>A 1st-level rogue using Move Silently to sneak past
the listener</td></tr> <tr><td align=center>15</td><td>People
whispering<sup>1</sup></td></tr><tr><td align=center>19</td><td>A cat
stalking</td></tr> <tr><td align=center>30</td><td>An owl gliding in for a
kill</td></tr> </table><p class=sub><sup>1</sup> If you beat the DC by 10
or more, you can make out what's being said, assuming that you
understand the language. <p class=sub><table class=box> <tr
class=header><td>Listen DC Modifier</td><td>Condition</td></tr><tr><td
align=center>+5</td><td>Through a door</td></tr> <tr><td
align=center>+15</td><td>Through a stone wall</td></tr> <tr><td
align=center>+1</td><td>Per 10 feet of distance</td></tr> <tr><td
align=center>+5</td><td>Listener distracted </td></tr></table> <p
class=sub>In the case of people trying to be quiet, the DCs given on the
table could be replaced by Move Silently checks, in which case theindicated
DC would be their average check result (or close to it). For instance, the
DC 19 noted on the table for a cat stalking means that an average cat has a
+9 bonus on Move Silently checks. Assuming an average roll of 10 on 1d20,
its Move Silently check result would be 19. <p class=sub><b>Action</b>:
Varies. Every time you have a chance to hear something in a reactive manner
(such as when someone makes a noise or you move into a new area), you can
make a Listen check without using an action. Trying to hear something you
failed to hear previously is a move action. <p class=sub><b>Try Again</b>:
Yes. You can try to hear something that you failed to hear previously with
no penalty. <p class=sub><b>Special</b>: When several characters are
listening to the same thing, a single 1d20 roll can be used for all the
individuals' Listen checks. A fascinated creature takes a -4 penalty on
Listen checks made as reactions. <p class=sub>If you have the Alertness
feat, you get a +2 bonus on Listen checks. <p class=sub>A ranger gains a
bonus on Listen checks when using this skill against a favored enemy (see
page 47). <p class=sub>An elf, gnome, or halfling has a +2 racial bonus on
Listen checks, thanks to the keen ears with which members of those races
are blessed. <p class=sub>A half-elf has a +1 racial bonus on Listen
checks. Her hearing is good because of her elven heritage, but not as keen
as that of a full elf. <p class=sub>A sleeping character may make Listen
checks at a -10 penalty. A successful check awakens the sleeper."
}, {
id: 29,
name: "Move Silently",
@@ -394,8 +396,8 @@
class_data: ["x", "x", "x", "x", "x", "x", "x", "x", "C", "x", "x"],
synergies: [],
feats: {
- 100: 2
-},
+ 100: 2
+ },
untrained: "No",
ability_id: 1,
detail: "description"