Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1415 from Taurenkey/picto
Browse files Browse the repository at this point in the history
Picto
  • Loading branch information
Taurenkey authored Jul 6, 2024
2 parents 7da115b + 460a8a8 commit 8076863
Show file tree
Hide file tree
Showing 6 changed files with 438 additions and 19 deletions.
26 changes: 26 additions & 0 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2179,6 +2179,32 @@ public enum CustomComboPreset

#endregion

#region PICTOMANCER
[ReplaceSkill(PCT.FireInRed)]
[ConflictingCombos(CombinedAetherhues)]
[CustomComboInfo("Simple Mode - Single Target", $"Replaces Fire in Red with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", PCT.JobID)]
PCT_ST_SimpleMode = 20000,

[ReplaceSkill(PCT.FireIIinRed)]
[ConflictingCombos(CombinedAetherhues)]
[CustomComboInfo("Simple Mode - AoE", $"Replaces Fire II in Red with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", PCT.JobID)]
PCT_AoE_SimpleMode = 20001,

[ReplaceSkill(PCT.FireInRed, PCT.FireIIinRed)]
[ConflictingCombos(PCT_ST_SimpleMode, PCT_AoE_SimpleMode)]
[CustomComboInfo("Combined Aetherhues Feature", "Combines aetherhue actions onto one button for their respective target types.", PCT.JobID)]
CombinedAetherhues = 20002,

[ReplaceSkill(PCT.CreatureMotif, PCT.WeaponMotif, PCT.LandscapeMotif)]
[CustomComboInfo("One Button Motifs", "Combine Motifs and Muses into one button.", PCT.JobID)]
CombinedMotifs = 20003,

[ReplaceSkill(PCT.HolyInWhite)]
[CustomComboInfo("One Button Paint", "Combines paint consuming actions into one button.", PCT.JobID)]
CombinedPaint = 20004,

#endregion

#region PALADIN

//// Last value = 11032
Expand Down
322 changes: 303 additions & 19 deletions XIVSlothCombo/Combos/PvE/PCT.cs
Original file line number Diff line number Diff line change
@@ -1,43 +1,56 @@
namespace XIVSlothCombo.Combos.PvE
using Dalamud.Game.ClientState.JobGauge.Types;
using XIVSlothCombo.CustomComboNS;
using XIVSlothCombo.CustomComboNS.Functions;
using XIVSlothCombo.Extensions;

namespace XIVSlothCombo.Combos.PvE
{
internal class PCT
{
public const byte JobID = 42;

public const uint
AdventofChocobastion = 39215,
AeroinGreen = 39192,
BlizzardinCyan = 39194,
BlizzardinCyan = 34653,
BlizzardIIinCyan = 34659,
ClawMotif = 34666,
CometinBlack = 39199,
ClawedMuse = 34672,
CometinBlack = 34663,
CreatureMotif = 34689,
FireInRed = 34650,
FireIIinRed = 34656,
HammerStamp = 34678,
HolyInWhite = 34662,
LandscapeMotif = 34691,
LivingMuse = 35347,
MawMotif = 34667,
MogoftheAges = 39782,
PomMotif1 = 34664,
PomMotif2 = 39200,
PomMuse1 = 34670,
PomMuse2 = 39205,
MogoftheAges = 34676,
PomMotif = 34664,
PomMuse = 34670,
RainbowDrip = 34688,
ReleaseSubtractivePalette = 39214,
RetributionoftheMadeen1 = 34677,
RetributionoftheMadeen2 = 39783,
RetributionoftheMadeen = 34677,
ScenicMuse = 35349,
Smudge1 = 34684,
Smudge2 = 39210,
Smudge = 34684,
StarPrism = 34681,
SteelMuse = 35348,
SubtractivePalette = 39213,
SubtractivePalette = 34683,
ThunderIIinMagenta = 34661,
ThunderinMagenta1 = 34655,
ThunderinMagenta2 = 39196,
ThunderinMagenta = 34655,
WaterinBlue = 34652,
WeaponMotif = 34690,
WingMotif = 34665;

public static class Buffs
{

public const ushort
SubtractivePalette = 3674,
RainbowBright = 3679,
HammerTime = 3680,
MonochromeTones = 3691,
StarryMuse = 3685,
Hyperphantasia = 3688,
Inspiration = 3689,
SubtractiveSpectrum = 3690,
Starstruck = 3681;
}

public static class Debuffs
Expand All @@ -47,7 +60,278 @@ public static class Debuffs

public static class Config
{
public static UserInt
CombinedAetherhueChoices = new("CombinedAetherhueChoices");

public static UserBool
CombinedMotifsMog = new("CombinedMotifsMog"),
CombinedMotifsMadeen = new("CombinedMotifsMadeen"),
CombinedMotifsWeapon = new("CombinedMotifsWeapon");
}


internal class PCT_ST_SimpleMode : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.PCT_ST_SimpleMode;

protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level)
{
if (actionID is FireInRed)
{
var gauge = GetJobGauge<PCTGauge>();
bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed));

if (HasEffect(Buffs.Starstruck))
return OriginalHook(StarPrism);

if (HasEffect(Buffs.RainbowBright))
return OriginalHook(RainbowDrip);

if (IsMoving)
{
if (gauge.Paint > 0)
{
if (HasEffect(Buffs.MonochromeTones))
return OriginalHook(CometinBlack);

return OriginalHook(HolyInWhite);
}
}


if (HasEffect(Buffs.StarryMuse))
{
if (HasEffect(Buffs.SubtractiveSpectrum) && !HasEffect(Buffs.SubtractivePalette) && canWeave)
return OriginalHook(SubtractivePalette);

if (MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)))
return OriginalHook(MogoftheAges);

if (!HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && GetBuffRemainingTime(Buffs.StarryMuse) >= 15f)
return OriginalHook(SteelMuse);

if (gauge.CreatureMotifDrawn && HasCharges(OriginalHook(LivingMuse)) && canWeave)
return OriginalHook(LivingMuse);

if (HasEffect(Buffs.HammerTime))
return OriginalHook(HammerStamp);

if (HasEffect(Buffs.SubtractivePalette))
return OriginalHook(BlizzardinCyan);

return actionID;
}

if (gauge.PalleteGauge >= 50 && !HasEffect(Buffs.SubtractivePalette) && canWeave)
return OriginalHook(SubtractivePalette);

if (HasEffect(Buffs.HammerTime) && !canWeave)
return OriginalHook(HammerStamp);

if (InCombat())
{
if (gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(MogoftheAges) && IsOffCooldown(ScenicMuse) && canWeave)
return OriginalHook(ScenicMuse);

if (MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldown(LivingMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || !ScenicMuse.LevelChecked()) && canWeave)
return OriginalHook(MogoftheAges);

if (!HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked()) && canWeave)
return OriginalHook(SteelMuse);

if (gauge.CreatureMotifDrawn && (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && HasCharges(OriginalHook(LivingMuse)) && canWeave)
return OriginalHook(LivingMuse);

if (LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && GetCooldownRemainingTime(ScenicMuse) <= GetActionCastTime(OriginalHook(LandscapeMotif)))
return OriginalHook(LandscapeMotif);

if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn && (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= GetActionCastTime(OriginalHook(CreatureMotif))))
return OriginalHook(CreatureMotif);

if (WeaponMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !gauge.WeaponMotifDrawn && (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= GetActionCastTime(OriginalHook(WeaponMotif))))
return OriginalHook(WeaponMotif);

}
if (gauge.Paint > 0 && HasEffect(Buffs.MonochromeTones))
return OriginalHook(CometinBlack);

if (HasEffect(Buffs.SubtractivePalette))
return OriginalHook(BlizzardinCyan);

}
return actionID;
}
}

internal class PCT_AoE_SimpleMode : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.PCT_AoE_SimpleMode;

protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level)
{
if (actionID is FireIIinRed)
{
var gauge = GetJobGauge<PCTGauge>();
bool canWeave = HasEffect(Buffs.SubtractivePalette) ? CanSpellWeave(OriginalHook(BlizzardinCyan)) : CanSpellWeave(OriginalHook(FireInRed));

if (HasEffect(Buffs.Starstruck))
return OriginalHook(StarPrism);

if (HasEffect(Buffs.RainbowBright))
return OriginalHook(RainbowDrip);

if (IsMoving)
{
if (gauge.Paint > 0)
{
if (HasEffect(Buffs.MonochromeTones))
return OriginalHook(CometinBlack);

return OriginalHook(HolyInWhite);
}
}

if (HasEffect(Buffs.StarryMuse))
{
if (HasEffect(Buffs.SubtractiveSpectrum) && !HasEffect(Buffs.SubtractivePalette) && canWeave)
return OriginalHook(SubtractivePalette);

if (MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)))
return OriginalHook(MogoftheAges);

if (!HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && GetBuffRemainingTime(Buffs.StarryMuse) >= 15f)
return OriginalHook(SteelMuse);

if (gauge.CreatureMotifDrawn && HasCharges(OriginalHook(LivingMuse)) && canWeave)
return OriginalHook(LivingMuse);

if (HasEffect(Buffs.HammerTime))
return OriginalHook(HammerStamp);

if (HasEffect(Buffs.SubtractivePalette))
return OriginalHook(BlizzardIIinCyan);

return actionID;
}

if (gauge.PalleteGauge >= 50 && !HasEffect(Buffs.SubtractivePalette) && canWeave)
return OriginalHook(SubtractivePalette);

if (HasEffect(Buffs.HammerTime) && !canWeave)
return OriginalHook(HammerStamp);

if (InCombat())
{
if (gauge.LandscapeMotifDrawn && gauge.WeaponMotifDrawn && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(MogoftheAges) && IsOffCooldown(ScenicMuse) && canWeave)
return OriginalHook(ScenicMuse);

if (MogoftheAges.LevelChecked() && (gauge.MooglePortraitReady || gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)) && (GetCooldown(MogoftheAges).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || !ScenicMuse.LevelChecked()) && canWeave)
return OriginalHook(MogoftheAges);

if (!HasEffect(Buffs.HammerTime) && gauge.WeaponMotifDrawn && HasCharges(OriginalHook(SteelMuse)) && (GetCooldown(SteelMuse).CooldownRemaining < GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(SteelMuse) == GetMaxCharges(SteelMuse) || !ScenicMuse.LevelChecked()) && canWeave)
return OriginalHook(SteelMuse);

if (gauge.CreatureMotifDrawn && (!(gauge.MooglePortraitReady || gauge.MadeenPortraitReady) || GetCooldown(LivingMuse).CooldownRemaining > GetCooldown(ScenicMuse).CooldownRemaining || GetRemainingCharges(LivingMuse) == GetMaxCharges(LivingMuse) || !ScenicMuse.LevelChecked()) && HasCharges(OriginalHook(LivingMuse)) && canWeave)
return OriginalHook(LivingMuse);

if (LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && GetCooldownRemainingTime(ScenicMuse) <= GetActionCastTime(OriginalHook(LandscapeMotif)))
return OriginalHook(LandscapeMotif);

if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn && (HasCharges(LivingMuse) || GetCooldownChargeRemainingTime(LivingMuse) <= GetActionCastTime(OriginalHook(CreatureMotif))))
return OriginalHook(CreatureMotif);

if (WeaponMotif.LevelChecked() && !HasEffect(Buffs.HammerTime) && !gauge.WeaponMotifDrawn && (HasCharges(SteelMuse) || GetCooldownChargeRemainingTime(SteelMuse) <= GetActionCastTime(OriginalHook(WeaponMotif))))
return OriginalHook(WeaponMotif);
}

if (gauge.Paint > 0 && HasEffect(Buffs.MonochromeTones))
return OriginalHook(CometinBlack);

if (gauge.Paint > 0)
return OriginalHook(HolyInWhite);

if (HasEffect(Buffs.SubtractivePalette))
return OriginalHook(BlizzardIIinCyan);

}
return actionID;
}
}

internal class CombinedAetherhues : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.CombinedAetherhues;

protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level)
{
int choice = Config.CombinedAetherhueChoices;

if (actionID == FireInRed && choice is 0 or 1)
{
if (HasEffect(Buffs.SubtractivePalette))
return OriginalHook(BlizzardinCyan);
}

if (actionID == FireIIinRed && choice is 0 or 2)
{
if (HasEffect(Buffs.SubtractivePalette))
return OriginalHook(BlizzardIIinCyan);
}

return actionID;
}
}

internal class CombinedMotifs : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.CombinedMotifs;

protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level)
{
var gauge = GetJobGauge<PCTGauge>();

if (actionID == CreatureMotif)
{
if ((Config.CombinedMotifsMog && gauge.MooglePortraitReady) || (Config.CombinedMotifsMadeen && gauge.MadeenPortraitReady) && IsOffCooldown(OriginalHook(MogoftheAges)))
return OriginalHook(MogoftheAges);

if (gauge.CreatureMotifDrawn)
return OriginalHook(LivingMuse);
}

if (actionID == WeaponMotif)
{
if (Config.CombinedMotifsWeapon && HasEffect(Buffs.HammerTime))
return OriginalHook(HammerStamp);

if (gauge.WeaponMotifDrawn)
return OriginalHook(SteelMuse);
}

if (actionID == LandscapeMotif)
{
if (gauge.LandscapeMotifDrawn)
return OriginalHook(ScenicMuse);
}

return actionID;
}
}

internal class CombinedPaint : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.CombinedPaint;

protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level)
{
if (actionID == HolyInWhite)
{
if (HasEffect(Buffs.MonochromeTones))
return CometinBlack;
}

return actionID;
}
}
}
}
Loading

0 comments on commit 8076863

Please sign in to comment.