Fix combo action heuristics

This commit is contained in:
Asriel Camora
2024-07-01 09:51:44 -07:00
parent 480cc15cc7
commit e67f263286
3 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -4,5 +4,6 @@ internal sealed class AdvancedTouchCombo() : BaseComboAction<StandardTouchCombo,
ActionType.StandardTouchCombo, ActionType.AdvancedTouch, 18 * 3
)
{
public override bool CouldUse(Simulator s) =>
BaseCouldUse(s) && VerifyDurability3(s, StandardTouchCombo.ActionA.DurabilityCost, StandardTouchCombo.ActionB.DurabilityCost);
}
+3 -2
View File
@@ -43,7 +43,8 @@ public abstract class BaseComboAction(
if (!perfection)
{
durability -= (int)MathF.Ceiling(durabilityA * wasteNots > 0 ? .5f : 1f);
durability -= (int)MathF.Ceiling(durabilityA * (wasteNots > 0 ? .5f : 1f));
if (durability <= 0)
return false;
}
@@ -54,7 +55,7 @@ public abstract class BaseComboAction(
if (wasteNots > 0)
wasteNots--;
durability -= (int)MathF.Ceiling(durabilityB * wasteNots > 0 ? .5f : 1f);
durability -= (int)MathF.Ceiling(durabilityB * (wasteNots > 0 ? .5f : 1f));
if (durability <= 0)
return false;