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
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
21 changes: 21 additions & 0 deletions tpdatasrc/tpgamefiles/rules/spells/1075 - Sonic Weapon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
School: Transmutation
Descriptor: Sonic
Level: Brd 2
Level: Sor 2
Level: Wiz 2
Component: V
Casting Time: 1 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/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"

33 changes: 33 additions & 0 deletions tpdatasrc/tpgamefiles/scr/Spell1075 - Sonic Weapon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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]
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 mainhandWeapon.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)

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"
35 changes: 35 additions & 0 deletions tpdatasrc/tpgamefiles/scr/Spell1103 - Dolorous Blow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from toee import *

def OnBeginSpellCast(spell):
print "Dolorous Blow OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level

def OnSpellEffect(spell):
print "Dolorous Blow OnSpellEffect"

spell.duration = 10 * spell.caster_level # 1 min/cl
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 mainhandWeapon.condition_add_with_args('sp-Dolorous Blow', spell.id, spell.duration, 0):
spellTarget.partsys_id = game.particles('sp-True Strike', spellTarget.obj)
else:
spellTarget.obj.float_mesfile_line('mes\\spell.mes', 30000)
game.particles('Fizzle', spellTarget.obj)
spell.target_list.remove_target(spellTarget.obj)
else:
spell.caster.float_text_line("Weapon required", tf_red)
game.particles('Fizzle', spell.caster)
spell.target_list.remove_target(spellTarget.obj)

spell.spell_end(spell.id)


def OnBeginRound(spell):
print "Dolorous Blow OnBeginRound"

def OnEndSpellCast(spell):
print "Dolorous Blow OnEndSpellCast"
Loading