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

Dragon Discipile WIP #619

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
54ec304
Dragon Disciple WIP
Sagenlicht Sep 16, 2021
0312673
Updated Dragon Disciple
Sagenlicht Sep 17, 2021
b9d12de
Update dragon_disciple.py
Sagenlicht Sep 17, 2021
6e6b68f
Merge branch 'master' into DragonDisciple
Sagenlicht Sep 20, 2021
783606e
Added Ability Boost
Sagenlicht Sep 20, 2021
0cb6e91
Fixed Heritage bug
Sagenlicht Sep 20, 2021
809df43
Fixed Cone Breath Weapon
Sagenlicht Sep 20, 2021
1ad5cfa
Further progress for the DD
Sagenlicht Sep 21, 2021
6e4d1e0
Finished help file for DD
Sagenlicht Sep 22, 2021
7fcad2c
DD: Dropped Blindsense, fixed fire smoke
Sagenlicht Sep 23, 2021
d02b5fb
Added Flying Toggle (Nonfunctional yet)
Sagenlicht Sep 30, 2021
e641ab5
Moved Flying to seperate condtion
Sagenlicht Oct 1, 2021
2ebb5a7
added Darley Wings Mesh as Wings for the DD
Sagenlicht Oct 14, 2021
f77c9dc
Merge branch 'master' into DragonDisciple
Sagenlicht Oct 26, 2021
d8ae0ec
Merge branch 'master' into DragonDisciple
Nov 21, 2021
7ec38ee
String fixes: DD requirements fit inside scroll box; feat descrition …
Nov 22, 2021
b085be2
Added PyObjHndl method anim_goal_throw_spell_w_cast_anim to properly …
Nov 22, 2021
9696b90
DD fixes Breath weapon
Nov 22, 2021
d1daf13
Merge branch 'DragonDisciple' of https://github.com/GrognardsFromHell…
Sagenlicht Nov 22, 2021
1aabeb1
Update to DD Draconic Heritage Handling
Sagenlicht Nov 23, 2021
2d2d8cb
First Draft of Bonus Spells Feature
Sagenlicht Nov 24, 2021
fbbfe61
Merge branch 'master' into DragonDisciple
Sagenlicht Nov 24, 2021
4099c50
Merge branch 'master' into DragonDisciple
Nov 24, 2021
67e6a9e
Merge branch 'DragonDisciple' of https://github.com/GrognardsFromHell…
Nov 24, 2021
a43fa6a
Forgot to merge the draconic_heritage feat to the DD
Sagenlicht Nov 25, 2021
8f9182e
Added new error codes
Sagenlicht Dec 6, 2021
1586499
Condition hashtable init replacement; added log message for when it o…
Dec 22, 2021
96c76ef
Merge branch 'DragonDisciple' of https://github.com/GrognardsFromHell…
Dec 22, 2021
b43a73d
reflex throw will now use SpellSaveThrow when used for spell actions,…
Dec 22, 2021
e21d766
Added get_caster_class method to python EventObjSpellsPerDay
Dec 22, 2021
05c1d8e
Renamed chargeAfterPicker for more accurate meaning
Dec 23, 2021
5fe70c7
Minor magic number cleanup from natural attacks review
Dec 24, 2021
370c30b
Changed Bonus Spells per Day
Sagenlicht Jan 18, 2022
422d1c4
Update dragon_disciple.py
Sagenlicht Jan 18, 2022
69a037a
Merge pull request #701 from GrognardsFromHell/bugfixes
DudeMcDude Sep 6, 2022
e590df5
Fixes animation script particle errors on map load
Sep 7, 2022
0a2315f
Merge pull request #702 from GrognardsFromHell/bugfixes
DudeMcDude Sep 7, 2022
fdb94bf
Minor wiki help errors
Sep 7, 2022
bb602d2
Merge branch 'bugfixes' into develop
Sep 9, 2022
b750dd0
Scribe scroll - automated infrastructure instead of the old manual pr…
Sep 9, 2022
9b6d579
Fixes crash issue when AI party member casts Dominate Monster (aka 'S…
Sep 10, 2022
9eefcb0
Fixes #682
Sep 10, 2022
d1b2858
Fixed error in targeting.py will_kos
Sep 10, 2022
c4ef9bd
Merge from develop
Sep 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update to DD Draconic Heritage Handling
  • Loading branch information
Sagenlicht committed Nov 23, 2021
commit 1aabeb197f253b690a67e5c490eb5adb6c0a40c6
2 changes: 2 additions & 0 deletions tpdatasrc/tpgamefiles/mes/help/breath_weapon_feats_help.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TAG_BREATH_FEATS TAG_FEATS_DES Breath Channeling Feats Dragons and creatures of ~Draconic Heritage~[TAG_DRACONIC_HERITAGE] that have breath weapons can choose these feats, which channel the destructive energy of a breath weapon into some other magical or supernatural effect. Using a breath channeling feat requires a creature to activate its breath weapon and counts of a use of that breath weapon. Breath Feats: [CMD_CHILDREN_SORTED]
TAG_EXTRA_EXHALATION TAG_FEATS_DES TAG_BREATH_FEATS Extra Exhalation You can use your breath weapon one more time per day than normal. Prerequisite: ~Draconic Heritage~[TAG_DRACONIC_HERITAGE], Breath Weapon with limited uses per day Benefit: You can use your breath weapon one additional time per day. The interval you must wait between breaths is 1d4 rounds. Special: You can gain this feat multiple times. Each time you take it, you can breathe one additional time per day.
29 changes: 27 additions & 2 deletions tpdatasrc/tpgamefiles/rules/char_class/class023_dragon_disciple.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from toee import *
import char_class_utils
import char_editor
from heritage_feat_utils import getDraconicHeritageColourString

###################################################

Expand All @@ -25,7 +26,7 @@ def GetClassHelpTopic():


class_feats = {
1: ("Dragon Disciple Heritage", "Dragon Disciple Natural Armor",),
1: ("Dragon Disciple Natural Armor",),
2: ("Dragon Disciple Claws and Bite",),
3: ("Dragon Disciple Breath Weapon",),
9: ("Dragon Disciple Wings",),
Expand Down Expand Up @@ -105,10 +106,34 @@ def ObjMeetsPrereqs(obj):


# Levelup
def alreadyHasDraconicHeritage(obj):
hasDraconicHeritageFeat = False
for heritage in range(heritage_draconic_black, heritage_draconic_white + 1):
colourString = getDraconicHeritageColourString(heritage)
if char_editor.has_feat("Draconic Heritage {}".format(colourString)):
hasDraconicHeritageFeat = True
break
return True if hasDraconicHeritageFeat else False

def IsSelectingFeatsOnLevelup(obj):
return 0
newLvl = char_editor.stat_level_get(classEnum)
if not newLvl == 1:
return 0
if alreadyHasDraconicHeritage(obj):
return 0
return 1

def LevelupGetBonusFeats(obj):
newLvl = char_editor.stat_level_get(classEnum)
bonus_feats = []
if newLvl == 1:
bonus_feats.append("Draconic Heritage")

bonFeatInfo = []
for ft in bonus_feats:
featInfo = char_editor.FeatInfo(ft)
featInfo.feat_status_flags |= 4 # always pickable
bonFeatInfo.append(featInfo)
char_editor.set_bonus_feats(bonFeatInfo)
return

This file was deleted.

6 changes: 6 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage black.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Black
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
6 changes: 6 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage blue.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Blue
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
6 changes: 6 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage brass.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Brass
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Bronze
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Copper
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
6 changes: 6 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage gold.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Gold
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
6 changes: 6 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage green.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Green
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
6 changes: 6 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage red.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Red
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage Silver
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
6 changes: 6 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage white.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Draconic Heritage White
flags: 4194304
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1
parent: Draconic Heritage
5 changes: 5 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/draconic heritage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: Draconic Heritage
flags: 13107200
prereqs:
description: You have a greater connection with your draconic bloodline than others of your kind.
prereq descr: Sorcercer Level 1; automatically granted to Dragon Disciple and Dragon Shaman
5 changes: 5 additions & 0 deletions tpdatasrc/tpgamefiles/rules/feats/extra exhalation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: Extra Exhalation
flags: 12582913
prereqs:
description: You can use your Breath Weapon one more time per day than normal. Special: You can take this feat multiple times. Each time you take it, you can breath one additional time per day.
prereq descr: Limited Breath Weapon use per day
11 changes: 11 additions & 0 deletions tpdatasrc/tpgamefiles/scr/feats/feat - Draconic Heritage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from toee import *
import char_editor
from heritage_feat_utils import hasDifferentHeritageFeat

def CheckPrereq(attachee, classLevelled, abilityScoreRaised):
if char_editor.stat_level_get(stat_level_sorcerer) < 1:
return 0
#Check if character already has any heritage feats
if hasDifferentHeritageFeat(char_editor, "Draconic Heritage"):
return 0
return 1
10 changes: 10 additions & 0 deletions tpdatasrc/tpgamefiles/scr/feats/feat - Extra Exhalation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from templeplus.pymod import PythonModifier
from toee import *
import char_editor

def CheckPrereq(attachee, classLevelled, abilityScoreRaised):
#Check if character has a limited usage Breath Weapon
#At the moment only Dragon Diciple has one:
if not char_editor.has_feat("Dragon Disciple Breath Weapon"):
return 0
return 1
174 changes: 174 additions & 0 deletions tpdatasrc/tpgamefiles/scr/heritage_feat_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
from templeplus.pymod import PythonModifier
from toee import *
import tpdp

# This file handles heritage feats

def heritageTypeList():
typeList = [
"Celestial Sorcerer Heritage",
"Draconic Heritage Black",
"Draconic Heritage Blue",
"Draconic Heritage Brass",
"Draconic Heritage Bronze",
"Draconic Heritage Copper",
"Draconic Heritage Gold",
"Draconic Heritage Green",
"Draconic Heritage Red",
"Draconic Heritage Silver",
"Draconic Heritage White",
"Fey Heritage",
"Fiendish Heritage",
"Infernal Sorcerer Heritage"
]
return typeList

# PHB II
def getCelestialSorcererHeritageFeatList():
featList = [
"Celestial Sorcerer Aura",
"Celestial Sorcerer Heritage",
"Celestial Sorcerer Lance",
"Celestial Sorcerer Lore",
"Celestial Sorcerer Wings"
]
return featList

# Draconic Feat List
# Note: Draconic Aura and Double Aura are not part of the draconic feats!
# Missing: Complete Arcane: Claw, Flight, Legacy(maybe a skip), Power, Presence
# Missing Dragon Magic: [Colour] Dragon Lineage (started), Draconic Knowledge (skip as there are no knowledge skills?), Draconic Senses
# Missing Dragon Magic Multiclass options: Dragonfire Assault (Power Attack), Dragonfire Channeling (Turn/Rebuke),
# Dragonfire Inspiration (Bardic Music), Dragonfire Strike (Sneak/Skirmish/Sudden Strike)
# Missing Races of the Dragon: Persuasion
def getDraconicHeritageFeatList():
featList = [
"Draconic Arcane Grace",
"Draconic Armor",
"Draconic Breath",
"Draconic Claw ",
"Draconic Flight"
"Draconic Heritage Black",
"Draconic Heritage Blue",
"Draconic Heritage Brass",
"Draconic Heritage Bronze",
"Draconic Heritage Copper",
"Draconic Heritage Gold",
"Draconic Heritage Green",
"Draconic Heritage Red",
"Draconic Heritage Silver",
"Draconic Heritage White",
"Draconic Knowledge",
"Draconic Legacy",
"Draconic Persuasion",
"Draconic Power",
"Draconic Presence",
"Draconic Resistance",
"Draconic Senses",
"Draconic Skin",
"Draconic Toughness",
"Draconic Vigor",
"Dragon Lineage Black",
"Dragon Lineage Blue",
"Dragon Lineage Brass",
"Dragon Lineage Bronze",
"Dragon Lineage Copper",
"Dragon Lineage Gold",
"Dragon Lineage Green",
"Dragon Lineage Red",
"Dragon Lineage Silver",
"Dragon Lineage White",
"Dragonfire Assault",
"Dragonfire Channeling",
"Dragonfire Inspiration",
"Dragonfire Strike"
]
return featList

# Complete Mage
def getFeyHeritageFeatList():
featList = [
"Fey Heritage",
"Fey Legacy",
"Fey Power",
"Fey Presence",
"Fey Skin"
]
return featList

# Complete Mage
def getFiendishHeritageFeatList():
featList = [
"Fiendish Heritage",
"Fiendish Legacy",
"Fiendish Power",
"Fiendish Presence",
"Fiendish Resistance"
]
return featList

# PHB II
def getInfernalSorcererHeritageFeatList():
featList = [
"Infernal Sorcerer Eyes",
"Infernal Sorcerer Heritage",
"Infernal Sorcerer Howl",
"Infernal Sorcerer Resistance",
]
return featList

def hasDifferentHeritageFeat(attachee, featToAquire):
for heritageFeat in heritageTypeList():
if not featToAquire == heritageFeat:
if attachee.has_feat(heritageFeat):
return True
return False

# Counts the number of heritage feats a character has
# Used by several feats
def countHeritageFeats(attachee, heritageType):
if heritageType == heritage_celestial_sorcerer:
featList = getCelestialSorcererHeritageFeatList()
elif heritageType in range(heritage_draconic_black, heritage_draconic_white + 1):
featList = getDraconicHeritageFeatList()
elif heritageType == heritage_fey:
featList = getFeyHeritageFeatList()
elif heritageType == heritage_fiendish:
featList = getFiendishHeritageFeatList()
elif heritageType == heritage_infernal_sorcerer:
featList = getInfernalSorcererHeritageFeatList()
numberOfFeats = 0
for feat in featList:
if attachee.has_feat(feat):
numberOfFeats += 1
return numberOfFeats

# Draconic heritage mappings
# [colourString, elementType, breathWeaponShape]

def getDictDraconicHeritage():
dictDraconicHeritage = {
heritage_draconic_black: ["Black", D20DT_ACID, dragon_breath_shape_line],
heritage_draconic_blue: ["Blue", D20DT_ELECTRICITY, dragon_breath_shape_line],
heritage_draconic_brass: ["Brass", D20DT_FIRE, dragon_breath_shape_line],
heritage_draconic_bronze: ["Bronze", D20DT_ELECTRICITY, dragon_breath_shape_line],
heritage_draconic_copper: ["Copper", D20DT_ACID, dragon_breath_shape_line],
heritage_draconic_gold: ["Gold", D20DT_FIRE, dragon_breath_shape_cone],
heritage_draconic_green: ["Green", D20DT_ACID, dragon_breath_shape_cone],
heritage_draconic_red: ["Red", D20DT_FIRE, dragon_breath_shape_cone],
heritage_draconic_silver: ["Silver", D20DT_COLD, dragon_breath_shape_cone],
heritage_draconic_white: ["White", D20DT_COLD, dragon_breath_shape_cone]
}
return dictDraconicHeritage

def getDraconicHeritageColourString(heritage):
dictDraconicHeritage = getDictDraconicHeritage()
return dictDraconicHeritage[heritage][0]

def getDraconicHeritageElement(heritage):
dictDraconicHeritage = getDictDraconicHeritage()
return dictDraconicHeritage[heritage][1]

def getDraconicHeritageBreathShape(heritage):
dictDraconicHeritage = getDictDraconicHeritage()
return dictDraconicHeritage[heritage][2]
Loading