-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/test/skript/tests/syntaxes/expressions/ExprLastDamage.sk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
delete entity in {_e} |