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

Doomsayer Rework #1470

Draft
wants to merge 4 commits into
base: dev_2.3.0
Choose a base branch
from

Conversation

MargaretTheFool
Copy link
Contributor

(Defaults to off)
Doomsayer can now observe a player to get a hint about their role upon the next meeting

@Tommy-XL
Copy link
Collaborator

In fact, I think that this is a very inefficient code that has 2 significant disadvantages

When adding a new role, probably no one will add the new role to the Doomsayer list

Even if someone adds a role to the list, they will also have to change the lines and this will reset the current lines in all languages, which is very annoying to change this every time

@Tommy-XL
Copy link
Collaborator

Previously, FortuneTeller had exactly the same code where each role was added manually and was eventually changed so that it selected random roles automatically

@Tommy-XL
Copy link
Collaborator

Tommy-XL commented Feb 13, 2025

So, I believe that the code should show the roles the same as in TOU-R when it selects a player and from the randomly active roles only one is correct

Or does it work somehow differently and I don’t remember how Doomsayer in TOU-R works

@Tommy-XL Tommy-XL marked this pull request as draft February 13, 2025 04:42
@Tommy-XL Tommy-XL added the Rework Role/Add-on Role or Add-on is reworked label Feb 13, 2025
@@ -268,4 +287,543 @@ public void SendMessageAboutGuess(PlayerControl guesser, PlayerControl playerMis
}, 0.7f, "Doomsayer Guess Msg 2");
}
}
public override bool CanUseKillButton(PlayerControl pc) => EasyMode.GetBool();
public override void SetKillCooldown(byte id) => ObserveCooldown.GetFloat();
Copy link
Collaborator

@Tommy-XL Tommy-XL Feb 13, 2025

Choose a reason for hiding this comment

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

Use
=> Main.AllPlayerKillCooldown[id] = ObserveCooldown.GetFloat();

@MargaretTheFool
Copy link
Contributor Author

So, I believe that the code should show the roles the same as in TOU-R when it selects a player and from the randomly active roles only one is correct

Or does it work somehow differently and I don’t remember how Doomsayer in TOU-R works

TOU-R does the same thing I've done, roles are put into categories for doomsayer and are hard-coded, which is fine because that mod doesn't have as much roles
maybe I could add a DoomsayerCategory enum in RoleBase and just assign it in every role?

@MargaretTheFool
Copy link
Contributor Author

I can perfectly understand why fortune Teller was reworked to the way it is now but if I did the same thing with doomsayer that would make the role way too easy

@Tommy-XL
Copy link
Collaborator

Tommy-XL commented Feb 13, 2025

It might be better to make the code check each role via Custom_RoleType to avoid manual addition, and also to avoid adding each role in strings it would be better to make the code do this, for example, as this code does in FortuneTeller.GetTargetRoleList

@MargaretTheFool
Copy link
Contributor Author

the issue with that is that im not sorting it by Custom_RoleType
if you think I should then I will, but I don't really want to

@Tommy-XL Tommy-XL changed the base branch from dev_2.2.0 to dev_2.3.0 February 21, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rework Role/Add-on Role or Add-on is reworked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants