Skip to content

Commit

Permalink
async ai window
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnifexOptimus committed Nov 30, 2024
1 parent 02f91dc commit 7479e4c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
11 changes: 10 additions & 1 deletion BossMod/AI/AIManagementWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ public void SetVisible(bool vis)
_config.Modified.Fire();
}
}
public void DrawDebug()
{

public override void Draw()
}
private Task UIAsync()
{
ImGui.TextUnformatted($"Navi={_manager.Controller.NaviTargetPos}");
_manager.Beh?.DrawDebug();
Expand Down Expand Up @@ -130,6 +133,12 @@ public override void Draw()
}
_config.Modified.Fire();
}
return Task.CompletedTask;
}

public override void Draw()
{
_ = UIAsync().ConfigureAwait(true);
}

public override void OnClose() => SetVisible(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public override void OnEventCast(Actor caster, ActorCastEvent spell)
}
}
}
class LeapingEarth2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LeapingEarth), new AOEShapeCircle(5));

class JaggedEdge(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.JaggedEdge), 6);
class TuraliStoneIV(BossModule module) : Components.StackWithCastTargets(module, ActionID.MakeSpell(AID.TuraliStoneIV), 6, 4, 4);
class LeporineLoaf(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.LeporineLoaf));
Expand Down Expand Up @@ -266,7 +266,6 @@ public D093LunipyatiStates(BossModule module) : base(module)
.ActivateOnEnter<SonicHowl>()
.ActivateOnEnter<Slabber>()
.ActivateOnEnter<LeapingEarth>()
.ActivateOnEnter<LeapingEarth2>()
.ActivateOnEnter<RockBlast>();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class D90RottenResearcherStates : StateMachineBuilder
public D90RottenResearcherStates(BossModule module) : base(module)
{
TrivialPhase()
.Raw.Update = () => Module.WorldState.Actors.Where(x => x.IsTargetable && !x.IsAlly && x.Position.AlmostEqual(Module.Arena.Center, Module.Bounds.Radius))
.Raw.Update = () => Module.WorldState.Actors.Where(x => !x.IsAlly && x.Position.AlmostEqual(Module.Arena.Center, Module.Bounds.Radius))
.All(x => x.IsDeadOrDestroyed);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public D90StationSpecterStates(BossModule module) : base(module)
TrivialPhase()
.ActivateOnEnter<GlassPunch>()
.ActivateOnEnter<Catapult>()
.Raw.Update = () => Module.WorldState.Actors.Where(x => x.IsTargetable && !x.IsAlly && x.Position.AlmostEqual(Module.Arena.Center, Module.Bounds.Radius))
.Raw.Update = () => Module.WorldState.Actors.Where(x => !x.IsAlly && x.Position.AlmostEqual(Module.Arena.Center, Module.Bounds.Radius))
.All(x => x.IsDeadOrDestroyed);
}
}
Expand Down

0 comments on commit 7479e4c

Please sign in to comment.