Closed AaronMcKenney closed 3 years ago
While it's Tim's role I can atleast admit, that you put a lot of work into it At a first glance I agree with you, but I am wondering about two things, first there shouldnt be any graverobbers, when there are no pharaohs, so actually the ankhs should disappear accordingly. Second, I wonder if the TTT2 system shouldnt exclude such secondary roles as the graverobber, sidekick, zombie or infected from role swapping. Maybe via a little tag. Don't exactly know how unknown and doppelganger are handled for example. So yeah there should be only one graverobber and they should be converted back, when there is no pharaoh or not?
While it's Tim's role I can atleast admit, that you out a lot of work into it At a first glance I agree with you, but I am wondering about two things, first there shouldnt be any graverobbers, when there are no pharaohs, so actually the ankhs should disappear accordingly. Second, I wonder if the TTT2 system shouldnt exclude such secondary roles as the graverobber, sidekick, zombie or infected from role swapping. Maybe via a little tag. Don't exactly know how unknown and doppelganger are handled for example. So yeah there should be only one graverobber and they should be converted back, when there is no pharaoh or not?
- Well not to be rude, but strategizing over something like this probably seldom happens, so it would be irrelevant in my opinion. Otherwise I think, that if roles change you need new strategies anyway, therefore this shouldnt be an issue, as the roles are not there anymore.
- Just forbidding the roles would be a weak solution anyways. I rather mean, that you cant choose those. I dont know how they change roles, but excluding secondary roles directly for choosing would be my way of doing that. So that, ttt2 only gives you a list of morphable roles, that are primary for example.
I don't want this pull request to be lost to the ages, so I'll summarize the discussion between Zen and I above, and ask something of Tim (the owner of this role):
There is a disagreement over how Ankhs should behave when Pharaohs and Graverobbers swap roles. I'll list out three general paths that could be taken:
Each idea has their own pros and cons. Tim, as the role owner, could you pick which one you prefer (or offer your own idea)? I will be willing to implement whichever one. While I have my own preferences, as long as the role is able to handle role swaps, I will ultimately be happy at the end of the day.
Sorry that it took that long. Life is busy and then I forgot about it. But I took the time, read everything and have a weak opinion on this. I can understand both of you though.
First off, I 100% agree that only pharaoh / graverobber should be able to interact with the ankh directly. Glad that you both agree with this. I generally agree with everything else that was said.
And I honestly can't say which solution to the ankh on rolechange I prefer. But since this solution is already done and tested, it is fine for me. I see why it is a good solution. However I also see why Svens solution is good.
Therefore I approve of this. Feel free to discuss this further with me.
Another idea I got while reading this: Should the graverobber receive their original role back, if the pharaoh respawned at their ankh? This would be a nice idea in my opinion. It is out of scope for this PR though.
When I released the Cursed role, a Steam user reported an interesting issue that would occur if the Pharaoh placed an ankh, swapped with the Graverobber, and attempted to steal their own ankh. In my efforts to reproduce the issue I found a few more that would occur from role swapping. The current code does not seem to always account for these strange cases where the Graverobber and Pharaoh roles move around frequently. I went ahead and took a look at the Pharaoh code and one thing lead to another... I ended up changing many things for this role. Good things I hope, but let's get into it.
Firstly, here are the notes (not necessarily bugs) that I compiled during my debug sessions and visual inspection of the code:
Here's a quick summary of the changes I made and why, which affect Notes 2,5,6, and 7:
Finally, I decided that Notes 4,8,9, and 11 were all issues that I should fix. So I did that. I also fixed Issue #7 (Jester can damage the ankh) and also added similar support for the Marker and Cursed roles (who also can't damage other players).
Notes 1,3, and 10 are assumed to be intentional, and still occur with these changes.
These changes were tested with multiple players in multiple sessions in order to stomp out as many bugs that may have been introduced as possible. I do not believe these changes will alter standard gameplay (Wherein only one Pharaoh exists, and no role swaps occur) in any significant manner.
Apologies for dumping this on you! It probably would have been better to have a discussion before making these changes, or make them over the course of multiple smaller pull requests, but I couldn't help myself (writing the Dual Ownership System was fun). Let me know what you think!