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

(Testing phase only!) Removes click combat, adds swing combat, Removes RNG block, adds active block #76928

Closed
wants to merge 201 commits into from

Conversation

MrMelbert
Copy link
Contributor

@MrMelbert MrMelbert commented Jul 17, 2023

About The Pull Request

2023-05-22.17-02-07.mp4

Implements swing combat as according to the following document.

Gameplay changes:

  • All attacking require combat mode now.
  • Clicking on a guy will no longer attack them. Instead, you will swing at their turf.
    • This means existing combat skills carry over 1:1. Successfully clicking a guy will attack.
    • You can click on a turf far away from you to swing in that direction.
    • For a majority of weapons, a swing at a turf affects just that turf, making weapons behave as they did before.
  • Some weapons now have larger swing arcs. A baseball bat swings at three turfs in front of you, for example.
    • Many wielded weapons, such as fire axes or spears now require wielding to enact their swing.
  • RNG block is removed. All blocking is done via active blocking by holding down "resist".
    • You can block with pretty much everything, but it is likely not a good idea.
    • Blocking an attack will stop all side effects of the attack and change the damage you would have taken into stamina damage.
    • The amount of stamina damage you take is applied with a multiplier. This multiplier depends on the ability of the weapon.
      • Shields are good at blocking most attacks.
      • Energy swords can handily block all laser or energy projectiles with no stamina damage taken.
    • Hulks cannot block but are better at breaking an opponents block (their attacks confer more stamina damage).
  • Punches are also swings. As are hugs, grabs, and disarms.

Code changes:

  • Massive amount of click chain, combat, and defense refactoring.
    • Removed a ton of mob implementations of attack_x. It's all handled by swings. This makes combat a ton more consistent.

image

Todo:

  • Remove all my todo comments
  • Batons block is based on their force and not stamina damage, not intended.
  • A lot of mobs seemingly don't work, particularly mining mobs
  • The syndicate bible cannot heal
  • Wallmounts and border objects (cursed)
  • Flashes don't work right
  • Baton
  • Repairing limbs with a welder / cable
  • Borg crowbarring
  • Many tests

Fixes #72812

Why It's Good For The Game

As outlined in the document, this aims to make melee combat much more dynamic and accessible.

Melee weapon variety will (ideally) be a lot less static and a lot more varied - rather than always opting for the highest force and greatest block chance, you may want to opt for a different weapon type depending on where you're fighting or what you're fighting.

Pixel hunting is massively reduced, reducing the passive advantage of having smaller sprites / advantage of having larger sprites, while also making it much more accessible to newer players.

This can also amend the staleless of melee combat being entirely focused on "who stuns first" - being able to block a hit before being floored may result in more drawn out duels.

Changelog

This needs to be filled out a bit more later.

🆑 Melbert
add: Adds swing combat.
del: Removes click combat.
add: Adds active blocking by holding "resist".
del: Removes RNG block.
/:cl:

@tgstation-server tgstation-server removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Sep 27, 2023
@Sightld2
Copy link
Contributor

Janitor cyborg can't wet their mop in their bucket apparently

@AtomTheProphet
Copy link
Contributor

AtomTheProphet commented Sep 28, 2023

The knock heretic cannot unlock airlocks, consoles or lockers. The rust heretic cannot rust airlocks, consoles, or lockers either but everything else works.

@DefinitelyNotATraitor
Copy link

seems like, when using the crusher as a miner on lavaland, trophies do not drop when swing combat. goliaths and legions attack much faster than they should; goliaths do not telegraph their sped up attacks. Blood-Drunk is incapable of hitting in melee combat (You avoid the blood-drunk miner's nuzzle!)

@isotope436
Copy link

makes it basically impossible to fight in groups and makes accidental hitting 100x for common (especially in medbay)

@DefinitelyNotATraitor
Copy link

you can't emag borgs with swing combat.

@Angustmeta
Copy link
Contributor

  In fact, trying to click on the wallmount instead hits yourself.

To add to this.

  1. Punching buttons (light switches, fire alarms) diagonally does weird animation and permanently makes you unable to move. Breaks/disconnects client repeatedly.
  2. Punching vendor opens its menu.
2023-09-28.10-08-28.Swing.test.bugs.mp4

Runtimes:

[09:30:58] Runtime in garbage.dm,433: /datum/light_source destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic
proc name: qdel (/proc/qdel)
usr: Angust/(Gus Banner)
usr.loc: (Shared Engineering Storage (124,72,4))
src: null
call stack:
qdel(/datum/light_source (/datum/light_source), 0)
the light switch (/obj/machinery/light_switch/directional/north): update light()
the light switch (/obj/machinery/light_switch/directional/north): set light(0, null, -99999, null, null, null)
the light switch (/obj/machinery/light_switch/directional/north): update icon state()
the light switch (/obj/machinery/light_switch/directional/north): update icon(16777215)
the light switch (/obj/machinery/light_switch/directional/north): update appearance(16777215)
the light switch (/obj/machinery/light_switch/directional/north): update appearance(16777215)
the light switch (/obj/machinery/light_switch/directional/north): update appearance(16777215)
the light switch (/obj/machinery/light_switch/directional/north): set lights(1)
the light switch (/obj/machinery/light_switch/directional/north): interact(Gus Banner (/mob/living/carbon/human))
...
Gus Banner (/mob/living/carbon/human): click on without item(the light switch (/obj/machinery/light_switch/directional/north), 1, null)
/datum/component/redirect_atta... (/datum/component/redirect_attack_hand_from_turf): on attack hand(the reinforced wall (123,73,4) (/turf/closed/wall/r_wall), Gus Banner (/mob/living/carbon/human), null)
the reinforced wall (123,73,4) (/turf/closed/wall/r_wall): attack hand(Gus Banner (/mob/living/carbon/human), null)
the reinforced wall (123,73,4) (/turf/closed/wall/r_wall): attack hand(Gus Banner (/mob/living/carbon/human), null)
/datum/attack_style/unarmed/ge... (/datum/attack_style/unarmed/generic_damage/limb_based/punch): collide with solid atom(the reinforced wall (123,73,4) (/turf/closed/wall/r_wall), the human left arm (/obj/item/bodypart/arm/left), Gus Banner (/mob/living/carbon/human))
/datum/attack_style/unarmed/ge... (/datum/attack_style/unarmed/generic_damage/limb_based/punch): execute attack(Gus Banner (/mob/living/carbon/human), the human left arm (/obj/item/bodypart/arm/left), /list (/list), the reinforced plasma window (/obj/structure/window/reinforced/plasma/fulltile), 0)
/datum/attack_style/unarmed/ge... (/datum/attack_style/unarmed/generic_damage/limb_based/punch): process attack(Gus Banner (/mob/living/carbon/human), the human left arm (/obj/item/bodypart/arm/left), the reinforced plasma window (/obj/structure/window/reinforced/plasma/fulltile), 0)
Gus Banner (/mob/living/carbon/human): click on without item at range(the reinforced plasma window (/obj/structure/window/reinforced/plasma/fulltile), /list (/list))
the reinforced plasma window (/obj/structure/window/reinforced/plasma/fulltile): Click(the plating (120,74,4) (/turf/open/floor/plating), "mapwindow.map", "icon-x=26;icon-y=32;left=1;but...")
Angust (/client): Click(the reinforced plasma window (/obj/structure/window/reinforced/plasma/fulltile), the plating (120,74,4) (/turf/open/floor/plating), "mapwindow.map", "icon-x=26;icon-y=32;left=1;but...")

[[09:30:58] Runtime in garbage.dm, line 433: /datum/light_source destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic]

@Higgin
Copy link
Contributor

Higgin commented Sep 28, 2023

Putting a spraycan into a mortar or grinder no longer works and appears to be trying to paint the object (I suspect it's treated as a reagent container or thing like a syringe dropper, but haven't duplicated with any other items like it.

Rags/soap cannot be used to clean microwaves.

Using rag/soap on a storage item tries to wash instead of putting it in.

@Deathfox666
Copy link

drake can attack you in the lava trap move so you just die if you have to stand next to them

* Convert attack telegraph to a style component rather than a mob component
Change some mob click keybindings

* Reapply basic mob melee cooldown

* Don't shoot and melee in the same click
@tgstation-server tgstation-server added the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Oct 2, 2023
@tgstation-server tgstation-server removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Oct 3, 2023
@Mechanelize
Copy link

wearing krav maga gloves breaks shoves among other issues

@github-actions
Copy link
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale Even the uncaring universe rejects you, why even go on label Oct 13, 2023
@MrMelbert
Copy link
Contributor Author

MrMelbert commented Oct 13, 2023

I'm closing the first round of testing now. I'm unhappy with the scale of the PR and the code quality at the moment, and I'd like to work on other refactors, primarily involving the attack chain, to make this easier & less buggy to accomplish going forward.

(Also the Holidays are coming up and I'm not going to be able to keep this updated and merge-conflict-free during then.)

I'll be back in, I dunno, 4 months? Unless something bad happens.

@MrMelbert MrMelbert closed this Oct 13, 2023
@LemonInTheDark
Copy link
Member

literally in tears

@TetrakoHateThis
Copy link

Lost to time, never to return.

@nikothedude
Copy link
Contributor

IT WILL COME BACK.....

@Rex9001
Copy link
Contributor

Rex9001 commented Apr 9, 2024

Necrroooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Exposes new bugs in interesting ways Removal This was too fun, too fun! I'm turning this feature around Sprites A bikeshed full of soulless bikes. Stale Even the uncaring universe rejects you, why even go on 📌 Test Merge Candidate This version will not be removed by actions when the PR is updated Test Merge Only I'm too scared to suggest this as a real change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

By not being in combat mode, unarmed strikes bypass blocking mechanics entirely.