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

ExprLastDamage - fix everything #6797

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/test/skript/tests/syntaxes/expressions/ExprLastDamage.sk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
test "last damage":
set {_l} to location 0.5 above highest block at location(1,1,1)
spawn a sheep at {_l}
set {_e} to last spawned entity

assert last damage of {_e} = 0 with "last damage of newly spawned entity should be 0"

damage {_e} by 1
assert last damage of {_e} = 1 with "last damage of entity should be 1 after damaging it by 1"

set last damage of {_e} to 3
assert last damage of {_e} = 3 with "last damage of entity should be 3 after setting to 3"

# thank you for your service
Copy link
Member

Choose a reason for hiding this comment

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

🫡

delete entity in {_e}