-
Notifications
You must be signed in to change notification settings - Fork 22
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 #413 from doug1234/master
Add improved skirmish feat.
- Loading branch information
Showing
8 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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
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 @@ | ||
name: Improved Skirmish | ||
flags: 12582912 | ||
prereqs: | ||
description: If you move at least 20 feet away from where you were at the start of your turn, your skirmish damage increases by 2d6 and your competence bonus to AC from skirmish improves by 2. A scout can select Improved Skirmish as one of his scout bonus feats. | ||
prereq descr: Skirmish +2d6/+1 AC |
13 changes: 13 additions & 0 deletions
13
tpdatasrc/tpgamefiles/scr/feats/feat - Improved Skirmish.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,13 @@ | ||
from toee import * | ||
import char_editor | ||
|
||
def CheckPrereq(attachee, classLeveled, abilityScoreRaised): | ||
|
||
#Skirmish +2D6, +1 AC | ||
scoutLevel = attachee.stat_level_get(stat_level_scout) | ||
if classLeveled == stat_level_scout: | ||
scoutLevel = scoutLevel + 1 | ||
if scoutLevel < 5: | ||
return 0 | ||
|
||
return 1 |
66 changes: 66 additions & 0 deletions
66
tpdatasrc/tpgamefiles/scr/tpModifiers/improved_skirmish.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,66 @@ | ||
from templeplus.pymod import PythonModifier | ||
from toee import * | ||
import tpdp | ||
import math | ||
|
||
#Improved Skirmish: Complete Scoundrel, p. 78 | ||
|
||
print "Registering Improved Skirmish" | ||
|
||
# Global variables for keeping track of the location of the scout at the beginning of the round | ||
# They do not need to be persistent except during a scout's turn | ||
improved_skimish_start_position_x = 0.0 | ||
improved_skimish_start_position_y = 0.0 | ||
improved_skimish_start_location = long() | ||
|
||
#Determine if skrimish is enabled based on if the scout has moved 10 feet | ||
def ImprovedSkirmishMovedDistance(attachee, args, evt_obj): | ||
#Keep track of how far the scout as moved from their initial position (not total distance moved) | ||
global improved_skimish_start_location | ||
global improved_skimish_start_position_x | ||
global improved_skimish_start_position_y | ||
|
||
#The distance needs to location at the beginning of the round needs to be adjusted by the radius (which is in inches) | ||
moveDistance = int(attachee.distance_to(improved_skimish_start_location, improved_skimish_start_position_x, improved_skimish_start_position_y) + (attachee.radius / 12.0)) | ||
|
||
args.set_arg(0, moveDistance) | ||
|
||
return 0 | ||
|
||
def ImprovedSkirmishReset(attachee, args, evt_obj): | ||
global improved_skimish_start_location | ||
global improved_skimish_start_position_x | ||
global improved_skimish_start_position_y | ||
|
||
#Save the initial position for the scout and the distance moved for the round | ||
improved_skimish_start_position_x = attachee.off_x | ||
improved_skimish_start_position_y = attachee.off_y | ||
improved_skimish_start_location = attachee.location | ||
|
||
#Zero out the total distance moved from the start position | ||
args.set_arg(0, 0) | ||
return 0 | ||
|
||
def ImprovedSkirmishACBonus(attachee, args, evt_obj): | ||
distance = args.get_arg(0) | ||
|
||
#20 foot move required for the bonus | ||
if distance >= 20: | ||
evt_obj.return_val += 2 | ||
return 0 | ||
|
||
def ImprovedSkirmishBonusDice(attachee, args, evt_obj): | ||
distance = args.get_arg(0) | ||
|
||
#20 foot move required for the bonus | ||
if distance >= 20: | ||
evt_obj.return_val += 2 | ||
return 0 | ||
|
||
daringOutlaw = PythonModifier("Improved Skirmish", 4) # distance, spare, spare, spare | ||
daringOutlaw.MapToFeat("Improved Skirmish") | ||
daringOutlaw.AddHook(ET_OnD20Signal, EK_S_Combat_Critter_Moved, ImprovedSkirmishMovedDistance, ()) | ||
daringOutlaw.AddHook(ET_OnBeginRound, EK_NONE, ImprovedSkirmishReset, ()) | ||
daringOutlaw.AddHook(ET_OnD20PythonQuery, "Skirmish Additional AC", ImprovedSkirmishACBonus, ()) | ||
daringOutlaw.AddHook(ET_OnD20PythonQuery, "Skirmish Additional Dice", ImprovedSkirmishBonusDice, ()) | ||
|
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
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