-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Added attack vectors to martial arts techniques #53954
Added attack vectors to martial arts techniques #53954
Conversation
The game has body sublocations. For example at https://github.com/CleverRaven/Cataclysm-DDA/pull/53954/files#diff-2cd8dac3d0903ca1ee60a47c28e09bcb56290214bc8d1fe5cf4afaed108b9d92R710-R711 you could instead specify The list of current sublocations are in bodyparts.json |
Character anatomy is about to become much more fluid, so I'd advise against using hardcoded bodypart ids. You could instead filter by bodypart type + a bool for nonstandard attacks, and accept the vector as valid if the player has a functioning limb of that type that doesn't deviate too much from normal anatomy to be usable. Something like |
Building on Venera3's comment, FOOT, LEG, THROW. and GRAPPLE currently describe them as being used when both limbs are available. For THROW and GRAPPLE I'd say at least two "arms" (even for e.g. a six armed naga), while FOOT and LEG would require > number of legs / 2, so two legged critters would still require both, while centaurs and other quadrupeds would require at least 3 (1 to hit with and two for balance). With hexopeds and octopeds I think half +1 would be good enough, although some combinations of fewer limbs would probably still work, while some won't. |
I could see something like |
Well, that complicates things. That going to mean a lot more checking and that it is going to be harder to manage since the code used to find the outer most clothing layer isn't ideal.
I probably need to wait until that is done since that is going to completely break my work.
Maybe in the MMA mod but not in the base game. I see those martial arts being too niche and hard to explain how they came to be since most martial arts are dervided from older styles and it takes a lot of type to adapt into new forms for humans let alone mutants. Furthermore, mutant limbs are going disqualify players from using certain techniques. You can't Roundhouse Kick as a centaur. Any kick from a horse body would not be supported by any existing martial arts style. Likewise, having tentacles instead for arms would prevent you from doing punches. Sure you could argue that you could do a Boxing Jab with a tentacle the same way as with an arm but the Boxing is taught with arms in mind and the Jab wouldn't work the same way due to the large amount of differences between those limbs. I can see all of this getting messy with game balance too. I might want to shelve this draft and rethink all of this. |
The way I'd handle this little can of worms is:
I agree on mutant MAs being either mod content or gated differently - some combination of EOC + time/skill based progression so an Apex predator Chimera could "develop their own style" (in reality a predefined MA that's not attainable any other way). |
Can you add to the PR description that this fixes #52001? |
@Hymore246 does this close #42451? |
@Hymore246 This is huge! Thanks for doing this. Quick question: does this fix the issue where reach attacks are not triggering non-feint techniques?? If not, I can write out a bug report for it. |
Last time I checked, reach attacks were triggering feint as long as it was a valid style weapon. Did that change? |
@Hymore246 Sorry for the confusion! I didn't not say feints were triggering. It's the non-feint moves that aren't not non-triggering. I kid! But I think if you reread my previous post you'll find it much easier to parse after reading these last couple of sentences. The gist: reach feints seem fine; it's the other techniques. MA techniques as well as weapon-inherent techniques seem to have this issue. |
Reach weapons can trigger techs if you are next to a target. They cannot trigger from reach attacks. Allowing this would a big power creep and I am unsure if it is a good idea to allow it since kiting is a very strong way to to fight. |
@Hymore246 does this close #42451? |
Summary
Balance "Added attack vectors to martial arts techniques"
Purpose of change
Adds a way to attack with different parts off the body with martial arts techniques
Fixes #48410
Fixes #52001
Describe the solution
Currently, all martial arts techniques are performed with the player's held weapon for melee techniques and with the "hands" for unarmed techniques. There is no way at the moment to designate what part of the body you are attacking with or what sort of attack you are performing. As a result, kicks are performed with the player's arms and you end up with problems such as #48410. It is also impossible to perform an unarmed attack while armed. For example, Karate cannot perform a Roundhouse Kick while holding a quarterstaff.
The solution is to add "attack vectors" to every technique. An attack vector tells the game how an attack will be performed by the user. Boxing's Jab, Cross, and Uppercut uses
HAND
while Karate's Roundhouse Kick usesFOOT
. It will be possible to designate multiple attack vectors and the player will be forbidden to use an technique with an attack vector they cannot use. For example, you can't punch if both your hands are broken. Lastly, attack vectors can also be used to designate non-limb attacks such as attacking with a weapon or performing a throw/grapple attack. Below is a list of planned attack vectors, examples of attacks that will use the attack vector, and the requirement to use the attack vector:LIST OF ATTACK VECTORS
NEW MARTIAL ARTS ATTRIBUTES
Martial art techniques have two new attributes
attack_vectors
andattack_vectors_random
.attack_vectors
is a technique attribute that indicates a list of possible ways to use the technique. For example, Cross would be"attack_vectors": [ "HAND" ]
. This attribute works using priority. For example, if a technique had"attack_vectors": [ "WEAPON", "HAND" ]
, the game would always try to hit with a style weapon first and only tries to hit with your hands if you had no weapon.attack_vectors_random
works the same way asattack_vectors
but picks randomly from its list instead of using priority. For example, Power Kick would be"attack_vectors_random": [ "LEG", "FOOT" ]
and could hit with either the leg or foot. This attribute will only be used if all choices fromattack_vectors
are not usable.Both
attack_vectors
andattack_vectors_random
are optional attributes and will not cause JSON errors if either is excluded from a technique. However, if both attributes are excluded (i.e. empty lists) the technique will never be able to trigger since no attack vector was given. Defensive technique (feint and grab break) do not need either attribute and will be ignored even if given.UPDATE TO DAMAGE FORMULAS
Because #41209 added a way to use gloves to boost unarmed damage, this PR will expand on that idea and allow all forms of clothing to improve unarmed damage. This means your
FOOT
techniques will do more damage if your were wearing something like Steel-Toed Boots. The damage formulas will also be updated to allow you to attack with an unarmed technique while holding a weapon such as Karate using a Roundhouse Kick while holding a quarterstaff.LIST OF TECHNIQUE ATTACK VECTORS
Below is the complete list of all techniques in the CDDA and the MMA mod with their proposed attack vectors:
Testing
Certain techniques such as Karate's Roundhouse Kick should now trigger when holding a staff. Testing this is as simple as holding a staff and attacking with karate a few times.
Wearing different types of clothing and attacking with the same style and technique should cause the average damage done to change.
Finally, breaking limbs that are required for specific techniques should prevent those techniques from triggering when fighting.
Additional context
This all started because I couldn't get Karate's Roundhouse Kick to work while holding a weapon. Sometime you only need to make a minor change for a big impact but other times, the reverse is true.