garbagemule / MobArena

MobArena plugin for Minecraft
GNU General Public License v3.0
195 stars 150 forks source link

More flexibility with Things in different types of waves #681

Open Maroon28 opened 3 years ago

Maroon28 commented 3 years ago

Feature request

Short description

Essentially, the current way drops work in some of the waves is very limiting. For example, we can only drop items in boss waves, which throws out most of the potential! My idea is to allow Permissions, Economy Money, and Commands to be able to run in supply waves, boss waves, and really anything with drops: in it!

Implementation details

Not much has to be changed, we'd set it up the same way we set rewards. So, an example would be this:

       boss1:
          type: boss
          wave: 12
          monster: zombie
          health: medium
          abilities: pull-nearby, disorient-nearby
          ability-interval: 5
          effects: glowing:1, increase_damage:1, slow:0
          drops: cmd:/mobcoins add <player> 50

Additional info

Thats it!

garbagemule commented 3 years ago

Just to follow up from the discussion on Discord, the feature itself (or probably some iteration of it) is perfectly relevant, but there are fundamental issues in the code base making this "icky" territory, because it sort of mixes concepts that were never designed to be mixed (rewards, upgrades, drops), and because a little bit of further brainstorming drives the idea towards a fundamentally flawed concept in MobArena...

Drops are items. It doesn't make sense to drop instances of MobArena's abstract concept of Things - all items can be considered Things, but not all Things can be considered items (permissions and commands are not items), and so "dropping" a Thing only makes sense conditionally. Perhaps the underlying intent behind this idea is actually what upgrade waves were designed to fulfill, but they indiscriminately reward everybody, while the drops from supply waves and boss waves reward those who are quick enough.

Boss rewards (not drops) actually support the intent behind the feature request, but they are based on the concept of a "kill", and sometimes bosses die to environmental damage such as fire ticks or fall damage, which means the "killing blow" isn't dealt by a player, so no reward is given. The immediate idea is to "just track damage done" or "track last hits", but despite being fairly easy to implement out of context, this isn't something the code base can easily support in its current form.

I'm leaving this up due to the relevance in the Sessions Rework, because there is lots of potential in the flexibility of "bonuses" as post-session rewards and/or in-session upgrades.