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

add boss fight infrastructure #26

Merged
merged 12 commits into from
Dec 11, 2023
Merged

Conversation

TheAfroOfDoom
Copy link
Owner

Summary

This PR adds the underlying functions required for the boss_fight director entity. It currently only supports the first attack phase and the corresponding WARNING sound/visual.

This includes:

  • randomized attacks
  • fight music
  • convenient start functions
  • good pipeline for state transitions

The boss fight director essentially functions as a state machine, where we do certain things both during states themselves and during transitions between states.

e.g.:

  • transition into attack phase state -> play music, set scores, set tag as boss_fight.phase.attack
  • during attack phase state -> attack by picking through a random list depending on phase (phase 0 is x bullets upper/lower, homing vines, friendliness pellets, etc.)
  • transition into warn phase state -> play alarm sound, don't start new attacks, set scores, set tag as boss_fight.phase.warn
  • during warn phase state -> wait until next state transition (into soul phase)
  • etc..

Reproducing in-game

function _:reset
function _:boss_fight

Preview

This PR's content can only really be shown in a video:

https://youtu.be/PfaDPz_5ew8


Some cool before visuals though is showing the actual redstone that was originally used to run the boss fight.

redstone caption
2023-12-11_14 56 25 state handler (attack phase -> soul phase -> ...)
2023-12-11_14 56 12 attack randomizer (color-coded)

Supplemental changes

  • added random attack so we can specify a list of attacks + weights to randomly choose to start
  • move objective setup commands to separate file for readability
  • add attack entities to entity setup/cleanup function

- allows us to specify a list of attacks with weights and start one at random
- run with `function entity:directorial/boss_fight/vanilla/start`
- only the 0th attack phase is implemented currently
- randomizes an attack listed in `...attack_phase/0.mcfunction`
they only use indicators right now, we should be consistent
- sounds more in sync with videos of the fight ("when does the WARNING sound happen during the music?")
@TheAfroOfDoom TheAfroOfDoom changed the title add directorial entity infrastructure add boss fight infrastructure Dec 11, 2023
@TheAfroOfDoom TheAfroOfDoom merged commit 98cfd3a into main Dec 11, 2023
@TheAfroOfDoom TheAfroOfDoom deleted the boss-fight-infrastructure branch December 11, 2023 20:02
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

Successfully merging this pull request may close these issues.

1 participant