Skip to content

Commit

Permalink
Cleaned up for relase
Browse files Browse the repository at this point in the history
  • Loading branch information
Vek17 committed Oct 30, 2021
1 parent 0ec30d0 commit 772bd2a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 38 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 1.9.5
## Version 1.9.6
* Rebuilt Metamagic rager to be less janky
* Fixed Arcane Bloodrager polymorph effects breaking turn based mode

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",
"Version": "1.9.5"
"Version": "1.9.6"
}
]
}
2 changes: 1 addition & 1 deletion TabletopTweaks/Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"ManagerVersion": "0.23.0",
"Repository": "https://raw.githubusercontent.com/Vek17/WrathMods-TabletopTweaks/master/Repository.json",
"Requirements": [],
"Version": "1.9.5"
"Version": "1.9.6"
}
35 changes: 0 additions & 35 deletions TabletopTweaks/NewContent/Archetypes/MetamagicRager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,40 +428,5 @@ string GenerateName(BlueprintFeature bloodline) {
return $"{split[0]}{split[1]}MetamagicRagerFeatSelection";
}
}

//[HarmonyPatch(typeof(MechanicActionBarSlotActivableAbility), "GetResource")]
static class MechanicActionBarSlotActivableAbility_Limitless_Patch {
static void Postfix(ref int __result, MechanicActionBarSlotActivableAbility __instance) {
if (ModSettings.AddedContent.Archetypes.IsDisabled("MetamagicRager")) { return; }
var resourceLogic = __instance.ActivatableAbility.Blueprint.GetComponent<ActivatableAbilityResourceLogic>();
if (resourceLogic != null && __result == 0) {
if (__instance.ActivatableAbility.Owner.HasFact(resourceLogic.FreeBlueprint)) {
__result = 1;
}
}
}
}
//[HarmonyPatch(typeof(AutoMetamagic), "ShouldApplyTo")]
static class AutoMetamagic_MetamagicRager_Patch {
static bool Prefix(ref bool __result, AutoMetamagic c, BlueprintAbility ability, AbilityData data) {
if (ModSettings.AddedContent.Archetypes.IsDisabled("MetamagicRager")) { return true; }
BlueprintAbility parentAbility = data?.ConvertedFrom?.Blueprint ?? ability?.Parent ?? ability;

var test = (parentAbility != ability && AutoMetamagic.ShouldApplyTo(c, parentAbility, data?.ConvertedFrom))
|| (c?.Abilities?.HasItem((BlueprintAbilityReference r) => r.Is(ability)) ?? false)
|| c.IsSuitableAbility(ability, data)
&& (c?.Abilities?.Empty() ?? true)
&& (c.Descriptor == SpellDescriptor.None | ability.SpellDescriptor.HasAnyFlag(c.Descriptor))
&& (c.School == SpellSchool.None
|| ability.School == c.School)
&& c.MaxSpellLevel > 0
&& data != null
&& data.SpellLevel <= c.MaxSpellLevel
&& (!c.CheckSpellbook || ability.IsInSpellList(c.Spellbook.SpellList));

__result = test;
return false;
}
}
}
}

0 comments on commit 772bd2a

Please sign in to comment.