The Twilight Forest

The Twilight Forest

143M Downloads

You have to make the killing blow to get the naga advancement

LordMonoxide opened this issue ยท 11 comments

commented

Forge version: 2443
Twilight Forest version: 5c9fca7

Steps to reproduce:

  1. Fight the naga with someone else
  2. Allow them to get the killing blow

What I expected to happen:
Both players get the advancement

What happened instead:
The player who landed the killing blow gets it

commented

Hmm right

commented

This is hard to track, how do you count if a player has contributed to the fight? Do they still get it if tjey only got one punch in?

Maybe it should just be item pickup instead of entity kill

commented

It used to trigger on both kill and item pickup in the past(separately, only one trigger was required not both), is it possible to do that with advancements still?

commented

It seems like the current criteria is kill AND pickup https://github.com/TeamTwilight/twilightforest/blob/1.12.x/src/main/resources/assets/twilightforest/advancements/progress_naga.json

If you want OR logic you need a requirements block:

"requirements": [ // AND everything in the list of lists
    ["naga", "scale"], // OR everything in a list
]
commented

My recommendation is to introduce a new advancement criteria where the boss tracks all players that have attacked it and perhaps a requirement of 'percentage of damage dealt' and/or another requirement of hits done. I'm speaking about a new advancement that would work to solve this issue but could also give us potential for some other interesting advancements

commented

Yeah, the naga itself (and probaby the rest of the bosses) should either
A: Grant all players nearby the achievement on death
or
B: Store the data dealt by uuid on the naga, and require a flat damage cap to give those players the achievements on the naga's death.

commented

Thinking of this:

d > ((x/p)/2) where x is boss health and p is player count. d is your damage done on the mob. If the conditional is true, then you get the advancement required.

commented

That seems reasonable to me, though it would become increasingly difficult to get with larger amounts of players. That's most likely not an issue, however.

commented

It breaks down to this:

If 1 player is fighting, they must deal half the damage themselves.
If 2 are fighting it, they must deal 1/4 damage themselves,
If 3, it's 1/6,
4, 1/8, etc.

commented

To elaborate a bit on what I meant, as the number of players increases and the fraction grows smaller, it becomes more likely that a single player will miss their threshold due to other players dealing damage above and beyond their threshold. This is most likely not an issue though, since it's unlikely that many players will be fighting at once. (If you did want to address that, which to me seems unnecessary, something quadratic would probably work)

commented

Another solution is to grant everyone in a range that advancement as per @Benimatic's proposal, I think seems like a better solution.