Skip to content

Implement animation effects for various tools#60

Merged
Extremelyd1 merged 42 commits into
Extremelyd1:mainfrom
BobbyTheCatfish:tools-batch-1
May 30, 2026
Merged

Implement animation effects for various tools#60
Extremelyd1 merged 42 commits into
Extremelyd1:mainfrom
BobbyTheCatfish:tools-batch-1

Conversation

@BobbyTheCatfish
Copy link
Copy Markdown
Contributor

@BobbyTheCatfish BobbyTheCatfish commented May 1, 2026

Adds the following tools:

  • flea brew
  • fractured mask
  • magma bell
  • magnetite dice
  • sawtooth circlet.

Also adds a base class for tools that will be more useful going forward, as well as a component to identify the owner of a tool (or really any effect that does damage).

Copy link
Copy Markdown
Owner

@Extremelyd1 Extremelyd1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR Bobby! I love seeing the new effects in action.
I've already gone over and changed a few formatting issues, comments, etc. So make sure to pull those changes.

A few notes though:

  • Make sure that you also add new entries in ServerSettings to the backing interface IServerSettings. I've already done this for now, but just something to keep in mind in the future.
  • The Flea Brew effect is normally cancelled when sitting on a bench, but this is not networked to other players. Very minor, not sure if we can easily remedy it. Maybe by implementing a "bench" effect that cancels various other effects, because I think more effects are cancelled when sitting on a bench so it could come in useful for other things as well.
  • Perhaps it is better to separate the Magma Bell effect in two networked parts. Taking damage with it active and regaining the protection. This can be done with the effect info. There are a few ways in which the regaining of the effect is interrupted, which will incorrectly play it for remote players (for example taking damage again just before regaining the effect), because it is simply on a timer.

@BobbyTheCatfish
Copy link
Copy Markdown
Contributor Author

I've implemented the benching logic as requested. As for the magma bell, the logic is hardcoded to take a specific amount of time. The logic can be found in HeroController on line 1359. This is a simplified version of it:

if (!dead && cooldownTimeLeft > 0f)
{
	if (MagmaBell.IsEquipped)
	{
		float timeElapsed = Gameplay.LavaBellCooldownTime - cooldownTimeLeft;
		cooldownTimeLeft -= Time.deltaTime;
		float newTimeElapsed = MagmaBellCooldownTime - cooldownTimeLeft;
		float lengthMinusAnimation = MagmaBellCooldownTime - 1.25f;
		
		if (timeElapsed < lengthMinusAnimation && newTimeElapsed >= lengthMinusAnimation)
		{
			RechargeBell();
		}
		
		if (cooldownTimeLeft <= 0f)
		{
			spriteFlash.Flash();
		}
	}
	else
	{
		ResetMagmaBell();
	}
}

Were you able to find an example in-game where the effect wasn't synced?

@Extremelyd1
Copy link
Copy Markdown
Owner

Were you able to find an example in-game where the effect wasn't synced?

Yes, any event that causes time dilation on the local player's game will cause it to be inconsistent with playing the effect on remote player's games. So, hazard respawning slightly delays time for the local player and remote players will play the effect slightly earlier. While I haven't tested it, winning an enemy arena causes a longer time dilation, which I think will also cause issues then.

Copy link
Copy Markdown
Owner

@Extremelyd1 Extremelyd1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you split up the Magma Bell effects then? That way the effect is better synchronised across clients.

@BobbyTheCatfish
Copy link
Copy Markdown
Contributor Author

Sorry, I've been swamped the past few weeks. I have it ready, I just need to test it first. I'll try to have it pushed by tonight

@Extremelyd1
Copy link
Copy Markdown
Owner

Sorry, I've been swamped the past few weeks. I have it ready, I just need to test it first. I'll try to have it pushed by tonight

No worries, don't feel rushed to work this. I'm already very happy with the contributions!

@Extremelyd1 Extremelyd1 changed the title Tools - Batch 1 Implement animation effects for various tools May 30, 2026
@Extremelyd1 Extremelyd1 merged commit 07c2d7c into Extremelyd1:main May 30, 2026
3 checks passed
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.

2 participants