Fix combo action heuristics
This commit is contained in:
@@ -4,5 +4,6 @@ internal sealed class AdvancedTouchCombo() : BaseComboAction<StandardTouchCombo,
|
|||||||
ActionType.StandardTouchCombo, ActionType.AdvancedTouch, 18 * 3
|
ActionType.StandardTouchCombo, ActionType.AdvancedTouch, 18 * 3
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
public override bool CouldUse(Simulator s) =>
|
||||||
|
BaseCouldUse(s) && VerifyDurability3(s, StandardTouchCombo.ActionA.DurabilityCost, StandardTouchCombo.ActionB.DurabilityCost);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ public abstract class BaseComboAction(
|
|||||||
|
|
||||||
if (!perfection)
|
if (!perfection)
|
||||||
{
|
{
|
||||||
durability -= (int)MathF.Ceiling(durabilityA * wasteNots > 0 ? .5f : 1f);
|
durability -= (int)MathF.Ceiling(durabilityA * (wasteNots > 0 ? .5f : 1f));
|
||||||
|
|
||||||
if (durability <= 0)
|
if (durability <= 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -54,7 +55,7 @@ public abstract class BaseComboAction(
|
|||||||
if (wasteNots > 0)
|
if (wasteNots > 0)
|
||||||
wasteNots--;
|
wasteNots--;
|
||||||
|
|
||||||
durability -= (int)MathF.Ceiling(durabilityB * wasteNots > 0 ? .5f : 1f);
|
durability -= (int)MathF.Ceiling(durabilityB * (wasteNots > 0 ? .5f : 1f));
|
||||||
|
|
||||||
if (durability <= 0)
|
if (durability <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ public class Simulator
|
|||||||
return ActionResponse.ActionNotUnlocked;
|
return ActionResponse.ActionNotUnlocked;
|
||||||
if (action == ActionType.Manipulation && !Input.Stats.CanUseManipulation)
|
if (action == ActionType.Manipulation && !Input.Stats.CanUseManipulation)
|
||||||
return ActionResponse.ActionNotUnlocked;
|
return ActionResponse.ActionNotUnlocked;
|
||||||
if (action is ActionType.CarefulObservation or ActionType.HeartAndSoul && !Input.Stats.IsSpecialist)
|
if (action is ActionType.CarefulObservation or ActionType.HeartAndSoul or ActionType.QuickInnovation && !Input.Stats.IsSpecialist)
|
||||||
return ActionResponse.ActionNotUnlocked;
|
return ActionResponse.ActionNotUnlocked;
|
||||||
if (baseAction.CPCost(this) > CP)
|
if (CalculateCPCost(baseAction.CPCost(this)) > CP)
|
||||||
return ActionResponse.NotEnoughCP;
|
return ActionResponse.NotEnoughCP;
|
||||||
return ActionResponse.CannotUseAction;
|
return ActionResponse.CannotUseAction;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user