diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..311fd39 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Sagenlicht + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/overrides.zip b/overrides.zip new file mode 100644 index 0000000..51c603f Binary files /dev/null and b/overrides.zip differ diff --git a/overrides/mes/help/stormlord_help.tab b/overrides/mes/help/stormlord_help.tab new file mode 100644 index 0000000..d771934 --- /dev/null +++ b/overrides/mes/help/stormlord_help.tab @@ -0,0 +1,8 @@ +TAG_STORMLORDS TAG_PRESTIGE_CLASSES Stormlords Stormlords often live as brigands, indulging their personal desires for wealth, food, luxury items, and wanton behavior as they crave random, spectacular acts of violence. Most Stormlords are cleric, druids, or cleric/sorcerers, although other class combinations, particulalry those including fighter or even barbarian are not unknown. Hit Die: d8 Requirements: To qualify to become a Stormlord, a character must fulfill all the following criteria. Alignment: Chaotic or Neutral Evil or Chaotic Neutral. Feats: ~Great Fortitude~[TAG_GREAT_FORT], ~Weapon Focus~[TAG_WEAPON_FOCUS](any spear or javelin). Base Save Bonus: ~Fortitude~[TAG_FORTITUDE] +4 Spells: Able to cast 3rd-level divine spells. Omitted: Feat Endurance(not in the game) Patron: Talos Special: The character must have been hit by a bolt of lightning, whether a natural bolt or one created by magic, and survived. Base Attack and Base Save Bonuses: see ~table~[TAG_CLASS_FEATURES_STORMLORD_TABLES] Class Skills: TBD Skill Points at Each Level: 2 + Int modifier Class Features: [CMD_CHILDREN] +TAG_CLASS_FEATURES_STORMLORD_SPELLS_PER_DAY TAG_STORMLORDS Stormlord Spells per Day At each stormlord level, the character gains new spells per day (and spells known, if applicable) as if he had also gained a level in a divine spellcasting class to which he belonged before adding the prestige class level. He does not, however, gain any other benefit a character of that class would have gained (improved chance of turning or destroying undead, additional favored enemies, and so on). If the character had more than one divine spellcasting class before becoming a stormlord, the player must decide to which class to add each stormlord level for the purpose of determining spells per day and spells known. +TAG_CLASS_FEATURES_STORMLORD_GRANTED_PROFICIENCIES TAG_STORMLORDS Stormlord Weapon and Armor Proficiency Stormlords gain no weapon or armor proficiencies. +TAG_CLASS_FEATURES_STORMLORD_ENHANCED_JAVELINS TAG_STORMLORDS Stormlord Enhanced Javelins Any javelin thrown by a stormlord counts as a +1 magic weapon. This bonus increases at 6th level to +2 and at 10th level to +3. +TAG_CLASS_FEATURES_STORMLORD_RESISTANCE_TO_ELECTRICITY TAG_STORMLORDS Stormlord Resistance to Electricity As a stormlord gains levels in this prestige class, he becomes increasingly ~resistant~[TAG_SPECIAL_ABILITIES_RESISTANCE_TO_ENERGY] to electrical energy, starting at 1st level with resistance to electricity 5. This bonus increases at 4th and 7th level by an additional 5. +TAG_CLASS_FEATURES_STORMLORD_SHOCK_WEAPONS TAG_STORMLORDS Stormlord Shock Weapons Any spear or javelin used by a stormlord of 2nd level or higher is treated as a shock weapon (dealing an extra 1d6 points of electricity damage). The weapon loses this ability when leaving the hand of the stormlord. For a stormlord of 8th level or higher, any spear or javelin he uses is instead treated as a shocking burst weapon. +TAG_CLASS_FEATURES_STORMLORD_THUNDERING_WEAPONS TAG_STORMLORDS Stormlords Thundering Weapons For a stormlord of 5th level or higher, any spear or javelin he uses is treated as a thundering weapon. The weapon loses this ability when leaving the hand of the stormlord. This effect stacks with that of the stormlord's shock weapon ability. +TAG_CLASS_FEATURES_STORMLORD_IMMUNITY_TO_ELECTRICITY_TAG_STORMLORDS Stormlords Immunity to Electricity At 9th level, a stormlord gains immunity to electricity. (Not yet implemented!) diff --git a/overrides/mes/stat_ext.mes b/overrides/mes/stat_ext.mes new file mode 100644 index 0000000..217c78c --- /dev/null +++ b/overrides/mes/stat_ext.mes @@ -0,0 +1,337 @@ +// Stat Names Go Between 0-999 +//core 3.5 Prestige classes +{18}{Arcane Archer} +{19}{Arcane Trickster} +{20}{Archmage} +{21}{Assassin} +{22}{Blackguard} +{23}{Dragon Disciple} +{24}{Duelist} +{25}{Dwarven Defender} +{26}{Eldritch Knight} +{27}{Hierophant} +{28}{Horizon Walker} +{29}{Loremaster} +{30}{Mystic Theurge} +{31}{Shadowdancer} +{32}{Thaumaturgist} + +// Other supplemental stuff for 3.5 ed +{33}{Warlock} +{34}{Favored Soul} +{35}{Red Avenger} +{36}{Iaijutsu Master} +{37}{Sacred Fist} +{38}{Stormlord} +{39}{Elemental Savant} +{40}{Blood Magus} +{41}{Beastmaster} +{42}{Cryokineticist} +{43}{Frost Mage} +{44}{Artificer} +{45}{Abjurant Champion} +{46}{Scout} +{47}{Warmage} +{48}{Beguiler} +{49}{Swashbuckler} + +// Psionic Classes +{58}{Psion} +{59}{Psychic Warrior} +{60}{Soulknife} +{61}{Wilder} +{62}{Cerebmancer} +{63}{Elocator} +{64}{Metamind} +{65}{Psion Uncarnate} +{66}{Psionic Fist} +{67}{Pyrokineticist} +{68}{Slayer} +{69}{Thrallherd} +{70}{War Mind} + +// Tome of Battle +{71}{Crusader} +{72}{Swordsage} +{73}{Warblade} +{74}{Bloodclaw Master} +{75}{Bloodstorm Blade} +{76}{Deepstone Sentinel} +{77}{Eternal Blade} +{78}{Jade Phoenix Mage} +{79}{Master of Nine} +{80}{Ruby Knight Vindicator} +{81}{Shadow Sun Ninja} + +// +{82}{Fochlucan Lyrist} + +{300}{Psi Points} // max +{301}{Psi Points} // cur + +// Stat Short Names Go Between 1000-1999 +{1018}{Aarc} +{1019}{Atrk} +{1020}{Amag} +{1021}{Assn} +{1022}{Blkg} +{1023}{Drds} +{1024}{Dlst} +{1025}{Dwdf} +{1026}{Edkn} +{1027}{Hier} +{1028}{Horw} +{1029}{Lore} +{1030}{Msth} +{1031}{Sdwd} +{1032}{Thmg} + +{1033}{Wrlk} +{1034}{Fvrd} +{1035}{} +{1036}{} +{1037}{} +{1038}{} +{1039}{} +{1040}{} +{1041}{} +{1042}{} +{1043}{} +{1044}{} +{1045}{} +{1046}{Sct} +{1047}{Wrmg} +{1048}{Bglr} +{1049}{Swbk} +{1050}{} +{1051}{} +{1052}{} +{1053}{} +{1054}{} +{1055}{} +{1056}{} +{1057}{} +{1058}{} +{1059}{} +{1060}{} +{1061}{} +{1062}{} +{1063}{} +{1064}{} +{1065}{} +{1066}{} +{1067}{} +{1068}{} +{1069}{} +{1070}{} + +{1071}{Crus} +{1072}{Swsg} +{1073}{Warb} +{1074}{Bcwm} +{1075}{Blmg} +{1076}{Dpstn} +{1077}{Etbl} +{1078}{Jpmg} +{1079}{Mo9} +{1080}{Rkvn} +{1081}{Ssnj} +{1082}{Foch} + + + + +{1300}{Psi} +{1301}{Psi} + +// Race Names Go Between 2000-2999 +{2007}{Goblin} +{2008}{Bugbear} +{2009}{Gnoll} +{2010}{Hill Giant} +{2011}{Troll} +{2012}{Hobgoblin} +{2013}{Lizardman} +{2033}{Deep Dwarf} +{2034}{Aquatic Elf} +{2035}{Svirfneblin} +{2038}{Tallfellow} +{2064}{Aasimar} +{2065}{Derro} +{2066}{Drow} +{2067}{Forest Gnome} +{2070}{Deep Halfling} +{2096}{Tiefling} +{2097}{Duergar} +{2098}{Gray Elf} +{2129}{Mountain Dwarf} +{2130}{Wild Elf} +{2162}{Wood Elf} +{2161}{Gold Dwarf} +{2102}{Strongheart} +{2134}{Ghostwise} + +// Race Abbreviations Go Between 3000-3999 + + +// Race Short Help Goes Between 12000-12999 +{12007} goblin {} +{12010} Hill Giant {Reckless brutes of incredible strength but little wit. +14 Strength, -2 Dexterity, +8 Constitution, -4 Intelligence, -4 Charisma, +4 Level Adjustment, 12d8 monster HD.} +{12011} Troll {Trolls have no fear of death: They launch themselves into combat without hesitation. +12 Strength, +4 Dexterity, +12 Constitution, -4 Intelligence, -2 Wisdom, -4 Charisma, +5 Level Adjustment, 6d8 monster HD.} +{12035} Svirfneblin {Also called deep gnomes, svirfneblin are said to dwell in great cities deep underground. Reclusive, suspicious, and resentful of intrusion into their cavern homes, the deep gnomes share little of the humor or openness of their surface cousins. They possess the following traits: -2 Strength, +2 Dexterity, +2 Wisdom, -4 Charisma. Spell resistance equal to 11 + class levels. +2 racial bonus on all saving throws. Add +1 to the Difficulty Class for all saving throws against illusion spells cast by svirfneblin. This adjustment stacks with those from similar effects, such as the Spell Focus feat. +1 racial bonus on attack rolls against kobolds and goblinoids. +4 dodge bonus to Armor Class against all creatures. Spell-Like Abilities: 1/day - blindness/deafness, blur. Caster level equals the svirfneblin's class levels. The save DC is Charisma-based and include a +4 racial modifier. +2 racial bonus on Hide and Listen checks. Their favored class is Rogue. Level adjustment +3.} +{12064} Aasimar {Aasimars are humans with some trace of celestial blood in their veins, and their favored class is Paladin. They possess the following traits: +2 Wisdom, +2 Charisma, Resistance 5 to acid, cold and electricity, and +2 on Spot and Listen checks. Level adjustment: +1.} +{12066} Drow {Drow are a depraved and evil subterranean offshoot, their chief deity is Lolth, and their favored class is Cleric (females) and Wizard (males). In addition to elven racial traits, the Drow feature: +2 Intelligence, +2 Charisma, Spell Resistance equal to 11 + class levels, and +2 on Will saves against spells and spell-like effects. Level adjustment: +2.} +{12097} Duergar {Duergar are evil beings that dwell in the underground. Their favored class is Fighter. In addition to dwarven racial traits, the Duergar feature: -4 Charisma, immunity to poison and paralysis, +2 on saves vs. spells and spell-like effects, +4 on Move Silently checks, 1/day enlarge person and invisibility. Level adjustment: +1.} +{12034} Aquatic Elf {Aquatic Elves are also called sea elves, these creatures are waterbreathing cousins to land-dwelling elves. Aquatic elves have all the standard elven racial traits except as follows: +2 Dexterity, -2 Intelligence. Their favored class is Fighter.} +{12096} Tiefling {Tieflings are humans with some trace of infernal blood in their veins, and their favored class is Rogue. Tieflings are sneaky, subtle, and generally conniving. They prefer to strike from ambush and usually avoid a fair fight if they can. Tieflings tend to have an unsettling air about them, and most people are uncomfortable around them, whether they are aware of the tiefling's unsavory ancestry or not. While some look like normal humans, most retain physical characteristics derived from their ancestor, with the most common such features being horns, non-prehensile tails, and pointed teeth. They possess the following traits: +2 Dexterity, +2 Intelligence and -2 Charisma, resistance to fire 5, cold 5, and electricity 5 and +2 racial bonus on bluff and hide checks. Level adjustment: +1.} +{12098} Gray Elf {Gray elves are taller and grander in physical appearance than others of their race, gray elves have a reputation for being aloof and arrogant (even by elven standards). Gray elves have all the standard elven racial traits except as follows: +2 Intelligence, -2 Strength. Their favored class is wizard.} +{12130} Wild Elf {Wild elves were always close to nature, even more so than other elves, but they have forgotten many of the high arts and lore of their people, choosing stealth and survival over building and book learning. Wild elves are stocky and strongly built for elves. Wild elves have all the standard elven racial traits except as follows: +2 Dexterity, -2 Intelligence. Their favored class is Sorcerer.} +{12162} Wood Elf {Wood elves are uncommonly strong for elves, but also smaller and less intuitive than most elves. Wood elves have all the standard elven racial traits except as follows: +2 Strength, +2 Dexterity, -2 Constitution, -2 Intelligence. Their favored class is ranger.} +{12161} Gold Dwarf {Gold dwarves are a forgotten realms race. They are stocky and muscular, Averaging 4 feet tall and weighing as much as an adult human. They have the standard dwarven traits except as follows: -2 Dexterity, +2 Constitution. +1 racial bonus on attack rolls against aberrations: Gold dwarves are trained in special combat techniques against the many bizarre creatures that live in the Underdark. (This replaces the attack bonus against ores and goblinoids.) Their favored class is fighter. } +{12102} Strongheart {Strongheart Halflings are a forgotten realms race. While the lightfoot halflings value the experience of travel and the sight of new lands and peoples, the stronghearts are a more organized, oderly, and industrious race. They build to last, and fiercely defend their homelands against threats that their lightfoot kin would simply flee. They have the standard halfling traits except as follows: Strongheart halflings gain one extra feat at 1st level. Srongheart halflings do not receinve the halfling racial +1 bonus on all saving throws.} +{12038} Tallfellow {Tallfellow halflings are somewhat rare among halfling folk. Tallfellows are 4 feet tall or more and weigh between 30 and 35 pounds. They have the standard halfling traits except as follows: +2 racial bonus on Search, Spot, and Listen checks. Like an elf, a tallfellow who merely passes within 5 feet of a secret or concealed door is entitled to a Search check as though actively looking for it. This trait replaces the lightfoot's +2 bonus on Listen checks. Tallfellows are less athletic than lightfoot halflings and do not have a racial bonus on Climb, Jump, and Move Silently checks.} +{12134} Ghostwise {Ghostwise Halflings are a forgotten realms race. These wild, nearly feral halflings rarely leave their confines of the deep forests. They have the standard halfling traits except as follows: Ghostwise halflings do not receinve the halfling racial +1 bonus on all saving throws. Their favored class is barbarian.} +// Class Short Help Goes Between 13000-13099 +{13011}Arcane Archer{The arcane archer is an Elven warrior skilled in using magic to supplement their combat prowess. + +Requirements: Elf or half-elf. BAB +6. +Feats: Point Blank Shot, Precise Shot, Weapon Focus (longbow or shortbow). +Spells: Ability to cast 1st-level arcane spells. +} + + +{13012}Arcane Trickster{Arcane tricksters combine their knowledge of spells with a taste for intrigue, larceny, or just plain mischief. + +Requirements: Nonlawful, Sneak attack +2d6. +Skill ranks: Disable Device 7 +Spells: Ability to cast an arcane spell of 3rd level+. +} + + +{13013}Archmage{--COMING SOON-- An advanced practitioner of the Art, who gains strange powers and the ability to alter spells in remarkable ways. + +Requirements: Ability to cast 7-th level arcane spells +Skill ranks: Spellcraft 15 +Feats: Skill Focus (Spellcraft), Spell Focus in two schools of magic} + + +{13014}Assassin{A master of dealing quick, lethal blows, whose training allows to carry out missions of death with shocking, terrifying precision. + +Requirements: Evil alignment. +Skill ranks: Hide 8, Move Silently 8 +} // The character must kill someone just for joining the assassins. + + +{13015}Blackguard{The quintessential black knight. Also called by some an anti-paladin. + +Requirements: Evil alignment. BAB +6. +Skill ranks: Hide 5 +Feats: Cleave, Power Attack +} // Special: Contact with an evil summoned outsider. + + +{13016}Dragon Disciple{--NOT COMING SOON-- A descendant of dragonkind who uses their innate magical power as a catalyst to ignite their dragon blood. + +Requirements +Race: Any nondragon. +Spellcasting: Ability to cast arcane spells without preparation.} + + +{13017}Duelist{A nimble, intelligent fighter trained in making precise attacks with light weapons, such as the rapier. Also known as a swashbuckler. + +Requirements: BAB +6 +Skill ranks: Perform 3, Tumble 5 +Feats: Dodge, Mobility, Weapon Finesse +} + + +{13018}Dwarven Defender{A sponsored champion of a dwarven cause, trained in the arts of defense. + +Requirements: Dwarven race. Lawful alignment. BAB +7. +Feats: Dodge, Toughness +} + + +{13019}Eldritch Knight{A versatile combatant who studies the martial and arcane arts to equal degree. + +Requirements: Able to cast 3rd-level arcane spells. +Weapon Proficiency: Must be proficient with all martial weapons. +} + + + +{13020}Hierophant{--NOT COMING SOON-- A divine spellcaster who rises high in the service of their deity, gaining access to spells and abilities of which lesser faithful can only dream. + +Requirements +Feats: Any metamagic feat. +Spells: Able to cast 7th-level divine spells.} +{13021}Horizon Walker{--NOT COMING SOON-- An unceasing traveller to the universe's most dangerous places. + +Requirements +derp} + + + +{13022}Loremaster{--NOT COMING SOON-- A spellcaster who concentrates on knowledge, unconvering secrets that they then use to better themselves mentally, physically and spiritually. + +Requirements +Feats: Any three metamagic or item creation feats. +Spells: Able to cast seven different divination spells, one of which must be 3rd level or higher. +} +{13023}Mystic Theurge{A mystic theurge walks two roads at once, simulatenously mastering spells common to clerics and wizards. + +Requirements: Able to cast 2nd-level divine spells and 2nd-level arcane spells. +} +{13024}Shadowdancer{--NOT COMING SOON-- A numble artist of deception operating in the border between light and darkness. + +Requirements +Skill ranks: Move Silently 8, Hide 10, Perform 5 +Feats: Combat Reflexes, Dodge, Mobility} + +{13025}Thaumaturgist{One who reaches out with divine power to other planes of existence, calling creatures there to do their bidding. + +Requirements +Feats: Spell Focus (conjuration). +Spells: Able to cast lesser planar ally.} + +{13026}Warlock{Born of a supernatural bloodline, a warlock seeks to master the perilous magic that suffuses his soul. Unlike sorcerers or wizards, who approach arcane magic through the medium of spells, a warlock invokes powerful magic through nothing more than an effort of will.} +{13027}Favored Soul{Favored souls cast divine spells by means of an innate connection rather than through laborious training and prayer, so their divine connection is natural rather than learned.} + +{13031}Stormlord{Stormlords often live as brigands, indulging their personal desires for wealth, food, luxury items, and wanton behavior as they crave random, spectacular acts of violence. + +Requirements +Alignment: As for a cleric of Talos (CE,CN, NE) +Feats: Great Fortitude, Weapon Focus (any spear or javelin) +Spells: Able to cast 3rd-level divine spells. +Base Save Bonus: Fort +4.} +// Not implemented: +// Feat: Endurance (non in the game) +// Patron: Talos +// Special: The character must have been hit by a bolt of lightning, whether a natural bolt or one created by magic, and survived. + +{13039}Scout{A scout has some training in weapons and a unique combat style that favors fast movement and devastating attacks.} +{13040}Warmage{A warmage is a militant spellcaster whose training focuses on battlefield magic.} +{13041}Beguiler{A beguiler is a spellcaster who delights in manipulating others, either to their disadvantage or for their own good.} +{13042}Swashbuckler{The swashbuckler embodies the concepts of daring and panache.} +{13075}Fochlucan Lyrist{The Fochlucan lyrist is a Warrior, thief, spy, poet and woodland champion. + +Requirements +Skills: Decipher Script 7, Diplomacy 7, Gather Information 7, Perform 13, Sleight of Hand 7. +Alignment: Neutral good, neutral, chaotic neutral, or neutral evil. +Spells: Casts 1st-level arcane and divine spells. +Special: Bardic knowledge, Speak Language (Druidic) and evasion abilities. +} + +// Cannot Pick Class Short Help Goes in the range of 20007+ +{20007} Arcane Archer{Arcane Archer requirements: +Race: Elf or half-elf. +Base Attack Bonus: +6 +Feats: Point Blank Shot, Precise Shot, Weapon Focus (longbow or shortbow) +Spells: Ability to cast 1st level arcane spells.} + +{20034} Favored Soul {Favored Soul requirements: +Charisma: 11 or higher.} +{20047} Warmage {Warmage requirements: +Charisma: 11 or higher.} +{20048} Beguiler {Beguiler requirements: +Intelligence: 11 or higher.} diff --git a/overrides/rules/char_class/class038_stormlord.py b/overrides/rules/char_class/class038_stormlord.py new file mode 100644 index 0000000..9252081 --- /dev/null +++ b/overrides/rules/char_class/class038_stormlord.py @@ -0,0 +1,131 @@ +from toee import * +import char_class_utils +import char_editor +################################################### + +def GetConditionName(): + return "Stormlord" + +def GetSpellCasterConditionName(): + return "Stormlord Spellcasting" + +def GetCategory(): + return "Complete Divine Prestige Classes" + +def GetClassDefinitionFlags(): + return CDF_None + +def GetClassHelpTopic(): + return "TAG_STROMLORD" + +classEnum = stat_level_stormlord + +################################################### + + +class_feats = { +1: ("Stormlord Enhanced Javelins", "Stormlord Resistance to Electricity",), +2: ("Stormlord Shock Weapon",), +3: ("Stormlord Storm Walk",), +5: ("Stormlord Thundering Weapon",), +6: ("Stormlord Storm Ride",), +9: ("Stormlord Immunity to Electricity",), +10: ("Stormlord Storm of Elemental Fury",) +} + +class_skills = (skill_concentration, skill_disguise, skill_gather_information, skill_intimidate, skill_knowledge_nature, skill_knowledge_religion, skill_swim, skill_wilderness_lore) + + +def IsEnabled(): + return 1 + +def GetHitDieType(): + return 8 + +def GetSkillPtsPerLevel(): + return 2 + +def GetBabProgression(): + return base_attack_bonus_type_semi_martial + +def IsFortSaveFavored(): + return 1 + +def IsRefSaveFavored(): + return 0 + +def IsWillSaveFavored(): + return 1 + +# Spell casting +def GetSpellListType(): + return spell_list_type_extender + +def GetSpellSourceType(): + return spell_source_type_divine + +def IsClassSkill(skillEnum): + return char_class_utils.IsClassSkill(class_skills, skillEnum) + +def IsClassFeat(featEnum): + return char_class_utils.IsClassFeat(class_feats, featEnum) + +def GetClassFeats(): + return class_feats + +def IsAlignmentCompatible( alignment): + # Alignment needs to be CE, CN or NE; + allowedAlignments = [ALIGNMENT_CHAOTIC_EVIL, ALIGNMENT_CHAOTIC_NEUTRAL, ALIGNMENT_NEUTRAL_EVIL] + if alignment in allowedAlignments: + return 1 + else: + return 0 + +def ObjMeetsPrereqs( obj ): + requiredFeats = [feat_weapon_focus_halfspear, feat_weapon_focus_shortspear, feat_weapon_focus_longspear, feat_weapon_focus_javelin] + objFeats = obj.feats + if obj.divine_spell_level_can_cast() < 3: + return 0 + elif obj.stat_level_get(stat_save_fortitude) < 4: + return 0 +# elif not obj.has_feat(feat_endurance): #not in the game currently +# return 0 + elif not obj.has_feat(feat_great_fortitude): + return 0 + elif not any(feat in objFeats for feat in requiredFeats): + return 0 + else: + return 1 + + +# Levelup + +def IsSelectingSpellsOnLevelup(obj, class_extended_1=0): + if class_extended_1 <= 0: + class_extended_1 = char_class_utils.GetHighestDivineClass(obj) + if char_editor.is_selecting_spells(obj, class_extended_1): + return 1 + return 0 + + +def LevelupCheckSpells(obj, class_extended_1=0): + if class_extended_1 <= 0: + class_extended_1 = char_class_utils.GetHighestDivineClass(obj) + if not char_editor.spells_check_complete(obj, class_extended_1): + return 0 + return 1 + + +def InitSpellSelection(obj, class_extended_1=0): + newLvl = obj.stat_level_get( classEnum ) + 1 + if newLvl == 1 or class_extended_1 <= 0: + class_extended_1 = char_class_utils.GetHighestDivineClass(obj) + char_editor.init_spell_selection(obj, class_extended_1) + return 0 + + +def LevelupSpellsFinalize(obj, class_extended_1=0): + if class_extended_1 <= 0: + class_extended_1 = char_class_utils.GetHighestDivineClass(obj) + char_editor.spells_finalize(obj, class_extended_1) + return 0 \ No newline at end of file diff --git a/overrides/rules/feats/stormlord enhanced javelins.txt b/overrides/rules/feats/stormlord enhanced javelins.txt new file mode 100644 index 0000000..b136c15 --- /dev/null +++ b/overrides/rules/feats/stormlord enhanced javelins.txt @@ -0,0 +1,5 @@ +name: Stormlord Enhanced Javelins +flags: 8 +prereqs: +description: Any javelin thrown by a stormlord counts as a +1 magic weapon. This bonus increases at 6th level to +2 and at 10th level to +3. +prereq descr: Stormlord Level 1. \ No newline at end of file diff --git a/overrides/rules/feats/stormlord immunity to electricity.txt b/overrides/rules/feats/stormlord immunity to electricity.txt new file mode 100644 index 0000000..93b3c7a --- /dev/null +++ b/overrides/rules/feats/stormlord immunity to electricity.txt @@ -0,0 +1,5 @@ +name: Stormlord Immunity to Electricity +flags: 8 +prereqs: +description: At 9th level, a stormlord gains immunity to electricity. +prereq descr: Stormlord Level 9. \ No newline at end of file diff --git a/overrides/rules/feats/stormlord resistance to electricity.txt b/overrides/rules/feats/stormlord resistance to electricity.txt new file mode 100644 index 0000000..75ece32 --- /dev/null +++ b/overrides/rules/feats/stormlord resistance to electricity.txt @@ -0,0 +1,5 @@ +name: Stormlord Resistance to Electricity +flags: 8 +prereqs: +description: : As a stormlord gains levels in this prestige class, he becomes increasingly resistant to electrical energy, starting at 1st level with resistance to electricity 5. This bonus increases at 4th and 7th level by an additional 5. +prereq descr: Stormlord Level 1. \ No newline at end of file diff --git a/overrides/rules/feats/stormlord shock weapon.txt b/overrides/rules/feats/stormlord shock weapon.txt new file mode 100644 index 0000000..6a9ddc5 --- /dev/null +++ b/overrides/rules/feats/stormlord shock weapon.txt @@ -0,0 +1,5 @@ +name: Stormlord Shock Weapon +flags: 8 +prereqs: +description: Any spear or javelin used by a stormlord of 2nd level or higher is treated as a shock weapon (dealing an extra 1d6 points of electricity damage). The weapon loses this ability when leaving the hand of the stormlord. For a stormlord of 8th level or higher, any spear or javelin he uses is instead treated as a shocking burst weapon. +prereq descr: Stormlord Level 2. \ No newline at end of file diff --git a/overrides/rules/feats/stormlord storm of elemental fury.txt b/overrides/rules/feats/stormlord storm of elemental fury.txt new file mode 100644 index 0000000..710e68a --- /dev/null +++ b/overrides/rules/feats/stormlord storm of elemental fury.txt @@ -0,0 +1,5 @@ +name: Stormlord Storm of Elemental Fury +flags: 8 +prereqs: +description: At 10th level, a stormlord can summon a storm of great magnitude and power. Once per day, a stormlord can use storm of elemental fury as if he were a 17th-level cleric. +prereq descr: Stormlord Level 10. \ No newline at end of file diff --git a/overrides/rules/feats/stormlord storm ride.txt b/overrides/rules/feats/stormlord storm ride.txt new file mode 100644 index 0000000..98a343a --- /dev/null +++ b/overrides/rules/feats/stormlord storm ride.txt @@ -0,0 +1,5 @@ +name: Stormlord Storm Ride +flags: 8 +prereqs: +description: Not implemented yet +prereq descr: Stormlord Level 6. \ No newline at end of file diff --git a/overrides/rules/feats/stormlord storm walk.txt b/overrides/rules/feats/stormlord storm walk.txt new file mode 100644 index 0000000..b0b869e --- /dev/null +++ b/overrides/rules/feats/stormlord storm walk.txt @@ -0,0 +1,5 @@ +name: Stormlord Storm Walk +flags: 8 +prereqs: +description: Not implemented yet. +prereq descr: Stormlord Level 3. \ No newline at end of file diff --git a/overrides/rules/feats/stormlord thundering weapon.txt b/overrides/rules/feats/stormlord thundering weapon.txt new file mode 100644 index 0000000..6560f84 --- /dev/null +++ b/overrides/rules/feats/stormlord thundering weapon.txt @@ -0,0 +1,5 @@ +name: Stormlord Thundering Weapon +flags: 8 +prereqs: +description: For a stormlord of 5th level or higher, any spear or javelin he uses is treated as a thundering weapon. The weapon loses this ability when leaving the hand of the stormlord. This effect stacks with that of the stormlord's shock weapon ability. +prereq descr: Stormlord Level 5. \ No newline at end of file diff --git a/overrides/scr/tpModifiers/stormlord.py b/overrides/scr/tpModifiers/stormlord.py new file mode 100644 index 0000000..8421f74 --- /dev/null +++ b/overrides/scr/tpModifiers/stormlord.py @@ -0,0 +1,231 @@ +from templeplus.pymod import PythonModifier +from toee import * +import tpdp +import char_class_utils + +################################################### + +def GetConditionName(): + return "Stormlord" + +def GetSpellCasterConditionName(): + return "Stormlord Spellcasting" + +print "Registering {}".format(GetConditionName()) + +classEnum = stat_level_stormlord +classSpecModule = __import__('class038_stormlord') +################################################### + + +#### standard callbacks - BAB and Save values +def OnGetToHitBonusBase(attachee, args, evt_obj): + classLvl = attachee.stat_level_get(classEnum) + babvalue = game.get_bab_for_class(classEnum, classLvl) + evt_obj.bonus_list.add(babvalue, 0, 137) # untyped, description: "Class" + return 0 + +def OnGetSaveThrowFort(attachee, args, evt_obj): + value = char_class_utils.SavingThrowLevel(classEnum, attachee, D20_Save_Fortitude) + evt_obj.bonus_list.add(value, 0, 137) + return 0 + +def OnGetSaveThrowReflex(attachee, args, evt_obj): + value = char_class_utils.SavingThrowLevel(classEnum, attachee, D20_Save_Reflex) + evt_obj.bonus_list.add(value, 0, 137) + return 0 + +def OnGetSaveThrowWill(attachee, args, evt_obj): + value = char_class_utils.SavingThrowLevel(classEnum, attachee, D20_Save_Will) + evt_obj.bonus_list.add(value, 0, 137) + return 0 + +classSpecObj = PythonModifier(GetConditionName(), 0) +classSpecObj.AddHook(ET_OnToHitBonusBase, EK_NONE, OnGetToHitBonusBase, ()) +classSpecObj.AddHook(ET_OnSaveThrowLevel, EK_SAVE_FORTITUDE, OnGetSaveThrowFort, ()) +classSpecObj.AddHook(ET_OnSaveThrowLevel, EK_SAVE_REFLEX, OnGetSaveThrowReflex, ()) +classSpecObj.AddHook(ET_OnSaveThrowLevel, EK_SAVE_WILL, OnGetSaveThrowWill, ()) + +## Stormlord Feats + +def stormlordWeapons(): + weaponList = [wt_javelin, wt_longspear, wt_shortspear, wt_spear] + return weaponList + +def featEnhancedJavelinsToHit(attachee, args, evt_obj): + usedWeapon = evt_obj.attack_packet.get_weapon_used() + if usedWeapon.obj_get_int(obj_f_weapon_type) == wt_javelin: + classLevel = attachee.stat_level_get(classEnum) + if classLevel < 6: + enhancementBonus = 1 + elif classLevel < 10: + enhancementBonus = 2 + else: + enhancementBonus = 3 + evt_obj.bonus_list.add_from_feat(enhancementBonus, 12, 114, "Stormlord Enhanced Javelins") + return 0 + +def featEnhancedJavelinsDamage(attachee, args, evt_obj): + usedWeapon = evt_obj.attack_packet.get_weapon_used() + if usedWeapon.obj_get_int(obj_f_weapon_type) == wt_javelin: + classLevel = attachee.stat_level_get(classEnum) + if classLevel < 6: + enhancementBonus = 1 + elif classLevel < 10: + enhancementBonus = 2 + else: + enhancementBonus = 3 + if not evt_obj.damage_packet.attack_power & D20DAP_MAGIC: + evt_obj.damage_packet.attack_power |= D20DAP_MAGIC + evt_obj.damage_packet.bonus_list.add(enhancementBonus, 12, "~Enhancement~[TAG_ENHANCEMENT_BONUS] : ~Stormlord Enhanced Javelins~[TAG_CLASS_FEATURES_STORMLORD_ENHANCED_JAVELINS]") + #evt_obj.damage_packet.bonus_list.add_from_feat(enhancementBonus, 12, 114, "Stormlord Enhanced Javelins") + return 0 + +enhancedJavelins = PythonModifier("Stormlord Enhanced Javelins Feat", 0) +enhancedJavelins.MapToFeat("Stormlord Enhanced Javelins") +enhancedJavelins.AddHook(ET_OnToHitBonus2, EK_NONE, featEnhancedJavelinsToHit, ()) +enhancedJavelins.AddHook(ET_OnDealingDamage, EK_NONE, featEnhancedJavelinsDamage, ()) + +def featResistanceToElectricity(attachee, args, evt_obj): + classLevel = attachee.stat_level_get(classEnum) + if classLevel >= 9: + return 0 + if classLevel < 4: + resistanceBonus = 5 + elif classLevel < 7: + resistanceBonus = 10 + else: + resistanceBonus = 15 + evt_obj.damage_packet.add_damage_resistance(resistanceBonus, D20DT_ELECTRICITY, 1010) #ID 1010 in damage.mes is Electricity + return 0 + +electricityResistance = PythonModifier("Stormlord Resistance to Electricity Feat", 0) +electricityResistance.MapToFeat("Stormlord Resistance to Electricity") +electricityResistance.AddHook(ET_OnTakingDamage , EK_NONE, featResistanceToElectricity, ()) + +def featShockWeapon(attachee, args, evt_obj): + usedWeapon = evt_obj.attack_packet.get_weapon_used() + weaponList = stormlordWeapons() + if not usedWeapon.obj_get_int(obj_f_weapon_type) in weaponList: + return 0 + classLevel = attachee.stat_level_get(classEnum) + bonusDice = dice_new('1d6') + evt_obj.damage_packet.add_dice(bonusDice, D20DT_ELECTRICITY, 100) #ID 100 in damage.mes is Weapon + if classLevel >= 8: + if evt_obj.attack_packet.get_flags() & D20CAF_CRITICAL: + bonusDiceBurst = dice_new('1d10') + critMultiplier = evt_obj.damage_packet.critical_multiplier + if critMultiplier > 3: #unsure if needed; D20SRD description ends at x4 + critMultiplier = 3 + bonusDiceBurst.number = critMultiplier + print "bonusDiceBurst: {}".format(bonusDiceBurst) + evt_obj.damage_packet.add_dice(bonusDiceBurst, D20DT_ELECTRICITY, 100) #ID 100 in damage.mes is Weapon + return 0 + +shockWeapon = PythonModifier("Stormlord Shock Weapon Feat", 0) +shockWeapon.MapToFeat("Stormlord Shock Weapon") +shockWeapon.AddHook(ET_OnDealingDamage, EK_NONE, featShockWeapon, ()) + +def featThunderingWeaponDamage(attachee, args, evt_obj): + usedWeapon = evt_obj.attack_packet.get_weapon_used() + weaponList = stormlordWeapons() + target = evt_obj.attack_packet.target + if not usedWeapon.obj_get_int(obj_f_weapon_type) in weaponList: + return 0 + print "passed weapon test" + if evt_obj.attack_packet.get_flags() & D20CAF_CRITICAL: + print "passed crit flag" + bonusDice = dice_new('1d8') + critMultiplier = evt_obj.damage_packet.critical_multiplier + print "critMultiplier: {}".format(critMultiplier) + if critMultiplier > 3: #unsure if needed; D20SRD description ends at x4 + critMultiplier = 3 + bonusDice.number = critMultiplier + evt_obj.damage_packet.add_dice(bonusDice, D20DT_SONIC, 100) #ID 1012 in damage.mes is Weapon + # Thundering Weapons deafens on a critical hit on a failed dc save 14 + saveDc = 14 + if target.saving_throw(saveDc, D20_Save_Fortitude, D20STD_F_SPELL_DESCRIPTOR_SONIC, attachee, EK_D20A_STANDARD_ATTACK): + target.float_text_line("Not deafened") + else: + if target.condition_add_with_args('sp-Deafness', 0, 0, 0): + game.particles('sp-Blindness-Deafness', target) + return 0 + +thunderingWeapon = PythonModifier("Stormlord Thundering Weapon Feat", 0) +thunderingWeapon.MapToFeat("Stormlord Thundering Weapon") +thunderingWeapon.AddHook(ET_OnDealingDamage, EK_NONE, featThunderingWeaponDamage, ()) + +def featImmunityToElectricity(attachee, args, evt_obj): + evt_obj.damage_packet.add_mod_factor(0.0, D20DT_ELECTRICITY, 132) #ID 132 in damage.mes is Immunity + return 0 + +electricityImmunity = PythonModifier("Stormlord Immunity to Electricity Feat", 0) +electricityImmunity.MapToFeat("Stormlord Immunity to Electricity") +electricityImmunity.AddHook(ET_OnTakingDamage , EK_NONE, featImmunityToElectricity, ()) + +##### Spell casting + +# configure the spell casting condition to hold the highest Divine classs +def OnAddSpellCasting(attachee, args, evt_obj): + # arg0 holds the divine class + if args.get_arg(0) == 0: + args.set_arg(0, char_class_utils.GetHighestDivineClass(attachee)) + + return 0 + +# Extend caster level for base casting class +def OnGetBaseCasterLevel(attachee, args, evt_obj): + class_extended_1 = args.get_arg(0) + class_code = evt_obj.arg0 + if class_code != class_extended_1: + if evt_obj.arg1 == 0: # arg1 != 0 means you're looking for this particular class's contribution + return 0 + classLvl = attachee.stat_level_get(classEnum) + evt_obj.bonus_list.add(classLvl , 0, 137) + return 0 + + +def OnSpellListExtensionGet(attachee, args, evt_obj): + class_extended_1 = args.get_arg(0) + class_code = evt_obj.arg0 + if class_code != class_extended_1: + if evt_obj.arg1 == 0: # arg1 != 0 means you're looking for this particular class's contribution + return 0 + classLvl = attachee.stat_level_get(classEnum) + evt_obj.bonus_list.add(classLvl, 0, 137) + return 0 + + +def OnInitLevelupSpellSelection(attachee, args, evt_obj): + if evt_obj.arg0 != classEnum: + return 0 + class_extended_1 = args.get_arg(0) + classSpecModule.InitSpellSelection(attachee, class_extended_1) + return 0 + + +def OnLevelupSpellsCheckComplete(attachee, args, evt_obj): + if evt_obj.arg0 != classEnum: + return 0 + class_extended_1 = args.get_arg(0) + if not classSpecModule.LevelupCheckSpells(attachee, class_extended_1): + evt_obj.bonus_list.add(-1, 0, 137) # denotes incomplete spell selection + return 1 + + +def OnLevelupSpellsFinalize(attachee, args, evt_obj): + if evt_obj.arg0 != classEnum: + return 0 + class_extended_1 = args.get_arg(0) + classSpecModule.LevelupSpellsFinalize(attachee, class_extended_1) + return 0 + + +spellCasterSpecObj = PythonModifier(GetSpellCasterConditionName(), 8) +spellCasterSpecObj.AddHook(ET_OnConditionAdd, EK_NONE, OnAddSpellCasting, ()) +spellCasterSpecObj.AddHook(ET_OnGetBaseCasterLevel, EK_NONE, OnGetBaseCasterLevel, ()) +spellCasterSpecObj.AddHook(ET_OnSpellListExtensionGet, EK_NONE, OnSpellListExtensionGet, ()) +spellCasterSpecObj.AddHook(ET_OnLevelupSystemEvent, EK_LVL_Spells_Activate, OnInitLevelupSpellSelection, ()) +spellCasterSpecObj.AddHook(ET_OnLevelupSystemEvent, EK_LVL_Spells_Check_Complete, OnLevelupSpellsCheckComplete, ()) +spellCasterSpecObj.AddHook(ET_OnLevelupSystemEvent, EK_LVL_Spells_Finalize, OnLevelupSpellsFinalize, ()) + diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..5c0db37 --- /dev/null +++ b/readme.txt @@ -0,0 +1,6 @@ +Stormlord Prestige Class for ToEE +Temple+ required + +Work in Progress + +What is working?