getting better
This commit is contained in:
parent
634373fa4d
commit
bd55e3031d
5 changed files with 8 additions and 8 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 7.3 MiB After Width: | Height: | Size: 7 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 MiB After Width: | Height: | Size: 5.6 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 339 KiB After Width: | Height: | Size: 316 KiB |
|
|
@ -457,9 +457,9 @@ public class BossRunExecutor : GameExecutor
|
||||||
}
|
}
|
||||||
if (_stopped) return;
|
if (_stopped) return;
|
||||||
|
|
||||||
// Walk back to fight area — fightWorldX/Y carries position from all phases
|
// Walk back to fight area — stop early if boss already spawned nearby
|
||||||
Log.Information("Walking to fight position ({X:F0},{Y:F0})", fightWorldX, fightWorldY);
|
Log.Information("Walking to fight position ({X:F0},{Y:F0})", fightWorldX, fightWorldY);
|
||||||
await WalkToWorldPosition(fightWorldX, fightWorldY);
|
await WalkToWorldPosition(fightWorldX, fightWorldY, cancelWhen: IsBossAlive);
|
||||||
await Sleep(300);
|
await Sleep(300);
|
||||||
Log.Information("Attacking at ring fight position");
|
Log.Information("Attacking at ring fight position");
|
||||||
await AttackBossUntilGone(fightWorldX, fightWorldY);
|
await AttackBossUntilGone(fightWorldX, fightWorldY);
|
||||||
|
|
@ -548,7 +548,7 @@ public class BossRunExecutor : GameExecutor
|
||||||
/// Start background combat loop, returning the task and CTS.
|
/// Start background combat loop, returning the task and CTS.
|
||||||
/// Caller must cancel + await + ReleaseAll when done.
|
/// Caller must cancel + await + ReleaseAll when done.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private (Task combatTask, CancellationTokenSource cts) StartCombatLoop(int x = 1280, int y = 660, int jitter = 30)
|
private (Task combatTask, CancellationTokenSource cts) StartCombatLoop(int x = 1280, int y = 660, int jitter = 0)
|
||||||
{
|
{
|
||||||
_combatTargetX = x;
|
_combatTargetX = x;
|
||||||
_combatTargetY = y;
|
_combatTargetY = y;
|
||||||
|
|
@ -771,7 +771,7 @@ public class BossRunExecutor : GameExecutor
|
||||||
|
|
||||||
private async Task AttackAtPosition(int x, int y, int durationMs)
|
private async Task AttackAtPosition(int x, int y, int durationMs)
|
||||||
{
|
{
|
||||||
var (combatTask, cts) = StartCombatLoop(x, y, jitter: 20);
|
var (combatTask, cts) = StartCombatLoop(x, y, jitter: 0);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sw = Stopwatch.StartNew();
|
var sw = Stopwatch.StartNew();
|
||||||
|
|
@ -790,7 +790,7 @@ public class BossRunExecutor : GameExecutor
|
||||||
|
|
||||||
private async Task AttackUntilBossDead(int x, int y, int timeoutMs)
|
private async Task AttackUntilBossDead(int x, int y, int timeoutMs)
|
||||||
{
|
{
|
||||||
var (combatTask, cts) = StartCombatLoop(x, y, jitter: 20);
|
var (combatTask, cts) = StartCombatLoop(x, y, jitter: 0);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sw = Stopwatch.StartNew();
|
var sw = Stopwatch.StartNew();
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class CombatManager
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// One combat iteration: flask check, mana-based click/hold, mouse jitter toward target.
|
/// One combat iteration: flask check, mana-based click/hold, mouse jitter toward target.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task Tick(int x, int y, int jitter = 30)
|
public async Task Tick(int x, int y, int jitter = 0)
|
||||||
{
|
{
|
||||||
await _flasks.Tick();
|
await _flasks.Tick();
|
||||||
await UseAbilities();
|
await UseAbilities();
|
||||||
|
|
@ -88,8 +88,8 @@ public class CombatManager
|
||||||
_smoothX += (x - _smoothX) * SmoothFactor;
|
_smoothX += (x - _smoothX) * SmoothFactor;
|
||||||
_smoothY += (y - _smoothY) * SmoothFactor;
|
_smoothY += (y - _smoothY) * SmoothFactor;
|
||||||
|
|
||||||
var mouseX = (int)_smoothX + Rng.Next(-jitter, jitter + 1);
|
var mouseX = (int)_smoothX;
|
||||||
var mouseY = (int)_smoothY + Rng.Next(-jitter, jitter + 1);
|
var mouseY = (int)_smoothY;
|
||||||
|
|
||||||
var mana = _hudReader.Current.ManaPct;
|
var mana = _hudReader.Current.ManaPct;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue