-
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 #282 from doug1234/master
Improved favored enemy and fix to max number of bardic music
- Loading branch information
Showing
7 changed files
with
186 additions
and
3 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: Improved Favored Enemy | ||
flags: 12582912 | ||
prereqs: | ||
description: You deal an extra 3 points of damage to your favored enemies. This benefit stacks with any existing favored enemy bonus gained from another class. | ||
prereq descr: Base attack bonus +5 and favored enemy ability, |
15 changes: 15 additions & 0 deletions
15
tpdatasrc/tpgamefiles/scr/feats/feat - Improved Favored Enemy.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,15 @@ | ||
from toee import * | ||
|
||
|
||
def CheckPrereq(attachee, classLevelled, abilityScoreRaised): | ||
|
||
#Return zero if base attack bonus is too low | ||
if attachee.get_base_attack_bonus() < 5: | ||
return 0 | ||
|
||
#Check for any favored enemy feat | ||
for i in range (feat_favored_enemy_aberration , feat_favored_enemy_humanoid_human): | ||
if attachee.has_feat(i): | ||
return 1 | ||
|
||
return 0 |
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
23 changes: 23 additions & 0 deletions
23
tpdatasrc/tpgamefiles/scr/tpModifiers/improved_favored_enemy.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,23 @@ | ||
#Improved Favored Enemy: Complete Warrior, p. 101 | ||
|
||
from templeplus.pymod import PythonModifier | ||
from toee import * | ||
import tpdp | ||
|
||
print "Registering Improved Favored Enemy" | ||
|
||
#Feat adds 3 extra damage | ||
bon_val = 3 | ||
|
||
def impFavoredEnemyDamageBonus(attachee, args, evt_obj): | ||
|
||
target = evt_obj.attack_packet.target | ||
favored_enemy = attachee.is_favored_enemy(target) | ||
|
||
if favored_enemy: | ||
evt_obj.damage_packet.bonus_list.add_from_feat(bon_val, 0, 114, "Improved Favored Enemy") | ||
return 0 | ||
|
||
impFavoredEnemy = PythonModifier("Improved Favored Enemy", 2) # args are just-in-case placeholders | ||
impFavoredEnemy.MapToFeat("Improved Favored Enemy") | ||
impFavoredEnemy.AddHook(ET_OnDealingDamage, EK_NONE, impFavoredEnemyDamageBonus, ()) |