Skip to content

Commit

Permalink
1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pheonix99 committed Jan 19, 2023
1 parent d29c72c commit 1b699cc
Show file tree
Hide file tree
Showing 18 changed files with 723 additions and 62 deletions.
18 changes: 18 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ NOW REQUIRES TabletopTweaks Core Module and ModMenu

## Changelog

### 1.4.3
Added Tiefling Alternate Racial Abilities

Scaled Skin - trade energy resist for natural armor

Maw And Claw - trade SLA for bite or claw attack

Armor Of The Pit - tiefling racial feat. +2 natural armor without Scaled Skin, +1 and regain missing energy resists with

Fix for setting Ember's default patron to Light breaking the mod.

Fix for Winter Witch not progressing non-winter patrons acquired via second patron.

Fixed Burst Of Radiance not doing damage.

Fixed Bloodrager Elemental Strikes doing an extra hit


### 1.4.2
Emergency hotfix to catch Burn Resistance being backwards

Expand Down
108 changes: 108 additions & 0 deletions TomeOfTheFirebird/Bugfixes/FixExtraHitsOnProcs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Buffs;
using BlueprintCore.Conditions.Builder;
using BlueprintCore.Conditions.Builder.ContextEx;
using BlueprintCore.Utils.Types;
using Kingmaker.Enums;
using Kingmaker.Enums.Damage;
using Kingmaker.RuleSystem.Rules.Damage;
Expand All @@ -13,6 +14,7 @@
using System.Linq;
using TabletopTweaks.Core.Utilities;
using TomeOfTheFirebird.Components;
using TomeOfTheFirebird.New_Components;

namespace TomeOfTheFirebird.Bugfixes
{
Expand Down Expand Up @@ -46,6 +48,112 @@ public static void FixFirebrand()
}
}

public static void FixElementalStrikes()
{
if (Settings.IsDisabled("FixExtraHitsElementalStrikes"))
return;

BuffConfigurator.For("eb71b69ec2b317140b950fbc879efdc3").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Fire };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Fire strikes before 20

FeatureConfigurator.For("837067e4608bc5948994d79a3f3b9e17").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Fire };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Fire strikes at 20



BuffConfigurator.For("11fd8bc21f8de6a408859f8f2e845094").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Cold };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Cold strikes before 20

FeatureConfigurator.For("c1710599b2f72e644918a3f7b0e2b44a").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Cold };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Cold strikes at 20

BuffConfigurator.For("8792f9cb9a9b03d4ebb057137bf853d9").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Electricity };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Elect strikes before 20

FeatureConfigurator.For("99e577bf8876f294eaaa47dec8dae994").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Electricity };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Elect strikes at 20

BuffConfigurator.For("ad90034a6f8a6f144bf8f329917e1d38").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Acid };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Elect strikes before 20

FeatureConfigurator.For("d37a8f6f5df057a4ea50b2c065288263").RemoveComponents(x => x is AddInitiatorAttackWithWeaponTrigger).AddComponent<ContextDamageValueEnergyDamageDice>(x =>
{
x.damageType = new DamageTypeDescription() { Type = DamageType.Energy, Energy = DamageEnergyType.Acid };
x.Value = new ContextDiceValue()
{
DiceCountValue = ContextValues.Rank(),
DiceType = Kingmaker.RuleSystem.DiceType.D6,
BonusValue = ContextValues.Constant(0)
};
}).Configure();//Elect strikes at 20


}

public static void FixRandomWeaponsRiders()
{
if (Settings.IsEnabled("FixExtraHitsSmallDragon"))
Expand Down
9 changes: 8 additions & 1 deletion TomeOfTheFirebird/BuildContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ static void Postfix()

PheonixBloodline.MakePheonixBloodline();



EldritchScionSage.Make();

Modified_Content.Archetypes.Witch.ReturnAccursedPatrons();
Modified_Content.Classes.Witch.FixIcons();
Modified_Content.Classes.Witch.AllPatronFixes();

ShimmeringMirage.Make();
ClockworkHeart.Make();
Expand All @@ -136,7 +138,11 @@ static void Postfix()
LastwallPhalanx.Make();
SwarmStrike.Make();
ArcaneStrike.AddDHSScaling();



TomeOfTheFirebird.New_Content.RacialOptions.Tiefling.Make();
ArmorOfThePit.Make();
}
catch (Exception e)
{
Expand Down Expand Up @@ -175,6 +181,7 @@ static void Postfix()
FixExtraHitsOnProcs.FixFirebrand();
FixExtraHitsOnProcs.FixRandomWeaponsRiders();
FixExtraHitsOnProcs.FixClawsOfSacredBeast();
FixExtraHitsOnProcs.FixElementalStrikes();


CavalierFixes.FixOrderAbilityDisplays();
Expand Down
20 changes: 19 additions & 1 deletion TomeOfTheFirebird/Config/Blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,25 @@
"WitchProtectionPatronSpellLevel6": "4a732e96-ac5f-4c0f-a299-eb9238952ed6",
"WitchProtectionPatronSpellLevel7": "c7383468-3c60-4994-ba59-55e348b00d8c",
"WitchProtectionPatronSpellLevel8": "eb1b5787-ddfd-4c4a-8539-58e08218d112",
"WitchProtectionPatronSpellLevel9": "b9685c67-6d2a-428c-b99d-9a09106ba249"
"WitchProtectionPatronSpellLevel9": "b9685c67-6d2a-428c-b99d-9a09106ba249",
"ClawTieflingRacialFeature": "a5bec04c-6816-4c18-a264-9d8be52c0b8d",
"MawTieflingRacialFeature": "914fe87b-7eba-4892-b82b-6c0a5c720385",
"ScaledSkinResistColdFeature": "088bd1c4-3905-427d-aaa5-45d9eab1869b",
"ScaledSkinResistElectricityFeature": "7cb252b9-458d-4423-8e83-f7387e6bd5e9",
"ScaledSkinResistFireFeature": "99b18971-bfdf-49f2-8f50-fb0231596d91",
"ScaledSkinTieflingRacialFeature": "8e014c31-bfb7-4999-8770-ff9737943374",
"TieflingAlternateTraitSelector": "1260d938-b78e-4c39-b46b-ddc841660161",
"TieflingNoAlternateTrait": "316a236f-bb9f-4121-9988-de6db8812878",
"TieflingNoSLAFeature": "562d3cf6-ce3d-413c-bf5d-f0727f08ff27",
"TieflingNAStackerFeature": "9c049536-197f-461a-8a07-6b027018b925",
"ArmorOfThePitMasterFeature": "f2389d68-e5ce-4444-9187-7c30c3322a0e",
"ArmorOfThePitSSOffFeature": "7b0f336e-90a4-4b85-a77c-81979e91ecee",
"ArmorOfThePitSSOnFeature": "d33f714d-2cfd-426a-9279-8ad687ff393a",
"AotPSSonResistColdFeature": "81e00159-b855-4534-afb7-6f6d8e2ad6ae",
"AotPSSonResistElectricityFeature": "33bcbccc-2d30-4c58-acee-0a7e816a9e87",
"AotPSSonResistFireFeature": "182ad10e-e03a-4871-8a42-181b532cc455"


},
"DerivedBlueprintMasters": {
"DiminishedSpellcastingMaster": "ba5d3cd1-29c3-4836-ae1d-88467323c6cd",
Expand Down
2 changes: 1 addition & 1 deletion TomeOfTheFirebird/Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Id": "TomeOfTheFirebird",
"DisplayName": "Tome Of The Firebird",
"Author": "pheonix99",
"Version": "1.4.2",
"Version": "1.4.3",
"ManagerVersion": "0.21.3",
"AssemblyName": "TomeOfTheFirebird.dll",
"EntryMethod": "TomeOfTheFirebird.Main.Load",
Expand Down
5 changes: 5 additions & 0 deletions TomeOfTheFirebird/Localization/Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"ProcessTemplates": false,
"enGB": "Tweaks"
},
{
"Key": "TotF.Settings.RacialAbilities.Title",
"ProcessTemplates": false,
"enGB": "Racial Abilities"
},
{
"Key": "TotF.Settings.MythicAbilities.Title",
"ProcessTemplates": false,
Expand Down
58 changes: 41 additions & 17 deletions TomeOfTheFirebird/Modified Content/Classes/Witch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,57 @@ class Witch
//TODO patch firestorm into Elements 8
//TODO patch meteor swarm into Elements 9?

public static void FixIcons()
public static void AllPatronFixes()
{
if (Settings.IsDisabled("FixWitchSpellIcons"))
return;
bool fixIcons = Settings.IsEnabled("FixWitchSpellIcons");

bool fixWWProg = Settings.IsEnabled("WinterWitchPatronProgression");
var wwPRC = BlueprintTool.GetRef<BlueprintCharacterClassReference>("eb24ca44debf6714aabe1af1fd905a07");
var patronselector = BlueprintTool.Get<BlueprintFeatureSelection>("381cf4c890815d049a4420c6f31d063f");

var bloodlineselector = BlueprintTool.Get<BlueprintFeatureSelection>("381cf4c890815d049a4420c6f31d063f");

foreach (var v in bloodlineselector.m_AllFeatures)
foreach (var v in patronselector.m_AllFeatures)
{
var v2 = BlueprintTools.GetBlueprint<BlueprintProgression>(v.Guid);

if (v2 != null)
{
ProgressionConfigurator.For(v2).ModifyLevelEntries(x =>
var patron = ProgressionConfigurator.For(v2);
if (fixIcons)
{
foreach (var q in x.m_Features)
{
var feature = q.Get();
patron.ModifyLevelEntries(x =>
{
foreach (var q in x.m_Features)
{
var feature = q.Get();
AddKnownSpell referant = feature.GetComponent<AddKnownSpell>();
if (referant != null)
{
FeatureConfigurator.For(feature).SetIcon(referant.m_Spell.Get().Icon).Configure();
AddKnownSpell referant = feature.GetComponent<AddKnownSpell>();
if (referant != null)
{
FeatureConfigurator.For(feature).SetIcon(referant.m_Spell.Get().Icon).Configure();
}
Main.TotFContext.Logger.LogPatch($"Patched Icon on", feature);
}
});
}
if (fixWWProg)
{
bool hasWW = false;

}
Main.TotFContext.Logger.LogPatch($"Patched Icon on", feature);
if (v2.m_Classes.Any(x => x.Class.ToReference<BlueprintCharacterClassReference>().Equals(wwPRC)))
{
Main.TotFContext.Logger.LogPatch("Skipped Adding Winter Witch Progression to patron", v2);
hasWW = true;
}


if (!hasWW)
{
Main.TotFContext.Logger.LogPatch("Added Winter Witch Progression to patron", v2);
patron.AddToClasses(wwPRC);
}
}).Configure();
}
patron.Configure();
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
namespace TomeOfTheFirebird.New_Components
using Kingmaker.PubSubSystem;
using Kingmaker.RuleSystem.Rules;
using Kingmaker.RuleSystem.Rules.Damage;
using Kingmaker.UnitLogic;
using Kingmaker.UnitLogic.Mechanics;

namespace TomeOfTheFirebird.New_Components
{
class ContextDamageValueEnergyDamageDice
class ContextDamageValueEnergyDamageDice : UnitFactComponentDelegate, IInitiatorRulebookHandler<RuleCalculateWeaponStats>, IRulebookHandler<RuleCalculateWeaponStats>, ISubscriber, IInitiatorRulebookSubscriber
{
public ContextDiceValue Value;

public DamageTypeDescription damageType;

public void OnEventAboutToTrigger(RuleCalculateWeaponStats evt)
{
evt.DamageDescription.Add(new DamageDescription()
{
Dice = new Kingmaker.RuleSystem.DiceFormula(Value.DiceCountValue.Calculate(this.Fact.MaybeContext), Value.DiceType),
TypeDescription = damageType,
Bonus = Value.BonusValue.Calculate(this.Fact.MaybeContext),

});

}

public void OnEventDidTrigger(RuleCalculateWeaponStats evt)
{

}
}
}
Loading

0 comments on commit 1b699cc

Please sign in to comment.