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 request: New setting: complete-final-wave-for-rewards #737

Open
Nesseley opened this issue May 29, 2022 · 1 comment
Open

Feature request: New setting: complete-final-wave-for-rewards #737

Nesseley opened this issue May 29, 2022 · 1 comment
Labels
area/sessions Related to how arena sessions run, e.g. wave setup, the lobby, spectating, event isolation, etc. blocked/rework Awaiting a larger rework effort. rework/sessions Relevant to the sessions rework effort. type/enhancement New or improved feature.

Comments

@Nesseley
Copy link
Collaborator

Feature request

Short description
There should be a way to only give out the rewards if the player reach the final-wave.

Implementation details
Adds a new arena setting: complete-final-wave-for-rewards: true/false if the player has set a final-wave
Default state should be false

Additional info
This was suggested by BetoGuey on Discord, but he didn't make a ticket. So I did! :)

@garbagemule
Copy link
Owner

I don't think this needs such a hard coupling to the final wave setting. Not all arenas have a final wave, but I also don't think they need to have one for the idea of "reward triggers" to make sense. At the bare minimum, we'd need the setting to denote the wave number for which the rewards should be triggered.

That said, this idea isn't actually necessary in the current version of MobArena. We already have the technology!

If an arena has a final wave, that means the complete wave configuration is predetermined, and because rewards are granted only at the wave level, the complete reward pool is predetermined as well. With the new advanced reward syntax, it is possible to implement this exact functionality by simply putting a single, complex reward in the after branch for the final wave.

Consider this reward configuration with a final wave of 25:

every:
  '1': $1
  '2': dirt, stone
after:
  '10': $100
  '20': diamond, iron_ingot, iron_shovel
  '25': $1000

This means that if we beat the final wave of the arena, we will always accrue the following rewards:

  • $1125 ($1 * 5 + $100 + $1000)
  • A mix of dirt and stone, totalling exactly 12 blocks
  • A diamond, an iron ingot, or an iron shovel

This can be expressed with the new reward syntax as:

after:
  '25': >-
    all(
      $1125,
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(dirt, stone),
      random(diamond, iron_ingot, iron_shovel)
    )

These two configurations will statistically yield the exact same loot, assuming we have the proposed setting in place. I realize the alternative is not quite as pretty, and it probably doesn't feel like it's the same, but I guarantee that it is.

I think that a different iteration of this idea would make a lot more sense in the Sessions Rework, since sessions will be much more flexible and less directly tied to the idea of "waves". I imagine the idea of having checkpoints in a session would make sense. Kind of like in Who Wants to Be a Millionaire?, where making it to a specific checkpoint guarantees you a certain portion of the current haul. We could probably suggest the same idea in the current iteration of MobArena and expect it to be a useful feature, but I doubt the code base can support it.

@garbagemule garbagemule added type/enhancement New or improved feature. area/sessions Related to how arena sessions run, e.g. wave setup, the lobby, spectating, event isolation, etc. rework/sessions Relevant to the sessions rework effort. blocked/rework Awaiting a larger rework effort. labels Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sessions Related to how arena sessions run, e.g. wave setup, the lobby, spectating, event isolation, etc. blocked/rework Awaiting a larger rework effort. rework/sessions Relevant to the sessions rework effort. type/enhancement New or improved feature.
Projects
None yet
Development

No branches or pull requests

2 participants