From d735df762c225c88dca3a7c3372f6b6774269b22 Mon Sep 17 00:00:00 2001 From: pheonix99 Date: Tue, 9 May 2023 16:57:17 -0400 Subject: [PATCH] Outline of INcendiary Cloud --- TomeOfTheFirebird/Helpers/InteropHelpers.cs | 2 +- TomeOfTheFirebird/Localization/Spells.json | 20 +++++++ .../New Content/Spells/IncendiaryCloud.cs | 52 ++++++++++++++++++- TomeOfTheFirebird/Settings.cs | 2 +- TomeOfTheFirebird/TomeOfTheFirebird.csproj | 1 - 5 files changed, 73 insertions(+), 4 deletions(-) diff --git a/TomeOfTheFirebird/Helpers/InteropHelpers.cs b/TomeOfTheFirebird/Helpers/InteropHelpers.cs index c8d6d20..de3b7e3 100644 --- a/TomeOfTheFirebird/Helpers/InteropHelpers.cs +++ b/TomeOfTheFirebird/Helpers/InteropHelpers.cs @@ -12,7 +12,7 @@ internal static class InteropHelpers { public static AbilityConfigurator AddSpellToMedium(this AbilityConfigurator spell, int level) { - if (Settings.IsMediumMpdEnabled()) + if (Settings.IsMediumModEnabled()) { spell.AddToSpellList(level, "ff3e034659b64d21ac57dc0d9e893bdb", true); } diff --git a/TomeOfTheFirebird/Localization/Spells.json b/TomeOfTheFirebird/Localization/Spells.json index 5ae795e..24b46c1 100644 --- a/TomeOfTheFirebird/Localization/Spells.json +++ b/TomeOfTheFirebird/Localization/Spells.json @@ -41,6 +41,26 @@ "Key": "MassFly.Desc", "ProcessTemplates": false, "enGB": "The party gains flight, increasing their speed by ten feet, ignoring ground effects, and gaining a +3 dodge bonus to AC against melee attacks" + }, + { + "Key": "IncendiaryCloud.Name", + "ProcessTemplates": false, + "enGB": "Incendiary Cloud" + }, + { + "Key": "IncendiaryCloud.Desc", + "ProcessTemplates": false, + "enGB": "An incendiary cloud spell creates a cloud of roiling smoke shot through with white-hot embers. The smoke obscures all sight as a fog cloud does. In addition, the white-hot embers within the cloud deal 6d6 points of fire damage to everything within the cloud on your turn each round. \nAs with a cloudkill spell, the smoke moves away from you at 10 feet per round. Figure out the smoke’s new spread each round based on its new point of origin, which is 10 feet farther away from where you were when you cast the spell.\nAs with fog cloud, wind disperses the smoke, and the spell can’t be cast underwater." + }, + { + "Key": "FogCloudConcealment.Name", + "ProcessTemplates": false, + "enGB": "Shrouded In Fog" + }, + { + "Key": "FogCloudConcealment.Desc", + "ProcessTemplates": false, + "enGB": "The fog around you obscures all sight, including darkvision, beyond 5 feet. A creature 5 feet away has concealment (attacks have a 20% miss chance). Creatures farther away have total concealment (50% miss chance, and the attacker cannot use sight to locate the target)." } diff --git a/TomeOfTheFirebird/New Content/Spells/IncendiaryCloud.cs b/TomeOfTheFirebird/New Content/Spells/IncendiaryCloud.cs index be9631a..cb3e800 100644 --- a/TomeOfTheFirebird/New Content/Spells/IncendiaryCloud.cs +++ b/TomeOfTheFirebird/New Content/Spells/IncendiaryCloud.cs @@ -1,13 +1,63 @@ -using System; +using BlueprintCore.Actions.Builder; +using BlueprintCore.Actions.Builder.ContextEx; +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Abilities; +using BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Buffs; +using BlueprintCore.Utils; +using BlueprintCore.Utils.Types; +using Kingmaker.Blueprints.Classes.Spells; +using Kingmaker.Enums; +using Kingmaker.UnitLogic.Abilities.Blueprints; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using TomeOfTheFirebird.Helpers; namespace TomeOfTheFirebird.New_Content.Spells { class IncendiaryCloud { + + public static void Make() + { + //On hold until Fog Cloud Stuff implemented + if (Settings.IsEnabled("IncendiaryCloud")) + { + var icon = BlueprintTool.Get("ba303565ad91ae542ac7eba89f59a9c4").Icon; + var spellConfig = AbilityConfigurator.NewSpell("IncendiaryCloud", Main.TotFContext.Blueprints.GetGUID("IncendiaryCloud").ToString(), Kingmaker.Blueprints.Classes.Spells.SpellSchool.Conjuration, true, SpellDescriptor.Fire); + + var areaConfig = AbilityAreaEffectConfigurator.New("IncendiaryCloudArea", Main.TotFContext.Blueprints.GetGUID("IncendiaryCloudArea").ToString()); + + + spellConfig.AddToSpellLists(8, SpellList.Wizard); + spellConfig.SetIcon(icon); + spellConfig.AddSpellToSummoner(6); + spellConfig.AddAbilityAoERadius(radius: new Kingmaker.Utility.Feet(20f),targetType: Kingmaker.UnitLogic.Abilities.Components.TargetType.Any); + spellConfig.AddCraftInfoComponent(aOEType: Kingmaker.Craft.CraftAOE.AOE, savingThrow: Kingmaker.Craft.CraftSavingThrow.Reflex, spellType: Kingmaker.Craft.CraftSpellType.Debuff); + spellConfig.SetDisplayName("IncendiaryCloud.Name").SetDescription("IncendiaryCloud.Desc"); + ActionsBuilder actionsBuilder = ActionsBuilder.New().SpawnAreaEffect(areaEffect: "IncendiaryCloudArea", durationValue: ContextDuration.Variable(value: ContextValues.Rank(Kingmaker.Enums.AbilityRankType.Default), rate: Kingmaker.UnitLogic.Mechanics.DurationRate.Minutes, isExtendable: true), onUnit: false); + + spellConfig.AddAbilityEffectRunAction(actionsBuilder); + + areaConfig.AddAbilityAreaEffectMovement(distancePerRound: new Kingmaker.Utility.Feet(10f)); + + var damage = ActionsBuilder.New().DealDamage(damageType: DamageTypes.Energy(Kingmaker.Enums.Damage.DamageEnergyType.Fire), value: ContextDice.Value(Kingmaker.RuleSystem.DiceType.D6, diceCount: ContextValues.Constant(8))); + areaConfig.AddAbilityAreaEffectRunAction(round:damage); + areaConfig.Configure(); + var spell = spellConfig.Configure(); + + //TODO optional adds to fire domain / flame mystery + } + else + { + AbilityConfigurator.New("IncendiaryCloud", Main.TotFContext.Blueprints.GetGUID("IncendiaryCloud").ToString()).SetDisplayName("IncendiaryCloud.Name").SetDescription("IncendiaryCloud.Desc").Configure(); + AbilityAreaEffectConfigurator.New("IncendiaryCloudArea", Main.TotFContext.Blueprints.GetGUID("IncendiaryCloudArea").ToString()).Configure(); + + } + + } + /* * Incendiary Cloud diff --git a/TomeOfTheFirebird/Settings.cs b/TomeOfTheFirebird/Settings.cs index f41b909..3ec300d 100644 --- a/TomeOfTheFirebird/Settings.cs +++ b/TomeOfTheFirebird/Settings.cs @@ -22,7 +22,7 @@ public static bool BloodlineMutationsEnabled() return IsEnabled("BloodHavoc"); } - public static bool IsMediumMpdEnabled() + public static bool IsMediumModEnabled() { return UnityModManager.modEntries.Where( mod => mod.Info.Id.Equals("Medium Class") && mod.Enabled && !mod.ErrorOnLoading) diff --git a/TomeOfTheFirebird/TomeOfTheFirebird.csproj b/TomeOfTheFirebird/TomeOfTheFirebird.csproj index 5fc56c4..a106daf 100644 --- a/TomeOfTheFirebird/TomeOfTheFirebird.csproj +++ b/TomeOfTheFirebird/TomeOfTheFirebird.csproj @@ -384,7 +384,6 @@ PreserveNewest - PreserveNewest