Skip to content

Commit

Permalink
Fix for Phoenix bloodline issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pheonix99 committed Apr 10, 2023
1 parent 8d277ee commit 2b1af52
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 36 deletions.
4 changes: 4 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ NOW REQUIRES TabletopTweaks Core Module and ModMenu

## Changelog

### 1.4.11
Hotfix for localization issue with Phoenix Bloodrager Bloodline


### 1.4.10

Official 2.1.2 release - Don't thing this will work with 2.1.0 or 2.1.1
Expand Down
3 changes: 2 additions & 1 deletion TomeOfTheFirebird/Config/Blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@
"ElementalStrikesFireBurstBuff": "e66ad7ba-fe84-43db-b9bc-f2f762c13bea",
"FlyBuff": "b6d76a5d-c8ec-4046-8a2c-7f09e2e7d146",
"FlySpell": "bbbd603f-9da4-4838-b8a8-5124aaa6ba40",
"FlySpellTouch": "e68a66c1-0ee6-4a7c-82d1-a6562c58263c"
"FlySpellTouch": "e68a66c1-0ee6-4a7c-82d1-a6562c58263c",
"BloodragerPhoenixSecondBloodline": "6d9fe5a3-d0eb-4e6e-ba6c-827e1d0f74bf"


},
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.10",
"Version": "1.4.11",
"ManagerVersion": "0.21.3",
"AssemblyName": "TomeOfTheFirebird.dll",
"EntryMethod": "TomeOfTheFirebird.Main.Load",
Expand Down
15 changes: 10 additions & 5 deletions TomeOfTheFirebird/Localization/Bloodlines.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"enGB": "At 12th level, you spout molten wings during bloodrage"
},
{
"Key": "BloodragerPheonixMoltenWings.Name",
"Key": "BloodragerPheonixMoltenWings.Name",
"ProcessTemplates": false,
"enGB": "Molten Wings"
},
Expand Down Expand Up @@ -111,12 +111,12 @@
"enGB": "Phoenix Fire"
},
{
"Key": "BloodragerPhoenixFireBuff.Description",
"Key": "BloodragerPhoenixFireBuff.Description",
"ProcessTemplates": true,
"enGB": "The power of the phoenix brings righteous destruction to any who oppose it. At 20th level, while bloodraging, you gain the following effects: your melee attacks deal an additional 2d6 points of fire damage, any enemies within 20 feet of you must succeed at a Reflex save (DC = 10 + 1/2 your bloodrager level + your Constitution modifier) or take 4d6 points of fire damage at the start of their turn, and any creature that attacks you with a natural or non-reach weapon takes 1d6 points of fire damage (no save) with each successful hit."
},
{
"Key":"BloodragerPhoenixHeartOfFire.Description",
"Key": "BloodragerPhoenixHeartOfFire.Description",
"ProcessTemplates": true,
"enGB": "At 4th level, you gain fire resistance 5. Whenever you are subjected to a magical healing effect from a cure spell, you regain 1 additional hit point per die rolled. At 8th level, your fire resistance increases to 10, and you regain 2 additional hit points per die rolled when you are healed by a cure spell."
},
Expand All @@ -131,10 +131,15 @@
"enGB": "At 4th level, you gain fire resistance 5. Whenever you are subjected to a magical healing effect from a cure spell, you regain 1 additional hit point per die rolled. At 8th level, your fire resistance increases to 10, and you regain 2 additional hit points per die rolled when you are healed by a cure spell."
},
{
"Key": "BloodragerPhoenixHeartOfFireBuff.Name",
"Key": "BloodragerPhoenixHeartOfFireBuff.Name",
"ProcessTemplates": false,
"enGB": "HeartOfFire"
},
{
"Key": "BloodragerPhoenixSelfResurrection.Name",
"ProcessTemplates": true,
"enGB": "Self-Resurrection"
},
{
"Key": "BloodragerPhoenixSelfResurrection.Description",
"ProcessTemplates": true,
Expand Down Expand Up @@ -166,7 +171,7 @@
"enGB": "At 7th, 10th, 13th, and 16th levels, a bloodrager learns an additional spell derived from his bloodline."
},
{
"Key": "BloodragerPhoenixSpell13.Name",
"Key": "BloodragerPhoenixSpell13.Name",
"ProcessTemplates": false,
"enGB": "Bonus Spell — Cure Serious Wounds"
},
Expand Down
10 changes: 10 additions & 0 deletions TomeOfTheFirebird/Localization/Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@
"ProcessTemplates": false,
"enGB": "REQUIRES RESTART\n\nTurning this off prevents the feature from working: characters cannot select this feature and characters with it cannot use it. You can still load save games that reference it.",
"ruRU": "ТРЕБУЕТ РЕСТАРТ\n\nЕсли вы отключите эту настройку, черта перестанет работать: персонажи, у которых она уже есть, не смогут ею пользоваться. Но это не помешает загружать сохранения, в которых присутствует эта черта."
},
{
"Key": "TotF.Settings.TwinSpell.Name",
"ProcessTemplates": false,
"enGB": "Metamagic: Twin Spell"
},
{
"Key": "TotF.Settings.TwinSpell.Desc",
"ProcessTemplates": false,
"enGB": "Adds Twin Spell Metamagic, which increases the spell level by four to cast it twice."
}

]
12 changes: 3 additions & 9 deletions TomeOfTheFirebird/New Content/Bloodlines/PheonixBloodline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -762,21 +762,15 @@ private static void MakePhoenixBloodragerBloodline()
TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(18, BloodragerPhoenixFeatSelection),
TabletopTweaks.Core.Utilities.Helpers.CreateLevelEntry(20, BloodragerPhoenixDispellingStrikesLevel20, PheonixFireFeature)
};
bp.AddPrerequisite<PrerequisiteNoFeature>(c =>
{
bp.AddPrerequisite<PrerequisiteNoFeature>(c => {
c.Group = Prerequisite.GroupType.Any;
c.m_Feature = TotFBloodlineTools.BloodlineRequisiteFeature;
});
bp.AddPrerequisite<PrerequisiteFeature>(c =>
{
c.Group = Prerequisite.GroupType.Any;
c.m_Feature = PhoenixBloodlineRequisiteFeature;
c.m_Feature = BloodragerPhoenixBloodline.ToReference<BlueprintFeatureReference>();
});
bp.UIGroups = new UIGroup[] {
TabletopTweaks.Core.Utilities.Helpers.CreateUIGroup(BloodragerPhoenixFeatSelection, BloodragerPhoenixFeatSelectionGreenrager)
};
});
ProgressionConfigurator.For(BloodragerPhoenixBloodline).SetDisplayName("BloodragerPhoenixBloodline.Name").SetDescription("BloodragerPhoenixBloodline.Description").Configure();
ProgressionConfigurator.For(BloodragerPhoenixBloodlineSecond).SetDisplayName("BloodragerPhoenixBloodline.Name").SetDescription("BloodragerPhoenixBloodline.Description").Configure();
var BloodragerPhoenixBloodlineWandering = BloodlineTools.CreateMixedBloodFeature(Main.TotFContext, "BloodragerPheonixBloodlineWandering", BloodragerPhoenixBloodline, bp =>
{
bp.m_Icon = AssetLoader.LoadInternal(Main.TotFContext, folder: "Abilities", file: "Phoenix_Bloodline.png");
Expand Down
107 changes: 107 additions & 0 deletions TomeOfTheFirebird/New Content/Feats/TwinSpell.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
using BlueprintCore.Blueprints.CustomConfigurators.Classes;
using BlueprintCore.Utils;
using Kingmaker.Blueprints;
using Kingmaker.Blueprints.Classes;
using Kingmaker.EntitySystem.Entities;
using Kingmaker.PubSubSystem;
using Kingmaker.RuleSystem;
using Kingmaker.RuleSystem.Rules.Abilities;
using Kingmaker.UnitLogic.Abilities;
using Kingmaker.UnitLogic.Abilities.Blueprints;
using Kingmaker.UnitLogic.Abilities.Components;
using Kingmaker.UnitLogic.FactLogic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using TabletopTweaks.Core.Utilities;
using TomeOfTheFirebird.Helpers;
using static TabletopTweaks.Core.MechanicsChanges.MetamagicExtention;

namespace TomeOfTheFirebird.New_Content.Feats
{
/*
static class TwinSpell
{
public static void AddTwinSpell()
{
var TwinSpellConfig = MakerTools.MakeFeature("TwinSpellFeat", LocalizationTool.GetString("TwinSpell.Name"), LocalizationTool.GetString("TwinSpell.Desc"));
if (Settings.IsEnabled("TwinSpell"))
{
TwinSpellConfig.AddToGroups(FeatureGroup.Feat, FeatureGroup.WizardFeat);
TwinSpellConfig.AddComponent<AddMetamagicFeat>(x => x.Metamagic = (Metamagic)TabletopTweaks.Core.MechanicsChanges.MetamagicExtention.CustomMetamagic.Twin);
TwinSpellConfig.AddFeatureTagsComponent(Kingmaker.Blueprints.Classes.Selection.FeatureTag.Magic | Kingmaker.Blueprints.Classes.Selection.FeatureTag.Metamagic);
TwinSpellConfig.AddPrerequisiteStatValue(Kingmaker.EntitySystem.Stats.StatType.Intelligence, 3);
TwinSpellConfig.AddRecommendationRequiresSpellbook();
}
var TwinSpell = TwinSpellConfig.Configure();
if (Settings.IsEnabled("TwinSpell"))
{
TabletopTweaks.Core.MechanicsChanges.MetamagicExtention.RegisterMetamagic(
context: Main.TotFContext,
metamagic: (Metamagic)TabletopTweaks.Core.MechanicsChanges.MetamagicExtention.CustomMetamagic.Twin,
name: "Twin",
icon: null,
defaultCost: 4,
favoriteMetamagic: null,
metamagicMechanics: TwinSpellMechanics.Instance,
metamagicFeat: TwinSpell);
}
}
public static void UpdateSpells()
{
if (Settings.IsDisabled("TwinSpell"))
{
return;
}
var spells = SpellTools.GetAllSpells();
foreach (var spell in spells)
{
bool validTwin = !spell.GetComponent<AbilityEffectStickyTouch>();
if (validTwin)
{
if (!spell.AvailableMetamagic.HasMetamagic((Metamagic)CustomMetamagic.Twin))
{
spell.AvailableMetamagic |= (Metamagic)CustomMetamagic.Twin;
Main.TotFContext.Logger.LogPatch("Enabled Twin Metamagic", spell);
}
};
}
}
private class TwinSpellMechanics : IRulebookHandler<RuleCastSpell>, ISubscriber
{
public static TwinSpellMechanics Instance = new();
public void OnEventAboutToTrigger(RuleCastSpell evt)
{
}
public void OnEventDidTrigger(RuleCastSpell evt)
{
var isSolidShadows = evt.Context?.HasMetamagic((Metamagic)CustomMetamagic.Twin) ?? false;
if (!isSolidShadows)
return;
if (evt.IsDuplicateSpellApplied || !evt.Success || evt.Spell.Blueprint.Type != AbilityType.Spell || (evt.Spell.Range == AbilityRange.Touch && evt.Spell.Blueprint.GetComponent<AbilityEffectStickyTouch>() != null))
{
return;
}
Rulebook.Trigger<RuleCastSpell>(new RuleCastSpell(evt.Spell, evt.SpellTarget)
{
IsDuplicateSpellApplied = true
});
}
}
}
*/
}
Loading

0 comments on commit 2b1af52

Please sign in to comment.