Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reach weapons #11665

Merged
merged 16 commits into from May 29, 2015

Conversation

Projects
None yet
@Coolthulhu
Copy link
Contributor

commented Mar 18, 2015

Implements reach weapons. Uses player::melee_attack function to deal damage and trigger effects (zapback explicitly forbids triggering at range, so no mdef effects).

Uses ranged attack targeting (no aiming allowed).

Bound under f, but allows bayonets with reach. In this case it is a separate gun mode (single fire->burst->aux->reach->back to single). By default the regular bayonet (not pistol, not sword) gets a reach attack.

Range of reach attack is 2, except for awl pike which has 3.

Can hit targets and obstacles in front of the intended target with a chance dependent on user skill and size difference between intended target and one in the way. Can attack through wire fences, except for survivor naginata (which doesn't have the SPEAR tag).

Gave reach attack to all melee spears (with "spear" in name), to awl pike, to pitchfork and to survivor naginata.
Didn't change bullwhip, because it disarms and melee disarming isn't implemented.

Closes #4903

@PropaneSoup

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2015

Very cool! So how does it work for diagonals? Can I select a square two to the northeast? Or one square up and then one to the northeast? Does this let me stab blindly around corners that I can't see?

@Night-Pryanik

This comment has been minimized.

Copy link
Member

commented Mar 18, 2015

Whoa! That was a really old suggestion! Grade A for implementation!

@sparr

This comment has been minimized.

Copy link
Member

commented Mar 18, 2015

Re diagonals, I'd also like to ask if this plays nice with the circular distance option. (note to self: check if gun firing obeys circular distance option in the first place)

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Mar 18, 2015

If the normal bayonet gets a reach attack, the sword bayonet definitely needs to have one, since a sword bayonet is even longer than a normal one.

@Lain-

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2015

Very nice, @sparr raised a valid concern about the "circular distance" option though. Still, very much looking forward to this.

@acidia

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2015

Seems neat! I agree that its a welcomed change but how do you foresee balancing pole weapons? Would you only deal bash instead of pierce/bash when you are at range 0? I see a pike being great if you can keep your opponent far away... would the lunge of a ranged attack take significantly more time?

@sparr

This comment has been minimized.

Copy link
Member

commented Mar 18, 2015

@acidia maybe weapons need a second set of damage stats when used for reach? lots of things change with reach. speed, bash/pierce, damage, etc.

@Snaaty

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2015

And of course now we need awesome zombies with reaching attacks...

Are enemiees that are hard to hit by guns also hard to hit by reaching?

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 18, 2015

@PropaneSoup @sparr Diagonals are handled like ranged weapons, even using the same functions for targeting. Just like with ranged weapons, if you somehow managed to target something out of your range, you'd attack it anyway (no special range checks outside targeting).

@Rivet-the-Zombie I didn't add it because sword bayonet cuts instead of stabbing. Adding it to cutting weapons (except naginata, which is obviously on a long pole) opens up questions about other medium-sized pole weapons like battle axe, makeshift halberd etc.
Not that I have anything against adding it (or any technical problems). Technically it's a trivial change now.

@acidia @sparr Currently uses default stats. Most spears are kinda weak and bayonets risk damaging your gun. Later on each weapon could have more than one set of stats, which would allow things like two-sided weapons (battle hammer is a pick+hammer) and dual-stat reach weapons.
Short spears IRL can easily be wielded closer to body, so only pike-length and cutting reach weapons should suffer from low distance

@Lain- If it works for ranged weapons, it will work for reach ones. With the same ranges too. Awl pike in this one has the same range as bullwhip in master and even the same targeting (except for the lack of confidence and steadiness).

@Snaaty Since reach weapons explicitly use melee attack function for accuracy and damage rolls, spears will hit skeletons and smokers like they would in melee.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

The entire purpose of a sword bayonet is to turn your long gun into a slashing weapon with extended reach; much like the standard utilization of a halberd (five to seven foot handle) or naginata (four to eight foot handle). I'm thinking all of the above should count as 'reach weapons'.

Battle axes usually had a handle around three to four feet in length (sometimes even less) and were not used as a reach weapon, instead being employed as a close-combat chopping/slashing weapon.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2015

Makes sense for halberd and sword bayonet.
With battle axe, I thought we're talking about something like Dane axe rather than horseman's axe. With volume 13, it is bigger than a quarterstaff.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

True on the volume. Perhaps that could be dialed back a bit.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2015

Or maybe make it more like Dane axe instead, nerf bashing and give it reach? It would make it differ more from fire axe - they have very similar stats at the moment.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

Either would work.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2015

During the tests it was pretty smooth.
Since bayonets are mounted underbarrel (like aux weapons), switching from single fire to reach attack should be at most shift+'ff'.
The only way it could be smoother is if I added a dedicated bind for it, like burst firing. If desired, I can add one, because it would be quite simple - the hardest part would be locating a free keybind for it.

I could add automatic switch to reach attack if a ranged one can't be executed (no ammo), but decided against it as it could be confusing ("why is my M4A1 range 2?").

With non-ranged weapons (regular spears), f is very straightforward and literally couldn't be easier. The gun/throw aiming system is useful here, because it can be easily adjusted to other uses - I didn't change a single line of the aiming function.

@sparr

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

OK, time to chime in with a realism/balance concern. I understand why reach would apply to a spear, halberd, flying guillotine, or maybe even a sword bayonet. However, I'm not sure that a regular bayonet deserves reach. A rifle with a knife strapped to it isn't much longer than a normal axe or sword. If a tile is a meter across (which, I know, it isn't officially), many melee weapons have a useful range of about a meter. Saying that a non-sword bayonet has a useful range of two meters doesn't work for me.

A bayonet is meant to give a soldier with a rifle a chance in melee against a soldier with a sword. It doesn't give him an advantage, just more of a chance than he'd have using his sword as a club.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2015

I'll leave it with reach for testing. If someone wants to later remove it, it's a json change.

If it was up to me, all pole weapons like axes would get the reach, to make them compete with combat knives and katanas. Then zombies would get a lunge/charge attack to compete with newly buffed survivors.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

Saying that a non-sword bayonet has a useful range of two meters doesn't work for me.

Assuming the player character's feet are glued to the ground, this would be true.

However, that's not the case. In the hands of someone who knows what they're doing, a bayonet provides some amazing reach.

bayonet thrust

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2015

Hmm. Odd suggestion, perhaps skilled bayonet fighting could be a melee stance?

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

We've already got a copy of FM 23-25 in-game, so I suppose we could rename it to something else, and reuse the name for a book to teach a melee style that improves damage and grants special attacks when using a rifle/bayonet combo.

However I'm still thinking that even an untrained user ought to be able to figure out how to do a basic lunging strike with one, in order to use the reach system.

@Eliijahh

This comment has been minimized.

Copy link

commented Mar 19, 2015

One question: since for rapiers, for example, we have the fencing martial art, that gives as a bonus a special attack which is thrust, how do you harmonize that with your mechanics? Maybe the reach mechanic should be allowed on those weapon too? Or maybe only if you are trained with those weapons, you get access to the reach attack?

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2015

Hmm, I always imagined them as 5 ft x 5 ft. Perhaps my experience in tabletop has skewed my notions.

@sparr

This comment has been minimized.

Copy link
Member

commented Mar 19, 2015

@DavidKeaton 5ft does match better with some game mechanics (and 2ft matches better with others). 5ft would make weapon reach even more rare.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2015

All this does is add another mechanic for folks to have to learn. I never got nethack's pounding. Nah.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2015

Nethack pounding has semi-complex mechanics tied to skills.
Unless you're talking about fencing giving a boost etc. there's no real way of attacking "press f to attack stuff at range" as a complex mechanic. Not without first removing guns from the game.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2015

If it was up to me, all pole weapons like axes would get the reach, to make them compete with combat knives and katanas. Then zombies would get a lunge/charge attack to compete with newly buffed survivors.

That's the problem. All this will do is add even more mechanics and another thing that folks have to learn.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2015

Didn't add anything like that in this PR. This one is only buffing spears and bayonets - both requested in the issue linked.

While it would be a mechanic to learn, it would be a very simple one - one that people already need to learn to use bows and guns. If not wanted or not realistic, it's obviously not mandatory or anything - it's just that it could add a lot to the game.
IRL baseball bats, swords and axes have a longer reach than knives, fists and mouths.

@sparr

This comment has been minimized.

Copy link
Member

commented Mar 20, 2015

@Coolthulhu Yes, 2-3ft weapons have a longer reach than 0-1ft weapons, but those all fall within the scope of one-tile melee combat. The extra reach of the bigger weapons is represented by them doing more damage, more often. You still have to "engage" in melee combat to use them.

As I mentioned above, reaching across a tile in this game isn't like a bat or a sword. It's the domain of pole-arms. If you think a tile is 2ft across, normal weapons can hit things 0-2.5ft away, and reach weapons can hit things 2-4.5ft away. If you think a tile is 4ft across, double those numbers.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2015

Bigger weapons do damage less often, generally, thanks to increased weight/volume. shrug

@kevingranade

This comment has been minimized.

Copy link
Member

commented Mar 20, 2015

I feel like a lunge would be better represented as a "fast move+attack", as in you attack with an intervening square, but you move as part of the attack. This would reserve the actual reach attacks for just spears.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2015

Fencing has that as two techs, but yeah, the step & stab is generally the sounder move. Lunge in fencing terms commits you for a few seconds to recover.

@Turtlicious

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2015

Man this is pretty great, what's holding it up for merging?

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2015

Idk, would love to see it as well.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2015

Philosophical differences and trust issues, short version.

Longer: I'm firmly in the general-playability/RP crowd, and I'm not sold on this not being a gateway to more complex nethack-style combat mechanics that IME demand optimization. (You're better off taking a point of DX!)

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2015

It's not any more complex than using a bullwhip.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Apr 9, 2015

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2015

Not saying it's worse or better, but certainly less complex.
It's not some new obscure mechanic that will require learning, but more of a formalization of an existing one.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2015

I hope to have the weekend free. Heading to Harrisburg tomorrow and Friday, hopefully will have time at some point, whether weekend or Monday, and can give it a shot then if I'm not even more drained.

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2015

I hope your trip is safe bud. :-)

Coolthulhu added some commits Apr 10, 2015

@Frost-wood Frost-wood referenced this pull request Apr 20, 2015

Closed

Unified Attack Menu #12090

Coolthulhu added some commits Apr 22, 2015

Merge branch 'master' into reach-weapons
Conflicts:
	src/game.cpp
	src/player.h

@kevingranade kevingranade merged commit 51b046b into CleverRaven:master May 29, 2015

1 check failed

default Unmergeable pull request.

@Coolthulhu Coolthulhu deleted the cataclysmbnteam:reach-weapons branch Jun 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.