Skip to content

Commit

Permalink
prevent preemptive use of potion for % based damage
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed Feb 1, 2025
1 parent a1d207e commit fcbf212
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion BossMod/Autorotation/Standard/xan/AI/DeepDungeon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override void Execute(StrategyValues strategy, ref Actor? primaryTarget,
if (regenAction != default && ShouldPotion(strategy))
Hints.ActionsToExecute.Push(regenAction, Player, ActionQueue.Priority.Medium);

if (potAction != default && Player.PredictedHPRatio <= 0.3f)
if (potAction != default && Player.HPRatio <= 0.3f)
Hints.ActionsToExecute.Push(potAction, Player, ActionQueue.Priority.VeryHigh);
}

Expand Down
1 change: 1 addition & 0 deletions BossMod/Data/Actor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public sealed class Actor(ulong instanceID, uint oid, int spawnIndex, string nam
public bool IsFriendlyNPC => Type == ActorType.Enemy && IsAlly && IsTargetable;
public bool IsStrikingDummy => NameID == 541; // this is a hack, but striking dummies are special in some ways
public int CharacterSpawnIndex => SpawnIndex < 200 && (SpawnIndex & 1) == 0 ? (SpawnIndex >> 1) : -1; // [0,100) for 'real' characters, -1 otherwise
public float HPRatio => (float)HPMP.CurHP / HPMP.MaxHP;
public int PendingHPDiffence => PendingHPDifferences.Sum(p => p.Value);
public int PendingMPDiffence => PendingMPDifferences.Sum(p => p.Value);
public int PredictedHPRaw => (int)HPMP.CurHP + PendingHPDiffence;
Expand Down

0 comments on commit fcbf212

Please sign in to comment.