Decompiled source of D20ExtensionsFor5E v1.1.0
D20ExtensionReliableTalent.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("D20ExtensionReliableTalent")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Nth Dimension")] [assembly: AssemblyProduct("D20ExtensionReliableTalent")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("D20ExtensionReliableTalent")] [assembly: ComVisible(false)] [assembly: Guid("c303405d-e66c-4316-9cdb-4e3ca15c6360")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.1.0.0")] namespace LordAshes; [BepInPlugin("org.lordashes.plugins.d20reliabletalent", "D20 Extension Reliable Talent", "1.1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class D20ReliableTalent : BaseUnityPlugin { public const string Name = "D20 Extension Reliable Talent"; public const string Guid = "org.lordashes.plugins.d20reliabletalent"; public const string Version = "1.1.0.0"; public const string Author = "Lord Ashes"; public const string Toggle = "RT"; private void Awake() { Scripts.LogMessage((DiagnosticLevel)3, "D20 Extension Reliable Talent (" + ((object)this).GetType().AssemblyQualifiedName + "): Active using 'RT' toggle."); Scripts.RegisterExtension((ExtensionType)1, "RT", (Func<CreatureBoardAsset, CreatureBoardAsset, CharacterSpecs, Spec, Spec, RollResult, RollResult>)delegate(CreatureBoardAsset instigator, CreatureBoardAsset target, CharacterSpecs sheet, Spec check, Spec empty, RollResult rollResult) { Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Reliable Talent: Checking For Reliable Talent..."); if (check.Extra("type") == "skill" && check.formula.StartsWith("1D20") && check.formula.Contains("[PB]")) { LoggingPlugin.LogDebug(instigator.Name + " Has Reliable Talent And Is Proficient In " + check.name); int num = rollResult.dice[0]; if (num < 10) { rollResult.dice[0] = 10; rollResult.total += 10 - num; Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Reliable Talent: Modifying Die From " + num + " To 10"); Scripts.ChatMessage(instigator, sheet, "Uses Reliable Talent (Roll: " + num + " => 10)"); } } return rollResult; }); } }
D20ExtensionSavageAttacker.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("D20ExtensionSavageAttacker")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Nth Dimension")] [assembly: AssemblyProduct("D20ExtensionSavageAttacker")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("D20ExtensionSavageAttacker")] [assembly: ComVisible(false)] [assembly: Guid("c303405d-e66c-4316-9cdb-4e3ca15c6360")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.1.0.0")] namespace LordAshes; [BepInPlugin("org.lordashes.plugins.d20savageattacker", "D20 Extension Savage Attacker", "1.1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class D20ReliableTalent : BaseUnityPlugin { public const string Name = "D20 Extension Savage Attacker"; public const string Guid = "org.lordashes.plugins.d20savageattacker"; public const string Version = "1.1.0.0"; public const string Author = "Lord Ashes"; public const string Toggle = "SA"; private void Awake() { Scripts.LogMessage((DiagnosticLevel)3, "D20 Extension Savage Attacker (" + ((object)this).GetType().AssemblyQualifiedName + "): Active using 'SA' toggle and setting 'SA_Threshold'"); Scripts.RegisterExtension((ExtensionType)2, "SA", (Func<CreatureBoardAsset, CreatureBoardAsset, CharacterSpecs, Spec, Spec, RollResult, RollResult>)delegate(CreatureBoardAsset instigator, CreatureBoardAsset target, CharacterSpecs sheet, Spec check, Spec damage, RollResult rollResult) { Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Savage Attacker: Type: " + check.Extra("type") + ", Formula: " + check.formula); if (check.Extra("type") == "attack" && (check.formula.Contains("[STR]") || check.formula.Contains("[DEX]"))) { Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Savage Attacker: This seems like a physical attack. Applying " + "D20 Extension Savage Attacker".Replace("D20 Extension ", "") + "..."); RollResult val = DiceRoller.Roll(DiceRoller.ComputeConstants(sheet.Resolve(damage.formula, 0))); string text = "Roll Set: (" + string.Join(",", rollResult.dice) + ")"; bool flag = false; int num = rollResult.dice[0]; string text2 = sheet.FindFirstValue("SA_Threshold"); if (num <= int.Parse((text2 != null) ? text2 : "2")) { flag = true; rollResult.total += val.dice[0] - rollResult.dice[0]; rollResult.dice[0] = val.dice[0]; } if (flag) { string text3 = "Feat: " + "D20 Extension Savage Attacker".Replace("D20 Extension ", "") + "\r\n" + text + "\r\nFinal Set: (" + string.Join(",", rollResult.dice) + ")"; Scripts.ChatMessage(instigator, sheet, text3); Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Savage Attacker: " + text3.Replace("\r\n", ". ")); } } return rollResult; }); } }
D20ExtensionElementalAdept.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("D20ExtensionElementalAdept")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Nth Dimension")] [assembly: AssemblyProduct("D20ExtensionElementalAdept")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("D20ExtensionElementalAdept")] [assembly: ComVisible(false)] [assembly: Guid("c303405d-e66c-4316-9cdb-4e3ca15c6360")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.1.0.0")] namespace LordAshes; [BepInPlugin("org.lordashes.plugins.d20elementaladept", "D20 Extension Elemental Adpet", "1.1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class D20ReliableTalent : BaseUnityPlugin { public const string Name = "D20 Extension Elemental Adpet"; public const string Guid = "org.lordashes.plugins.d20elementaladept"; public const string Version = "1.1.0.0"; public const string Author = "Lord Ashes"; public const string Toggle = "EA"; private void Awake() { Scripts.LogMessage((DiagnosticLevel)3, "D20 Extension Elemental Adpet (" + ((object)this).GetType().AssemblyQualifiedName + "): Active using 'EA' toggle and 'EA_Types' setting."); Scripts.RegisterExtension((ExtensionType)2, "EA", (Func<CreatureBoardAsset, CreatureBoardAsset, CharacterSpecs, Spec, Spec, RollResult, RollResult>)delegate(CreatureBoardAsset instigator, CreatureBoardAsset target, CharacterSpecs sheet, Spec check, Spec damage, RollResult rollResult) { if (check.Extra("type") == "attack" && (check.formula.Contains("[INT]") || check.formula.Contains("[WIS]") || check.formula.Contains("[CHA]"))) { Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Elemental Adpet: Mental attack. Checking For " + "D20 Extension Elemental Adpet".Replace("D20 Extension ", "") + " Actions..."); string text = sheet.FindFirstValue("EA_Types"); string text2 = ((text != null) ? text : ""); string text3 = damage.Extra("damageType"); Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Elemental Adpet: Damage Type: " + text3 + ", EA Types: " + text2); if (text2.Contains(text3)) { Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Elemental Adpet: This seems to be a " + text3 + " spell. Elemental Adept (" + text2 + ") applies."); foreach (SpecPair item in damage.extra) { if (item.key == "damageType") { item.value = "non-resisted"; } } string text4 = "Roll Set: (" + string.Join(",", rollResult.dice) + ")"; bool flag = false; for (int i = 0; i < rollResult.dice.Length; i++) { if (rollResult.dice[i] <= 1) { flag = true; rollResult.dice[i] = 2; rollResult.total += 1; } } if (flag) { string text5 = "Feat: " + "D20 Extension Elemental Adpet".Replace("D20 Extension ", "") + "\r\n" + text4 + "\r\nFinal Set: (" + string.Join(",", rollResult.dice) + ")"; Scripts.ChatMessage(instigator, sheet, text5); Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Elemental Adpet: " + text5.Replace("\r\n", ". ")); } } } return rollResult; }); } }
D20ExtensionGreatWeaponFighting.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("D20ExtensionGreatWeaponFighting")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Nth Dimension")] [assembly: AssemblyProduct("D20ExtensionGreatWeaponFighting")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("D20ExtensionGreatWeaponFighting")] [assembly: ComVisible(false)] [assembly: Guid("c303405d-e66c-4316-9cdb-4e3ca15c6360")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.1.0.0")] namespace LordAshes; [BepInPlugin("org.lordashes.plugins.d20greatweaponfighting", "D20 Extension Great Weapon Fighting", "1.1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class D20ReliableTalent : BaseUnityPlugin { public const string Name = "D20 Extension Great Weapon Fighting"; public const string Guid = "org.lordashes.plugins.d20greatweaponfighting"; public const string Version = "1.1.0.0"; public const string Author = "Lord Ashes"; public const string Toggle = "GWF"; private void Awake() { Scripts.LogMessage((DiagnosticLevel)3, "D20 Extension Great Weapon Fighting (" + ((object)this).GetType().AssemblyQualifiedName + "): Active using 'GWF' toggle."); Scripts.RegisterExtension((ExtensionType)2, "GWF", (Func<CreatureBoardAsset, CreatureBoardAsset, CharacterSpecs, Spec, Spec, RollResult, RollResult>)delegate(CreatureBoardAsset instigator, CreatureBoardAsset target, CharacterSpecs sheet, Spec check, Spec damage, RollResult rollResult) { if (check.Extra("type") == "attack" && check.formula.Contains("[STR]")) { Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Great Weapon Fighting: This is a srength attack. Applying Great Weapon Fighting..."); RollResult val = DiceRoller.Roll(DiceRoller.ComputeConstants(sheet.Resolve(damage.formula, 0))); string text = "Roll Set: (" + string.Join(",", rollResult.dice) + ")"; bool flag = false; for (int i = 0; i < rollResult.dice.Length; i++) { if (rollResult.dice[i] <= 2) { flag = true; rollResult.total += val.dice[i] - rollResult.dice[i]; rollResult.dice[i] = val.dice[i]; } } if (flag) { string text2 = "Feat: Great Weapon Fighting\r\n" + text + "\r\nFinal Set: (" + string.Join(",", rollResult.dice) + ")"; Scripts.ChatMessage(instigator, sheet, text2); Scripts.LogMessage((DiagnosticLevel)4, "D20 Extension Great Weapon Fighting: " + text2.Replace("\r\n", ". ")); } } return rollResult; }); } }