Skip to content

Commit

Permalink
Formatting fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Feb 12, 2024
1 parent c62a79e commit 31ee241
Showing 1 changed file with 33 additions and 25 deletions.
58 changes: 33 additions & 25 deletions BossMod/Modules/PVP/HiddenGorge/GoblinMercenary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,40 @@ public enum OID : uint
BossHelper = 0x233C,
};

public enum AID : uint
{
IronKiss = 14562, // 233C->location, 5,0s cast, range 7 circle
GobfireShootypopsStart = 14563, // 25FA->self, 5,0s cast, range 30+R width 6 rect
GobfireShootypops = 14564, // 25FA->self, no cast, range 30+R width 6 rect
GobspinWhooshdropsTelegraph = 14567, // 233C->self, 1,0s cast, single-target
Plannyplot = 14558, // 25FA->self, 4,0s cast, single-target
GobspinWhooshdrops = 14559, // 25FA->self, no cast, range 8 circle, knockback 15 away from source
GobswipeConklopsTelegraph = 14568, // BossHelper->self, 1,0s cast, single-target
GobswipeConklops = 14560, // Boss->self, no cast, range 30 circle, knockback 15 away from source (note: this looks like ca. 5-30 donut, no idea why it gets detected as a circle)
Discharge = 14561, // Boss->self, no cast, single-target

};
public enum AID : uint
{
IronKiss = 14562, // 233C->location, 5,0s cast, range 7 circle
GobfireShootypopsStart = 14563, // 25FA->self, 5,0s cast, range 30+R width 6 rect
GobfireShootypops = 14564, // 25FA->self, no cast, range 30+R width 6 rect
GobspinWhooshdropsTelegraph = 14567, // 233C->self, 1,0s cast, single-target
Plannyplot = 14558, // 25FA->self, 4,0s cast, single-target
GobspinWhooshdrops = 14559, // 25FA->self, no cast, range 8 circle, knockback 15 away from source
GobswipeConklopsTelegraph = 14568, // BossHelper->self, 1,0s cast, single-target
GobswipeConklops = 14560, // Boss->self, no cast, range 30 circle, knockback 15 away from source (note: this looks like ca. 5-30 donut, no idea why it gets detected as a circle)
Discharge = 14561, // Boss->self, no cast, single-target
};

public enum IconID : uint
{
RotateCCW = 168, // Boss
RotateCW = 167, // Boss
RotateCCW = 168, // Boss
RotateCW = 167, // Boss
};

class GobspinSwipe : Components.GenericAOEs
{
private bool castingGobspin;
private bool castingGobswipe;
private readonly AOEShapeCircle circle = new(8);
private readonly AOEShapeDonut donut = new(5,30);
private readonly AOEShapeDonut donut = new(5, 30);

public override IEnumerable<AOEInstance> ActiveAOEs(BossModule module, int slot, Actor actor)
{
if (castingGobspin)
yield return new(circle, module.PrimaryActor.Position);
if (castingGobswipe)
yield return new(donut, module.PrimaryActor.Position);
}

public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.GobspinWhooshdropsTelegraph)
Expand All @@ -57,19 +60,22 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent
castingGobswipe = false;
}
}

class Knockbacks : Components.Knockback
{
private bool castingGobspin;
private bool castingGobswipe;
private readonly AOEShapeCircle circle = new(8);
private readonly AOEShapeDonut donut = new(5,30);
private readonly AOEShapeDonut donut = new(5, 30);

public override IEnumerable<Source> Sources(BossModule module, int slot, Actor actor)
{
if (castingGobspin)
yield return new(module.PrimaryActor.Position, 15, default, circle, module.PrimaryActor.Rotation, Kind.AwayFromOrigin);
if (castingGobswipe)
yield return new(module.PrimaryActor.Position, 15, default, donut, module.PrimaryActor.Rotation, Kind.AwayFromOrigin);
}

public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.GobspinWhooshdropsTelegraph)
Expand All @@ -87,11 +93,11 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent
}
}

class GobfireShootypops : Components.GenericRotatingAOE
class GobfireShootypops : Components.GenericRotatingAOE
{
private Angle _increment;

private static AOEShapeRect _shape = new AOEShapeRect(32,3);
private static AOEShapeRect _shape = new AOEShapeRect(32, 3);

public override void OnEventIcon(BossModule module, Actor actor, uint iconID)
{
Expand Down Expand Up @@ -120,10 +126,12 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent
AdvanceSequence(0, module.WorldState.CurrentTime);
}
}

class IronKiss : Components.LocationTargetedAOEs
{
public IronKiss() : base(ActionID.MakeSpell(AID.IronKiss), 7) { }
}

class GoblinMercenaryStates : StateMachineBuilder
{
public GoblinMercenaryStates(BossModule module) : base(module)
Expand All @@ -139,14 +147,14 @@ public GoblinMercenaryStates(BossModule module) : base(module)
[ModuleInfo(CFCID = 599, NameID = 7906)]
public class GoblinMercenary : BossModule
{
public GoblinMercenary(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0,0), 0)) {}
public GoblinMercenary(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsCircle(new(0, 0), 0)) { }

protected override void UpdateModule()
{
if (Enemies(OID.Boss).Any(e => e.Position.AlmostEqual(new(0,-125),1)))
Arena.Bounds = new ArenaBoundsSquare(new(0,-124.5f), 16); //Note: the arena doesn't seem to be a perfect square, but it seems close enough
if (Enemies(OID.Boss).Any(e => e.Position.AlmostEqual(new(0,144.5f),1)))
Arena.Bounds = new ArenaBoundsCircle(new(0,144.5f), 30); //Note: the arena doesn't seem to be a perfect circle, but this seems good enough
if (Enemies(OID.Boss).Any(e => e.Position.AlmostEqual(new(0, -125), 1)))
Arena.Bounds = new ArenaBoundsSquare(new(0, -124.5f), 16); //Note: the arena doesn't seem to be a perfect square, but it seems close enough
if (Enemies(OID.Boss).Any(e => e.Position.AlmostEqual(new(0, 144.5f), 1)))
Arena.Bounds = new ArenaBoundsCircle(new(0, 144.5f), 30); //Note: the arena doesn't seem to be a perfect circle, but this seems good enough
}
}
}
}

0 comments on commit 31ee241

Please sign in to comment.