Loobinex / keeperfx-unofficial

KeeperFX - Unofficial release
60 stars 7 forks source link

Lightning trap's behavior is bugged, attacks any unit within a 3-tile radius when it's duration is over #58

Closed Whurrhurr closed 5 years ago

Whurrhurr commented 6 years ago

At some point during 4.6 unofficial the behavior lighting traps had (shoot lightning at the closest unit to it when triggered) bugged out (unless this change was intentional. never saw any patch note saying that this trap's behavior was changed.) and now when the trap's duration is over it damages every unit within a (i think) 3 tile radius from the trap. even if the unit is from the same team as the trap's owner (i.e green keeper's units get hurt by the lightning trap from this bugged attack when the trap's duration is over even though the trap is owned by green.) this makes lightning traps very effective at weakening large groups of units or even outright killing dozens of units when it shouldn't be able to (went into hero heart room in blaise end by using destroy walls with 60 units. ended with only a mere 17 units. i lost 43 units to the 4 lightning traps on the hero heart tiles.) only got around to reporting it now since i didn't see any post/thread on keeperklan about it (may have missed a post about it) or an issue reported on the git.

spartahawk commented 6 years ago

@Whurrhurr You're right. I'm seeing it in the most recent version at least. And it looks like the damage occurs right at the end of the lightning trap, though no lightning hits the bystander. I'll look into it. Thanks.

spartahawk commented 6 years ago

There's definitely splash damage that decreases with distance.

I might be applying the patch wrong, but I'm even seeing this effect after patching with the official KeeperFX v0.4.6 r1834 patch for example. So I think it predates Unofficial.

@Loobinex were you aware of this already and do you know if it was intentional? Is this merely a property tweaked in a config file for lightning traps?

Loobinex commented 6 years ago

I can't check for a until I'm back home in several days, but I'm sure if it's wrong you'll find the answers starting here: https://code.google.com/archive/p/keeperfx/issues/351

If there's splash damage, it should be magic.cfg. Check the file history on the official branch to see when it was introduced.

On Thu, Sep 13, 2018 at 9:38 PM Doug Hawkes notifications@github.com wrote:

There's definitely splash damage that decreases with distance.

I might be applying the patch wrong, but I'm even seeing this effect after patching with the official KeeperFX v0.4.6 r1834 patch for example. So I think it predates Unofficial.

@Loobinex https://github.com/Loobinex were you aware of this already and do you know if it was intentional?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Loobinex/keeperfx-unofficial/issues/58#issuecomment-421127281, or mute the thread https://github.com/notifications/unsubscribe-auth/ANMxLrrtuZsWe8k011_ZjU-Xp3OZIBeGks5uarQjgaJpZM4Wmlu6 .

spartahawk commented 6 years ago

Okay apparently this area damage was added to lightning trap in 2013. https://github.com/dkfans/keeperfx-stable/commit/a8be34d6e14f62bff1595963722075df4777fb11#diff-5300affb36a67638cfabd683d0eae044R453

Apparently area damage affects all creatures and I'm not sure if that is easily changeable. But if there is demand to make trap area damage not affect friendlies, we can probably do that.

I'd say just remove the area damage from lightning traps, or decrease it. I don't think it makes sense for lightning to have area damage, personally.

Lightning trap was changed to not directly hit allies at one point. https://github.com/dkfans/keeperfx-stable/commit/c308a93c87d32b74273aebd08244033bcb467235 but the area damage still affects all creatures.

Loobinex commented 6 years ago

I think this is worth looking into some more, but I don't think simply removing the area damage is the right approach. (The keeper lightning spell also does area damage when charged by the way)

Currently, the thing with traps is that they do very little against units, and are very powerful against workers. Traps doing area damage mitigates this somewhat, since that is mostly effective against groups of enemy fighters.

The thing is, whatever happens, the player should get proper feedback. I'll get back on this.

Loobinex commented 5 years ago

I've looked into it further and think the area damage can be removed.

The lightning-trap area damage was introduced simultaneously with the area-damage of the lightning-shot (for units) and the latter change was reverted.

When a lightning trap is triggered it will start shooting out SHOT_LIGHTNING_BALL which are currently set at 150 damage per hit, these are the visible lightning arcs. This will go on until the health on SHOT_TRAP_LIGHTNING runs out and will then do the area damage of the SHOT_TRAP_LIGHTNING, which was set at 160 damage over a range of 6 subtiles. I will remove the area damage on this.

The main reason for this is that there is no graphical effect that shows the 'lightning explosion' at the end that does the area damage. If that is ever implemented, we could reintroduce area damage and balance around that.

But all in all, this change won't do that much to the ending of level 18, as the 4 lightning traps and the 8 WOP traps still do significant damage. I don't particularly like this, especially because traps placed on a heart can't be disarmed, but it is by design.