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

Damage System: ability to integrate modifier #1642

Closed
Tracked by #1641
alek13 opened this issue Sep 10, 2024 · 0 comments
Closed
Tracked by #1641

Damage System: ability to integrate modifier #1642

alek13 opened this issue Sep 10, 2024 · 0 comments

Comments

@alek13
Copy link
Member

alek13 commented Sep 10, 2024

As for now, there is nodes with damage of: fire, poison,...
But MineTest does not handle damage_groups for nodes.

We need add ability into Core/damage to handle this.
We use minetest.register_on_player_hpchange(), callback of which can modify changed hp.
So, as a workaround we can just register our own modifers.

In Core/damage

  • add ability to pass callback as modifier into on_damage_of()

And then we can use it in our lord_defense to prevent damage of those nodes if we have appropriate defense.

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

No branches or pull requests

1 participant