Skip to content

Commit

Permalink
Outline of INcendiary Cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
pheonix99 committed May 9, 2023
1 parent c5b29f6 commit d735df7
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TomeOfTheFirebird/Helpers/InteropHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
20 changes: 20 additions & 0 deletions TomeOfTheFirebird/Localization/Spells.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
}


Expand Down
52 changes: 51 additions & 1 deletion TomeOfTheFirebird/New Content/Spells/IncendiaryCloud.cs
Original file line number Diff line number Diff line change
@@ -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<BlueprintAbility>("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
Expand Down
2 changes: 1 addition & 1 deletion TomeOfTheFirebird/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion TomeOfTheFirebird/TomeOfTheFirebird.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@
<EmbeddedResource Include="Localization\Kineticist.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>

<EmbeddedResource Include="Localization\ClassesAndArchetypes.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
Expand Down

0 comments on commit d735df7

Please sign in to comment.