Skip to content

Commit

Permalink
3.0.19.9 ->Update MCH
Browse files Browse the repository at this point in the history
  • Loading branch information
xhabit committed Apr 1, 2024
1 parent 042c0bb commit a84b28a
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 13 deletions.
48 changes: 39 additions & 9 deletions XIVSlothComboX/Combos/PvE/MCH.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ internal class MCH
钻头Drill = 16498,
热弹HotShot = 2872,
整备Reassemble = 2876,
// 250 获取不到先拿散弹枪的ID
整备ReassembleV2 = 25786,
空气锚AirAnchor = 16500,
超荷Hypercharge = 17209,
热冲击HeatBlast = 7410,
Expand Down Expand Up @@ -68,6 +70,7 @@ internal static class Config
MCH_VariantCure = new("MCH_VariantCure"),
MCH_ST_TurretUsage = new("MCH_ST_Adv_TurretGauge"),
MCH_AoE_TurretUsage = new("MCH_AoE_TurretUsage");

public static UserBoolArray MCH_ST_Reassembled = new("MCH_ST_Reassembled"),
MCH_AoE_Reassembled = new("MCH_AoE_Reassembled");
public static UserBool MCH_AoE_Hypercharge = new("MCH_AoE_Hypercharge");
Expand Down Expand Up @@ -368,7 +371,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
&& !gauge.IsOverheated
&& gauge.Heat >= 50
&& !WasLastAction(热冲击HeatBlast)
&& GetCooldownRemainingTime(回转飞锯ChainSaw) <= 2.13f
&& 回转飞锯ChainSaw.GCDActionReady(actionID, 2.15f)
&& GetCooldownRemainingTime(野火Wildfire) <= 1.1f
&& CanSpellWeavePlus(actionID)
&& GetCooldownRemainingTime(MCH.弹射Ricochet) >= 5
Expand All @@ -385,6 +388,13 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
// Wildfire
if (IsEnabled(CustomComboPreset.MCH_ST_Adv_WildFire))
{

//钻头都没学 直接用吧
if (!LevelChecked(钻头Drill))
{
return 野火Wildfire;
}

if (gauge.Heat >= 50 && ActionReady(野火Wildfire) && CanSpellWeavePlus(actionID))
{

Expand All @@ -398,9 +408,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim






if (GetCooldownRemainingTime(回转飞锯ChainSaw) < 1.5f
&& GetCooldownRemainingTime(空气锚AirAnchor) > 8
&& GetCooldownRemainingTime(钻头Drill) > 8
Expand Down Expand Up @@ -587,7 +594,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim




// Service.ChatGui.Print($"整备Reassemble3");

// TOOLS!! ChainSaw Drill Air Anchor
if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassembled)
Expand Down Expand Up @@ -703,16 +710,39 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
}

}

if (IsEnabled(CustomComboPreset.MCH_ST_Adv_HeatBlast))
{
if (gauge.IsOverheated && LevelChecked(热冲击HeatBlast))
{
return 热冲击HeatBlast;
}

}

if (IsEnabled(CustomComboPreset.MCH_ST_Adv_Reassembled)
&& !整备ReassembleV2.LevelChecked()
&& HasCharges(整备Reassemble))
{
if (OriginalHook(热弹HotShot).GCDActionReady(狙击弹CleanShot)
|| 钻头Drill.GCDActionReady(狙击弹CleanShot)
|| 回转飞锯ChainSaw.GCDActionReady(狙击弹CleanShot))
{
if (InCombat())
{
if (CanSpellWeavePlus(actionID))
{
return 整备Reassemble;
}
}
else
{
return 整备Reassemble;
}
}
}


//三大件
if (ReassembledTools(ref actionID))
return actionID;
Expand All @@ -731,9 +761,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
//1-2-3 Combo
if (comboTime > 0)
{
if (lastComboMove is 分裂弹SplitShot or 热分裂弹HeatedSplitShot && LevelChecked(OriginalHook(独头弹SlugShot)))
if (lastComboMove is 分裂弹SplitShot or 热分裂弹HeatedSplitShot && LevelChecked(OriginalHook(独头弹SlugShot)))
return OriginalHook(独头弹SlugShot);

if (lastComboMove is 独头弹SlugShot or 热独头弹HeatedSlugshot && LevelChecked(OriginalHook(狙击弹CleanShot)))
return OriginalHook(狙击弹CleanShot);
}
Expand Down
17 changes: 17 additions & 0 deletions XIVSlothComboX/Extensions/UIntExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ internal static bool GCDActionReady(this uint value, uint gcdActionId)
}
return false;
}


internal static bool GCDActionReady(this uint value, uint gcdActionId,float RemainingTime)
{
if (!CustomComboFunctions.LevelChecked(value))
{
return false;
}

if (CustomComboFunctions.GetCooldownRemainingTime(value) <= 0
|| (CustomComboFunctions.GetCooldownRemainingTime(value) <= CustomComboFunctions.GetCooldownRemainingTime(gcdActionId)
&& CustomComboFunctions.GetCooldownRemainingTime(gcdActionId) < RemainingTime))
{
return true;
}
return false;
}
/// <summary>
/// 能力技好之前的最后一个gcd
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions XIVSlothComboX/Window/Functions/UserConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,9 @@ internal static void Draw(CustomComboPreset preset, bool enabled)
if (preset == CustomComboPreset.MCH_AoE_Adv_GaussRicochet)
UserConfig.DrawAdditionalBoolChoice(MCH.Config.MCH_AoE_Hypercharge, $"Use Outwith {ActionWatching.GetActionName(MCH.超荷Hypercharge)}", "");

if (preset == CustomComboPreset.MCH_Variant_Cure)
UserConfig.DrawSliderInt(1, 100, MCH.Config.MCH_VariantCure, "存几层充能?(0 = 用光,一层不留)", 200);

#endregion
// ====================================================================================
#region MONK
Expand Down
6 changes: 5 additions & 1 deletion XIVSlothComboX/Window/Tabs/Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ internal class DebugCombo : CustomCombo
ImGui.TextUnformatted($"TARGET OBJECT KIND: {Service.ClientState.LocalPlayer.TargetObject?.ObjectKind}");
ImGui.TextUnformatted($"TARGET IS BATTLE CHARA: {Service.ClientState.LocalPlayer.TargetObject is BattleChara}");
ImGui.TextUnformatted($"PLAYER IS BATTLE CHARA: {LocalPlayer is BattleChara}");
ImGui.TextUnformatted($"Level: {Service.ClientState.LocalPlayer.Level}");
ImGui.TextUnformatted($"IN COMBAT: {CustomComboFunctions.InCombat()}");
ImGui.TextUnformatted($"ActionWatching.CombatActions.Count: {ActionWatching.CombatActions.Count}");
ImGui.TextUnformatted($"IN MELEE RANGE: {CustomComboFunctions.InMeleeRange()}");
Expand All @@ -67,6 +68,7 @@ internal class DebugCombo : CustomCombo
ImGui.TextUnformatted($"LAST SPELL: {ActionWatching.GetActionName(ActionWatching.LastSpell)}");
ImGui.TextUnformatted($"LAST ABILITY: {ActionWatching.GetActionName(ActionWatching.LastAbility)}");
ImGui.TextUnformatted($"ZONE: {Service.ClientState.TerritoryType}");


// ImGui.TextUnformatted($"buff : {CustomComboFunctions.GetBuffRemainingTime(PLD.Buffs.DivineMight)}");
// ImGui.TextUnformatted($"王权层数 : {CustomComboFunctions.GetBuffStacks(PLD.Buffs.忠义之剑SwordOath)}");
Expand Down Expand Up @@ -105,10 +107,12 @@ internal class DebugCombo : CustomCombo
// ImGui.TextUnformatted($"倍攻DoubleDown : {CustomComboFunctions.GetCooldownRemainingTime(GNB.倍攻DoubleDown)}");


//机工 start
// 机工 start
// ImGui.TextUnformatted($"倒计时 : {Countdown.TimeRemaining()} HasPrePullCooldowns:{MCHOpenerLogic.HasPrePullCooldowns()} HasCooldowns:{MCHOpenerLogic.HasCooldowns()}");
// ImGui.TextUnformatted($"HasPrePullCooldowns:{MCHOpenerLogic.HasPrePullCooldowns()} HasCooldowns:{MCHOpenerLogic.HasCooldowns()}");
// ImGui.TextUnformatted($"倒计时 : {Countdown.TimeRemaining()} ");
ImGui.TextUnformatted($"整备ReassembleV2 : {MCH.整备ReassembleV2.LevelChecked()} ");
ImGui.TextUnformatted($"整备ReassembleV21 : {CustomComboFunctions.GetLevel(MCH.整备ReassembleV2)} ");
;
;
;
Expand Down
2 changes: 1 addition & 1 deletion XIVSlothComboX/XIVSlothComboX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Authors>Aki, k-kz, ele-starshade, damolitionn, Taurenkey, Augporto, grimgal, Genesis-Nova, Tartarga</Authors>
<Company>-</Company>
<Version>3.0.19.8</Version>
<Version>3.0.19.9</Version>
<!-- This is the version that will be used when pushing to the repo.-->
<Description>XIVCombo for lazy players</Description>
<Copyright>Copyleft attick 2021 thanks attick UwU</Copyright>
Expand Down
Binary file modified release/XIVSlothComboX/latest.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions release/pluginmaster.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"Punchline": "Condenses combos and mutually exclusive abilities onto a single button - and then some.",
"Description": "Condenses combos and mutually exclusive abilities onto a single button - and then some.",
"InternalName": "XIVSlothComboX",
"AssemblyVersion": "3.0.19.8",
"Changelog": "Update Variant",
"AssemblyVersion": "3.0.19.9",
"Changelog": "Update MCH",
"RepoUrl": "https://github.com/44451516/XIVSlothCombo/",
"ApplicableVersion": "any",
"DalamudApiLevel": 9,
Expand Down

0 comments on commit a84b28a

Please sign in to comment.