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

Commit

Permalink
Merge commit 'refs/pull/1740/head' of https://github.com/Nik-Potokar/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Aug 22, 2024
2 parents a840912 + d4b8c7f commit c573aff
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 0 deletions.
21 changes: 21 additions & 0 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5021,6 +5021,27 @@ The three digets after RDM.JobID can be used to reorder items in the list

#endregion

#region PICTOMANCER
[PvPCustomCombo]
[ReplaceSkill(PCTPvP.FireInRed)]
[CustomComboInfo("Burst Mode", "Turns Fire in Red into an all-in-one damage button.", PCTPvP.JobID)]
PCTPvP_Burst = 140000,

[ParentCombo(PCTPvP_Burst)]
[CustomComboInfo("Burst Control Option", "Saves high-damaging actions until the target's HP falls below the threshold.", PCTPvP.JobID)]
PCTPvP_BurstControl = 140001,

[ParentCombo(PCTPvP_Burst)]
[CustomComboInfo("Tempera Coat Option", "Uses Tempera Coat when HP falls below the threshold during combat.", PCTPvP.JobID)]
PCTPvP_TemperaCoat = 140002,

[ParentCombo(PCTPvP_Burst)]
[CustomComboInfo("Smart Palette Option", "Uses Subtractive Palette when standing still and releases it when moving.", PCTPvP.JobID)]
PCTPvP_SubtractivePalette = 140003,

// Last value = 140003
#endregion

#region REAPER
[PvPCustomCombo]
[CustomComboInfo("Burst Mode", "Turns Slice Combo into an all-in-one damage button.\nAdds Soul Slice to the main combo.", RPR.JobID)]
Expand Down
101 changes: 101 additions & 0 deletions XIVSlothCombo/Combos/PvP/PCTPVP.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
using XIVSlothCombo.CustomComboNS;
using XIVSlothCombo.CustomComboNS.Functions;

namespace XIVSlothCombo.Combos.PvP
{
internal static class PCTPvP
{
public const byte JobID = 42;

internal const uint
FireInRed = 39191,
AeroInGreen = 39192,
WaterInBlue = 39193,
HolyInWhite = 39198,
CreatureMotif = 39204,
LivingMuse = 39209,
TemperaCoat = 39211,
SubtractivePalette = 39213,
StarPrism = 39216,
MogOfTheAges = 39782;

internal class Buffs
{
internal const ushort
PomMotif = 4105,
WingMotif = 4106,
ClawMotif = 4107,
MawMotif = 4108,
TemperaCoat = 4114,
Starstruck = 4118,
MooglePortrait = 4103,
MadeenPortrait = 4104,
SubtractivePalette = 4102;
}

internal class Config
{
internal static UserInt
PCTPvP_BurstHP = new("PCTPvP_BurstHP", 100),
PCTPvP_TemperaHP = new("PCTPvP_TemperaHP", 50);
}

internal class PCTPvP_Burst : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.PCTPvP_Burst;
protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
#region Variables
bool isMoving = IsMoving;
bool hasTarget = HasTarget();
bool hasStarPrism = HasEffect(Buffs.Starstruck);
bool targetHasGuard = TargetHasEffectAny(PvPCommon.Buffs.Guard);
bool hasSubtractivePalette = HasEffect(Buffs.SubtractivePalette);
bool hasPortrait = HasEffect(Buffs.MooglePortrait) || HasEffect(Buffs.MadeenPortrait);
bool isStarPrismExpiring = HasEffect(Buffs.Starstruck) && GetBuffRemainingTime(Buffs.Starstruck) <= 3;
bool isTemperaCoatExpiring = HasEffect(Buffs.TemperaCoat) && GetBuffRemainingTime(Buffs.TemperaCoat) <= 3;
bool hasMotifDrawn = HasEffect(Buffs.PomMotif) || HasEffect(Buffs.WingMotif) || HasEffect(Buffs.ClawMotif) || HasEffect(Buffs.MawMotif);
bool isBurstControlled = IsNotEnabled(CustomComboPreset.PCTPvP_BurstControl) || (IsEnabled(CustomComboPreset.PCTPvP_BurstControl) && GetTargetHPPercent() < Config.PCTPvP_BurstHP);
#endregion

if (actionID is FireInRed or AeroInGreen or WaterInBlue)
{
// Tempera Coat / Tempera Grassa
if (IsEnabled(CustomComboPreset.PCTPvP_TemperaCoat) && ((IsOffCooldown(TemperaCoat) &&
InCombat() && PlayerHealthPercentageHp() < Config.PCTPvP_TemperaHP) || isTemperaCoatExpiring))
return OriginalHook(TemperaCoat);

if (hasTarget && !targetHasGuard)
{
// Star Prism
if (hasStarPrism && (isBurstControlled || isStarPrismExpiring))
return StarPrism;

// Moogle / Madeen Portrait
if (hasPortrait && isBurstControlled)
return OriginalHook(MogOfTheAges);

// Living Muse
if (hasMotifDrawn && HasCharges(OriginalHook(LivingMuse)) && isBurstControlled)
return OriginalHook(LivingMuse);

// Holy in White / Comet in Black
if (HasCharges(OriginalHook(HolyInWhite)) && isBurstControlled)
return OriginalHook(HolyInWhite);
}

// Creature Motif
if (!hasMotifDrawn && !isMoving)
return OriginalHook(CreatureMotif);

// Subtractive Palette
if (IsEnabled(CustomComboPreset.PCTPvP_SubtractivePalette) && IsOffCooldown(OriginalHook(SubtractivePalette)) &&
hasTarget && ((isMoving && hasSubtractivePalette) || (!isMoving && !hasSubtractivePalette)))
return OriginalHook(SubtractivePalette);
}

return actionID;
}
}
}
}
6 changes: 6 additions & 0 deletions XIVSlothCombo/Window/Functions/UserConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,12 @@ internal static void Draw(CustomComboPreset preset, bool enabled)
UserConfig.DrawSliderInt(0, 10000, PCT.Config.PCT_AoE_AdvancedMode_LucidOption, "Add Lucid Dreaming when below this MP", sliderIncrement: SliderIncrements.Hundreds);
}

// PvP
if (preset == CustomComboPreset.PCTPvP_BurstControl)
UserConfig.DrawSliderInt(1, 100, PCTPvP.Config.PCTPvP_BurstHP, "Target HP%", 200);

if (preset == CustomComboPreset.PCTPvP_TemperaCoat)
UserConfig.DrawSliderInt(1, 100, PCTPvP.Config.PCTPvP_TemperaHP, "Player HP%", 200);
#endregion
// ====================================================================================
#region PALADIN
Expand Down

0 comments on commit c573aff

Please sign in to comment.