Skip to content

Commit

Permalink
oopC
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed Jan 29, 2025
1 parent cef92dd commit 0259655
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
19 changes: 18 additions & 1 deletion BossMod/ActionQueue/ActionDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ public sealed class ActionDefinitions : IDisposable
public static readonly ActionID IDPotionInt = new(ActionType.Item, 1044165); // hq grade 2 gemdraught of intelligence
public static readonly ActionID IDPotionMnd = new(ActionType.Item, 1044166); // hq grade 2 gemdraught of mind

// deep dungeon consumables
public static readonly ActionID IDSustainingPotion = new(ActionType.Item, 20309);
public static readonly ActionID IDMaxPotion = new(ActionType.Item, 1013637);
public static readonly ActionID IDEmpyreanPotion = new(ActionType.Item, 23163);
public static readonly ActionID IDSuperPotion = new(ActionType.Item, 1023167);
public static readonly ActionID IDOrthosPotion = new(ActionType.Item, 38944);
public static readonly ActionID IDHyperPotion = new(ActionType.Item, 1038956);

// special general actions that we support
public static readonly ActionID IDGeneralLimitBreak = new(ActionType.General, 3);
public static readonly ActionID IDGeneralSprint = new(ActionType.General, 4);
Expand Down Expand Up @@ -219,6 +227,13 @@ private ActionDefinitions()
RegisterPotion(IDPotionInt);
RegisterPotion(IDPotionMnd);

RegisterPotion(IDSustainingPotion, 1.1f);
RegisterPotion(IDMaxPotion, 1.1f);
RegisterPotion(IDEmpyreanPotion, 1.1f);
RegisterPotion(IDSuperPotion, 1.1f);
RegisterPotion(IDOrthosPotion, 1.1f);
RegisterPotion(IDHyperPotion, 1.1f);

// special content actions - bozja, deep dungeons, etc
for (var i = BozjaHolsterID.None + 1; i < BozjaHolsterID.Count; ++i)
RegisterBozja(i);
Expand Down Expand Up @@ -380,7 +395,7 @@ public void RegisterSpell<AID>(AID aid, bool isPhysRanged = false, float instant

private void Register(ActionID aid, ActionDefinition definition) => _definitions.Add(aid, definition);

private void RegisterPotion(ActionID aid)
private void RegisterPotion(ActionID aid, float animLock = 0.6f)
{
var baseId = aid.ID % 500000;
var item = ItemData(baseId);
Expand All @@ -399,6 +414,7 @@ private void RegisterPotion(ActionID aid)
CastTime = castTime,
MainCooldownGroup = cdgroup,
Cooldown = cooldown,
InstantAnimLock = animLock,
};
var aidHQ = new ActionID(ActionType.Item, baseId + 1000000);
_definitions[aidHQ] = new(aidHQ)
Expand All @@ -408,6 +424,7 @@ private void RegisterPotion(ActionID aid)
CastTime = castTime,
MainCooldownGroup = cdgroup,
Cooldown = cooldown * 0.9f,
InstantAnimLock = animLock
};
}

Expand Down
13 changes: 13 additions & 0 deletions BossMod/ActionQueue/Roleplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

public enum AID : uint
{
// palace of the dead/EO transformations
Pummel = 6273,
VoidFireII = 6274,
HeavenlyJudge = 6871,
Rotosmash = 32781,
WreckingBall = 32782,

// magitek reaper in Fly Free, My Pretty
MagitekCannon = 7619, // range 30 radius 6 ground targeted aoe
PhotonStream = 7620, // range 10 width 4 rect aoe
Expand Down Expand Up @@ -262,6 +269,12 @@ public sealed class Definitions : IDisposable
{
public Definitions(ActionDefinitions d)
{
d.RegisterSpell(AID.Pummel);
d.RegisterSpell(AID.VoidFireII);
d.RegisterSpell(AID.HeavenlyJudge);
d.RegisterSpell(AID.Rotosmash);
d.RegisterSpell(AID.WreckingBall);

d.RegisterSpell(AID.MagitekCannon);
d.RegisterSpell(AID.PhotonStream);
d.RegisterSpell(AID.DiffractiveMagitekCannon);
Expand Down
3 changes: 1 addition & 2 deletions BossMod/Autorotation/Standard/xan/AI/DeepDungeon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ private void DoTransformActions(StrategyValues strategy, Actor? primaryTarget, T
return;

Hints.GoalZones.Add(goal);
if (castTime == 0 || Hints.MaxCastTimeEstimate >= (castTime - 0.5f))
Hints.ActionsToExecute.Push(attack, primaryTarget, ActionQueue.Priority.High, targetPos: primaryTarget.PosRot.XYZ());
Hints.ActionsToExecute.Push(attack, primaryTarget, ActionQueue.Priority.High, targetPos: primaryTarget.PosRot.XYZ(), castTime: castTime - 0.5f);
}

private bool ShouldPotion(StrategyValues strategy)
Expand Down

0 comments on commit 0259655

Please sign in to comment.