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

Possible to treat emergency illness that you have not discovered! #506

Closed
TheCycoONE opened this issue Dec 24, 2014 · 21 comments · Fixed by #1754
Closed

Possible to treat emergency illness that you have not discovered! #506

TheCycoONE opened this issue Dec 24, 2014 · 21 comments · Fixed by #1754
Assignees
Labels
bug issue type Googlecode Origin P3 Medium Priority

Comments

@TheCycoONE
Copy link
Member

From mark.l1...@hotmail.co.uk on November 13, 2012 15:39:42

I don't know whether this should be possible or not, I suspect not.
I received a fax for several patients with invis' and it said I could treat them. I have not yet discovered invis, but most were treated. After the emergency was over I had an invis' go to the GP and invis' was then discovered.
You can see from the pic that invis' is not in the casebook yet.

Win7 using directx testing 0.11RC with level 6 and the emergency was in Nov of the first year

Attachment: 3a.png

Original issue: http://code.google.com/p/corsix-th/issues/detail?id=1384

@TheCycoONE
Copy link
Member Author

From alexgh...@gmail.com on November 16, 2012 08:25:54

I created a small patch that will discover the disease if you accept an emergency and that disease isn't discovered yet. I don't know how this situation is treated in the original TH. Presumably if somebody offers you an emergency and can tell if you can cure the respective disease, they can also inform you about the existence of that disease and a basic cure for it.

Attachment: fix.diff

@TheCycoONE TheCycoONE added P3 Medium Priority Googlecode Origin bug issue type labels Dec 24, 2014
@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on November 18, 2012 09:39:43

@1: I think we need to discuss this before adding it.
How did the original game work?

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 19, 2012 11:25:41

I have checked this in TH for the same level and I did not get the emergency. I have checked in the SAM files and invis patients should show up from month 2 and as an emergency from month 8 to month 12. As I had not discovered the illness until Feb in year 2 the emergency did not happen. (the first invis patient did not appear until month 13)
I suspect that TH would skip an emergency if it was for an illness you had not discovered, perhaps Edvin can check the SAM files too, as his understanding is better than mine.
I think there was a similar issue or maybe more than one with aliens and was the other with hairyitus?
How did we handle that?
Do we make the disease known or skip the emergency or swap it for something else?

@TheCycoONE
Copy link
Member Author

From alexgh...@gmail.com on November 20, 2012 12:49:46

I think skipping or changing the emergency will create problems with alien DNA (or other emergency only diseases if any are added) because it will cause it to become impossible to get if you don't know it at the beginning of a level. I checked and in the campaign levels it is known but it could be a problem for custom maps.

If an emergency is skipped if you don't know the disease shouldn't it also be skipped if you can't build a cure room to keep it consistent?

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 20, 2012 12:59:13

If you can build the room but have not done so or need to employ someone it tells you this in the fax.
"You will need to build a %s and employ a %s" etc
Otherwise if you can't cure it because you can't build the room you are told this
"You cannot cure this disease at the moment"
So it is a little different to not knowing what is wrong, even though the fax tells you the illness. You have not discovered that illness, which is why I think it must skip it.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 20, 2012 13:00:53

I think with custom maps the illnesses are picked from what is known, I will check this now.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 20, 2012 13:10:20

In world lua
if not disease then
-- Unknown disease! Create a random one instead.
I think that this is with campaign and custom map.
So in my case the disease was known according to the SAM file, but not discovered, yet, otherwise it would have been replaced for something else.

Perhaps it should be changed from known to discovered?

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 23, 2012 11:00:34

Issue 1393 has been merged into this issue.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 23, 2012 12:36:01

In earlier comments I have said a known disease, what I meant was available disease.

@TheCycoONE
Copy link
Member Author

From alexgh...@gmail.com on November 24, 2012 00:21:56

What I meant to say about the alien DNA problem is that I think it will be impossible to get if the disease is available to be learned but is not discovered at the beginning of the level. Because no non-emergency patients with alien DNA will ever come the disease can never be discovered and that will cause any emergencies containing them to be skipped (or changed) so no alien DNA patients will ever appear.

Does anybody know how emergencies were handled in multiplayer games in the original? If the same emergency was offered to more than one player then I don't think emergencies should be skipped or swapped because one player hasn't discovered the disease.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 24, 2012 01:02:22

From what I remember from TH is that patients with alien DNA can walk though the door like other patients. So you should get them before an emergency and it can be discovered, but only by a consultant in the GP Office.

@TheCycoONE
Copy link
Member Author

From alexgh...@gmail.com on November 24, 2012 01:28:50

If you check the file for the alien DNA disease you'll see that the only_emergency flag is set and in a comment for that it says that there are no normal door animations for alien DNA.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 24, 2012 02:42:30

That is not how theme hospital worked it is how CorsixTH is working at the
moment. In TH Aliens would arrive via reception just like any other
patients, not just from emergencies.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on January 08, 2013 02:40:25

Issue 1441 has been merged into this issue.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on September 30, 2013 02:39:28

Issue 1709 has been merged into this issue.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on January 20, 2014 12:24:22

On looking through the TH level files (SAM) alien DNA is technically always available.
There are also two other settings which we don't currently use #gbv.MinimumAbductTime (which is the number of years which must pass before you get aliens) and #gbv.AbductionsPerYear (a limit to the number of aliens that can arrive through the door).
If we are to mimic TH here, then if a disease has not been discovered any emergency would be skipped, not replaced with another one.

So the question is do we mimic TH or do we use the above patch to discover the disease when we get the emergency?

My vote is for mimic TH and skip the emergency, not replace it with another disease either. If you had enough well trained staff you would likely have discovered it soon!

@TheCycoONE
Copy link
Member Author

I still think the most sensible option is to automatically decline an emergency if you can't handle it - just like in real life - it would go to one of your competitors instead.

@MarkL1961
Copy link
Contributor

You can handle it though, it is treatable just not discovered. There are plenty of diseases in the game which are treatable before they are discovered, although this could be poorly thought out sam files.
The error only occurs if you try an view the disease in the casebook as described in the connected issue. Otherwise they are treated and leave like anyone else.

@TheCycoONE
Copy link
Member Author

Emergencies are essentially rewards for having a well managed hospital (as opposed to earthquakes and epidemics which are punitive). In that sense it makes sense to reward research as well as having lots of doctors and rooms.

@MarkL1961
Copy link
Contributor

I have researched the treatment. Emergencies are already diagnosed, they require treatment only.
Just because TH would skip them when you have not discovered the disease could be a bug.
If I could not treat the emergency it will still be offered to me, it would be a mistake to accept it though.
I can treat it, so I accept it.

@Alberth289346
Copy link
Contributor

Alberth289346 commented Jan 14, 2017

Documenting suggested fix:

After accepting the emergency, it is assumed that details of the disease are messaged along with the patient details, leading to discovery of the disease.
Conceptually, this is equal to a doctor discovering the disease in a GP, which is performed by the

self.hospital.research:discoverDisease(patient.disease)

call at line 147 of gp.lua. (As found by TheCycoONE.)

After accepting the emergency fax, the code should check whether the disease is known, and if not, perform the above call.

@lewri lewri self-assigned this Sep 24, 2020
lewri added a commit to lewri/CorsixTH that referenced this issue Nov 21, 2020
Prevent emergencies being available to player if the relevant disease has not been discovered.
TheCycoONE pushed a commit that referenced this issue Nov 24, 2020
* Fix for #1156 #506

Prevent emergencies being available to player if the relevant disease has not been discovered.

* Changes as suggested

Thanks Alberth :)

* Changes as suggested[2]

Thanks again
@lewri lewri added this to Done in 0.65 Release Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue type Googlecode Origin P3 Medium Priority
Projects
No open projects
0.65 Release
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants