-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update CondIsCharged * Adds new test and updates effect - Also deletes old test * Fixes test - Wither skull wasn't spawning as I thought it was, changed to shoot effect * Apply suggestions from code review Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> * Suggestions --------- Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> Co-authored-by: Moderocky <admin@moderocky.com>
- Loading branch information
1 parent
de1a529
commit 706c82f
Showing
4 changed files
with
74 additions
and
43 deletions.
There are no files selected for viewing
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
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
31 changes: 31 additions & 0 deletions
31
src/test/skript/tests/syntaxes/conditions/CondIsCharged.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,31 @@ | ||
test "is charged": | ||
spawn a creeper at (spawn of world "world"): | ||
set {_e} to entity | ||
shoot a wither skull from {_e} | ||
set {_w} to last shot entity | ||
|
||
assert {_e} is not charged with "a normally spawned creeper should not be charged" | ||
assert {_w} is not charged with "a normally spawned wither skull should not be charged" | ||
|
||
charge {_e} | ||
charge {_w} | ||
assert {_e} is charged with "charging a creeper should do exactly that" | ||
assert {_w} is charged with "charging a wither skull should do exactly that" | ||
|
||
uncharge {_e} | ||
uncharge {_w} | ||
assert {_e} is not charged with "uncharging a creeper should do exactly that" | ||
assert {_w} is not charged with "uncharging a wither skull should do exactly that" | ||
|
||
spawn an adult zombie at (spawn of world "world"): | ||
set {_z} to entity | ||
|
||
assert {_z} is not charged with "a non-creeper/wither skull should never be charged" | ||
charge {_z} | ||
assert {_z} is not charged with "charging a non-creeper/wither skull should do nothing" | ||
uncharge {_z} | ||
assert {_z} is not charged with "uncharging a non-creeper/wither skull should do nothing" | ||
|
||
delete entity within {_e} | ||
delete entity within {_w} | ||
delete entity within {_z} |
This file was deleted.
Oops, something went wrong.