mt-mods / spacecannon

2 stars 4 forks source link

Fix projectiles not damaging players #20

Closed kiedtl closed 1 year ago

kiedtl commented 1 year ago

Also significantly up the damage of each cannon. It's a cannon, after all, the old cannons did less damage than even a steel sword. Now they're in the range of mithril/lava swords.

Railguns have a base damage of 10, but in the future could potentially do more damage via specialized slugs... +5 Slugs of Dragon-slaying anyone? :)

This doesn't fix the incorrect logging of player damage, no idea what's causing that.

One outstanding issue is ensuring griefers can't use this to kill others with no consequences. Simply logging the cannon's owner name probably wouldn't fix this, as someone else could potentially trigger another player's cannon via digilines. Maybe log the name of the player who pulled the trigger as well?

kiedtl commented 1 year ago

Actually, one easy solution for murder-prevention is to provide an option to disable it entirely unless they're in the warzone. I have no idea how to cleanly implement that without assuming pandorabox as the host, though.

S-S-X commented 1 year ago

You cannot really know who pulled the trigger unless it is manual cannon formspec trigger and I think not many use that when you can just add external button which is easy to setup and a lot faster to use. It simply just is not possible to know so next best thing to do is to just log cannon owner and position, wouldn't put too much energy into that if cannon owner and position is logged already.

S-S-X commented 1 year ago

Maybe spacecannon.can_damage(obj) should be last check to run, shouldn't make big difference but it actually doesn't make sense to call it for those builtin things, cannon projectile or other stuff that would anyway cancel damage. Yeah I know I made suggestion to place it first but didn't really think about it.

Not sure about increased damage though, is it sensible? Especially with green cannon or other rapid fire cannons you can easily get hit in very rapid succession by multiple rounds and similar with other types. Sure it did seem to be bit low before but also increment might be too high.

I've not actually tested anything in game.

kiedtl commented 1 year ago

Maybe spacecannon.can_damage(obj) should be last check to run, shouldn't make big difference but it actually doesn't make sense to call it for those builtin things, cannon projectile or other stuff that would anyway cancel damage. Yeah I know I made suggestion to place it first but didn't really think about it.

Fair, I wasn't thinking about it either.

Not sure about increased damage though, is it sensible? Especially with green cannon or other rapid fire cannons you can easily get hit in very rapid succession by multiple rounds and similar with other types. Sure it did seem to be bit low before but also increment might be too high.

I don't know. On one hand a cannon mounted on a ship is going to have a hard enough time just being able to get the target into its line of fire (though a future targeting/aiming feature may make it much easier). Once they're in the line of fire though, granted, it'll be easy to rapidly perforate them. Especially with railguns.

I'll lower the damage for now to 5-8-10-6-6 for ion-plasma-nova-rail-helical, we can always raise it later on if needed...

*I just made the commits, GH shows it as being done 11 hours ago because WSL's timekeeping skills are horrible (clock stops when Windows sleeps...)