Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item enchantment spells #556

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion tpdatasrc/tpgamefiles/mes/help/spell_compendium_help.tab
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ TAG_SPELLS_SHOCK_AND_AWE TAG_SPELLS TAG_ASSASSIN_1 TAG_BARD_1 TAG_SORCERER_1 TA
TAG_SPELLS_SIRINES_GRACE TAG_SPELLS TAG_BARD_4 TAG_DRUID_5 Sirine's Grace ~Evocation~[TAG_MAGIC_SCHOOLS_EVOCATION] Level: ~Bard~[TAG_BARDS] 4, ~Druid~[TAG_DRUIDS] 5 Components: V, S Casting Time: 1 ~standard action~[TAG_STANDARD_ACTION] Range: Personal Target: You Duration: 1 round/level Upon completion of this spell, you are infused with unearthly grace and confidence. For the duration of this spell, you gain a +4 ~enhancement~[TAG_ENHANCEMENT_BONUS] bonus to ~Charisma~[TAG_CHARISMA] and ~Dexterity~[TAG_DEXTERITY], a ~deflection~[TAG_DEFLECTION_BONUS] bonus to ~AC~[TAG_ARMOR_CLASS] equal to your ~Charisma modifier~[TAG_ABILITY_SCORES], and a +8 bonus on ~Perform~[TAG_PERFORM] checks. You also gain a swim speed of 60 feet and the ability to breathe water. You can move and attack normally while underwater, even with slashing or bludgeoning weapons. Note: The underwater parts are not applicable to TOEE and due to this not implemented.
TAG_SPELLS_SLASHING_DARKNESS TAG_SPELLS TAG_CLERIC_3 Slashing Darkness ~Evocation~[TAG_MAGIC_SCHOOLS_EVOCATION] Level: ~Cleric~[TAG_CLERICS] 3 Components: V, S Casting Time: 1 ~standard action~[TAG_STANDARD_ACTION] Range: Medium (100 ft. + 10 ft./level) Target: One creature Duration: Instantaneous Saving Throw: None Spell Resistance: Yes You complete this spell and a hissing, hurtling ribbon of pure darkness flies from your hand. You must succeed on a ~ranged touch attack~[TAG_TOUCH_ATTACK] with the ray to strike a target. A creature struck by this ray of negative energy takes 1d8 points of damage per two caster levels (maximum 5d8). An undead creature instead heals 1d8 points of damage per two caster levels (maximum 5d8).
TAG_SPELLS_SNIPERS_SHOT TAG_SPELLS TAG_ASSASSIN_1, TAG_RANGER_1, TAG_SORCERER_1 TAG_WIZARD_1 Sniper's Shot ~Divination~[TAG_MAGIC_SCHOOLS_DIVINATION] Level: ~Assassin~[TAG_ASSASSINS] 1, ~Ranger~[TAG_RANGERS] 1, ~Sorcerer~[TAG_SORCERERS]/~Wizard~[TAG_WIZARDS] 1 Components: V, S Casting Time: ~Free action~[TAG_FREE_ACTION] Range: Personal Target: You Duration: 1 round While muttering a short chant you focus your awareness, looking only at the areas of your foe that seem most vital to its survival. Your ~ranged attacks~[TAG_RANGED_ATTACKS] made before the start of your next turn can be ~sneak attacks~[TAG_CLASS_FEATURES_ROGUE_SNEAK_ATTACK] regardless of the distance between you and your target. You must still fulfill the other conditions for making a sneak attack against the target. Note: This spell doesn't grant you the ability to make a sneak attack if you don't already have that ability.
TAG_SPELLS_SONIC_WEAPON TAG_SPELLS TAG_BARD_1 TAG_SORCERER_1 TAG_WIZARD_1 Sonic Weapon ~Transmutation~[TAG_MAGIC_SCHOOLS_TRANSMUTATION] Level: ~Bard~[TAG_BARDS] 1, ~Sorcerer~[TAG_SORCERERS]/~Wizard~[TAG_WIZARDS] 1 Components: V Casting Time: 1 ~standard action~[TAG_STANDARD_ACTION] Range: Personal Target: Wapon touched Duration: 1 minute/level Holding the weapon to your mouth, you whisper the spell's arcane words, shrouding the weapon in visible sound like a thin sheen of water. While the spell is in effect, the affected weapon deals an extra 1d6 points of sonic damage with each successful attack. The sonic energy does not harm the weapon's wielder. Bows, crossbows, and slings that are affected by this spell bestow the sonic energy upon their ammunition.
TAG_SPELLS_SONIC_WEAPON TAG_SPELLS TAG_BARD_1 TAG_SORCERER_1 TAG_WIZARD_1 Sonic Weapon ~Transmutation~[TAG_MAGIC_SCHOOLS_TRANSMUTATION] Level: ~Bard~[TAG_BARDS] 1, ~Sorcerer~[TAG_SORCERERS]/~Wizard~[TAG_WIZARDS] 1 Components: V Casting Time: 1 ~standard action~[TAG_STANDARD_ACTION] Range: Touch Target: Weapon touched Duration: 1 minute/level Holding the weapon to your mouth, you whisper the spell's arcane words, shrouding the weapon in visible sound like a thin sheen of water. While the spell is in effect, the affected weapon deals an extra 1d6 points of sonic damage with each successful attack. The sonic energy does not harm the weapon's wielder. Bows, crossbows, and slings that are affected by this spell bestow the sonic energy upon their ammunition. Note: The ammunition part is not implemented yet.
TAG_SPELLS_SOUND_LANCE TAG_SPELLS TAG_SORCERER_3 TAG_WIZARD_3 TAG_CLERIC_4 Sound Lance ~Evocation~[TAG_MAGIC_SCHOOLS_EVOCATION](Sonic) Level: ~Sorcerer~[TAG_SORCERERS]/~Wizard~[TAG_WIZARDS] 3, ~Cleric~[TAG_CLERICS] 4 Components: V, S Casting Time: 1 ~standard action~[TAG_STANDARD_ACTION] Range: Medium (100 ft. +10 ft./level) Target: One creature or object Duration: Instantaneous Saving Throw: ~Fortitude~[TAG_FORTITUDE] half Spell Resistance: Yes You unleash a shrill, piercing cry at your target, which takes the barely visible form of a translucent lance hurtling through the air. This spell causes a projectile of intense sonic energy to leap from you to a target within range. The sound deals 1d8 points of sonic damage per caster level (maximum 10d8). A sound lance cannot penetrate the area of a ~silence~[TAG_SPELLS_SILENCE] spell.
TAG_SPELLS_SPIKES TAG_SPELLS TAG_CLERIC_3 TAG_DRUID_3 Spikes ~Transmutation~[TAG_MAGIC_SCHOOLS_TRANSMUTATION] Level: ~Cleric~[TAG_CLERICS] 3, ~Druid~[TAG_DRUIDS] 3 Components: V, S Casting Time: 1 ~standard action~[TAG_STANDARD_ACTION] Range: Touch Target: Weapon touched Duration: 1 round/level Saving Throw: None Spell Resistance: No With the sound of twisting wood, the weapon you touch grows sharp spikes like rose thorns. This spell functions like ~Brambles~[TAG_SPELLS_BRAMBLES], except that the affected weapon gains a +2 ~enhancement~[TAG_ENHANCEMENT_BONUS] bonus on its ~attack rolls~[TAG_ATTACK_ROLL], and its threat range is doubled. This effect does not stack with other effects that increase a weapon's threat range, such as the Improved Critical feat. Note: the spell only works on weapons equipped in the mainhand.
TAG_SPELLS_STRATEGIC_CHARGE TAG_SPELLS TAG_BLACKGUARD_1 TAG_PALADIN_1 Strategic Charge ~Abjuration~[TAG_MAGIC_SCHOOLS_ABJURATION] Level: ~Blackguard~[TAG_BLACKGUARDS] 1, ~Paladin~[TAG_PALADINS] 1 Components: V Casting Time: 1 ~Free action~[TAG_FREE_ACTION] Range: Personal Target: You Duration: 1 round/level A red nimbus surrounds you as you move smoothly across the crowded battlefield. You gain the benefit of the ~Mobility~[TAG_MOBILITY] feat, even if you not meet the prerequisites. You do not have to be charging to gain this benefit.
Expand Down
18 changes: 18 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/039 - Bless Weapon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
School: Transmutation
Level: Pal 1
Component: V
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
inc_flags_Target: Other
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
22 changes: 22 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1075 - Sonic Weapon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
School: Transmutation
Descriptor: Sonic
Level: Brd 2
Level: Sor 2
Level: Wiz 2
Component: V
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
inc_flags_Target: Other
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
choices: 3011 3012
21 changes: 21 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1103 - Dolorous Blow.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
School: Transmutation
Level: Brd 3
Level: Sor 3
Level: Wiz 3
Component: V
Component: S
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
inc_flags_Target: Other
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
20 changes: 20 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1115 - Deafening Clang.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
School: Transmutation
Descriptor: Sonic
Level: Pal 1
Component: V
Component: S
Casting Time: Swift Action
Range: Personal
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
exc_flags_Target: Other
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Personal
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
21 changes: 21 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1130 - Shield of Warding.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
School: Abjuration
Descriptor: Good
Level: Clr 3
Level: Pal 2
Component: V
Component: S
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
inc_flags_Target: Other
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
20 changes: 20 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1134 - Undead Bane Weapon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
School: Transmutation
Level: Clr 4
Level: Pal 3
Component: V
Component: S
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
inc_flags_Target: Other
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
18 changes: 18 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1141 - Lawful Sword.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
School: Evocation
Descriptor: Lawful
Level: Pal 4
Component: V
Component: S
Casting Time: 1 action
Range: Personal
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
exc_flags_Target: Dead
exc_flags_Target: Non-critter
exc_flags_Target: Other
mode_Target: Personal
radius_Target: 0
ai_type: ai_action_defensive
20 changes: 20 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1149 - Brambles.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
School: Transmutation
Level: Clr 2
Level: Drd 2
Component: V
Component: S
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Other
inc_flags_Target: Self
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
23 changes: 23 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1154 - Align Weapon Mass.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
School: Transmutation
Level: Clr 3
Component: V
Component: S
Casting Time: 1 action
Range: Close
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Other
inc_flags_Target: Self
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Multi
mode_Target: Once-Multi
mode_Target: Any 30 Feet
mode_Target: End Early Multi
min_Target: 1
max_Target: 0
radius_Target: 0
ai_type: ai_action_defensive
choices: 3001 3002 3003 3004
16 changes: 16 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1155 - Bless Weapon Swift.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
School: Transmutation
Level: Pal 1
Component: V
Casting Time: Swift Action
Range: Personal
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Self
exc_flags_Target: Dead
exc_flags_Target: Non-critter
exc_flags_Target: Other
mode_Target: Personal
radius_Target: 0
ai_type: ai_action_defensive
20 changes: 20 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1160 - Align Weapon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
School: Transmutation
Level: Clr 2
Component: V
Component: S
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Other
inc_flags_Target: Self
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
choices: 3001 3002 3003 3004
20 changes: 20 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1168 - Spikes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
School: Transmutation
Level: Clr 3
Level: Drd 3
Component: V
Component: S
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Other
inc_flags_Target: Self
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
22 changes: 22 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1170 - Weapon of Energy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
School: Transmutation
Level: Clr 3
Level: Sor 3
Level: Wiz 3
Component: V
Component: S
Casting Time: 1 action
Range: Touch
Saving Throw: None
Spell Resistance: No
Projectile: No
flags_Target: Range
inc_flags_Target: Other
inc_flags_Target: Self
exc_flags_Target: Dead
exc_flags_Target: Non-critter
mode_Target: Single
min_Target: 1
max_Target: 1
radius_Target: 0
ai_type: ai_action_defensive
choices: 3041 3042 3043 3044
32 changes: 32 additions & 0 deletions tpdatasrc/tpgamefiles/scr/Spell039 - Bless Weapon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from toee import *

def OnBeginSpellCast(spell):
print "Bless Weapon OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level

def OnSpellEffect(spell):
print "Bless Weapon OnSpellEffect"

spell.duration = 10 * spell.caster_level
spellTarget = spell.target_list[0]
mainhandWeapon = spellTarget.obj.item_worn_at(item_wear_weapon_primary)

if mainhandWeapon.obj_get_int(obj_f_type) == obj_t_weapon:
mainhandWeapon.d20_status_init()
if not mainhandWeapon.condition_add_with_args('sp-Bless Weapon', spell.id, spell.duration, 0):
spellTarget.obj.float_mesfile_line('mes\\spell.mes', 30000)
game.particles('Fizzle', spellTarget.obj)
else:
spellTarget.obj.float_text_line("Weapon required", tf_red)
game.particles('Fizzle', spellTarget.obj)

spell.target_list.remove_target(spellTarget.obj)
spell.spell_end(spell.id)

def OnBeginRound(spell):
print "Bless Weapon OnBeginRound"

def OnEndSpellCast(spell):
print "Bless Weapon OnEndSpellCast"

45 changes: 45 additions & 0 deletions tpdatasrc/tpgamefiles/scr/Spell1075 - Sonic Weapon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from toee import *

def OnBeginSpellCast(spell):
print "Sonic Weapon OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level

def OnSpellEffect(spell):
print "Sonic Weapon OnSpellEffect"

spell.duration = 10 * spell.caster_level # 1 min/cl
spellTarget = spell.target_list[0]
radialChoice = spell.spell_get_menu_arg(RADIAL_MENU_PARAM_MIN_SETTING)
if radialChoice == 1:
itemToEnchant = spellTarget.obj.item_worn_at(item_wear_weapon_primary)
elif radialChoice == 2:
itemToEnchant = spellTarget.obj.item_worn_at(item_wear_weapon_secondary)
elif radialChoice == 3:
itemToEnchant = spellTarget.obj.item_worn_at(item_wear_ammo)
else: #Fallback
radialChoice == 1
itemToEnchant = spellTarget.obj.item_worn_at(item_wear_weapon_primary)

if radialChoice < 3:
if itemToEnchant.obj_get_int(obj_f_type) == obj_t_weapon:
itemToEnchant.d20_status_init()
if itemToEnchant.condition_add_with_args('sp-Sonic Weapon', spell.id, spell.duration, 0):
spellTarget.partsys_id = game.particles('sp-Sound Burst', spellTarget.obj)
else:
spellTarget.obj.float_mesfile_line('mes\\spell.mes', 30000)
game.particles('Fizzle', spellTarget.obj)
else:
spellTarget.obj.float_text_line("Weapon required", tf_red)
game.particles('Fizzle', spellTarget.obj)
else:
pass

spell.target_list.remove_target(spellTarget.obj)
spell.spell_end(spell.id)

def OnBeginRound(spell):
print "Sonic Weapon OnBeginRound"

def OnEndSpellCast(spell):
print "Sonic Weapon OnEndSpellCast"
Loading