[charactermanager] r342 committed - spells

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 2, 2009, 7:25:48 PM10/2/09
to characterman...@googlegroups.com
Revision: 342
Author: todd.chambery
Date: Fri Oct 2 15:24:42 2009
Log: spells
http://code.google.com/p/charactermanager/source/detail?r=342

Modified:
/trunk/charmgrjs/charmgr.css
/trunk/charmgrjs/edit.js
/trunk/charmgrjs/spells.js

=======================================
--- /trunk/charmgrjs/charmgr.css Thu Sep 10 14:37:02 2009
+++ /trunk/charmgrjs/charmgr.css Fri Oct 2 15:24:42 2009
@@ -130,4 +130,5 @@

.new_weapon {
background-color: #dcecff;
-}
+ text-align: center;
+}
=======================================
--- /trunk/charmgrjs/edit.js Fri Oct 2 04:12:16 2009
+++ /trunk/charmgrjs/edit.js Fri Oct 2 15:24:42 2009
@@ -23,7 +23,7 @@
function build_edit_page(chardata) {
set_links_part(chardata, 1);

- var edit_page_layout = "<form name='charmgr'><div id='topline'
class='dp100'></div><div id='abilitiespart' class='dp100'></div><br
style='clear:both'/><div id='middlepart' class='dp60'><div id='weaponspart'
class='dp100'></div><div id='armorpart' class='dp100'></div></div><div
id='skillspart' class='dp33'></div><div class='clear'></div></form>";
+ var edit_page_layout = "<form name='charmgr'><div id='topline'
class='dp100'></div><div id='abilitiespart' class='dp100'></div><br
style='clear:both'/><div id='middlepart' class='dp60'><div id='weaponspart'
class='dp100'><div id='char_weapons'></div><div id='new_weapon'
class='new_weapon'></div></div><div id='armorpart'
class='dp100'></div></div><div id='skillspart' class='dp33'></div><div
class='clear'></div></form>";
$('#content').html(edit_page_layout);

// topline
@@ -252,6 +252,18 @@
$('div#ranger_weapon_style').hide();
}

+ // update available weapons (for class change)
+ var weapons_count = chardata.weapons != null ? chardata.weapons.length :
0;
+ // add 1 for blank
+ for(var j=0; j<weapons_count+1; j++) {
+ curr_weapon_sel = $("select[id='weapon_" + j + "']").val();
+ // create new select from available weapons
+ var name = 'weapon_' + j;
+ var select = create_select(name,
get_available_weapons(chardata), "update_weapon(chardata, \"" + name
+ "\")", true, "width: 185px;");
+ $("select[id='weapon_" + j + "']").replaceWith(select);
+ // select curr_weapon_sel
+ $("select[id='weapon_" + j + "']").val(curr_weapon_sel);
+ }
populate_weapons_part(chardata.weapons);

set_links_part(chardata, 1);
@@ -337,34 +349,27 @@
}

function build_weapons_part(char_weapons) {
- var weapons_html = "";
+ var char_weapons_html = "";
// create containers for each of the character's weapons
if (char_weapons != null) {
for ( var i in char_weapons) {
- weapons_html += "<div id='weapon_" + i + "_div'>";
+ char_weapons_html += "<div id='weapon_" + i + "_div'>";
var name = 'weapon_' + i;
- weapons_html += c_s('weaponspart', name,
get_available_weapons(chardata), "update_weapon(chardata, \"" + name
+ "\")", "update_weapon_override(chardata, " + i + ")",
["Name", "Att", "Dam",
+ char_weapons_html += c_s('weaponspart', name,
get_available_weapons(chardata), "update_weapon(chardata, \"" + name
+ "\")", "update_weapon_override(chardata, " + i + ")",
["Name", "Att", "Dam",
"Crit", "Note" ], true);
- weapons_html += "</div>";
+ char_weapons_html += "</div>";
}
}
+ $('#char_weapons').html(char_weapons_html);
+
// create an empty
- var new_weapon_idx = (char_weapons != null ? char_weapons.length : 0);
- weapons_html += "<div id='weapon_" + new_weapon_idx + "_div'
class=\'new_weapon\'>";
- var name = 'weapon_' + new_weapon_idx;
- weapons_html += c_s('weaponspart', name,
get_available_weapons(chardata), "update_weapon(chardata, \"" + name
+ "\")", "update_weapon_override(chardata, " + i + ")",
[ "Name", "Att", "Dam", "Crit",
- "Note" ], true);
- weapons_html += "</div>";
- $('#weaponspart').html(weapons_html);
+ var name = 'weapon_new';
+ var new_weapon_select = create_select(name,
get_available_weapons(chardata), "update_weapon(chardata, \"" + name
+ "\")", true, "width: 185px;");
+ $('#new_weapon').html(new_weapon_select);
}

function populate_weapons_part(char_weapons) {
for (var j in char_weapons) {
- curr_weapon_sel = $("select[id='weapon_" + j + "']").val();
- // create new select from available weapons
- // remove current select
- // replace with select
- // select curr_weapon_sel
var weapon = weapons.first( {
id : char_weapons[j].weapon_id
});
@@ -464,7 +469,7 @@
}

var avail_weapons =
simple_weapons.concat(martial_weapons).concat(exotic_weapons);
- return avail_weapons.sort(function(a,b){ return a.name < b.name ? -1 : 1;
});
+ return avail_weapons.sort(function(a,b){ return a.name <= b.name ? -1 :
1; });
}

function update_log(chardata) {
=======================================
--- /trunk/charmgrjs/spells.js Fri Oct 2 04:12:16 2009
+++ /trunk/charmgrjs/spells.js Fri Oct 2 15:24:42 2009
@@ -3617,7 +3617,7 @@
save: "Special",
sr: "Sp",
phb: 238,
- detail: ""
+ detail: "<i>Hallow</i> makes a particular site, building, orstructure
a holy site. This has four major effects. <p class=sub>First, the site or
structure is guarded by a <i>magic circle against evil</i> effect. <p
class=sub>Second, all Charisma checks made to turn undead gain a +4 sacred
bonus, and Charisma checks to command undead take a –4 penalty. Spell
resistance does not apply to this effect. (This provision does not apply to
the druid version of the spell.) <p class=sub>Third, any dead body interred
in a <i>hallowed</i> site cannot be turned into an undead creature. <p
class=sub>Finally, you may choose to fix a single spell effect to the
hallowed site. The spell effect lasts for one year and functions throughout
the entire site, regardless of the normal duration and area or effect. You
may designate whether the effect applies to all creatures, creatures who
share your faith or alignment, or creatures who adhere to another faith or
alignment. For example, you may create a bless effect that aids all
creatures of your alignment or faith in the area, or a bane effect that
hinders creatures of the opposed alignment or an enemy faith. At the end of
the year, the chosen effect lapses, but it can be renewed or replaced
simply by casting <i>hallow</i> again. <p class=sub>Spell effects that may
be tied to a <i>hallowed</i> site include <i>aid, bane, bless, cause fear,
darkness, daylight, death ward, deeper darkness, detect evil, detect magic,
dimensional anchor, discern lies, dispel magic, endure elements, freedom of
movement, invisibility purge, protection from energy, remove fear, resist
energy, silence, tongues, and zone of truth</i>. Saving throws and spell
resistance might apply to these spells’ effects. (See the individual spell
descriptions for details.) An area can receive only one <i>hallow</i> spell
(and its associated spell effect) at a time. <p class=sub><i>Hallow</i>
counters but does not dispel <i>unhallow</i>. <p class=sub><i>Material
Component</i>: Herbs, oils, and incense worth at least 1,000 gp, plus 1,000
gp per level of the spell to be included in the <i>hallowed</i> area."
}, {
id: 239,
name: "Hallucinatory Terrain",
@@ -3647,7 +3647,7 @@
save: "Will negs",
sr: "Yes",
phb: 238,
- detail: ""
+ detail: "This spell renders as many as three undead creatures
immobile. A nonintelligent undead creature (such as a skeleton or zombie)
gets no saving throw; an intelligent undead creature does. If the spell is
successful, it renders the undead creature immobile for the duration of the
spell (similar to the effect of hold person on a living creature). The
effect is broken if the halted creatures are attacked or take damage. <p
class=sub><i>Material Component</i>: A pinch of sulfur and powdered garlic."
}, {
id: 241,
name: "Harm",
@@ -3662,7 +3662,7 @@
save: "Will half",
sr: "Yes",
phb: 239,
- detail: ""
+ detail: "Harm charges a subject with negative energy that deals 10
points of damage per caster level (to a maximum of 150 points at 15th
level). If the creature successfully saves, <i>harm</i> deals half this
amount, but it cannot reduce the target’s hit points to less than 1. <p
class=sub>If used on an undead creature, <i>harm</i> acts like heal."
}, {
id: 242,
name: "Haste",
@@ -3677,7 +3677,7 @@
save: "Fort negs",
sr: "Yes",
phb: 239,
- detail: ""
+ detail: "The transmuted creatures move and act more quickly than
normal. This extra speed has several effects. When making a full attack
action, a <i>hasted</i> creature may make one extra attack with any weapon
he is holding. The attack is made using the creature’s full base attack
bonus, plus any modifiers appropriate to the situation. (This effect is not
cumulative with similar effects, such as that provided by a weapon of
speed, nor does it actually grant an extra action, so you can’t use it to
cast a second spell or otherwise take an extra action in the round.) <p
class=sub>A <i>hasted</i> creature gains a +1 bonus on attack rolls and a
+1 dodge bonus to AC and Reflex saves. Any condition that makes you lose
your Dexterity bonus to Armor Class (if any) also makes you lose dodge
bonuses. <p class=sub>All of the <i>hasted</i> creature’s modes of movement
(including land movement, burrow, climb, fly, and swim) increase by 30
feet, to a maximum of twice the subject’s normal speed using that form of
movement. This increase counts as an enhancement bonus, and it affects the
creature’s jumping distance as normal for increased speed. <p
class=sub>Multiple <i>haste</i> effects don’t stack. <i>Haste</i> dispels
and counters <i>slow</i>. <p class=sub><i>Material Component</i>: A shaving
of licorice root."
}, {
id: 243,
name: "Heal",
@@ -3692,7 +3692,7 @@
save: "Will negs",
sr: "Yes",
phb: 239,
- detail: ""
+ detail: "<i>Heal</i> enables you to channel positive energy into a
creature to wipe away injury and afflictions. It immediately ends any and
all of the following adverse conditions affecting the Target: ability
damage, blinded, <i>confused</i>, dazed, dazzled, deafened, diseased,
exhausted, fatigued, <i>feebleminded</i>, insanity, nauseated, sickened,
stunned, and poisoned. It also cures 10 hit points of damage per level of
the caster, to a maximum of 150 points at 15th level. Heal does not remove
negative levels, restore permanently drained levels, or restore permanently
drained ability score points. <p class=sub>If used against an undead
creature, <i>heal</i> instead acts like <i>harm</i>."
}, {
id: 244,
name: "Heal, Mass",
@@ -3707,7 +3707,7 @@
save: "Will negs",
sr: "Yes",
phb: 239,
- detail: ""
+ detail: "This spell functions like <i>heal</i>, except as noted above.
The maximum number of hit points restored to each creature is 250."
}, {
id: 245,
name: "Heal Mount",
@@ -3722,7 +3722,7 @@
save: "Will negs",
sr: "Yes",
phb: 239,
- detail: ""
+ detail: "This spell functions like <i>heal</i>, but it affects only
the paladin’s special mount (typically a warhorse)."
}, {
id: 246,
name: "Heat Metal",
@@ -3737,7 +3737,7 @@
save: "Will negs",
sr: "Yes",
phb: 239,
- detail: ""
+ detail: "<i>Heat metal</i> makes metal extremely warm. Unattended,
nonmagical metal gets no saving throw. Magical metal is allowed a saving
throw against the spell. (Magic item’s saving throws are covered in the
<i>Dungeon Master’s Guide</i>.) An item in a creature’s possession uses the
creature’s saving throw bonus unless its own is higher. <p class=sub>A
creature takes fire damage if its equipment is heated. It takes full damage
if its armor is affected or if it is holding, touching, wearing, or
carrying metal weighing one-fifth of its weight. The creature takes minimum
damage (1 point or 2 points; see the table) if it’s not wearing metal armor
and the metal that it’s carrying weighs less than one-fifth of its weight.
On the first round of the spell, the metal becomes warm and uncomfortable
to touch but deals no damage. The same effect also occurs on the last round
of the spell’s duration. During the second (and also the next-to-last)
round, intense heat causes pain and damage. In the third, fourth, and fifth
rounds, the metal is searing hot, causing more damage, as shown on the
table below.<table><tr class=header><td>Round</td><td>Metal
Temperature</td><td>Damage</td></tr><tr><td>1</td><td>Warm</td><td>None</td></tr><tr><td>2</td><td>Hot</td><td>1d4
points</td></tr><tr><td>3–5</td><td>Searing</td><td>2d4
points</td></tr><tr><td>6</td><td>Hot</td><td>1d4
points</td></tr><tr><td>7</td><td>Warm</td><td>None</td></tr></table> <p
class=sub>Any cold intense enough to damage the creature negates fire
damage from the spell (and vice versa) on a point-for-point basis. For
example, if the damage roll from a <i>heat metal</i> spell indicates 2
points of fire damage and the subject is hit by a <i>ray of frost</i> in
the same round and takes 3 points of cold damage, it winds up taking no
fire damage and only 1 point of cold damage. If cast underwater, <i>heat
metal</i> deals half damage and boils the surrounding water. <p
class=sub><i>Heat metal</i> counters and dispels <i>chill metal</i>."
}, {
id: 247,
name: "Helping Hand",
@@ -3752,7 +3752,7 @@
save: "-",
sr: "-",
phb: 239,
- detail: ""
+ detail: "You create the ghostly image of a hand, which you can send to
find a creature within 5 miles. The hand then beckons to that creature and
leads it to you if the creature is willing to follow. <p class=sub>When the
spell is cast, the hand appears in front of you. You then specify a person
(or any creature) by physical description, which can include race, gender,
and appearance but not ambiguous factors such as level, alignment, or
class. When the description is complete, the hand streaks off in search of
a subject that fits the description. The amount of time it takes to find
the subject depends on how far away she is. <p class=sub><table><tr
class=header><td>Distance</td><td>Time to Locate</td></tr><tr><td>100 ft.
or less</td><td>1 round</td></tr><tr><td>1,000 ft.</td><td>1
minute</td></tr><tr><td>1 mile</td><td>10 minutes</td></tr><tr><td>2
miles</td><td>1 hour</td></tr><tr><td>3 miles</td><td>2
hours</td></tr><tr><td>4 miles</td><td>3 hours</td></tr><tr><td>5
miles</td><td>4 hours</td></tr></table><p class=sub>Once the hand locates
the subject, it beckons the creature to follow it. If the subject does so,
the hand points in your direction, indicating the most direct feasible
route. The hand hovers 10 feet in front of the subject, moving before it at
a speed of as much as 240 feet per round. Once the hand leads the subject
back to you, it disappears. <p class=sub>The subject is not compelled to
follow the hand or act in any particular way toward you. If the subject
chooses not to follow, the hand continues to beckon for the duration of the
spell, then disappears. If the spell expires while the subject is en route
to you, the hand disappears; the subject must then rely on her own devices
to locate you. <p class=sub>If more than one subject in a 5-mile radius
meets the description, the hand locates the closest creature. If that
creature refuses to follow the hand, the hand does not seek out a second
subject. <p class=sub>If, at the end of 4 hours of searching, the hand has
found no subject that matches the description within 5 miles, it returns to
you, displays an outstretched palm (indicating that no such creature was
found), and disappears. <p class=sub>The ghostly hand has no physical form.
It is invisible to anyone except you and a potential subject. It cannot
engage in combat or execute any other task aside from locating a subject
and leading it back to you. The hand can’t pass through solid objects but
can ooze through small cracks and slits. The hand cannot travel more than 5
miles from the spot it appeared when you cast the spell."
}, {
id: 248,
name: "Heroes' Feast",
@@ -3767,7 +3767,7 @@
save: "-",
sr: "-",
phb: 240,
- detail: ""
+ detail: "You bring forth a great feast, including a magnificent table,
chairs, service, and food and drink. The feast takes 1 hour to consume, and
the beneficial effects do not set in until this hour is over. Every
creature partaking of the feast is cured of all diseases, sickness, and
nausea; becomes immune to poison for 12 hours; and gains 1d8 temporary hit
points +1 point per two caster levels (maximum +10) after imbibing the
nectar-like beverage that is part of the feast. The ambrosial food that is
consumed grants each creature that partakes a +1 morale bonus on attack
rolls and Will saves and immunity to fear effects for 12 hours. <p
class=sub>If the feast is interrupted for any reason, the spell is ruined
and all effects of the spell are negated."
}, {
id: 249,
name: "Heroism",
@@ -3782,7 +3782,7 @@
save: "Will negs",
sr: "Yes",
phb: 240,
- detail: ""
+ detail: "This spell imbues a single creature with great bravery and
morale in battle. The target gains a +2 morale bonus on attack rolls,
saves, and skill checks."
}, {
id: 250,
name: "Heroism, Greater",
@@ -3797,7 +3797,7 @@
save: "Will negs",
sr: "Yes",
phb: 240,
- detail: ""
+ detail: "This spell functions like <i>heroism</i>, except the creature
gains a +4 morale bonus on attack rolls, saves, and skill checks, immunity
to fear effects, and temporary hit points equal to your caster level
(maximum 20)."
}, {
id: 251,
name: "Hide from Animals",
@@ -3812,7 +3812,7 @@
save: "Will negs",
sr: "Yes",
phb: 241,
- detail: ""
+ detail: "Animals cannot see, hear, or smell the warded creatures. Even
extraordinary or supernatural sensory capabilities, such as blindsense,
blindsight, scent, and tremorsense, cannot detect or locate warded
creatures. Animals simply act as though the warded creatures are not there.
Warded creatures could stand before the hungriest of lions and not be
molested or even noticed. If a warded character touches an animal or
attacks any creature, even with a spell, the spell ends for all recipients."
}, {
id: 252,
name: "Hide from Undead",
@@ -3827,7 +3827,7 @@
save: "Will negs",
sr: "Yes",
phb: 241,
- detail: ""
+ detail: "Undead cannot see, hear, or smell the warded creatures. Even
extraordinary or supernatural sensory capabilities, such as blindsense,
blindsight, scent, and tremorsense, cannot detect or locate warded
creatures. Nonintelligent undead creatures are automatically affected and
act as though the warded creatures are not there. <p class=sub>An
intelligent undead creature gets a single Will saving throw. If it fails,
the subject can’t see any of the warded creatures. However, if it has
reason to believe unseen opponents are present, it can attempt to find or
strike them. <p class=sub>If a warded creature attempts to turn or command
undead, touches an undead creature, or attacks any creature (even with a
spell), the spell ends for all recipients."
}, {
id: 253,
name: "Hold Animal",
Reply all
Reply to author
Forward
0 new messages