Skip to content

Commit

Permalink
Fix for 2.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Vek17 committed Dec 5, 2022
1 parent 4125afb commit 3dfb8b2
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 32 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Version 2.4.5
* Fix for 2.0.5o

## Version 2.4.4
* Fixes
* Spells
* Cone of Cold
* Added to the Witch spell list.

## Version 2.4.3
* Fixes
* Removed Overtip Fixes as they are now in vanilla.
Expand Down
2 changes: 1 addition & 1 deletion Repository.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Releases": [
{
"Id": "TabletopTweaks-Base",
"Version": "2.4.3"
"Version": "2.4.5"
}
]
}
12 changes: 8 additions & 4 deletions TabletopTweaks-Base/Bugfixes/Abilities/Spells.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ static void Postfix() {
PatchChainLightning();
PatchCommand();
PatchCommandGreater();
PatchConeOfCold();
PatchCrusadersEdge();
PatchDeathWard();
PatchDispelMagicGreater();
Expand Down Expand Up @@ -842,7 +843,6 @@ static void PatchSuddenSquall() {
static void PatchUnbreakableBond() {
if (Main.TTTContext.Fixes.Spells.IsDisabled("UnbreakableBond")) { return; }

string path = @"C:\Users\spetrie\Documents\Exported";
var UnbreakableBond = BlueprintTools.GetBlueprint<BlueprintAbility>("947a929f3347d3e458a524424fbceccb");
var UnbreakableBondArea = BlueprintTools.GetBlueprint<BlueprintAbilityAreaEffect>("9063d387e8d90a24f8bdd8c0c95f72f4");
var UnbreakableBondImmunityBuff = BlueprintTools.GetBlueprint<BlueprintBuff>("e60806180806b4c488f0d45af1035917");
Expand Down Expand Up @@ -875,7 +875,6 @@ static void PatchUnbreakableBond() {
c.Actions.AddAction(embedded);
}
});
BlueprintTools.TryExportBlueprint(bp, path);
});
UnbreakableBondArea.TemporaryContext(bp => {
bp.GetComponent<AbilityAreaEffectRunAction>().TemporaryContext(c => {
Expand All @@ -887,7 +886,6 @@ static void PatchUnbreakableBond() {
c.IfTrue.RemoveActions<ContextActionApplyBuff>(a => a.Buff == UnbreakableBondImmunityBuff);
c.IfFalse.RemoveActions<ContextActionApplyBuff>(a => a.Buff == UnbreakableBondImmunityBuff);
});
BlueprintTools.TryExportBlueprint(bp, path);
});
UnbreakableBondImmunityBuff.TemporaryContext(bp => {
bp.AddComponent<SpellImmunityToSpellDescriptor>(c => {
Expand All @@ -901,7 +899,6 @@ static void PatchUnbreakableBond() {
c.m_CasterIgnoreImmunityFact = new BlueprintUnitFactReference();

});
BlueprintTools.TryExportBlueprint(UnbreakableBondImmunityBuff, path);
});
TTTContext.Logger.LogPatch(UnbreakableBondImmunityBuff);
}
Expand Down Expand Up @@ -1249,6 +1246,13 @@ static void PatchCommandGreater() {
TTTContext.Logger.LogPatch(ability);
});
}
static void PatchConeOfCold() {
if (Main.TTTContext.Fixes.Spells.IsDisabled("ConeOfCold")) { return; }

var ConeOfCold = BlueprintTools.GetBlueprint<BlueprintAbility>("e7c530f8137630f4d9d7ee1aa7b1edc0");
ConeOfCold.AddToSpellList(SpellTools.SpellList.WitchSpellList, 6);
TTTContext.Logger.LogPatch(ConeOfCold);
}
static void PatchCrusadersEdge() {
if (Main.TTTContext.Fixes.Spells.IsDisabled("CrusadersEdge")) { return; }

Expand Down
6 changes: 3 additions & 3 deletions TabletopTweaks-Base/Bugfixes/Features/Feats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,9 @@ public void OnEventDidTrigger(RulePrepareDamage evt) {

private readonly UnitEntityData m_Unit;
private readonly EntityFact m_Fact;
private int m_DamageMod;
private bool m_Mythic;
private bool m_Rowdy;
private readonly int m_DamageMod;
private readonly bool m_Mythic;
private readonly bool m_Rowdy;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion TabletopTweaks-Base/Bugfixes/General/FeatSelections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void FixFeatSelections() {

TTTContext.Logger.LogHeader("Patching Feat Selections");
var allFeats = FeatTools.Selections.BasicFeatSelection.m_AllFeatures;
foreach (var feat in allFeats) {
foreach (var feat in allFeats.Where(f => f.Get() is not null)) {
FeatTools.Selections.FeatSelections
.Where(selection => feat.Get().HasGroup(selection.Group) || feat.Get().HasGroup(selection.Group2))
.ForEach(selection => selection.AddFeatures(feat));
Expand Down
7 changes: 6 additions & 1 deletion TabletopTweaks-Base/Config/Fixes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,11 @@
"Homebrew": false,
"Description": "Adds missing spell descriptors to match tabletop."
},
"ConeOfCold": {
"Enabled": true,
"Homebrew": false,
"Description": "Adds Cone of Cold to the Witch spell list."
},
"CorruptMagic": {
"Enabled": true,
"Homebrew": false,
Expand Down Expand Up @@ -1363,7 +1368,7 @@
"DisableAll": false,
"Settings": {
"AnimalCompanionProgression": {
"Enabled": true,
"Enabled": false,
"Homebrew": false,
"Description": "Updates animal companion progressions to reflect tabletop values."
}
Expand Down
2 changes: 1 addition & 1 deletion TabletopTweaks-Base/Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"Repository": "https://raw.githubusercontent.com/Vek17/TabletopTweaks-Base/master/Repository.json",
"Requirements": [ "TabletopTweaks-Core-0.5.3" ],
"LoadAfter": [ "TabletopTweaks-Core" ],
"Version": "2.4.3"
"Version": "2.4.5"
}
32 changes: 16 additions & 16 deletions TabletopTweaks-Base/NewContent/Archetypes/MetamagicRager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static void AddMetamagicRager() {
private static BlueprintBuff CreateMetamagicBuff(string name, BlueprintFeature metamagicFeat, int level, Action<BlueprintBuff> init = null) {
var result = Helpers.CreateBlueprint<BlueprintBuff>(TTTContext, name, bp => {
bp.m_Icon = metamagicFeat.Icon;
bp.AddComponent(Helpers.Create<AddAbilityUseTrigger>(c => {
bp.AddComponent<AddAbilityUseTrigger>(c => {
c.m_Spellbooks = new BlueprintSpellbookReference[] { BloodragerSpellbook.ToReference<BlueprintSpellbookReference>() };
c.m_Ability = new BlueprintAbilityReference();
c.Action = new ActionList() {
Expand All @@ -102,14 +102,14 @@ private static BlueprintBuff CreateMetamagicBuff(string name, BlueprintFeature m
};
c.AfterCast = true;
c.FromSpellbook = true;
}));
bp.AddComponent(Helpers.Create<AutoMetamagic>(c => {
});
bp.AddComponent<AutoMetamagic>(c => {
c.m_Spellbook = BloodragerSpellbook.ToReference<BlueprintSpellbookReference>();
c.Metamagic = metamagicFeat.GetComponent<AddMetamagicFeat>().Metamagic;
c.School = SpellSchool.None;
c.MaxSpellLevel = level;
c.CheckSpellbook = true;
}));
});
});
init?.Invoke(result);
return result;
Expand All @@ -124,7 +124,7 @@ private static BlueprintAbility CreateMetamagicAbility(string name, BlueprintBuf
bp.LocalizedDuration = new LocalizedString();
bp.LocalizedSavingThrow = new LocalizedString();
bp.m_Icon = metamagicFeat.Icon;
bp.AddComponent(Helpers.Create<AbilityEffectRunAction>(c => {
bp.AddComponent<AbilityEffectRunAction>(c => {
c.Actions = new ActionList() {
Actions = new GameAction[] {
Helpers.Create<ContextActionApplyBuff>(a => {
Expand All @@ -141,18 +141,18 @@ private static BlueprintAbility CreateMetamagicAbility(string name, BlueprintBuf
}
};

}));
bp.AddComponent(Helpers.Create<AbilityResourceLogic>(c => {
});
bp.AddComponent<AbilityResourceLogic>(c => {
c.m_RequiredResource = BloodragerRageResource.ToReference<BlueprintAbilityResourceReference>();
c.m_IsSpendResource = true;
c.Amount = buff.GetComponent<AutoMetamagic>().MaxSpellLevel * 2 + cost;
}));
bp.AddComponent(Helpers.Create<AbilityShowIfCasterHasFact>(c => {
});
bp.AddComponent<AbilityShowIfCasterHasFact>(c => {
c.m_UnitFact = metamagicFeat.ToReference<BlueprintUnitFactReference>();
}));
bp.AddComponent(Helpers.Create<AbilityCasterHasNoFacts>(c => {
});
bp.AddComponent<AbilityCasterHasNoFacts>(c => {
c.m_Facts = blockedBuffs;
}));
});
});
init?.Invoke(result);
return result;
Expand Down Expand Up @@ -265,7 +265,7 @@ private static BlueprintAbility CreateMetaRageLevel(int level) {
bp.LocalizedDuration = new LocalizedString();
bp.LocalizedSavingThrow = new LocalizedString();
bp.m_Icon = AssetLoader.LoadInternal(TTTContext, folder: "Abilities", file: $"Icon_MetaRage{level}.png");
bp.AddComponent(Helpers.Create<AbilityVariants>(c => {
bp.AddComponent<AbilityVariants>(c => {
c.m_Variants = new BlueprintAbilityReference[] {
MetaRageEmpowerAbility.ToReference<BlueprintAbilityReference>(),
MetaRageExtendAbility.ToReference<BlueprintAbilityReference>(),
Expand All @@ -276,11 +276,11 @@ private static BlueprintAbility CreateMetaRageLevel(int level) {
MetaRageSelectiveAbility.ToReference<BlueprintAbilityReference>(),
MetaRageBolsteredAbility.ToReference<BlueprintAbilityReference>()
};
}));
bp.AddComponent(Helpers.Create<AbilityShowIfCasterCanCastSpells>(c => {
});
bp.AddComponent<AbilityShowIfCasterCanCastSpells>(c => {
c.Class = BloodragerClass.ToReference<BlueprintCharacterClassReference>();
c.Level = level;
}));
});
});

return MetaRageBaseAbility;
Expand Down
8 changes: 4 additions & 4 deletions TabletopTweaks-Base/NewContent/Classes/Cavalier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ public static void AddCavalierFeatures() {
bp.SetDescription(TTTContext, "A cavalier does not take an armor check penalty on Mobility checks while riding his mount.");
bp.IsClassFeature = true;
bp.m_Flags = BlueprintBuff.Flags.HiddenInUi;
bp.AddComponent(Helpers.Create<NegateArmorCheckSkillPenalty>(c => {
bp.AddComponent<NegateArmorCheckSkillPenalty>(c => {
c.Descriptor = ModifierDescriptor.UntypedStackable;
c.Stat = StatType.SkillMobility;
}));
});
});

var CavalierMobilityFeature = Helpers.CreateBlueprint<BlueprintFeature>(TTTContext, "CavalierMobilityFeature", bp => {
bp.SetName(TTTContext, "Cavalier Mobility");
bp.SetDescription(TTTContext, "A cavalier does not take an armor check penalty on Mobility checks while riding his mount.");
bp.IsClassFeature = true;
bp.Ranks = 1;
bp.AddComponent(Helpers.Create<BuffExtraEffects>(c => {
bp.AddComponent<BuffExtraEffects>(c => {
c.m_CheckedBuff = MountedBuff.ToReference<BlueprintBuffReference>();
c.m_ExtraEffectBuff = CavalierMobilityBuff.ToReference<BlueprintBuffReference>();
}));
});
});

var CavalierMountFeatureWolf = Helpers.CreateBlueprint<BlueprintFeature>(TTTContext, "CavalierMountFeatureWolf", bp => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ private class ElementalSpellMechanics : IAfterRulebookEventTriggerHandler<RulePr
BlueprintFeature ElementalSpellFeatCold;
BlueprintFeature ElementalSpellFeatElectricity;
BlueprintFeature ElementalSpellFeatFire;
private readonly Metamagic elementalMetamagicMask = (Metamagic)(CustomMetamagic.ElementalAcid | CustomMetamagic.ElementalCold | CustomMetamagic.ElementalElectricity | CustomMetamagic.ElementalFire);
private static readonly Metamagic elementalMetamagicMask = (Metamagic)(CustomMetamagic.ElementalAcid | CustomMetamagic.ElementalCold | CustomMetamagic.ElementalElectricity | CustomMetamagic.ElementalFire);

internal ElementalSpellMechanics(BlueprintFeature acid, BlueprintFeature cold, BlueprintFeature electricity, BlueprintFeature fire) {
this.ElementalSpellFeatAcid = acid;
Expand Down

0 comments on commit 3dfb8b2

Please sign in to comment.