Revision: 337
Author: todd.chambery
Date: Fri Sep 25 13:44:22 2009
Log: spells
small fixes
http://code.google.com/p/charactermanager/source/detail?r=337
Modified:
/trunk/charmgrjs/common.js
/trunk/charmgrjs/edit_feats2.js
/trunk/charmgrjs/main.js
/trunk/charmgrjs/spells.js
=======================================
--- /trunk/charmgrjs/common.js Wed Sep 23 19:33:36 2009
+++ /trunk/charmgrjs/common.js Fri Sep 25 13:44:22 2009
@@ -57,6 +57,12 @@
do_spells(chardata);
}
}
+
+function count_attrs(obj) {
+ var count = 0;
+ for (k in obj) if (obj.hasOwnProperty(k)) count++;
+ return count;
+}
// TODO - this is a mess, as you knew it would be
function create_select(name, items, onchange_action, include_empty, style,
category_filter) {
=======================================
--- /trunk/charmgrjs/edit_feats2.js Wed Sep 23 15:53:43 2009
+++ /trunk/charmgrjs/edit_feats2.js Fri Sep 25 13:44:22 2009
@@ -152,7 +152,7 @@
function show_rogue_specials() {
$('#rogue_specials').toggle();
var hidden = $('#rogue_specials').is(':hidden');
- $('#rogue_special_expand_flag').text(hidden ? '+' : '-');
+ $('#rogue_specials_expand_flag').text(hidden ? '+' : '-');
}
function update_feats_remaining(chardata) {
=======================================
--- /trunk/charmgrjs/main.js Fri Sep 25 10:40:09 2009
+++ /trunk/charmgrjs/main.js Fri Sep 25 13:44:22 2009
@@ -154,7 +154,7 @@
// class special abilities
var class_specials = get_special_abilities(chardata);
var special_html = "";
- if (class_specials.length > 0) {
+ if (count_attrs(class_specials) > 0) {
special_html += "<table style='border: 1px solid #D0D0D0' width='100%'
border='0' margin='0'><tbody><tr><td colspan='2' bgcolor='#8DC3E9'
onclick='show_specials()'><a class='fake_link'
onclick='show_specials()'>Special Abilities</a><span
id='specials_expand_flag' class='box'>+</span></td></tr></tbody><tbody
id='specials'>";
for (var i in class_specials) {
if(class_specials[i] != null) {
@@ -555,7 +555,7 @@
function show_specials() {
$('#specials').toggle();
var hidden = $('#specials').is(':hidden');
- $('#special_expand_flag').text(hidden ? '+' : '-');
+ $('#specials_expand_flag').text(hidden ? '+' : '-');
}
function calc_critical(weapon_critical, char_weapon, char_feats) {
=======================================
--- /trunk/charmgrjs/spells.js Fri Sep 25 10:40:09 2009
+++ /trunk/charmgrjs/spells.js Fri Sep 25 13:44:22 2009
@@ -2807,7 +2807,7 @@
save: "-",
sr: "-",
phb: 228,
- detail: ""
+ detail: "This spell conjures a field of rubbery black tentacles, each
10 feet long. These waving members seem to spring forth from the earth,
floor, or whatever surface is underfoot—including water. They grasp and
entwine around creatures that enter the area, holding them fast and
crushing them with great strength. <p class=sub>Every creature within the
area of the spell must make a grapple check, opposed by the grapple check
of the tentacles. Treat the tentacles attacking a particular target as a
Large creature with a base attack bonus equal to your caster level and a
Strength score of 19. Thus, its grapple check modifier is equal to your
caster level +8. The tentacles are immune to all types of damage. <p
class=sub>Once the tentacles grapple an opponent, they may make a grapple
check each round on your turn to deal 1d6+4 points of bludgeoning damage.
The tentacles continue to crush the opponent until the spell ends or the
opponent escapes. <p class=sub>Any creature that enters the area of the
spell is immediately attacked by the tentacles. Even creatures who
aren't grappling with the tentacles may move through the area at only
half normal speed. <p class=sub><i>Material Component</i>: A piece of
tentacle from a giant octopus or a giant squid."
}, {
id: 185,
name: "Expeditious Retreat",
@@ -2822,7 +2822,7 @@
save: "-",
sr: "-",
phb: 228,
- detail: ""
+ detail: "This spell increases your base land speed by 30 feet. (This
adjustment is treated as an enhancement bonus.) There is no effect on other
modes of movement, such as burrow, climb, fly, or swim. As with any effect
that increases your speed, this spell affects your jumping distance (see
the Jump skill, page 77). <p class=sub>This spell need not be used as part
of a retreat; the name of the spell merely hints at the typical
wizard's attitude towards combat."
}, {
id: 186,
name: "Explosive Runes",
@@ -2837,7 +2837,7 @@
save: "Special",
sr: "Yes",
phb: 228,
- detail: ""
+ detail: "You trace these mystic runes upon a book, map, scroll, or
similar object bearing written information. The <i>runes</i> detonate when
read, dealing 6d6 points of force damage. Anyone next to the <i>runes</i>
(close enough to read them) takes the full damage with no saving throw; any
other creature within 10 feet of the <i>runes</i> is entitled to a Reflex
save for half damage. The object on which the runes were written also takes
full damage (no saving throw). <p class=sub>You and any characters you
specifically instruct can read the protected writing without triggering the
<i>runes</i>. Likewise, you can remove the <i>runes</i> whenever desired.
Another creature can remove them with a successful <i>dispel magic</i> or
<i>erase</i> spell, but attempting to dispel or erase the runes and failing
to do so triggers the explosion. <p class=sub><i>Note</i>: Magic traps such
as <i>explosive runes</i> are hard to detect and disable. A rogue (only)
can use the Search skill to find the <i>runes</i> and Disable Device to
thwart them. The DC in each case is 25 + spell level, or 28 for
<i>explosive runes</i>."
}, {
id: 187,
name: "Eyebite",
@@ -2852,7 +2852,7 @@
save: "Fort negs",
sr: "Yes",
phb: 228,
- detail: ""
+ detail: "Each round, you may target a single living creature, striking
it with waves of evil power. Depending on the target's HD, this attack
has as many as three effects. <table><tr
class=header><td>HD</td><td>Effect</td></tr> <tr><td align=center>10 or
more</td><td>Sickened</td></tr> <tr><td align=center>5–9</td><td>Panicked,
sickened</td></tr> <tr><td align=center>4 or less</td><td>Comatose,
panicked, sickened</td></tr></table> <p class=sub>The effects are
cumulative and concurrent. <p class=sub><i>Sickened</i>: Sudden pain and
fever sweeps over the subject's body. A sickened creature takes a –2
penalty on attack rolls, weapon damage rolls, saving throws, skill checks,
and ability checks. A creature affected by this spell remains sickened for
10 minutes per caster level. The effects cannot be negated by a <i>remove
disease</i> or <i>heal</i> spell, but a <i>remove curse</i> is effective.
<p class=sub><i>Panicked</i>: The subject becomes panicked for 1d4 rounds.
Even after the panic ends, the creature remains shaken for 10 minutes per
caster level, and it automati-cally becomes panicked again if it comes
within sight of you during that time. This is a fear effect. <p
class=sub><i>Comatose</i>: The subject falls into a catatonic coma for 10
minutes per caster level. During this time, it cannot be awakened by any
means short of dispelling the effect. This is not a <i>sleep</i> effect,
and thus elves are not immune to it. <p class=sub>The spell lasts for 1
round per three caster levels. You must spend a move action each round
after the first to target a foe."
}, {
id: 188,
name: "Fabricate",
@@ -2867,7 +2867,7 @@
save: "-",
sr: "-",
phb: 229,
- detail: ""
+ detail: "You convert material of one sort into a product that is of
the same material. Thus, you can fabricate a wooden bridge from a clump of
tress, a rope from a patch of hemp, clothes from flax or wool, and so
forth. Creatures or magic items cannot be created or transmuted by the
fabricate spell. The quality of items made by this spell is commensurate
with the quality of material used as the basis for the new fabrication. If
you work with a mineral, the target is reduced to 1 cubic foot per level
instead of 10 cubic feet. <p class=sub>You must make an appropriate Craft
check to fabricate articles requiring a high degree of craftsmanship
(jewelry, swords, glass, crystal, and the like). <p class=sub>Casting
requires 1 round per 10 cubic feet (or 1 cubic foot) of material to be
affected by the spell. <p class=sub><i>Material Component</i>: The original
material, which costs the same amount as the raw materials required to
craft the item to be created."
}, {
id: 189,
name: "Faerie Fire",
@@ -2882,7 +2882,7 @@
save: "-",
sr: "Yes",
phb: 229,
- detail: ""
+ detail: "A pale glow surrounds and outlines the subjects. Outlined
subjects shed light as candles. Outlined creatures do not benefit from the
concealment normally provided by darkness (though a 2nd-level or higher
magical <i>darkness</i> effect functions normally), <i>blur</i>,
displacement, invisibility, or similar effects. The light is too dim to
have any special effect on undead or dark-dwelling creatures vulnerable to
light. The <i>faerie fire</i> can be blue, green, or violet, according to
your choice at the time of casting. The <i>faerie fire</i> does not cause
any harm to the objects or creatures thus outlined."
}, {
id: 190,
name: "False Life",
@@ -2897,7 +2897,7 @@
save: "-",
sr: "-",
phb: 229,
- detail: ""
+ detail: "You harness the power of unlife to grant yourself a limited
ability to avoid death. While this spell is in effect, you gain temporary
hit points equal to 1d10 +1 per caster level (maximum +10). <p
class=sub><i>Material Component</i>: A small amount of alcohol or distilled
spirits, which you use to trace certain sigils on your body during casting.
These sigils cannot be seen once the alcohol or spirits evaporate."
}, {
id: 191,
name: "False Vision",
@@ -2912,7 +2912,7 @@
save: "-",
sr: "-",
phb: 229,
- detail: ""
+ detail: "Any divination (scrying) spell used to view anything within
the area of this spell instead receives a false image (as the <i>major
image</i> spell), as defined by you at the time of casting. As long as the
duration lasts, you can concentrate to change the image as desired. While
you aren't concentrating, the image remains static. <p
class=sub><i>Arcane Material Component</i>: The ground dust of a piece of
jade worth at least 250 gp, which is sprinkled into the air when the spell
is cast."
}, {
id: 192,
name: "Fear",
@@ -2927,7 +2927,7 @@
save: "Will part",
sr: "Yes",
phb: 229,
- detail: ""
+ detail: "An invisible cone of terror causes each living creature in
the area to become panicked unless it succeeds on a Will save. If cornered,
a panicked creature begins cowering. (See the <i>Dungeon Master's
Guide</i> for more information on fear-panicked creatures.) If the Will
save succeeds, the crea-ture is shaken for 1 round. <p
class=sub><i>Material Component</i>: Either the heart of a hen or a white
feather."
}, {
id: 193,
name: "Feather Fall",
@@ -2942,7 +2942,7 @@
save: "Will negs",
sr: "Yes",
phb: 229,
- detail: ""
+ detail: "The affected creatures or objects fall slowly, though faster
than feathers typically do. <i>Feather fall</i> instantly changes the rate
at which the targets fall to a mere 60 feet per round (equivalent to the
end of a fall from a few feet), and the subjects take no damage upon
landing while the spell is in effect. However, when the spell duration
expires, a normal rate of falling resumes. <p class=sub><i>The spell
affects one or more Medium or smaller creatures (including gear and carried
objects up to each creature's maximum load) or objects, or the
equivalent in larger creatures</i>: A Large creature or object counts as
two Medium creatures or objects, a Huge creature or object counts as two
Large creatures or objects, and so forth. <p class=sub>You can cast this
spell with an instant utterance, quickly enough to save yourself if you
unexpectedly fall. Casting the spell is a free action, like casting a
quickened spell, and it counts toward the normal limit of one quickened
spell per round. You may even cast this spell when it isn't your turn.
<p class=sub>This spell has no special effect on ranged weapons unless they
are falling quite a distance. If the spell is cast on a falling item, such
as a boulder dropped from the top of a castle wall, the object does half
normal damage based on its weight, with no bonus for the height of the
drop. (See the <i>Dungeon Master's Guide</i> for information on falling
objects.) <p class=sub><i>Feather fall</i> works only upon free-falling
objects. It does not affect a sword blow or a charging or flying creature."
}, {
id: 194,
name: "Feeblemind",
@@ -2957,7 +2957,7 @@
save: "Will negs",
sr: "Yes",
phb: 229,
- detail: ""
+ detail: "If the target creature fails a Will saving throw, its
Intelligence and Charisma scores each drop to 1, giving it roughly the
intellect of a lizard. The affected creature is unable to use Intelligence-
or Charisma-based skills, cast spells, understand language, or communicate
coherently. Still, it knows who its friends are and can follow them and
even protect them. The subject remains in this state until a <i>heal</i>,
<i>limited wish</i>, <i>miracle</i>, or <i>wish</i> spell is used to cancel
the effect of the <i>feeblemind</i>. A creature that can cast arcane
spells, such as a sorcerer or a wizard, takes a –4 penalty on its saving
throw. <p class=sub><i>Material Component</i>: A handful of clay, crystal,
glass, or mineral spheres."
}, {
id: 195,
name: "Find the Path",
@@ -2972,7 +2972,7 @@
save: "Will negs",
sr: "Yes",
phb: 230,
- detail: ""
+ detail: "The recipient of this spell can find the shortest, most
direct physical route to a specified destination, be it the way into or out
of a locale. The locale can be outdoors, underground, or even inside a
<i>maze</i> spell. Find the path works with respect to locations, not
objects or creatures at a locale. Thus, the subject could not find the way
to “a forest where a green dragon lives” or “a hoard of platinum pieces,”
but it could find the exit to a labyrinth. The location must be on the same
plane as you are at the time of casting. <p class=sub>The spell enables the
subject to sense the correct direction that will eventually lead it to its
destination, indicating at appropriate times the exact path to follow or
physical actions to take. For example, the spell enables the subject to
sense trip wires or the proper word to bypass a <i>glyph of warding</i>.
The spell ends when the destination is reached or the duration expires,
whichever comes first. Find the path can be used to remove the subject and
its companions from the effect of a <i>maze</i> spell in a single round. <p
class=sub>This divination is keyed to the recipient, not its companions,
and its effect does not predict or allow for the actions of creatures
(including guardians). <p class=sub><i>Focus</i>: A set of divination
counters of the sort you favor--bones, ivory counters, sticks, carved
runes, or the like."
}, {
id: 196,
name: "Find Traps",
@@ -2987,7 +2987,7 @@
save: "-",
sr: "-",
phb: 230,
- detail: ""
+ detail: "You gain intuitive insight into the workings of traps. You
can use the Search skill to detect traps just as a rogue can. In addition,
you gain an insight bonus equal to one-half your caster level (maximum +10)
on Search checks made to find traps while the spell is in effect. <p
class=sub>Note that <i>find traps</i> grants no ability to disable the
traps that you may find."
}, {
id: 197,
name: "Finger of Death",
@@ -3002,7 +3002,7 @@
save: "Fort part",
sr: "Yes",
phb: 230,
- detail: ""
+ detail: "You can slay any one living creature within range. The target
is entitled to a Fortitude saving throw to survive the attack. If the save
is successful, the creature instead takes 3d6 points of damage +1 point per
caster level (maximum +25). The subject might die from damage even if it
succeeds on its saving throw."
}, {
id: 198,
name: "Fire Seeds",
@@ -3017,7 +3017,7 @@
save: "Ref half",
sr: "-",
phb: 230,
- detail: ""
+ detail: "Depending on the version of <i>fire seeds</i> you choose, you
turn acorns into splash weapons that you or another character can throw, or
you turn holly berries into bombs that you can detonate on command. <p
class=sub><i>Acorn Grenades</i>: As many as four acorns turn into special
splash weapons that can be hurled as far as 100 feet. A ranged touch attack
roll is required to strike the intended target. Together, the acorns are
capable of dealing 1d6 points of fire damage per caster level (maximum
20d6), divided up among the acorns as you wish. For example, a 20th-level
druid could create one 20d6 missile, two 10d6 missiles, one 11d6 and three
3d6 missiles, or any other combination totalling up to four acorns and 20d6
points of damage. <p class=sub>Each acorn explodes upon striking any hard
surface. In addition to its regular fire damage, it deals 1 point of splash
damage per die, and it ignites any combustible materials within 10 feet. A
creature within this area that makes a successful Reflex saving throw takes
only half damage; a creature struck directly is not allowed a saving throw.
<p class=sub><i>Holly Berry Bombs</i>: You turn as many as eight holly
berries into special bombs. The holly berries are usually placed by hand,
since they are too light to make effective thrown weapons (they can be
tossed only 5 feet). If you are within 200 feet and speak a word of
command, each berry instantly bursts into flame, causing 1d8 points of fire
damage +1 point per caster level to every creature in a 5-foot-radius burst
and igniting any combustible materials within 5 feet. A creature in the
area that makes a successful Reflex saving throw takes only half damage. <p
class=sub><i>Material Component</i>: The acorns or holly berries."
}, {
id: 199,
name: "Fire Shield",
@@ -3032,7 +3032,7 @@
save: "-",
sr: "-",
phb: 230,
- detail: ""
+ detail: "This spell wreathes you in flame and causes damage to each
creature that attacks you in melee. The flames also protect you from either
cold-based or fire-based attacks (your choice). <p class=sub>Any creature
striking you with its body or a handheld weapon deals normal damage, but at
the same time the attacker takes 1d6 points of damage +1 point per caster
level (maximum +15). This damage is either cold damage (if the
<i>shield</i> protects against fire-based attacks) or fire damage (if the
<i>shield</i> protects against cold-based attacks). If the attacker has
spell resistance, it applies to this effect. Creatures wielding weapons
with exceptional reach are not subject to this damage if they attack you.
<p class=sub>When casting this spell, you appear to immolate yourself, but
the flames are thin and wispy, giving off light equal to only half the
illumination of a normal torch (10 feet). The color of the flames is
determined randomly (50% chance of either color)--blue or green if the
<i>chill shield</i> is cast, violet or blue if the <i>warm shield</i> is
employed. The special powers of each version are as follows. <p
class=sub><i>Warm Shield</i>: The flames are warm to the touch. You take
only half damage from cold-based attacks. If such an attack allows a Reflex
save for half damage, you take no damage on a successful save. <p
class=sub><i>Chill Shield</i>: The flames are cool to the touch. You take
only half damage from fire-based attacks. If such an attack allows a Reflex
save for half damage, you take no damage on a successful save. <p
class=sub><i>Arcane Material Component</i>: A bit of phosphorus for the
<i>warm</i> shield; a live fire-fly or glowworm or the tail portions of
four dead ones for the <i>chill</i> shield."
}, {
id: 200,
name: "Fire Storm",
@@ -3047,7 +3047,7 @@
save: "Ref half",
sr: "Yes",
phb: 231,
- detail: ""
+ detail: "When a <i>fire storm</i> spell is cast, the whole area is
shot through with sheets of roaring flame. The raging flames do not harm
nat-ural vegetation, ground cover, and any plant creatures in the area that
you wish to exclude from damage. Any other creature within the area takes
1d6 points of fire damage per caster level (maximum 20d6)."
}, {
id: 201,
name: "Fire Trap",
@@ -3062,7 +3062,7 @@
save: "Ref half",
sr: "Yes",
phb: 231,
- detail: ""
+ detail: "<i>Fire trap</i> creates a fiery explosion when an intruder
opens the item that the trap protects. A <i>fire trap</i> can ward any
object that can be opened and closed (book, box, bottle, chest, coffer,
coffin, door, drawer, and so forth). <p class=sub>When casting <i>fire
trap</i>, you select a point on the object as the spell's center. When
someone other than you opens the object, a fiery explosion fills the area
within a 5-foot radius around the spell's center. The flames deal 1d4
points of fire damage +1 point per caster level (maximum +20). The item
protected by the trap is not harmed by this explosion. <p class=sub>A
<i>fire trapped</i> item cannot have a second closure or warding spell
placed on it. <p class=sub>A <i>knock</i> spell does not bypass a <i>fire
trap</i>. An unsuccessful <i>dispel magic</i> spell does not detonate the
spell. <p class=sub>Underwater, this ward deals half damage and creates a
large cloud of steam. <p class=sub>You can use the <i>fire trapped</i>
object without discharging it, as can any individual to whom the object was
specifically attuned when cast. Attuning a <i>fire trapped</i> object to an
individual usually involves setting a password that you can share with
friends. <p class=sub><i>Note</i>: Magic traps such as <i>fire trap</i> are
hard to detect and disable. A rogue (only) can use the Search skill to find
a <i>fire trap</i> and Disable Device to thwart it. The DC in each case is
25 + spell level (DC 27 for a druid's <i>fire trap</i> or DC 29 for the
arcane version). <p class=sub><i>Material Component</i>: A half-pound of
gold dust (cost 25 gp) sprinkled on the warded object."
}, {
id: 202,
name: "Fireball",