-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Backport suppress_power test files to match 1.21 branch
- Loading branch information
Showing
9 changed files
with
152 additions
and
46 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
8 changes: 8 additions & 0 deletions
8
src/test/resources/data/shappoli/powers/suppress_power/by_source/not_suppressed.json
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,8 @@ | ||
{ | ||
"type": "apoli:active_self", | ||
"key": "key.attack", | ||
"entity_action": { | ||
"type": "apoli:execute_command", | ||
"command": "say Suppress by source: Active; Should not be suppressed" | ||
} | ||
} |
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
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
103 changes: 103 additions & 0 deletions
103
src/test/resources/data/shappoli/powers/suppress_power/error_check.json
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,103 @@ | ||
{ | ||
"type": "apoli:multiple", | ||
|
||
"action_no_fields": { | ||
"type": "apoli:active_self", | ||
"key": "key.attack", | ||
"entity_action": { | ||
"type": "apoli:selector_action", | ||
"selector": "@s", | ||
"bientity_action": { | ||
"type": "shappoli:suppress_power", | ||
"duration": 40 | ||
} | ||
} | ||
}, | ||
|
||
"action_nonexisting_power": { | ||
"type": "apoli:active_self", | ||
"key": "key.attack", | ||
"entity_action": { | ||
"type": "apoli:selector_action", | ||
"selector": "@s", | ||
"bientity_action": { | ||
"type": "shappoli:suppress_power", | ||
"duration": 40, | ||
"power": "test:nonexisting_power" | ||
} | ||
} | ||
}, | ||
|
||
"action_nonexisting_power_type": { | ||
"type": "apoli:active_self", | ||
"key": "key.attack", | ||
"entity_action": { | ||
"type": "apoli:selector_action", | ||
"selector": "@s", | ||
"bientity_action": { | ||
"type": "shappoli:suppress_power", | ||
"duration": 40, | ||
"power_type": "test:nonexisting_power_type" | ||
} | ||
} | ||
}, | ||
|
||
"power_no_fields": { | ||
"type": "shappoli:suppress_power" | ||
}, | ||
|
||
"no_condition_suppressor": { | ||
"type": "apoli:active_self", | ||
"key": "key.attack", | ||
"entity_action": { | ||
"type": "apoli:selector_action", | ||
"selector": "@s", | ||
"bientity_action": { | ||
"type": "shappoli:suppress_power", | ||
"duration": 40, | ||
"power": "*:*_no_condition_suppressed", | ||
"bientity_action": { | ||
"type": "apoli:actor_action", | ||
"action": { | ||
"type": "apoli:execute_command", | ||
"command": "say Warning check: No condition" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"no_condition_suppressed": { | ||
"type": "apoli:attribute", | ||
"modifier": { | ||
"id": "shappoli:suppress_power/multiple/suppressed/attribute/health", | ||
"attribute": "minecraft:generic.max_health", | ||
"operation": "addition", | ||
"value": 1 | ||
}, | ||
"update_health": true | ||
}, | ||
|
||
"multiple_suppressor": { | ||
"type": "apoli:action_on_block_place", | ||
"entity_action": { | ||
"type": "apoli:selector_action", | ||
"selector": "@s", | ||
"bientity_action": { | ||
"type": "shappoli:suppress_power", | ||
"duration": 40, | ||
"power": "*:*", | ||
"powers": [ | ||
"*:*_power_hit" | ||
], | ||
"bientity_action": { | ||
"type": "apoli:actor_action", | ||
"action": { | ||
"type": "apoli:execute_command", | ||
"command": "say Warning check: Suppressed multiple powers" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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