forked from GrognardsFromHell/TemplePlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request GrognardsFromHell#802 from doug1234/SagenlichtAssa…
…ssin Sagenlicht Assassin Spells: Critical Strike, Fell the Greates Foe, Find the Gab, Sniper's Shot, Wrathstrike
- Loading branch information
Showing
20 changed files
with
418 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ID_string: CRITICAL_STRIKE | ||
effect_type: 0 | ||
texture_file: art\interface\player_conditions\buffs\Spell True Strike.tga | ||
help_topic: TAG_SPELLS_CRITICAL_STRIKE | ||
tooltip_base_text: Critical Strike |
5 changes: 5 additions & 0 deletions
5
tpdatasrc/tpgamefiles/rules/indicators/fell_the_greatest_foe.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ID_string: FELL_THE_GREATEST_FOE | ||
effect_type: 0 | ||
texture_file: art\interface\player_conditions\buffs\Spell True Strike.tga | ||
help_topic: TAG_SPELLS_FELL_THE_GREATEST_FOE | ||
tooltip_base_text: Fell the Greatest Foe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ID_string: FIND_THE_GAP | ||
effect_type: 0 | ||
texture_file: art\interface\player_conditions\buffs\Spell True Strike.tga | ||
help_topic: TAG_SPELLS_FIND_THE_GAP | ||
tooltip_base_text: Find the Gap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ID_string: SNIPER'S_SHOT | ||
effect_type: 0 | ||
texture_file: art\interface\player_conditions\buffs\Spell True Strike.tga | ||
help_topic: TAG_SPELLS_SNIPERS_SHOT | ||
tooltip_base_text: Snipers Shot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ID_string: WRAITHSTRIKE | ||
effect_type: 0 | ||
texture_file: art\interface\player_conditions\buffs\Spell True Strike.tga | ||
help_topic: TAG_SPELLS_WRAITHSTRIKE | ||
tooltip_base_text: Wraithstrike |
20 changes: 20 additions & 0 deletions
20
tpdatasrc/tpgamefiles/rules/spells/1051 - Critical Strike.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
School: Divination | ||
Level: Brd 1 | ||
Level: Sor 1 | ||
Level: Wiz 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: 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
21
tpdatasrc/tpgamefiles/rules/spells/1074 - Snipers Shot.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
School: Divination | ||
Level: Rgr 1 | ||
Level: Sor 1 | ||
Level: Wiz 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
21
tpdatasrc/tpgamefiles/rules/spells/1085 - Fell the Greatest Foe.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
School: Transmutation | ||
Level: Clr 3 | ||
Level: Pal 2 | ||
Level: Rgr 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 |
19 changes: 19 additions & 0 deletions
19
tpdatasrc/tpgamefiles/rules/spells/1097 - Find the Gap.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
School: Divination | ||
Level: Pal 3 | ||
Level: Rgr 3 | ||
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 |
20 changes: 20 additions & 0 deletions
20
tpdatasrc/tpgamefiles/rules/spells/1098 - Wraithstrike.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
School: Transmutation | ||
Level: Sor 2 | ||
Level: Wiz 2 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from toee import * | ||
|
||
def OnBeginSpellCast(spell): | ||
print "Critical Strike OnBeginSpellCast" | ||
print "spell.spellTarget_list=", spell.target_list | ||
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level | ||
|
||
def OnSpellEffect(spell): | ||
print "Critical Strike OnSpellEffect" | ||
spell.duration = 0 #Active only for current round | ||
spellTarget = spell.target_list[0] | ||
mainhandWeapon = spell.caster.item_worn_at(item_wear_weapon_primary) | ||
|
||
if mainhandWeapon == OBJ_HANDLE_NULL: | ||
spell.caster.float_text_line("Weapon required", tf_red) | ||
game.particles('Fizzle', spell.caster) | ||
spell.target_list.remove_target(spellTarget.obj) | ||
else: | ||
if spellTarget.obj.condition_add_with_args('sp-Critical Strike', spell.id, spell.duration): | ||
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) | ||
spell.spell_end(spell.id) | ||
|
||
|
||
def OnBeginRound(spell): | ||
print "Critical Strike OnBeginRound" | ||
|
||
def OnEndSpellCast(spell): | ||
print "Critical Strike OnEndSpellCast" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from toee import * | ||
|
||
def OnBeginSpellCast(spell): | ||
print "Snipers Shot OnBeginSpellCast" | ||
print "spell.target_list=", spell.target_list | ||
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level | ||
|
||
def OnSpellEffect(spell): | ||
print "Snipers Shot OnSpellEffect" | ||
|
||
spell.duration = 0 #Snipers Shot is a Swift Action, works in the current round | ||
spellTarget = spell.target_list[0] | ||
|
||
if spellTarget.obj.condition_add_with_args('sp-Snipers Shot', 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) | ||
spell.spell_end(spell.id) | ||
|
||
def OnBeginRound(spell): | ||
print "Snipers Shot OnBeginRound" | ||
|
||
def OnEndSpellCast(spell): | ||
print "Snipers Shot OnEndSpellCast" |
26 changes: 26 additions & 0 deletions
26
tpdatasrc/tpgamefiles/scr/Spell1085 - Fell the Greatest Foe.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from toee import * | ||
|
||
def OnBeginSpellCast(spell): | ||
print "Fell the Greatest Foe OnBeginSpellCast" | ||
print "spell.target_list=", spell.target_list | ||
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level | ||
|
||
def OnSpellEffect(spell): | ||
print "Fell the Greatest Foe OnSpellEffect" | ||
|
||
spell.duration = 1 * spell.caster_level # 1 round/cl | ||
spellTarget = spell.target_list[0] | ||
|
||
if spellTarget.obj.condition_add_with_args('sp-Fell the Greatest Foe', spell.id, spell.duration, 0): | ||
spellTarget.partsys_id = game.particles('sp-True Strike', spell.caster) | ||
else: | ||
spellTarget.obj.float_mesfile_line('mes\\spell.mes', 30000) | ||
game.particles('Fizzle', spellTarget.obj) | ||
spell.target_list.remove_target(spellTarget.obj) | ||
spell.spell_end(spell.id) | ||
|
||
def OnBeginRound(spell): | ||
print "Fell the Greatest Foe OnBeginRound" | ||
|
||
def OnEndSpellCast(spell): | ||
print "Fell the Greatest Foe OnEndSpellCast" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from toee import * | ||
|
||
def OnBeginSpellCast(spell): | ||
print "Find the Gap OnBeginSpellCast" | ||
print "spell.target_list=", spell.target_list | ||
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level | ||
|
||
def OnSpellEffect(spell): | ||
print "Find the Gap OnSpellEffect" | ||
|
||
spell.duration = 1 * spell.caster_level # 1 round/cl | ||
spellTarget = spell.target_list[0] | ||
|
||
if spellTarget.obj.condition_add_with_args('sp-Find the Gap', spell.id, spell.duration, 0, 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) | ||
spell.spell_end(spell.id) | ||
|
||
def OnBeginRound(spell): | ||
print "Find the Gap OnBeginRound" | ||
|
||
def OnEndSpellCast(spell): | ||
print "Find the Gap OnEndSpellCast" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from toee import * | ||
|
||
def OnBeginSpellCast(spell): | ||
print "Wraithstrike OnBeginSpellCast" | ||
print "spell.target_list=", spell.target_list | ||
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level | ||
|
||
def OnSpellEffect(spell): | ||
print "Wraithstrike OnSpellEffect" | ||
|
||
spell.duration = 0 # current round | ||
spellTarget = spell.target_list[0] | ||
|
||
if spellTarget.obj.condition_add_with_args('sp-Wraithstrike', 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) | ||
spell.spell_end(spell.id) | ||
|
||
def OnBeginRound(spell): | ||
print "Wraithstrike OnBeginRound" | ||
|
||
def OnEndSpellCast(spell): | ||
print "Wraithstrike OnEndSpellCast" |
64 changes: 64 additions & 0 deletions
64
tpdatasrc/tpgamefiles/scr/tpModifiers/sp_critical_strike.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from templeplus.pymod import PythonModifier | ||
from toee import * | ||
import tpdp | ||
from utilities import * | ||
from spell_utils import SpellPythonModifier, getSpellHelpTag | ||
|
||
print "Registering sp-Critical Strike" | ||
|
||
def verifyCriticalStrikeConditions(attackPacket): | ||
flags = attackPacket.get_flags() | ||
weaponUsed = attackPacket.get_weapon_used() | ||
target = attackPacket.target | ||
attacker = attackPacket.attacker | ||
|
||
if weaponUsed.obj_get_int(obj_f_type) != obj_t_weapon: | ||
return False | ||
elif attacker.can_sneak_attack(target): | ||
return True | ||
return False | ||
|
||
|
||
def criticalStrikeSpellModifyThreatRange(attachee, args, evt_obj): | ||
attackPacket = evt_obj.attack_packet | ||
if verifyCriticalStrikeConditions(attackPacket): | ||
weaponKeenRange = attackPacket.get_weapon_used().obj_get_int(obj_f_weapon_crit_range) | ||
bonusType = bonus_type_enhancement | ||
bonusHelpTag = game.get_mesline("mes\\bonus_description.mes", bonusType) | ||
spellId = args.get_arg(0) | ||
spellHelpTag = getSpellHelpTag(spellId) | ||
evt_obj.bonus_list.add(weaponKeenRange, bonusType, "{} : {}".format(bonusHelpTag, spellHelpTag)) | ||
return 0 | ||
|
||
def criticalStrikeSpellBonusToConfirmCrit(attachee, args, evt_obj): | ||
attackPacket = evt_obj.attack_packet | ||
if verifyCriticalStrikeConditions(attackPacket): | ||
bonusValue = 4 #+4 to confirm crits | ||
bonusType = bonus_type_insight | ||
bonusHelpTag = game.get_mesline("mes\\bonus_description.mes", bonusType) | ||
spellId = args.get_arg(0) | ||
spellHelpTag = getSpellHelpTag(spellId) | ||
evt_obj.bonus_list.add(bonusValue, bonusType, "{} : {}".format(bonusHelpTag, spellHelpTag)) | ||
return 0 | ||
|
||
def criticalStrikeSpellBonusToDamage(attachee, args, evt_obj): | ||
attackPacket = evt_obj.attack_packet | ||
if verifyCriticalStrikeConditions(attackPacket): | ||
target = attackPacket.target | ||
#Check if opponent is immnue to precision based damage | ||
if target.d20_query(Q_Critter_Is_Immune_Critical_Hits): | ||
#evt_obj.damage_packet.bonus_list.add_zeroed(325) #ID 325 = Creature Immune to ~Sneak Attack~[TAG_CLASS_FEATURES_ROGUE_SNEAK_ATTACK] | ||
evt_obj.damage_packet.bonus_list.add_zeroed(375) #ID 375 = NEW! | ||
else: | ||
bonusDice = dice_new('1d6') #Critical Strike Bonus Damage | ||
damageType = D20DT_UNSPECIFIED | ||
damageMesId = 3000 #ID3000 added in damage.mes | ||
evt_obj.damage_packet.add_dice(bonusDice, damageType, damageMesId) | ||
else: | ||
evt_obj.damage_packet.bonus_list.add_zeroed(376) #ID 376 = NEW! | ||
return 0 | ||
|
||
criticalStrikeSpell = SpellPythonModifier("sp-Critical Strike") # spell_id, duration, empty | ||
criticalStrikeSpell.AddHook(ET_OnGetCriticalHitRange, EK_NONE, criticalStrikeSpellModifyThreatRange,()) | ||
criticalStrikeSpell.AddHook(ET_OnConfirmCriticalBonus, EK_NONE, criticalStrikeSpellBonusToConfirmCrit,()) | ||
criticalStrikeSpell.AddHook(ET_OnDealingDamage, EK_NONE, criticalStrikeSpellBonusToDamage,()) |
24 changes: 24 additions & 0 deletions
24
tpdatasrc/tpgamefiles/scr/tpModifiers/sp_fell_the_greatest_foe.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from toee import * | ||
import tpdp | ||
from utilities import * | ||
from spell_utils import SpellPythonModifier | ||
|
||
print "Registering sp-Fell the Greatest Foe" | ||
|
||
def fellTheGreatestFoeSpellBonusToDamage(attachee, args, evt_obj): | ||
target = evt_obj.attack_packet.target | ||
attackerSize = attachee.get_size | ||
targetSize = target.get_size | ||
bonusDiceNumber = targetSize-attackerSize | ||
|
||
if bonusDiceNumber > 0: | ||
#Fell the Greatest Foe only works with melee attacks | ||
if not evt_obj.attack_packet.get_flags() & D20CAF_RANGED: | ||
bonusDice = dice_new('1d6') | ||
bonusDice.number = bonusDiceNumber | ||
evt_obj.damage_packet.add_dice(bonusDice, D20DT_UNSPECIFIED, 3003) #ID3003 added in damage.mes | ||
return 0 | ||
|
||
fellTheGreatestFoeSpell = SpellPythonModifier("sp-Fell the Greatest Foe") # spell_id, duration, empty | ||
fellTheGreatestFoeSpell.AddHook(ET_OnDealingDamage, EK_NONE, fellTheGreatestFoeSpellBonusToDamage,()) | ||
fellTheGreatestFoeSpell.AddSpellNoDuplicate() |
Oops, something went wrong.