Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samurai + Reaper #301

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion XIVComboPlugin/Configuration/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public enum CustomComboPreset : long
[CustomComboInfo("Iaijutsu into Tsubame", "Replace Iaijutsu with Tsubame after using an Iaijutsu", 34)]
SamuraiTsubameCombo = 1L << 56,

[CustomComboInfo("Ogi Namikiri Combo", "Replace Ikishoten with Ogi Namiki and Kaeshi Namikiri when appropriate", 34)]
[CustomComboInfo("Ogi Namikiri Combo", "Replace Ikishoten with Ogi Namiki > Kaeshi Namikiri > Zanshin", 34)]
SamuraiOgiCombo = 1L << 62,


Expand Down Expand Up @@ -188,6 +188,9 @@ public enum CustomComboPreset : long

[CustomComboInfo("Arcane Circle Combo", "Replace Arcane Circle with Plentiful Harvest while you have Immortal Sacrifice.", 39)]
ReaperArcaneFeature = 1L << 30,

[CustomComboInfo("Perfectio", "Replace Enshroud with Perfectio while you have Perfectio Parata", 39)]
ReaperPerfectio = 1L << 31
}

public class CustomComboInfoAttribute : Attribute
Expand Down
106 changes: 84 additions & 22 deletions XIVComboPlugin/IconReplacer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,22 @@ private ulong GetIconDetour(byte self, uint actionID)
if (actionID == SAM.Yukikaze)
{
if (SearchBuffArray(SAM.BuffMeikyoShisui))
{
return SAM.Yukikaze;
}
if (comboTime > 0)
if (lastMove == SAM.Hakaze && level >= 50)
{
if ((lastMove == SAM.Hakaze || lastMove == SAM.Gyofu) && level >= 50)
{
return SAM.Yukikaze;
}
}

if (level >= 92)
{
return SAM.Gyofu;
}

return SAM.Hakaze;
}

Expand All @@ -338,13 +350,26 @@ private ulong GetIconDetour(byte self, uint actionID)
if (actionID == SAM.Gekko)
{
if (SearchBuffArray(SAM.BuffMeikyoShisui))
{
return SAM.Gekko;
}

if (comboTime > 0)
{
if (lastMove == SAM.Hakaze && level >= 4)
if ((lastMove == SAM.Hakaze || lastMove == SAM.Gyofu) && level >= 4)
{
return SAM.Jinpu;
}

if (lastMove == SAM.Jinpu && level >= 30)
{
return SAM.Gekko;
}
}

if (level >= 92)
{
return SAM.Gyofu;
}

return SAM.Hakaze;
Expand All @@ -358,10 +383,20 @@ private ulong GetIconDetour(byte self, uint actionID)
return SAM.Kasha;
if (comboTime > 0)
{
if (lastMove == SAM.Hakaze && level >= 18)
if ((lastMove == SAM.Hakaze || lastMove == SAM.Gyofu) && level >= 18)
{
return SAM.Shifu;
}

if (lastMove == SAM.Shifu && level >= 40)
{
return SAM.Kasha;
}
}

if (level >= 92)
{
return SAM.Gyofu;
}

return SAM.Hakaze;
Expand Down Expand Up @@ -396,15 +431,27 @@ private ulong GetIconDetour(byte self, uint actionID)
}

if (Configuration.ComboPresets.HasFlag(CustomComboPreset.SamuraiOgiCombo))
{
if (actionID == SAM.Ikishoten)
{
if (SearchBuffArray(SAM.BuffOgiNamikiriReady))
{
return SAM.OgiNamikiri;
}

if (JobGauges.Get<SAMGauge>().Kaeshi == Kaeshi.NAMIKIRI)
{
return SAM.KaeshiNamikiri;

}

if (level >= 96 && SearchBuffArray(SAM.BuffZanshinReady))
{
return SAM.Zanshin;
}

return SAM.Ikishoten;
}
}

// NINJA

Expand Down Expand Up @@ -597,23 +644,23 @@ private ulong GetIconDetour(byte self, uint actionID)
if (actionID == AST.Play)
{
var gauge = JobGauges.Get<ASTGauge>();
switch (gauge.DrawnCard)
{
case CardType.BALANCE:
return AST.Balance;
case CardType.BOLE:
return AST.Bole;
case CardType.ARROW:
return AST.Arrow;
case CardType.SPEAR:
return AST.Spear;
case CardType.EWER:
return AST.Ewer;
case CardType.SPIRE:
return AST.Spire;
default:
return AST.Draw;
}
//switch (gauge.DrawnCards)
//{
// case CardType.BALANCE:
// return AST.Balance;
// case CardType.BOLE:
// return AST.Bole;
// case CardType.ARROW:
// return AST.Arrow;
// case CardType.SPEAR:
// return AST.Spear;
// case CardType.EWER:
// return AST.Ewer;
// case CardType.SPIRE:
// return AST.Spire;
// default:
// return AST.Draw;
//}
}

// SUMMONER
Expand Down Expand Up @@ -883,7 +930,15 @@ private ulong GetIconDetour(byte self, uint actionID)
{
if (actionID == RPR.Enshroud)
{
if (SearchBuffArray(RPR.Buffs.Enshrouded)) return RPR.Communio;
if (SearchBuffArray(RPR.Buffs.Enshrouded))
{
return RPR.Communio;
}
else if (SearchBuffArray(RPR.Buffs.PerfectioParata))
{
return RPR.Perfectio;
}

return actionID;
}
}
Expand All @@ -907,8 +962,15 @@ private bool SearchBuffArray(ushort needle)
if (needle == 0) return false;
var buffs = clientState.LocalPlayer.StatusList;
for (var i = 0; i < buffs.Length; i++)
{
//PluginLog.Debug($"Buff Name: {buffs[i].GameData.Name.ToString()} | ID: {buffs[i].StatusId}");

if (buffs[i].StatusId == needle)
{
return true;
}
}

return false;
}
}
Expand Down
10 changes: 7 additions & 3 deletions XIVComboPlugin/JobActions/RPR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ public const uint
Enshroud = 24394,
Communio = 24398,


Egress = 24402,
Ingress = 24401,
Regress = 24403,

ArcaneCircle = 24405,
PlentifulHarvest = 24385;
PlentifulHarvest = 24385,
Perfectio = 36973;

public static class Buffs
{
public const ushort
Enshrouded = 2593,
Threshold = 2595,
ImSac1 = 2592,
ImSac2 = 3204;
ImSac2 = 3204,
PerfectioParata = 3860;
}

public static class Debuffs
Expand All @@ -47,7 +50,8 @@ public const byte
InfernalSlice = 30,
NightmareScythe = 45,
Enshroud = 80,
Communio = 90;
Communio = 90,
Perfectio = 100;
}
}
}
7 changes: 5 additions & 2 deletions XIVComboPlugin/JobActions/SAM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ public const uint
OgiNamikiri = 25781,
Ikishoten = 16482,
KaeshiNamikiri = 25782,
Fuko = 25780;
Fuko = 25780,
Gyofu = 36963,
Zanshin = 36964;

public const ushort
BuffOgiNamikiriReady = 2959,
BuffMeikyoShisui = 1233;
BuffMeikyoShisui = 1233,
BuffZanshinReady = 3855;
}
}
20 changes: 20 additions & 0 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"Author": "Raptor",
"Name": "XIVCombo",
"Description": "XIVCombo",
"InternalName": "XIVCombo",
"AssemblyVersion": "1.0.0.0",
"RepoUrl": "https://github.com/erotpar/XIVComboPluginTest",
"ApplicableVersion": "any",
"DalamudApiLevel": 4,
"IsTestingExclusive": false,
"DownloadCount": 0,
"LastUpdated": "0"
"DownloadLinkInstall": "https://github.com/erotpar/XIVComboPluginTest/archive/refs/tags/release.zip",
"IsHide": false,
"IsTestingExclusive": false,
"DownloadLinkTesting": "https://github.com/erotpar/XIVComboPluginTest/archive/refs/tags/release.zip",
"DownloadLinkUpdate": "https://github.com/erotpar/XIVComboPluginTest/archive/refs/tags/release.zip",
}
]