Skip to content

Commit 5eeb64f

Browse files
committed
2 parents 3c9f699 + 8cac298 commit 5eeb64f

File tree

4 files changed

+132
-25
lines changed

4 files changed

+132
-25
lines changed

Presets/Dawntrail/Raids/The Arcadion 12 Savage Phase 2.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Netherworld-far and Netherworld-near
4444
# Idyllic Dream
4545
> [!Warning]
4646
>
47-
> Testing versions may fail
47+
> Do not install both scripts! Pick one.
4848
4949
### [Script] M12S Idyllic Dream
5050
> [!IMPORTANT]
@@ -65,7 +65,16 @@ https://youtu.be/GJApjyNryQo
6565
https://github.com/PunishXIV/Splatoon/raw/refs/heads/main/SplatoonScripts/Duties/Dawntrail/M12S%20Idyllic%20Dream.cs
6666
```
6767

68-
Stored AOEs:
68+
### [Script] [WIP] [Beta]
69+
Idyllic Dream - [based on Tired guide](https://www.youtube.com/watch?v=pL5NGwkaTFs).
70+
```
71+
https://github.com/PunishXIV/Splatoon/raw/refs/heads/main/SplatoonScripts/Duties/Dawntrail/M12S%20P2%20Idyllic%20Dream%20Tired.cs
72+
```
73+
- Can probably be reconfigured for other guides too
74+
- Will show: which tether to pick up, defamation and stack AOEs, stored clone AOEs
75+
- In progress: towers and precise positions for stacks/spreads
76+
77+
Stored AOEs (don't need with either scripts):
6978
```
7079
~Lv2~{"Name":"M12S P2 Twisted Vision (1st set of stored aoes)","Group":"M12S P2","ZoneLockH":[1327],"ConditionalAnd":true,"Freezing":true,"FreezeFor":33.0,"IntervalBetweenFreezes":5.0,"FreezeDisplayDelay":28.0,"ElementsL":[{"Name":"","type":1,"refActorNPCNameID":14379,"refActorRequireCast":true,"refActorCastId":[48098],"refActorUseCastTime":true,"refActorCastTimeMin":1.0,"refActorCastTimeMax":2.0,"refActorComparisonType":6,"Conditional":true,"Nodraw":true},{"Name":"","type":4,"radius":40.0,"coneAngleMin":-45,"coneAngleMax":45,"fillIntensity":0.4,"refActorNPCNameID":14379,"refActorRequireCast":true,"refActorCastId":[46354],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6,"includeRotation":true},{"Name":"","type":1,"radius":10.0,"fillIntensity":0.4,"refActorNPCNameID":14380,"refActorRequireCast":true,"refActorCastId":[46353],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6}]}
7180
~Lv2~{"Name":"M12S P2 Twisted Vision (2nd set of stored aoes)","Group":"M12S P2","ZoneLockH":[1327],"Freezing":true,"FreezeFor":25.0,"IntervalBetweenFreezes":5.0,"FreezeDisplayDelay":11.0,"ElementsL":[{"Name":"","type":1,"refActorNPCNameID":14379,"refActorRequireCast":true,"refActorCastId":[48098],"refActorUseCastTime":true,"refActorCastTimeMin":1.0,"refActorCastTimeMax":2.0,"refActorComparisonType":6,"Conditional":true,"Nodraw":true},{"Name":"","type":4,"radius":40.0,"coneAngleMin":-45,"coneAngleMax":45,"fillIntensity":0.4,"refActorNPCNameID":14380,"refActorRequireCast":true,"refActorCastId":[46352],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6,"includeRotation":true},{"Name":"","type":1,"radius":10.0,"fillIntensity":0.4,"refActorNPCNameID":14380,"refActorRequireCast":true,"refActorCastId":[48303],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6},{"Name":"","type":4,"radius":40.0,"coneAngleMin":-45,"coneAngleMax":45,"fillIntensity":0.4,"refActorNPCNameID":14380,"refActorRequireCast":true,"refActorCastId":[46352],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6,"includeRotation":true,"AdditionalRotation":3.1415927},{"Name":"","type":1,"offY":28.0,"radius":10.0,"Donut":40.0,"color":3355506687,"fillIntensity":0.2,"thicc":4.0,"refActorNPCNameID":14380,"refActorRequireCast":true,"refActorCastId":[48303],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6,"includeRotation":true,"RotationOverride":true,"RotationOverridePoint":{"X":100.0,"Y":100.0}},{"Name":"","type":4,"radius":40.0,"coneAngleMin":-45,"coneAngleMax":45,"fillIntensity":0.4,"refActorNPCNameID":14380,"refActorRequireCast":true,"refActorCastId":[46351],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6,"includeRotation":true,"AdditionalRotation":1.5707964},{"Name":"","type":4,"radius":40.0,"coneAngleMin":-45,"coneAngleMax":45,"fillIntensity":0.4,"refActorNPCNameID":14380,"refActorRequireCast":true,"refActorCastId":[46351],"refActorCastTimeMin":1.0,"refActorCastTimeMax":999.0,"refActorComparisonType":6,"includeRotation":true,"AdditionalRotation":4.712389}],"ForcedProjectorActions":[48303]}

SplatoonScripts/Duties/Dawntrail/M12S P1 Mortal Slayer.cs

Lines changed: 110 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public enum Direction { East, West }
3333
private PlayerData[] _playerOrderForBalls = [];
3434
private List<(BallKind Kind, Direction Dir, int Wave)> _spawnedBalls = [];
3535
private int _waveState;
36-
public override Metadata Metadata => new(1, "Garume");
36+
public override Metadata Metadata => new(2, "Garume");
3737
public override HashSet<uint>? ValidTerritories => [1327];
3838

3939
public Config C => Controller.GetConfig<Config>();
@@ -96,17 +96,105 @@ private bool BuildPlayerOrder()
9696
{
9797
var prio = C.PriorityData.GetPlayers(_ => true)?.ToList();
9898
if (prio?.Count < 8) { DuoLog.Warning($"PriorityData.GetPlayers() returned insufficient players. Count={prio?.Count ?? 0}"); return false; }
99-
var ordered = _spawnedBalls.Chunk(2).SelectMany(chunk => chunk.OrderBy(b => b.Dir == Direction.West ? 0 : 1)).ToArray();
100-
var ret = new PlayerData[ordered.Length];
101-
var purpleSlot = 0; var greenSlot = 2;
102-
for (var i = 0; i < ordered.Length; i++)
103-
{
104-
var b = ordered[i];
105-
var idx = b.Kind == BallKind.Purple ? purpleSlot++ : greenSlot++;
106-
if ((uint)idx >= (uint)prio.Count) { DuoLog.Warning($"Priority index out of range. idx={idx}, prioCount={prio.Count}"); return false; }
107-
var p = prio[idx];
108-
ret[i] = new PlayerData { Direction = b.Dir, Kind = b.Kind, ObjectId = p.IGameObject.EntityId, Name = p.IGameObject.Name.ToString() };
109-
}
99+
100+
var westTank = prio[0]; // MT
101+
var westHealer= prio[1]; // H1
102+
var westMelee = prio[2]; // D1
103+
var westRanged= prio[3]; // D3
104+
var eastTank = prio[4]; // ST
105+
var eastHealer= prio[5]; // H2
106+
var eastMelee = prio[6]; // D2
107+
var eastRanged= prio[7]; // D4
108+
109+
// Purple is always on one side (strategy assumption)
110+
var purpleBalls = _spawnedBalls.Where(x => x.Kind == BallKind.Purple).ToList();
111+
if (purpleBalls.Count != 2)
112+
{
113+
DuoLog.Warning($"Purple ball count is not 2. Count={purpleBalls.Count}");
114+
return false;
115+
}
116+
var purpleSide = purpleBalls[0].Dir;
117+
118+
// Build per-side assignment queues (this is the key change)
119+
List<(uint ObjectId, string Name)> westPurple = new();
120+
List<(uint ObjectId, string Name)> eastPurple = new();
121+
List<(uint ObjectId, string Name)> westGreen = new();
122+
List<(uint ObjectId, string Name)> eastGreen = new();
123+
124+
if (purpleSide == Direction.West)
125+
{
126+
// West has 2 purples, East has 4 greens.
127+
// Tank without purple (EastTank) swaps with ranged on purple side (WestRanged).
128+
westPurple.Add((westTank.IGameObject.EntityId, westTank.IGameObject.Name.ToString())); // 1st purple
129+
westPurple.Add((eastTank.IGameObject.EntityId, eastTank.IGameObject.Name.ToString())); // 2nd purple (swapped tank)
130+
131+
westGreen.Add((westHealer.IGameObject.EntityId, westHealer.IGameObject.Name.ToString())); // green #1
132+
westGreen.Add((westMelee.IGameObject.EntityId, westMelee.IGameObject.Name.ToString())); // green #2
133+
134+
eastGreen.Add((eastHealer.IGameObject.EntityId, eastHealer.IGameObject.Name.ToString())); // green #1
135+
eastGreen.Add((eastMelee.IGameObject.EntityId, eastMelee.IGameObject.Name.ToString())); // green #2
136+
eastGreen.Add((eastRanged.IGameObject.EntityId, eastRanged.IGameObject.Name.ToString())); // green #3
137+
eastGreen.Add((westRanged.IGameObject.EntityId, westRanged.IGameObject.Name.ToString())); // green #4 (swapped ranged)
138+
}
139+
else
140+
{
141+
// East has 2 purples, West has 4 greens.
142+
// Tank without purple (WestTank) swaps with ranged on purple side (EastRanged).
143+
eastPurple.Add((eastTank.IGameObject.EntityId, eastTank.IGameObject.Name.ToString())); // 1st purple
144+
eastPurple.Add((westTank.IGameObject.EntityId, westTank.IGameObject.Name.ToString())); // 2nd purple (swapped tank)
145+
146+
eastGreen.Add((eastHealer.IGameObject.EntityId, eastHealer.IGameObject.Name.ToString())); // green #1
147+
eastGreen.Add((eastMelee.IGameObject.EntityId, eastMelee.IGameObject.Name.ToString())); // green #2
148+
149+
westGreen.Add((westHealer.IGameObject.EntityId, westHealer.IGameObject.Name.ToString())); // green #1
150+
westGreen.Add((westMelee.IGameObject.EntityId, westMelee.IGameObject.Name.ToString())); // green #2
151+
westGreen.Add((westRanged.IGameObject.EntityId, westRanged.IGameObject.Name.ToString())); // green #3
152+
westGreen.Add((eastRanged.IGameObject.EntityId, eastRanged.IGameObject.Name.ToString())); // green #4 (swapped ranged)
153+
}
154+
155+
var ret = new PlayerData[_spawnedBalls.Count];
156+
var wp = 0; var wg = 0; var ep = 0; var eg = 0;
157+
for (var i = 0; i < _spawnedBalls.Count; i++)
158+
{
159+
var b = _spawnedBalls[i];
160+
(uint ObjectId, string Name) pick;
161+
162+
if (b.Dir == Direction.West)
163+
{
164+
if (b.Kind == BallKind.Purple)
165+
{
166+
if (wp >= westPurple.Count) { DuoLog.Warning("West purple overflow"); return false; }
167+
pick = westPurple[wp++];
168+
}
169+
else
170+
{
171+
if (wg >= westGreen.Count) { DuoLog.Warning("West green overflow"); return false; }
172+
pick = westGreen[wg++];
173+
}
174+
}
175+
else
176+
{
177+
if (b.Kind == BallKind.Purple)
178+
{
179+
if (ep >= eastPurple.Count) { DuoLog.Warning("East purple overflow"); return false; }
180+
pick = eastPurple[ep++];
181+
}
182+
else
183+
{
184+
if (eg >= eastGreen.Count) { DuoLog.Warning("East green overflow"); return false; }
185+
pick = eastGreen[eg++];
186+
}
187+
}
188+
189+
ret[i] = new PlayerData
190+
{ Direction = b.Dir,
191+
Kind = b.Kind,
192+
ObjectId = pick.ObjectId,
193+
Name = pick.Name
194+
};
195+
}
196+
197+
110198
for (var i = 0; i < ret.Length; i += 2)
111199
{
112200
var a = ret[i]; var b = ret[i + 1]; var w = i / 2 + 1; var off = a.Direction == b.Direction ? 3f : 0f;
@@ -129,9 +217,7 @@ public override void OnObjectCreation(IntPtr newObjectPtr)
129217
if (_spawnedBalls.Count % 2 == 0) BuildPlayerOrder();
130218
if (_spawnedBalls.Count < 8) return;
131219
_waveState = 1;
132-
_spawnedBalls = _spawnedBalls.Chunk(2)
133-
.SelectMany(chunk => chunk.OrderBy(b => b.Dir == Direction.West ? 0 : 1)).ToList();
134-
});
220+
});
135221
}
136222

137223
public override void OnActionEffectEvent(ActionEffectSet set)
@@ -148,12 +234,12 @@ public override void OnSettingsDraw()
148234
if (ImGui.CollapsingHeader("Guide (JP)"))
149235
{
150236
ImGui.TextWrapped("西側をMT組、東側をST組と見ます。優先順位の1・2番は紫球を受け、それ以降は順番に緑球を受けます。");
151-
ImGui.TextWrapped("例:紫球が MT → OT、緑球の優先が H→近接→遠隔 の場合は「MT OT H1 H2 M1 M2 R1 R2」と入力してください。");
237+
ImGui.TextWrapped("例:紫球が MT → OT、緑球の優先が H→近接→遠隔 の場合は「MT H1 M1 R1 OT H2 M2 R2」と入力してください。");
152238
}
153239
if (ImGui.CollapsingHeader("Guide (EN)"))
154240
{
155241
ImGui.TextWrapped("West = MT, East = OT. Priority 1–2 take purple orbs; everyone after that takes green orbs in order.");
156-
ImGui.TextWrapped("Example: if purple is MT → OT and green priority is H → Melee → Ranged, enter: \"MT OT H1 H2 M1 M2 R1 R2\".");
242+
ImGui.TextWrapped("Example: if purple is MT → OT and green priority is H → Melee → Ranged, enter: \"MT H1 M1 R1 OT H2 M2 R2\".");
157243
}
158244
if (ImGuiEx.CollapsingHeader("Debug"))
159245
{
@@ -177,6 +263,13 @@ public override void OnSettingsDraw()
177263
ImGui.Text($"My index: {Array.FindIndex(_playerOrderForBalls, x => x.ObjectId == Controller.BasePlayer.EntityId)}");
178264
}
179265
}
266+
267+
public override Dictionary<int, string>? Changelog => new()
268+
{
269+
{ 2, "プレイヤーの選出ロジックを修正しました。それに伴い優先順位の設定方法が変わったので一度確認してください。\n" +
270+
"I’ve fixed the player selection logic. Because of that, the way you set the priority order has changed, so please review it once.\n" }
271+
};
272+
180273
public class PlayerData { public Direction Direction; public bool First; public BallKind Kind; public string Name = ""; public uint ObjectId; public float Offset; public string Text = ""; public int Wave, Order; }
181274

182275
public class Config : IEzConfig

SplatoonScripts/Duties/Dawntrail/M12S P1 Snake.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace SplatoonScriptsOfficial.Duties.Dawntrail;
2020

2121
public class M12S_P1_Snake : SplatoonScript
2222
{
23-
public override Metadata Metadata { get; } = new(3, "NightmareXIV, Garume");
23+
public override Metadata Metadata { get; } = new(4, "NightmareXIV, Garume");
2424
public override HashSet<uint>? ValidTerritories { get; } = [1327];
2525

2626
public enum Debuff
@@ -31,6 +31,7 @@ public enum Debuff
3131
Pos4 = 3451,
3232
Alpha = 4752,
3333
Beta = 4754,
34+
AfterBeta = 4755,
3435
}
3536

3637
public enum DebuffGroup
@@ -301,9 +302,13 @@ public override void OnUpdate()
301302
}
302303
else if(me.Group == DebuffGroup.Beta)
303304
{
304-
var bt = GetBlackTowerInfo(me.TowerOrder);
305-
var soakDone = (bt != null && bt.Removed) || (me.SoakRotation != null && RotationCount > me.SoakRotation);
306-
if(soakDone)
305+
// var bt = GetBlackTowerInfo(me.TowerOrder);
306+
// var soakDone = (bt != null && bt.Removed) || (me.SoakRotation != null && RotationCount > me.SoakRotation);
307+
// var allowCut = soakDone || me.SoakRotation == null || me.CutRotation <= me.SoakRotation;
308+
// var hasBetaNow = BasePlayer != null && HasStatus(Debuff.Beta);
309+
// if(allowCut && hasBetaNow)
310+
var betaRemaining = GetRemainingTime(Debuff.Beta);
311+
if ((betaRemaining < 3f && betaRemaining != 0f) || HasStatus(Debuff.AfterBeta))
307312
{
308313
ShowCutIfDue(me, cutGuide, nextColor, nowColor);
309314
}

SplatoonScripts/update.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ SplatoonScriptsOfficial.Duties.Dawntrail@M8S_Lone_Wolfs_Lament,2,https://github.
5454
SplatoonScriptsOfficial.Duties.Dawntrail@M5S_Lets_Dance,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M5S Lets Dance.cs
5555
SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Sunrise_Sabbath,5,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Sunrise Sabbath.cs
5656
SplatoonScriptsOfficial.Duties.Dawntrail@EX2_Projection_of_Triumph,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/EX2 Projection of Triumph.cs
57-
SplatoonScriptsOfficial.Duties.Dawntrail@M12S_P1_Mortal_Slayer,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M12S P1 Mortal Slayer.cs
57+
SplatoonScriptsOfficial.Duties.Dawntrail@M12S_P1_Mortal_Slayer,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M12S P1 Mortal Slayer.cs
5858
SplatoonScriptsOfficial.Duties.Dawntrail@M10S_Insane_Air,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M10S Insane Air.cs
5959
SplatoonScriptsOfficial.Duties.Dawntrail@EX6_Arcane_Revelation,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/EX6_Arcane_Revelation.cs
6060
SplatoonScriptsOfficial.Duties.Dawntrail@M8S_Ultraviolent_Ray,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M8S Ultraviolent Ray.cs
@@ -63,7 +63,7 @@ SplatoonScriptsOfficial.Duties.Dawntrail@M6S_Target_Enforcer,6,https://github.co
6363
SplatoonScriptsOfficial.Duties.Dawntrail@M8S_Tactical_Pack,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M8S Tactical Pack.cs
6464
SplatoonScriptsOfficial.Duties.Dawntrail@R4S_Midnight_Sabbath,2,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/R4S Midnight Sabbath.cs
6565
SplatoonScriptsOfficial.Duties.Dawntrail@M8S_Rise_of_the_Howling_Wind,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M8S Rise of the Howling Wind.cs
66-
SplatoonScriptsOfficial.Duties.Dawntrail@M12S_P1_Snake,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M12S P1 Snake.cs
66+
SplatoonScriptsOfficial.Duties.Dawntrail@M12S_P1_Snake,4,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M12S P1 Snake.cs
6767
SplatoonScriptsOfficial.Duties.Dawntrail@M8S_Quad_Beckon_Moonlight,3,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M8S Quad Beckon Moonlight.cs
6868
SplatoonScriptsOfficial.Duties.Dawntrail@Underkeep_ValiaPira,1,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/Underkeep_ValiaPira.cs
6969
SplatoonScriptsOfficial.Duties.Dawntrail@M6S_Lava_Towers,6,https://github.com/PunishXIV/Splatoon/raw/main/SplatoonScripts/Duties/Dawntrail/M6S Lava Towers.cs

0 commit comments

Comments
 (0)