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

#44459 make disabling a monster an activity with variable duration #44670

Merged
merged 10 commits into from
Jul 17, 2021

Conversation

Autoquark
Copy link
Contributor

@Autoquark Autoquark commented Oct 6, 2020

Summary

Balance "Disabling is now an activity that takes variable time depending on TODO"

Purpose of change

Fixes #44459

Describe the solution

Adds a new activity, ACT_DISABLE, for disabling/reprogramming a robot. Activity is disabled if the bot becomes an invalid target (e.g. hostile bot recovers from stunning) or if it moves. To prevent friendly bots from moving, added a new status worked_on which is applied during the activity and prevents them from moving.

The time to disable a robot in moves is (2000 / (electronics + mechanics)).

Describe alternatives you've considered

Testing

Tested disabling both a nursebot and disabling/reprogramming a manhack (manhacks have special reprogramming options). Tested with a friendly bot and a stunned bot, verifying that the activity is interrupted on a stunned bot when it recovers and that a friendly bot does not move during the activity.

Additional context

Consultation Request: I need suggestions for how the time for the disable activity should be calculated. Any comments on the implementation are also welcome.

Edit: I have gone with the above formula for now, suggestions from more experienced players are still welcome.

@Autoquark Autoquark force-pushed the issue_44459 branch 4 times, most recently from f65dee6 to 7e98071 Compare October 7, 2020 13:24
@Autoquark Autoquark force-pushed the issue_44459 branch 2 times, most recently from f246390 to 34e89f3 Compare October 19, 2020 15:14
@Autoquark Autoquark changed the title [CR] [WIP] #44459 make disabling a monster an activity with variable duration #44459 make disabling a monster an activity with variable duration Oct 20, 2020
@anothersimulacrum anothersimulacrum added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` labels Nov 8, 2020
Copy link
Member

@BrettDong BrettDong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some merge conflicts with present master branch.

src/activity_actor.cpp Outdated Show resolved Hide resolved
src/activity_actor.cpp Outdated Show resolved Hide resolved
@Maleclypse
Copy link
Member

@Autoquark are you still working on this?

@Autoquark
Copy link
Contributor Author

Hi, I had this ready to merge for a while but no one hit the button so it's become out of date. I could fix the conflicts but I don't know what the chances of it actually getting merged are?

@anothersimulacrum
Copy link
Member

As far as I know, the only barrier to this being merged is it having conflicts and the mergers reviewing it.

kevingranade and others added 2 commits July 3, 2021 23:28
Co-authored-by: Binrui Dong <brett.browning.dong@gmail.com>
@kevingranade
Copy link
Member

Cleared some merge conflicts, need to review carefully that I didn't break something.

src/activity_actor.cpp Outdated Show resolved Hide resolved
@kevingranade
Copy link
Member

Yep I mangled the merge dangit. Working on a fix now.

@kevingranade kevingranade merged commit 9f0d77d into CleverRaven:master Jul 17, 2021
anothersimulacrum pushed a commit to anothersimulacrum/Cataclysm-DDA that referenced this pull request Jul 18, 2021
…duration (CleverRaven#44670)

* CleverRaven#44459 disabling a robot is an activity with variable duration
Co-authored-by: Binrui Dong <brett.browning.dong@gmail.com>
Co-authored-by: Kevin Granade <kevin.granade@gmail.com>
pjf added a commit to pjf/Cataclysm-DDA that referenced this pull request Jul 19, 2021
* origin/master:
  Rebalance bionic, fix some weird stats (CleverRaven#46212)
  CleverRaven#44459 make disabling a monster an activity with variable duration (CleverRaven#44670)
@John-Candlebury
Copy link
Member

Did you test if Hub01s Iron Safari mission is still completable with this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabling a Robot takes a flat 100 moves
7 participants