MovingBlocks/DestinationSol

Miner knockback ability is too powerful

BenjaminAmos opened this issue · 2 comments

What you were trying to do

When playing as the Imperial Small ship, I was attempting to attack a small miner ship.

What actually happened

The miner's knockback ability sent both ships flying apart at an absurd speed. My ship got completely crushed by a collision with a nearby asteroid.

How to reproduce

  1. Encounter a miner ship in the wild (try near an asteroid belt).
  2. Attack the ship until flaming but do not destroy it.
  3. The miner ship should attempt to use its ability. If the ship doesn't do it at first, try finding another ship instead.

Game version

develop

Log details

No response

Operating System

Windows

Additional Info

You can find the knockback settings for the small miner ship here.

"ability": {
"type": "knockBack",
"force": 150,
"rechargeTime": 10
},

I don't think it's related to this though. The force applied seems different when flying a larger ship instead. I suspect that the issue may be caused because we're not scaling the knockback force by the player ship's mass.

Vector2 toO = SolMath.distVec(ownerPos, oPos);
float accLen = config.force * perc;
toO.scl(accLen / dst);
o.receiveForce(toO, game, false);
SolMath.free(toO);

I've been testing this in some older (pre-2.0) releases and the ability seems quite strong even then. It's certainly too strong in 1.5.0 and has quite an effect still in 1.1.0. This makes me wonder if this is really a bug at all? The knockback code doesn't really seem to have changed since the game's initial source release.

This is what happens:
DestSolKnockback

I think it's a bug. The fix is included with the new tutorial.