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

[Feature] Add Trigger for final round #1571

Closed
antontimmermans opened this issue Jun 29, 2022 · 4 comments
Closed

[Feature] Add Trigger for final round #1571

antontimmermans opened this issue Jun 29, 2022 · 4 comments
Assignees

Comments

@antontimmermans
Copy link
Collaborator

antontimmermans commented Jun 29, 2022

Is your feature request related to a problem? Please describe.**

the current trigger for 'Eliminated' is called AFTER the next full round (including mythos and monster activation) after the menu option 'Investigator eliminated' is set.
This is almost as official rules dictate, with the exception of the additional Mythos and Monster Activation. There is no way to work around this in the scenarios.
image

Describe the solution you'd like

Add a trigger 'StartFinalRound' that is called at the start of the round when the menu option 'Investigator Eliminated' is selected.
image
The trigger condition would be : start round AND #eliminated='1'

This new trigger would allow the Scenario writer to for example:

  • display a text warning that the final full round is starting and set a scenario variable that he/she can check at the 'EndInvestigatorTurn event'
  • or add more creative scenario twists like "the investigator turns into a big monster, and you can only end the scenario by wining or losing the fight" Or "An investigator may revive the dead investigator by transferring half of its remaining life points".

Describe alternatives you've considered

Alternatively, a scenario writer could check for variables a the trigger 'EndInvestigatorTurn'
"#eliminated" - it means it's currently selected in the menu
"#eliminatedprev" - "Eliminated" was selected last turn (this is the last round of the game)
"#eliminatedcomplete" - this is set to 1 after the last investigator phase, when this is set to 1 it also triggers "Eliminated" events
However, these variables are NOT available in the Valkyrie editor which would mean that scenario writer would have to add that code with a text editor in the .ini files

An alternative solution could be to NOT add a trigger, But to make the #eliminatedprev variable selectable in the valkyrie editor, and then the scenario writer could check this at the StartRound or EndInvestigatorTurn trigger

Additional context

Add any other context or screenshots about the feature request here.

@mayjak mayjak self-assigned this Jul 27, 2022
mayjak added a commit that referenced this issue Jul 27, 2022
…or's phase)

#1571 added StartFinalRound event
#1519 fixed Round log entries for MoM
mayjak added a commit that referenced this issue Jul 27, 2022
#1571 fixed elimination rules (game ends immediately after investigator's phase)
#1571 added StartFinalRound event
#1519 (partial) fixed Round log entries for MoM
#1543 Readded quest.ini to file list
@antontimmermans
Copy link
Collaborator Author

antontimmermans commented Jul 27, 2022

ZZZTriggerTest 2.5.7b.zip
I tested the StartFinalRound trigger with this small scenario.
When end investigator eliminated is set: the following events appear when you hit Next turn (and a monster is present)

  1. Button: End Turn
  2. #eliminated = 1
  3. Trigger: EndInvestigatorTurn
  4. Trigger Mythos -> Mythos phase
  5. Trigger BeforeMonsterActivation
  6. Monster attack -> Monster Step
  7. Handle Monster's Attack -> Horror Step
  8. Trigger StartRound #eliminatedprev = 1
  9. Trigger StartFinalRound
  10. Button: End Turn
  11. Trigger Eliminated -> Investigator phase does not change.
  12. And then nothing happens anymore no mythos , no monster phase, it stays in the Investigator phase. If you hit the end turn button again, it will again fire the Trigger Eliminated.

Up to(and including) step 11, the behavior seems working correctly. This means that if properly programmed, the scenario can end properly after the death of an investigator, without Mythos and without monster activation.
However, not all scenarios have implemented implemented the handling of eliminated investigators. It is true that it is a problem in their scenario, but most of those have other ways to still complete the scenario in a way. This 'not progressing to the next phase' will hang-up those scenarios.
In fact, it will break my scenarios because I implemented that at the EndInvestigatorTurn the status of the scenario is checked (including the death of an investigator) to determine if the sncenario should end in an epilogue or not.
If it is possible, to always process the event that is triggered by the Eliminated trigger before any mythos is called, this will automatically go correct and not break anything. If nothing is implemented for trigger Eliminated then Mythos continues as normal.

@antontimmermans
Copy link
Collaborator Author

With the same test scenario, the event sequence is now:

  1. Button: End Turn
  2. #eliminated = 1
  3. Trigger: EndInvestigatorTurn (Mythos phase)
  4. Trigger Mythos (Mythos phase)
  5. Trigger BeforeMonsterActivation (Mythos phase)
  6. Monster attack (Monster step)
  7. Handle Monster's Attack -> Horror Step
  8. Trigger StartFinalRound (investigator phase)
  9. Trigger StartRound #eliminatedprev = 1 (investigator phase)
  10. Button: End Turn
  11. Trigger Eliminated (investigator phase); After handling the Eliminated event the game remains in the investigator phase.
  12. Button: End Turn
  13. Trigger: EndInvestigatorTurn; #eliminatedcomplete = 1
  14. Trigger Mythos -> Mythos phase
  15. ....game cycle as usual. Note that the Eliminated event is not fired again, and the menu option remains grayed out (which is good in my opinion).

The only thing remaining is that if the Eliminated event is called, you have to hit the End Turn button again (step 12) to make it end the turn. In my opinion, this is not really a problem because this only happens if you have an event linked to the Eliminated trigger, which means that the scenario writer is handling it. If there is no event linked to the Eliminated trigger, the game just continues as before.

I like the changed sequence of first calling StartFinalRound and then StartRound.

@mayjak
Copy link
Collaborator

mayjak commented Jul 28, 2022

The only thing remaining is that if the Eliminated event is called, you have to hit the End Turn button again (step 12) to make it end the turn. In my opinion, this is not really a problem because this only happens if you have an event linked to the Eliminated trigger, which means that the scenario writer is handling it. If there is no event linked to the Eliminated trigger, the game just continues as before.

Yes, the scenario should end either in Eliminated or Mythos triggers in this case. This is just meant as a failsafe for mishandled Eliminated events as I'd hate to lock the players out of the game cycle.

I could theoretically check if the game ended after the Eliminated trigger was resolved, but due to asynchronous nature of it that's a lot more work and something I'm not comfortable changing right now. Maybe for a future release.

@antontimmermans
Copy link
Collaborator Author

antontimmermans commented Jul 29, 2022

Released in Valkyrie V2.5.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants