forked from awgil/ffxiv_bossmod
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
351f09c
commit 1a7ba89
Showing
14 changed files
with
120 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ public enum Category | |
Ultimate, | ||
Unreal, | ||
Alliance, | ||
Chaotic, | ||
Foray, | ||
VariantCriterion, | ||
DeepDungeon, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
BossMod/Modules/Dawntrail/Chaotic/Ch01CloudOfDarkness/ArenaChanges.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
namespace BossMod.Dawntrail.Chaotic.Ch01CloudOfDarkness; | ||
|
||
class ArenaChanges(BossModule module) : Components.GenericAOEs(module) | ||
{ | ||
private AOEInstance? _aoe; | ||
private static readonly Square[] DefaultPolygon = [new(Ch01CloudOfDarkness.DefaultCenter, 40)]; | ||
private static readonly AOEShapeCustom P1Transition = new(DefaultPolygon, Ch01CloudOfDarkness.Diamond); | ||
private static readonly AOEShapeCustom P2Transition = new(DefaultPolygon, Ch01CloudOfDarkness.Phase2ShapesWD); | ||
private static readonly AOEShapeDonut donut = new(34, 40); | ||
|
||
public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); | ||
|
||
public override void OnEventEnvControl(byte index, uint state) | ||
{ | ||
if (index == 0x00) | ||
switch (state) | ||
{ | ||
case 0x00200010: | ||
SetAOE(P1Transition); | ||
break; | ||
case 0x00020001: | ||
SetAOE(P2Transition); | ||
break; | ||
} | ||
else if (index == 0x02) | ||
switch (state) | ||
{ | ||
case 0x00020001: | ||
SetArena(Ch01CloudOfDarkness.Phase2BoundsND); | ||
break; | ||
case 0x00080004: | ||
SetArena(Ch01CloudOfDarkness.Phase2BoundsWD); | ||
break; | ||
} | ||
} | ||
|
||
public override void OnEventDirectorUpdate(uint updateID, uint param1, uint param2, uint param3, uint param4) | ||
{ | ||
if (updateID != 0x8000000D) | ||
return; | ||
switch (param1) | ||
{ | ||
case 0x10000000: // default arena | ||
Arena.Bounds = Ch01CloudOfDarkness.DefaultArena; | ||
Arena.Center = Ch01CloudOfDarkness.DefaultCenter; | ||
break; | ||
case 0x20000000: // (phase 2) | ||
SetArena(Ch01CloudOfDarkness.Phase2BoundsWD); | ||
break; | ||
case 0x40000000: // diamond arena (phase 1) | ||
SetArena(Ch01CloudOfDarkness.Phase1Bounds); | ||
break; | ||
} | ||
} | ||
|
||
public override void OnCastStarted(Actor caster, ActorCastInfo spell) | ||
{ | ||
if ((AID)spell.Action.ID == AID.DarkDominion) | ||
SetAOE(donut); | ||
} | ||
|
||
private void SetArena(ArenaBoundsComplex bounds) | ||
{ | ||
Arena.Bounds = bounds; | ||
Arena.Center = bounds.Center; | ||
_aoe = null; | ||
} | ||
|
||
private void SetAOE(AOEShape shape) | ||
{ | ||
_aoe = new(shape, Arena.Center, default, WorldState.FutureTime(9)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.