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

remove entity:utils/damage check for boss fight #39

Open
TheAfroOfDoom opened this issue Dec 22, 2023 · 1 comment
Open

remove entity:utils/damage check for boss fight #39

TheAfroOfDoom opened this issue Dec 22, 2023 · 1 comment
Labels
datapack Issues pertaining to the datapack enhancement New feature or request good first issue Good for newcomers

Comments

@TheAfroOfDoom
Copy link
Owner

while attacks are still being developed and validated, we have an execute unless entity @e[tag=boss_fight] ... check since the damage function can take in an from argument at the end to specify who did the damage (see wiki)

we'll want to specify that the boss_fight entity did the damage so that when someone dies it says

TheAfroOfDoom was killed by Omega Flowey

problem is we also want to be able to run attacks individually (not restricted to running them only during the boss fight) while developing them (e.g. function _:attack/homing-vines). so we split the damage command into two versions:

  • one that makes the boss_fight entity the cause of damage if it exists
  • one that has no source of damage if the boss_fight doesn't exist

https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/blob/afb1cc943424e4145c365b8503f9b30655effa6f/datapacks/omega-flowey/data/entity/functions/utils/damage.mcfunction#L1-L6


this split will be an unnecessary check once all attacks are completed and the boss fight runs in entirety, so we should remove this check then and convert the function to the single line:

$execute as @a[distance=..$(radius),team=player] run damage @s $(damage) minecraft:mob_projectile by @e[tag=boss_fight,limit=1]
@TheAfroOfDoom TheAfroOfDoom added enhancement New feature or request good first issue Good for newcomers datapack Issues pertaining to the datapack labels Dec 22, 2023
@TheAfroOfDoom TheAfroOfDoom changed the title remove entity:utils/damage check for no boss fight remove entity:utils/damage check for boss fight Dec 22, 2023
TheAfroOfDoom added a commit that referenced this issue Dec 22, 2023
@TheAfroOfDoom
Copy link
Owner Author

this could instead be part of a larger refactor to use a global storage to store the boss fight entity's UUID for reference.

execute if entity $(boss_fight_uuid) run ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datapack Issues pertaining to the datapack enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant