text:
#> asset:artifact/0840.honey_bee_stick/trigger/4.vfx
#
# vfxだよ
#
# @within function asset:artifact/0840.honey_bee_stick/trigger/3.main

# パーティクル
# [ImportKey]: NobwRALgngDgpmAXGGB7ANlA5qgdgWgENcBjAC1QCcwAaMAV3oEsATJMAFgAYAzLgdgAcXEvgBMAVhIAjfBwDMHUYP5dB+FoI6CW8gGxwu8uAE5aYXIQC2CZICxNQEuRgI31ARQyBnhkDVDIB+GAAQBGcxhCSmsAZyRwElR6XAgkPzoSOFi4akRwADdCdHpbcAAPJC46KCKAXzK6EJYmenDEMQA6fnk6UIhguMRisDh0dCYYUNs-Lh7KVA6IWx6oylxUpD06ACt6Kxh4umk4AC8mRe66DsosOC7wE7OusEJ5Pw4FMQ4iaQkJORIxFnxpPS4fhJ5IQdoJBBITA9BOZglh2EkUtRKmAmKEAKL9QbDNEAR3o2UwAGUgkk2IgeNlhnRUQAhPYHSi4-H9KDEwikpAQSi5Co0S6wWwoDDYPDmRisdh3B5PF4g96fb6-f6A4Gg8GQ7TmSw2diOJz+QLBMIRMBRGJdPxiRLJaZpcBWYiDejoQjTTncuB0HgTKzsbh8IQicRSWQKJT4FRqDRaHT6QzGMx0LI5WygFFksBjFiGQhcEwaeQ8PxyaTyMT4ExiExwfBcPwSPwkeQkCQ8bTlnhlvzNvw8Wt6MQ1jhiHjlrQSGvyeQsaSN9k8P7ScyFI5gUqIcTNeSVcAS5BZnN5gtFktlitVmt1htNlttwTlwd+S0L0T8OBwcscaSED6CEwSLgIxIUdnmrMRJA4ZckCafRhw4Ex5AkMQp3rPwWhKJB8D8Rp9AAsZ8IIsYxB3dN2APLhc3zXQTy-M9K2rWtUJvVt21rCQWAkPQ9Akfh8BIQgxFDLRRBMXNixYHhJPAxtBA-LgoIaHC9DghCkJQhtBAwxBsNgkw9P0gy9O3PlSP3AFDyowti1o8t6MvJjmxY+9fhUEweAhWQHkQuRK2LQRCBUfB7gnQsArgFgKIU+QcKecF+D0Pw9H4cD+A4GtEq0poWhIvdM3Miij2o6zS1si9GOvRy70-PxRJnEhAL-L85H4O4Kx4fh8y4FLtB2KsSD0BTN1g0DEOQ4K0K0nTuMIma-ByjNyMo49irosqr0bSrWMIEwW0tLg9F+fgWGskx+A+QhCH4WQ9HkQRpH4FoxEIXsBroFchuUka1PG9C10wqa8JmgjiIAXToDAyQKIotK4XkwGqWp6mwni2hOLp5B6PoBiGEYxiqSZXRmRIqAWNJljANYNi2MAdn2Q4elRDFsexPECVZElwqQCl0CpFFQjpOnGVZlk2Q5clKTgCoQaAA_3
# 多角形 1
particle wax_on ^0.785 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^0.85042 ^ ^-3.97635 0 0 0 0 1
particle wax_on ^0.91583 ^ ^-3.86305 0 0 0 0 1
particle wax_on ^0.98125 ^ ^-3.74974 0 0 0 0 1
particle wax_on ^1.04667 ^ ^-3.63644 0 0 0 0 1
particle wax_on ^1.11208 ^ ^-3.52313 0 0 0 0 1
particle wax_on ^1.1775 ^ ^-3.40983 0 0 0 0 1
particle wax_on ^1.24292 ^ ^-3.29652 0 0 0 0 1
particle wax_on ^1.30833 ^ ^-3.18322 0 0 0 0 1
particle wax_on ^1.37375 ^ ^-3.06991 0 0 0 0 1
particle wax_on ^1.43917 ^ ^-2.95661 0 0 0 0 1
particle wax_on ^1.50458 ^ ^-2.8433 0 0 0 0 1
particle wax_on ^1.57 ^ ^-2.73 0 0 0 0 1
particle wax_on ^1.50458 ^ ^-2.6167 0 0 0 0 1
particle wax_on ^1.43917 ^ ^-2.50339 0 0 0 0 1
particle wax_on ^1.37375 ^ ^-2.39009 0 0 0 0 1
particle wax_on ^1.30833 ^ ^-2.27678 0 0 0 0 1
particle wax_on ^1.24292 ^ ^-2.16348 0 0 0 0 1
particle wax_on ^1.1775 ^ ^-2.05017 0 0 0 0 1
particle wax_on ^1.11208 ^ ^-1.93687 0 0 0 0 1
particle wax_on ^1.04667 ^ ^-1.82356 0 0 0 0 1
particle wax_on ^0.98125 ^ ^-1.71026 0 0 0 0 1
particle wax_on ^0.91583 ^ ^-1.59695 0 0 0 0 1
particle wax_on ^0.85042 ^ ^-1.48365 0 0 0 0 1
particle wax_on ^0.785 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^0.65417 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^0.52333 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^0.3925 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^0.26167 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^0.13083 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^0 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^-0.13083 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^-0.26167 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^-0.3925 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^-0.52333 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^-0.65417 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^-0.785 ^ ^-1.37034 0 0 0 0 1
particle wax_on ^-0.85042 ^ ^-1.48365 0 0 0 0 1
particle wax_on ^-0.91583 ^ ^-1.59695 0 0 0 0 1
particle wax_on ^-0.98125 ^ ^-1.71026 0 0 0 0 1
particle wax_on ^-1.04667 ^ ^-1.82356 0 0 0 0 1
particle wax_on ^-1.11208 ^ ^-1.93687 0 0 0 0 1
particle wax_on ^-1.1775 ^ ^-2.05017 0 0 0 0 1
particle wax_on ^-1.24292 ^ ^-2.16348 0 0 0 0 1
particle wax_on ^-1.30833 ^ ^-2.27678 0 0 0 0 1
particle wax_on ^-1.37375 ^ ^-2.39009 0 0 0 0 1
particle wax_on ^-1.43917 ^ ^-2.50339 0 0 0 0 1
particle wax_on ^-1.50458 ^ ^-2.6167 0 0 0 0 1
particle wax_on ^-1.57 ^ ^-2.73 0 0 0 0 1
particle wax_on ^-1.50458 ^ ^-2.8433 0 0 0 0 1
particle wax_on ^-1.43917 ^ ^-2.95661 0 0 0 0 1
particle wax_on ^-1.37375 ^ ^-3.06991 0 0 0 0 1
particle wax_on ^-1.30833 ^ ^-3.18322 0 0 0 0 1
particle wax_on ^-1.24292 ^ ^-3.29652 0 0 0 0 1
particle wax_on ^-1.1775 ^ ^-3.40983 0 0 0 0 1
particle wax_on ^-1.11208 ^ ^-3.52313 0 0 0 0 1
particle wax_on ^-1.04667 ^ ^-3.63644 0 0 0 0 1
particle wax_on ^-0.98125 ^ ^-3.74974 0 0 0 0 1
particle wax_on ^-0.91583 ^ ^-3.86305 0 0 0 0 1
particle wax_on ^-0.85042 ^ ^-3.97635 0 0 0 0 1
particle wax_on ^-0.785 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^-0.65417 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^-0.52333 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^-0.3925 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^-0.26167 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^-0.13083 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^0 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^0.13083 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^0.26167 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^0.3925 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^0.52333 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^0.65417 ^ ^-4.08966 0 0 0 0 1
particle wax_on ^3.14925 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^3.21467 ^ ^-2.61135 0 0 0 0 1
particle wax_on ^3.28008 ^ ^-2.49805 0 0 0 0 1
particle wax_on ^3.3455 ^ ^-2.38474 0 0 0 0 1
particle wax_on ^3.41092 ^ ^-2.27144 0 0 0 0 1
particle wax_on ^3.47633 ^ ^-2.15813 0 0 0 0 1
particle wax_on ^3.54175 ^ ^-2.04483 0 0 0 0 1
particle wax_on ^3.60717 ^ ^-1.93152 0 0 0 0 1
particle wax_on ^3.67258 ^ ^-1.81822 0 0 0 0 1
particle wax_on ^3.738 ^ ^-1.70491 0 0 0 0 1
particle wax_on ^3.80342 ^ ^-1.59161 0 0 0 0 1
particle wax_on ^3.86883 ^ ^-1.4783 0 0 0 0 1
particle wax_on ^3.93425 ^ ^-1.365 0 0 0 0 1
particle wax_on ^3.86883 ^ ^-1.2517 0 0 0 0 1
particle wax_on ^3.80342 ^ ^-1.13839 0 0 0 0 1
particle wax_on ^3.738 ^ ^-1.02509 0 0 0 0 1
particle wax_on ^3.67258 ^ ^-0.91178 0 0 0 0 1
particle wax_on ^3.60717 ^ ^-0.79848 0 0 0 0 1
particle wax_on ^3.54175 ^ ^-0.68517 0 0 0 0 1
particle wax_on ^3.47633 ^ ^-0.57187 0 0 0 0 1
particle wax_on ^3.41092 ^ ^-0.45856 0 0 0 0 1
particle wax_on ^3.3455 ^ ^-0.34526 0 0 0 0 1
particle wax_on ^3.28008 ^ ^-0.23195 0 0 0 0 1
particle wax_on ^3.21467 ^ ^-0.11865 0 0 0 0 1
particle wax_on ^3.14925 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^3.01842 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^2.88758 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^2.75675 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^2.62592 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^2.49508 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^2.36425 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^2.23342 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^2.10258 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^1.97175 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^1.84092 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^1.71008 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^1.57925 ^ ^-0.00534 0 0 0 0 1
particle wax_on ^1.51383 ^ ^-0.11865 0 0 0 0 1
particle wax_on ^1.44842 ^ ^-0.23195 0 0 0 0 1
particle wax_on ^1.383 ^ ^-0.34526 0 0 0 0 1
particle wax_on ^1.31758 ^ ^-0.45856 0 0 0 0 1
particle wax_on ^1.25217 ^ ^-0.57187 0 0 0 0 1
particle wax_on ^1.18675 ^ ^-0.68517 0 0 0 0 1
particle wax_on ^1.12133 ^ ^-0.79848 0 0 0 0 1
particle wax_on ^1.05592 ^ ^-0.91178 0 0 0 0 1
particle wax_on ^0.9905 ^ ^-1.02509 0 0 0 0 1
particle wax_on ^0.92508 ^ ^-1.13839 0 0 0 0 1
particle wax_on ^0.85967 ^ ^-1.2517 0 0 0 0 1
particle wax_on ^1.71008 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^1.84092 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^1.97175 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^2.10258 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^2.23342 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^2.36425 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^2.49508 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^2.62592 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^2.75675 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^2.88758 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^3.01842 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^3.21467 ^ ^0.11865 0 0 0 0 1
particle wax_on ^3.28008 ^ ^0.23195 0 0 0 0 1
particle wax_on ^3.3455 ^ ^0.34526 0 0 0 0 1
particle wax_on ^3.41092 ^ ^0.45856 0 0 0 0 1
particle wax_on ^3.47633 ^ ^0.57187 0 0 0 0 1
particle wax_on ^3.54175 ^ ^0.68517 0 0 0 0 1
particle wax_on ^3.60717 ^ ^0.79848 0 0 0 0 1
particle wax_on ^3.67258 ^ ^0.91178 0 0 0 0 1
particle wax_on ^3.738 ^ ^1.02509 0 0 0 0 1
particle wax_on ^3.80342 ^ ^1.13839 0 0 0 0 1
particle wax_on ^3.86883 ^ ^1.2517 0 0 0 0 1
particle wax_on ^3.93425 ^ ^1.365 0 0 0 0 1
particle wax_on ^3.86883 ^ ^1.4783 0 0 0 0 1
particle wax_on ^3.80342 ^ ^1.59161 0 0 0 0 1
particle wax_on ^3.738 ^ ^1.70491 0 0 0 0 1
particle wax_on ^3.67258 ^ ^1.81822 0 0 0 0 1
particle wax_on ^3.60717 ^ ^1.93152 0 0 0 0 1
particle wax_on ^3.54175 ^ ^2.04483 0 0 0 0 1
particle wax_on ^3.47633 ^ ^2.15813 0 0 0 0 1
particle wax_on ^3.41092 ^ ^2.27144 0 0 0 0 1
particle wax_on ^3.3455 ^ ^2.38474 0 0 0 0 1
particle wax_on ^3.28008 ^ ^2.49805 0 0 0 0 1
particle wax_on ^3.21467 ^ ^2.61135 0 0 0 0 1
particle wax_on ^3.14925 ^ ^2.72466 0 0 0 0 1
particle wax_on ^3.01842 ^ ^2.72466 0 0 0 0 1
particle wax_on ^2.88758 ^ ^2.72466 0 0 0 0 1
particle wax_on ^2.75675 ^ ^2.72466 0 0 0 0 1
particle wax_on ^2.62592 ^ ^2.72466 0 0 0 0 1
particle wax_on ^2.49508 ^ ^2.72466 0 0 0 0 1
particle wax_on ^2.36425 ^ ^2.72466 0 0 0 0 1
particle wax_on ^2.23342 ^ ^2.72466 0 0 0 0 1
particle wax_on ^2.10258 ^ ^2.72466 0 0 0 0 1
particle wax_on ^1.97175 ^ ^2.72466 0 0 0 0 1
particle wax_on ^1.84092 ^ ^2.72466 0 0 0 0 1
particle wax_on ^1.71008 ^ ^2.72466 0 0 0 0 1
particle wax_on ^1.57925 ^ ^2.72466 0 0 0 0 1
particle wax_on ^1.51383 ^ ^2.61135 0 0 0 0 1
particle wax_on ^1.44842 ^ ^2.49805 0 0 0 0 1
particle wax_on ^1.383 ^ ^2.38474 0 0 0 0 1
particle wax_on ^1.31758 ^ ^2.27144 0 0 0 0 1
particle wax_on ^1.25217 ^ ^2.15813 0 0 0 0 1
particle wax_on ^1.18675 ^ ^2.04483 0 0 0 0 1
particle wax_on ^1.12133 ^ ^1.93152 0 0 0 0 1
particle wax_on ^1.05592 ^ ^1.81822 0 0 0 0 1
particle wax_on ^0.9905 ^ ^1.70491 0 0 0 0 1
particle wax_on ^0.92508 ^ ^1.59161 0 0 0 0 1
particle wax_on ^0.85967 ^ ^1.4783 0 0 0 0 1
particle wax_on ^0.79425 ^ ^1.365 0 0 0 0 1
particle wax_on ^0.85967 ^ ^1.2517 0 0 0 0 1
particle wax_on ^0.92508 ^ ^1.13839 0 0 0 0 1
particle wax_on ^0.9905 ^ ^1.02509 0 0 0 0 1
particle wax_on ^1.05592 ^ ^0.91178 0 0 0 0 1
particle wax_on ^1.12133 ^ ^0.79848 0 0 0 0 1
particle wax_on ^1.18675 ^ ^0.68517 0 0 0 0 1
particle wax_on ^1.25217 ^ ^0.57187 0 0 0 0 1
particle wax_on ^1.31758 ^ ^0.45856 0 0 0 0 1
particle wax_on ^1.383 ^ ^0.34526 0 0 0 0 1
particle wax_on ^1.44842 ^ ^0.23195 0 0 0 0 1
particle wax_on ^1.51383 ^ ^0.11865 0 0 0 0 1
particle wax_on ^1.50458 ^ ^2.8433 0 0 0 0 1
particle wax_on ^1.43917 ^ ^2.95661 0 0 0 0 1
particle wax_on ^1.37375 ^ ^3.06991 0 0 0 0 1
particle wax_on ^1.30833 ^ ^3.18322 0 0 0 0 1
particle wax_on ^1.24292 ^ ^3.29652 0 0 0 0 1
particle wax_on ^1.1775 ^ ^3.40983 0 0 0 0 1
particle wax_on ^1.11208 ^ ^3.52313 0 0 0 0 1
particle wax_on ^1.04667 ^ ^3.63644 0 0 0 0 1
particle wax_on ^0.98125 ^ ^3.74974 0 0 0 0 1
particle wax_on ^0.91583 ^ ^3.86305 0 0 0 0 1
particle wax_on ^0.85042 ^ ^3.97635 0 0 0 0 1
particle wax_on ^0.785 ^ ^4.08966 0 0 0 0 1
particle wax_on ^0.65417 ^ ^4.08966 0 0 0 0 1
particle wax_on ^0.52333 ^ ^4.08966 0 0 0 0 1
particle wax_on ^0.3925 ^ ^4.08966 0 0 0 0 1
particle wax_on ^0.26167 ^ ^4.08966 0 0 0 0 1
particle wax_on ^0.13083 ^ ^4.08966 0 0 0 0 1
particle wax_on ^0 ^ ^4.08966 0 0 0 0 1
particle wax_on ^-0.13083 ^ ^4.08966 0 0 0 0 1
particle wax_on ^-0.26167 ^ ^4.08966 0 0 0 0 1
particle wax_on ^-0.3925 ^ ^4.08966 0 0 0 0 1
particle wax_on ^-0.52333 ^ ^4.08966 0 0 0 0 1
particle wax_on ^-0.65417 ^ ^4.08966 0 0 0 0 1
particle wax_on ^-0.785 ^ ^4.08966 0 0 0 0 1
particle wax_on ^-0.85042 ^ ^3.97635 0 0 0 0 1
particle wax_on ^-0.91583 ^ ^3.86305 0 0 0 0 1
particle wax_on ^-0.98125 ^ ^3.74974 0 0 0 0 1
particle wax_on ^-1.04667 ^ ^3.63644 0 0 0 0 1
particle wax_on ^-1.11208 ^ ^3.52313 0 0 0 0 1
particle wax_on ^-1.1775 ^ ^3.40983 0 0 0 0 1
particle wax_on ^-1.24292 ^ ^3.29652 0 0 0 0 1
particle wax_on ^-1.30833 ^ ^3.18322 0 0 0 0 1
particle wax_on ^-1.37375 ^ ^3.06991 0 0 0 0 1
particle wax_on ^-1.43917 ^ ^2.95661 0 0 0 0 1
particle wax_on ^-1.50458 ^ ^2.8433 0 0 0 0 1
particle wax_on ^-1.57 ^ ^2.73 0 0 0 0 1
particle wax_on ^-1.50458 ^ ^2.6167 0 0 0 0 1
particle wax_on ^-1.43917 ^ ^2.50339 0 0 0 0 1
particle wax_on ^-1.37375 ^ ^2.39009 0 0 0 0 1
particle wax_on ^-1.30833 ^ ^2.27678 0 0 0 0 1
particle wax_on ^-1.24292 ^ ^2.16348 0 0 0 0 1
particle wax_on ^-1.1775 ^ ^2.05017 0 0 0 0 1
particle wax_on ^-1.11208 ^ ^1.93687 0 0 0 0 1
particle wax_on ^-1.04667 ^ ^1.82356 0 0 0 0 1
particle wax_on ^-0.98125 ^ ^1.71026 0 0 0 0 1
particle wax_on ^-0.91583 ^ ^1.59695 0 0 0 0 1
particle wax_on ^-0.85042 ^ ^1.48365 0 0 0 0 1
particle wax_on ^-0.785 ^ ^1.37034 0 0 0 0 1
particle wax_on ^-0.65417 ^ ^1.37034 0 0 0 0 1
particle wax_on ^-0.52333 ^ ^1.37034 0 0 0 0 1
particle wax_on ^-0.3925 ^ ^1.37034 0 0 0 0 1
particle wax_on ^-0.26167 ^ ^1.37034 0 0 0 0 1
particle wax_on ^-0.13083 ^ ^1.37034 0 0 0 0 1
particle wax_on ^0 ^ ^1.37034 0 0 0 0 1
particle wax_on ^0.13083 ^ ^1.37034 0 0 0 0 1
particle wax_on ^0.26167 ^ ^1.37034 0 0 0 0 1
particle wax_on ^0.3925 ^ ^1.37034 0 0 0 0 1
particle wax_on ^0.52333 ^ ^1.37034 0 0 0 0 1
particle wax_on ^0.65417 ^ ^1.37034 0 0 0 0 1
particle wax_on ^-1.57925 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-1.51383 ^ ^0.11865 0 0 0 0 1
particle wax_on ^-1.44842 ^ ^0.23195 0 0 0 0 1
particle wax_on ^-1.383 ^ ^0.34526 0 0 0 0 1
particle wax_on ^-1.31758 ^ ^0.45856 0 0 0 0 1
particle wax_on ^-1.25217 ^ ^0.57187 0 0 0 0 1
particle wax_on ^-1.18675 ^ ^0.68517 0 0 0 0 1
particle wax_on ^-1.12133 ^ ^0.79848 0 0 0 0 1
particle wax_on ^-1.05592 ^ ^0.91178 0 0 0 0 1
particle wax_on ^-0.9905 ^ ^1.02509 0 0 0 0 1
particle wax_on ^-0.92508 ^ ^1.13839 0 0 0 0 1
particle wax_on ^-0.85967 ^ ^1.2517 0 0 0 0 1
particle wax_on ^-1.71008 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-1.84092 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-1.97175 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-2.10258 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-2.23342 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-2.36425 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-2.49508 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-2.62592 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-2.75675 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-2.88758 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-3.01842 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-3.14925 ^ ^2.72466 0 0 0 0 1
particle wax_on ^-3.21467 ^ ^2.61135 0 0 0 0 1
particle wax_on ^-3.28008 ^ ^2.49805 0 0 0 0 1
particle wax_on ^-3.3455 ^ ^2.38474 0 0 0 0 1
particle wax_on ^-3.41092 ^ ^2.27144 0 0 0 0 1
particle wax_on ^-3.47633 ^ ^2.15813 0 0 0 0 1
particle wax_on ^-3.54175 ^ ^2.04483 0 0 0 0 1
particle wax_on ^-3.60717 ^ ^1.93152 0 0 0 0 1
particle wax_on ^-3.67258 ^ ^1.81822 0 0 0 0 1
particle wax_on ^-3.738 ^ ^1.70491 0 0 0 0 1
particle wax_on ^-3.80342 ^ ^1.59161 0 0 0 0 1
particle wax_on ^-3.86883 ^ ^1.4783 0 0 0 0 1
particle wax_on ^-3.93425 ^ ^1.365 0 0 0 0 1
particle wax_on ^-3.86883 ^ ^1.2517 0 0 0 0 1
particle wax_on ^-3.80342 ^ ^1.13839 0 0 0 0 1
particle wax_on ^-3.738 ^ ^1.02509 0 0 0 0 1
particle wax_on ^-3.67258 ^ ^0.91178 0 0 0 0 1
particle wax_on ^-3.60717 ^ ^0.79848 0 0 0 0 1
particle wax_on ^-3.54175 ^ ^0.68517 0 0 0 0 1
particle wax_on ^-3.47633 ^ ^0.57187 0 0 0 0 1
particle wax_on ^-3.41092 ^ ^0.45856 0 0 0 0 1
particle wax_on ^-3.3455 ^ ^0.34526 0 0 0 0 1
particle wax_on ^-3.28008 ^ ^0.23195 0 0 0 0 1
particle wax_on ^-3.21467 ^ ^0.11865 0 0 0 0 1
particle wax_on ^-3.14925 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-3.01842 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-2.88758 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-2.75675 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-2.62592 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-2.49508 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-2.36425 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-2.23342 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-2.10258 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-1.97175 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-1.84092 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-1.71008 ^ ^0.00534 0 0 0 0 1
particle wax_on ^-0.85967 ^ ^-1.2517 0 0 0 0 1
particle wax_on ^-0.92508 ^ ^-1.13839 0 0 0 0 1
particle wax_on ^-0.9905 ^ ^-1.02509 0 0 0 0 1
particle wax_on ^-1.05592 ^ ^-0.91178 0 0 0 0 1
particle wax_on ^-1.12133 ^ ^-0.79848 0 0 0 0 1
particle wax_on ^-1.18675 ^ ^-0.68517 0 0 0 0 1
particle wax_on ^-1.25217 ^ ^-0.57187 0 0 0 0 1
particle wax_on ^-1.31758 ^ ^-0.45856 0 0 0 0 1
particle wax_on ^-1.383 ^ ^-0.34526 0 0 0 0 1
particle wax_on ^-1.44842 ^ ^-0.23195 0 0 0 0 1
particle wax_on ^-1.51383 ^ ^-0.11865 0 0 0 0 1
particle wax_on ^-3.21467 ^ ^-0.11865 0 0 0 0 1
particle wax_on ^-3.28008 ^ ^-0.23195 0 0 0 0 1
particle wax_on ^-3.3455 ^ ^-0.34526 0 0 0 0 1
particle wax_on ^-3.41092 ^ ^-0.45856 0 0 0 0 1
particle wax_on ^-3.47633 ^ ^-0.57187 0 0 0 0 1
particle wax_on ^-3.54175 ^ ^-0.68517 0 0 0 0 1
particle wax_on ^-3.60717 ^ ^-0.79848 0 0 0 0 1
particle wax_on ^-3.67258 ^ ^-0.91178 0 0 0 0 1
particle wax_on ^-3.738 ^ ^-1.02509 0 0 0 0 1
particle wax_on ^-3.80342 ^ ^-1.13839 0 0 0 0 1
particle wax_on ^-3.86883 ^ ^-1.2517 0 0 0 0 1
particle wax_on ^-3.93425 ^ ^-1.365 0 0 0 0 1
particle wax_on ^-3.86883 ^ ^-1.4783 0 0 0 0 1
particle wax_on ^-3.80342 ^ ^-1.59161 0 0 0 0 1
particle wax_on ^-3.738 ^ ^-1.70491 0 0 0 0 1
particle wax_on ^-3.67258 ^ ^-1.81822 0 0 0 0 1
particle wax_on ^-3.60717 ^ ^-1.93152 0 0 0 0 1
particle wax_on ^-3.54175 ^ ^-2.04483 0 0 0 0 1
particle wax_on ^-3.47633 ^ ^-2.15813 0 0 0 0 1
particle wax_on ^-3.41092 ^ ^-2.27144 0 0 0 0 1
particle wax_on ^-3.3455 ^ ^-2.38474 0 0 0 0 1
particle wax_on ^-3.28008 ^ ^-2.49805 0 0 0 0 1
particle wax_on ^-3.21467 ^ ^-2.61135 0 0 0 0 1
particle wax_on ^-3.14925 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-3.01842 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-2.88758 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-2.75675 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-2.62592 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-2.49508 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-2.36425 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-2.23342 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-2.10258 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-1.97175 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-1.84092 ^ ^-2.72466 0 0 0 0 1
particle wax_on ^-1.71008 ^ ^-2.72466 0 0 0 0 1


text:
#> asset:artifact/0840.honey_bee_stick/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0840.honey_bee_stick/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
    function asset:artifact/common/use/auto

# ここから先は神器側の効果の処理を書く

# 演出
    execute positioned ~ ~0.2 ~ rotated ~ 0 run function asset:artifact/0840.honey_bee_stick/trigger/4.vfx
    particle minecraft:block honey_block ~ ~1.2 ~ 3 0.4 3 0 50
    particle dust 1.000 0.741 0.141 1.3 ~ ~1.2 ~ 2 0.4 2 0 240 normal
    particle minecraft:wax_on ~ ~ ~ 2 2 2 0 100
    playsound minecraft:entity.glow_squid.squirt player @a ~ ~ ~ 1 0.8 0

# 回復
    data modify storage lib: Argument.Heal set value 20f
    function lib:heal/modifier
    execute as @a[distance=..5] run function lib:heal/
    function lib:heal/reset

# ダメージ
    data modify storage lib: Argument.Damage set value 800.0f
    data modify storage lib: Argument.AttackType set value "Magic"
    data modify storage lib: Argument.ElementType set value "Water"
    function lib:damage/modifier
    execute as @e[type=#lib:living,type=!player,tag=Enemy,tag=!Uninterferable,distance=..5] run function lib:damage/
    function lib:damage/reset

# 鈍足付与
    effect give @e[type=#lib:living,type=!player,tag=Enemy,tag=!Uninterferable,distance=..5] slowness 2 2 true

repo_name: ProjectTSB/TheSkyBlessing

repo_language: mcfunction

mime_type: text/plain


text:
#> asset:artifact/0840.honey_bee_stick/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのautoに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{auto:840} run function asset:artifact/0840.honey_bee_stick/trigger/2.check_condition


text:
#> asset:artifact/0954.inverted_parachute/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[1] append value 954


text:
#> asset:artifact/0954.inverted_parachute/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:954} run function asset:artifact/0954.inverted_parachute/give/2.give


text:
#> asset:artifact/0954.inverted_parachute/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0954.inverted_parachute/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 954
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '{"text":"逆さパラシュート","color":"yellow"}'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['{"text":"ゆっくりと落ちることができる。上に。"}']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    data modify storage asset:artifact RemainingCount set value 15
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "hotbar"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "equipping"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value '{"text":"サバイバルモード"}'
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.Damage set value [0,0]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.IsRangeAttack set value
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 25
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    # data modify storage asset:artifact LocalCooldown set value
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value ["Urban", "Nyaptov", "Wi-ki"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    # data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0954.inverted_parachute/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0954.inverted_parachute/trigger/1.trigger

# ID指定する
    data modify storage asset:artifact TargetID set value 954
# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
    function asset:artifact/common/check_condition/hotbar
# 他にアイテム等確認する場合はここに書く
    execute if entity @s[gamemode=!survival,tag=CanUsed] run function lib:message/artifact/can_not_use_here
    execute if entity @s[gamemode=!survival] run tag @s remove CanUsed

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0954.inverted_parachute/trigger/3.main


text:
#> asset:artifact/0954.inverted_parachute/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0954.inverted_parachute/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
    function asset:artifact/common/use/hotbar

# ここから先は神器側の効果の処理を書く
    playsound minecraft:entity.bat.takeoff player @a ~ ~ ~ 0.5 0
    effect give @s levitation 1000000 3 true


text:
#> asset:artifact/0954.inverted_parachute/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのautoに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{hotbar:[954]} run function asset:artifact/0954.inverted_parachute/trigger/2.check_condition
    #execute if data storage asset:context id{offhand:954} run function asset:artifact/0954.inverted_parachute/trigger/2.check_condition


text:
#> asset:artifact/0954.inverted_parachute/trigger/dis_equip/main
#
# 装備を外した時のメイン処理
#
# @within function asset:artifact/0954.inverted_parachute/trigger/dis_equip/

playsound minecraft:entity.leash_knot.break player @a ~ ~ ~ 0.75 0
effect clear @s levitation


text:
#> asset:artifact/0094.netherite_armor_set/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:94} run function asset:artifact/0094.netherite_armor_set/give/2.give


text:
#> asset:artifact/0094.netherite_armor_set/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0094.netherite_armor_set/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 94
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '{"text":"ネザライト装備セット","italic":false}'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['{"text":"エンチャント不可のネザライト装備を装着する"}']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    data modify storage asset:artifact RemainingCount set value 1
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "auto"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onClick"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.Damage set value [0,0]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.IsRangeAttack set value
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 0
# MP必要量 (int) (オプション)
    data modify storage asset:artifact MPRequire set value 210
# 神器のクールダウン (int) (オプション)
    # data modify storage asset:artifact LocalCooldown set value
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value "ALL"
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    # data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0094.netherite_armor_set/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0094.netherite_armor_set/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
    function asset:artifact/common/check_condition/auto
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0094.netherite_armor_set/trigger/3.main


text:
#> asset:artifact/0094.netherite_armor_set/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0094.netherite_armor_set/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
    function asset:artifact/common/use/auto

# ここから先は神器側の効果の処理を書く

# 装備変更成功の時
    execute unless data storage asset:context {Inventory:[{Slot:100b},{Slot:101b},{Slot:102b},{Slot:103b}]} run particle minecraft:happy_villager ~ ~1 ~ 0.4 0.4 0.4 0.1 50
    execute unless data storage asset:context {Inventory:[{Slot:100b},{Slot:101b},{Slot:102b},{Slot:103b}]} run playsound minecraft:block.anvil.land player @a ~ ~ ~ 1 2

# 装備変更失敗の時
    execute if data storage asset:context {Inventory:[{Slot:100b},{Slot:101b},{Slot:102b},{Slot:103b}]} run particle minecraft:smoke ~ ~1 ~ 0 0 0 0.1 50
    execute if data storage asset:context {Inventory:[{Slot:100b},{Slot:101b},{Slot:102b},{Slot:103b}]} run playsound minecraft:item.shield.break player @a ~ ~ ~ 1 0.5

# 装備返却処理
    execute if data storage asset:context {Inventory:[{Slot:103b}]} run summon item ~ ~ ~ {Motion:[0.0,0.1,0.0],Item:{id:"minecraft:netherite_helmet",Count:1b,tag:{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]}}}
    execute if data storage asset:context {Inventory:[{Slot:102b}]} run summon item ~ ~ ~ {Motion:[0.0,0.1,0.0],Item:{id:"minecraft:netherite_chestplate",Count:1b,tag:{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]}}}
    execute if data storage asset:context {Inventory:[{Slot:101b}]} run summon item ~ ~ ~ {Motion:[0.0,0.1,0.0],Item:{id:"minecraft:netherite_leggings",Count:1b,tag:{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]}}}
    execute if data storage asset:context {Inventory:[{Slot:100b}]} run summon item ~ ~ ~ {Motion:[0.0,0.1,0.0],Item:{id:"minecraft:netherite_boots",Count:1b,tag:{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]}}}

# 装備変更
    execute unless data storage asset:context {Inventory:[{Slot:103b}]} run item replace entity @s armor.head with minecraft:netherite_helmet{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]} 1
    execute unless data storage asset:context {Inventory:[{Slot:102b}]} run item replace entity @s armor.chest with minecraft:netherite_chestplate{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]} 1
    execute unless data storage asset:context {Inventory:[{Slot:101b}]} run item replace entity @s armor.legs with minecraft:netherite_leggings{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]} 1
    execute unless data storage asset:context {Inventory:[{Slot:100b}]} run item replace entity @s armor.feet with minecraft:netherite_boots{display:{Name:'{"text":"簡易ネザライト防具","italic":false}'},RepairCost:9999,Enchantments:[{}]} 1


text:
#> asset:artifact/0094.netherite_armor_set/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのautoに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{auto:94} run function asset:artifact/0094.netherite_armor_set/trigger/2.check_condition


text:
#> asset:artifact/0292.craving_sword/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[1] append value 292


text:
#> asset:artifact/0292.craving_sword/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:292} run function asset:artifact/0292.craving_sword/give/2.give


text:
#> asset:artifact/0292.craving_sword/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0292.craving_sword/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 292
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '{"text":"渇望の剣","color":"dark_red"}'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['{"text":"キルすると体力が回復する。"}']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    # data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "mainhand"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onKilledByMelee"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.Damage set value [0,0]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.IsRangeAttack set value
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 0
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    # data modify storage asset:artifact LocalCooldown set value
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value ["Flora", "Urban", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    data modify storage asset:artifact CustomNBT set value {AttributeModifiers:[{AttributeName:"generic.attack_damage",Amount:31.2,Operation:0,UUID:[I;1,1,292,1],Slot:mainhand,Name:"generic.attack_damage"},{AttributeName:"generic.attack_speed",Amount:-0.2,Operation:0,UUID:[I;1,1,292,1],Slot:mainhand,Name:"generic.attack_speed"}]}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0292.craving_sword/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0292.craving_sword/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/check_condition/mainhand
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0292.craving_sword/trigger/3.main


text:
#> asset:artifact/0292.craving_sword/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0292.craving_sword/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/use/mainhand

# ここから先は神器側の効果の処理を書く

# 演出
    particle minecraft:composter ~ ~1 ~ 0.5 0.5 0.5 1 20 force @s
    playsound minecraft:entity.arrow.hit_player player @s ~ ~ ~ 1 1

# HP回復
    data modify storage lib: Argument.Heal set value 8f
    function lib:heal/modifier
    function lib:heal/

# リセット
    function lib:heal/reset


text:
#> asset:artifact/0292.craving_sword/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのauto/feet/legs/chest/head/mainhand/offhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{mainhand:292} run function asset:artifact/0292.craving_sword/trigger/2.check_condition


text:
#> asset:artifact/0210.terra_blade/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[3] append value 210


text:
#> asset:artifact/0210.terra_blade/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:210} run function asset:artifact/0210.terra_blade/give/2.give


text:
#> asset:artifact/0210.terra_blade/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0210.terra_blade/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 210
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '[{"text":"テラ","color":"#29D656","italic":false},{"text":"ダブ","color":"#22B19A","italic":false},{"text":"リス","color":"#238db6","italic":false}]'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['{"text":"目の前に武器の幻影を作り出し、魔法弾を連射する。","color":"white","italic":false}','[{"text":"もちろん、剣としての斬れ味も","color":"white","italic":false},{"text":"抜群","color":"gold","italic":false},{"text":"。","color":"white","italic":false}]','{"text":"\\"大地の力を解き放て！\\"","color":"gray","italic":false}']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    # data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "auto"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onClick"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.Damage set value ["70x6"]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.AttackType set value [Physical]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.ElementType set value [None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 15
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value 100
# 神器のクールダウン (int) (オプション)
    data modify storage asset:artifact LocalCooldown set value 30
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    data modify storage asset:artifact DisableCooldownMessage set value true
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value "ALL"
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    data modify storage asset:artifact CustomNBT set value {HideFlags:6,Unbreakable:1b,AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:140.0,Operation:0,UUID:[I;-1060843307,550455007,-1279204449,-249445105],Slot:"mainhand"},{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-3.0,Operation:0,UUID:[I;-326377093,214385260,-1706767736,-1207015802],Slot:"mainhand"}]}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0210.terra_blade/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0210.terra_blade/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/check_condition/auto
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0210.terra_blade/trigger/3.main


text:
#> asset:artifact/0210.terra_blade/trigger/3.1.terra_shot_tick
#
# テラブレードショットにコマンドを実行するためのfunction。scheduleで自身を呼び出して再帰するよ！
#
# @within function
#   asset:artifact/0210.terra_blade/trigger/3.1.terra_shot_tick
#   asset:artifact/0210.terra_blade/trigger/event/summon_shot
#   asset:artifact/0210.terra_blade/trigger/rejoin_process

# テラショットにコマンド実行
    execute as @e[type=armor_stand,tag=5U.Shot] at @s run function asset:artifact/0210.terra_blade/trigger/3.3.terra_shot_main

# ビームが存在していれば、このfunctionをループさせるよ
    execute if entity @e[type=armor_stand,tag=5U.Shot,limit=1] run schedule function asset:artifact/0210.terra_blade/trigger/3.1.terra_shot_tick 1t


text:
#> asset:artifact/0210.terra_blade/trigger/terra_shot_break
#
#
#
# @within function asset:artifact/0210.terra_blade/trigger/*

scoreboard players reset @s 5U.Range
particle minecraft:happy_villager ^ ^ ^-1 0 0 0 1 1 force
particle minecraft:crit ^ ^ ^-1 0 0 0 0.25 5
kill @s


text:
#> asset:artifact/0210.terra_blade/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0210.terra_blade/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/use/auto

# VFX
    playsound minecraft:item.trident.throw player @a ~ ~ ~ 1.5 0.75
    playsound minecraft:entity.player.attack.sweep player @a ~ ~ ~ 1.5 1.25

# 剣を召喚
    function asset:artifact/0210.terra_blade/trigger/sword/summon_sword


text:
#> asset:artifact/0210.terra_blade/trigger/0.load
#
# スコアボード作成
#
# @within tag/function asset:artifact/load

#> Objective
# @within asset:artifact/0210.terra_blade/trigger/**
    scoreboard objectives add 5U.Tick dummy
    scoreboard objectives add 5U.ID dummy
    scoreboard objectives add 5U.Range dummy
    scoreboard objectives add 5U.Recursion dummy
    scoreboard objectives add 5U.Owner dummy
    scoreboard objectives add 5U.Life dummy
    scoreboard objectives add 5U.Burst dummy


text:
#> asset:artifact/0210.terra_blade/trigger/rejoin_process
#
# 使い方は必ずwikiを見ること
#
# @within tag/function asset:rejoin

# このfunctionをループさせる
    execute if entity @e[type=armor_stand,tag=5U.Sword,limit=1] run schedule function asset:artifact/0210.terra_blade/trigger/sword/sword_schedule 1t
    execute if entity @e[type=armor_stand,tag=5U.Shot,limit=1] run schedule function asset:artifact/0210.terra_blade/trigger/3.1.terra_shot_tick 1t


text:
#> asset:artifact/0210.terra_blade/trigger/3.5.terra_shot_hit
#
# モブにヒットした際の処理だよ ノックバックは…どうしよう。
#
# @within function asset:artifact/0210.terra_blade/trigger/3.3.terra_shot_main

# 魔法、無属性のダメージをぶちかます
    data modify storage lib: Argument.Damage set value 70.0f
    data modify storage lib: Argument.AttackType set value "Physical"
    data modify storage lib: Argument.ElementType set value "None"
    tag @s add this
    execute as @a if score @s UserID = @e[type=armor_stand,tag=this,distance=..1,limit=1] 5U.ID run function lib:damage/modifier
    tag @s remove this
    execute as @e[type=#lib:living,type=!player,sort=nearest,limit=1] run function lib:damage/
    function lib:damage/reset

# パーティクル
    particle minecraft:crit ~ ~ ~ 0 0 0 0.5 10
    particle minecraft:sweep_attack ~ ~ ~ 0 0 0 0 1

#ショット削除
    function asset:artifact/0210.terra_blade/trigger/terra_shot_break


text:
#> asset:artifact/0210.terra_blade/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのauto/feet/legs/chest/head/mainhand/offhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{auto:210} run function asset:artifact/0210.terra_blade/trigger/2.check_condition


text:
#> asset:artifact/0210.terra_blade/trigger/3.3.terra_shot_main
#
# テラブレードショットに"3.4.terra_shot_main2"を複数回実行させたいだけのfunction 負荷によってはボツにする予定
#
# @within function asset:artifact/0210.terra_blade/trigger/3.1.terra_shot_tick
# @within function asset:artifact/0210.terra_blade/trigger/3.3.terra_shot_main

# 移動とパーティクル
    tp @s ^ ^ ^0.5
    particle minecraft:composter ~ ~ ~ 0 0 0 0 1 force
    particle minecraft:dust 0 1 0.25 0.75 ~ ~ ~ 0 0 0 0 1
    particle minecraft:dust 0.75 1 0.75 0.75 ~ ~ ~ 0 0 0 0 1

# モブに接触
    execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living,type=!player,tag=!Uninterferable,dx=0] positioned ~0.5 ~0.5 ~0.5 run function asset:artifact/0210.terra_blade/trigger/3.5.terra_shot_hit

# 再帰カウントが0なら弾速からセット
    execute unless entity @s[scores={5U.Recursion=1..,5U.Range=1..}] run scoreboard players set @s 5U.Recursion 10

# 前進
    execute if entity @s[scores={5U.Recursion=1..,5U.Range=1..}] run tp @s ^ ^ ^0.25 ~ ~

# スコア減算
    scoreboard players remove @s 5U.Recursion 1
    scoreboard players remove @s 5U.Range 1

# 壁の衝突判定
    execute at @s unless block ~ ~ ~ #lib:no_collision run function asset:artifact/0210.terra_blade/trigger/terra_shot_break

# 再帰
    execute if entity @s[scores={5U.Recursion=1..,5U.Range=1..}] at @s run function asset:artifact/0210.terra_blade/trigger/3.3.terra_shot_main

# キル
    execute if entity @s[scores={5U.Range=0}] run function asset:artifact/0210.terra_blade/trigger/terra_shot_break


text:
#> asset:artifact/0210.terra_blade/trigger/_index.d
#
# インデックス
#
# @within function asset:artifact/0210.terra_blade/trigger/2.check_condition

#> tags
# @within function asset:artifact/0210.terra_blade/trigger/**
    #declare tag 5U.ShotInit
    #declare tag 5U.Shot
    #declare tag 5U.Spread
    #declare tag 5U.This
    #
    #declare tag 5U.Sword


text:
#> asset:artifact/0210.terra_blade/trigger/3.2.terra_shot_init
#
# テラショット発射直後の動作。向きを発射者に揃えて、発射者の目線の高さに移動
#
# @within function asset:artifact/0210.terra_blade/trigger/event/summon_shot

#> SpreadLib
# @private
#declare tag SpreadMarker

# パーティクル
    particle minecraft:dust 0 1 0 1 ~ ~ ~ 0.1 0.1 0.1 0 2
    particle minecraft:dust 0 1 0.5 0.75 ~ ~ ~ 0.1 0.1 0.1 0 2

# 向き調整とタグ削除
# 精度
    summon marker ~ ~ ~ {Tags:["SpreadMarker"]}
    data modify storage lib: Argument.Distance set value 21.0f
    data modify storage lib: Argument.Spread set value 0.5f
    execute as @e[type=marker,tag=SpreadMarker,limit=1] at @p[tag=5U.This] anchored eyes positioned ^ ^ ^ run function lib:forward_spreader/circle
    execute facing entity @e[type=marker,tag=SpreadMarker,limit=1] feet run tp @s ~ ~ ~ ~ ~
    tag @s remove 5U.ShotInit
    tag @s add 5U.Shot

# スコアセット
    scoreboard players set @s 5U.Range 100

# IDコピー
    scoreboard players operation @s 5U.ID = @a[tag=5U.This,limit=1] UserID

# リセット
    kill @e[type=marker,tag=SpreadMarker]


text:
#> asset:artifact/0210.terra_blade/trigger/event/random_position
#
#
#
# @within function asset:artifact/0210.terra_blade/trigger/event/summon_shot

#> SpreadLib
# @private
#declare tag SpreadMarker

    summon marker ~ ~ ~ {Tags:["SpreadMarker"]}
    data modify storage lib: Argument.Distance set value 0.5f
    data modify storage lib: Argument.Spread set value 1.5f
    execute as @e[type=marker,tag=SpreadMarker,limit=1] at @p[tag=5U.This] anchored eyes positioned ^ ^ ^ run function lib:forward_spreader/circle
    execute at @e[type=marker,tag=SpreadMarker,limit=1] run summon armor_stand ^-0.35 ^-0.25 ^ {Marker:1b,Invisible:1b,Tags:["5U.ShotInit","Projectile","Uninterferable"]}


text:
#> asset:artifact/0210.terra_blade/trigger/event/summon_shot
#
#
#
# @within function
#       asset:artifact/0210.terra_blade/trigger/3.main
#       asset:artifact/0210.terra_blade/trigger/sword/sword

# サウンド
    playsound minecraft:entity.shulker.shoot player @a ~ ~ ~ 2 1.5
    playsound minecraft:entity.ghast.shoot player @a ~ ~ ~ 2 2

# ランダムな位置から発射
    function asset:artifact/0210.terra_blade/trigger/event/random_position

# テラショットにInitコマンド実行
    execute as @e[type=armor_stand,tag=5U.ShotInit] at @s run function asset:artifact/0210.terra_blade/trigger/3.2.terra_shot_init

# ループスタート
    function asset:artifact/0210.terra_blade/trigger/3.1.terra_shot_tick


text:
#> asset:artifact/0210.terra_blade/trigger/sword/summon_sword
#
#
#
# @within function asset:artifact/0210.terra_blade/trigger/3.main

#> Private
# @private
    #declare tag 5U.Init

# 剣オブジェクトを召喚！
    summon armor_stand ~ ~ ~ {DisabledSlots:4144959,Invisible:1b,Pose:{Head:[0.1f,0.1f,0.1f]},Tags:["Object","Uninterferable","5U.Sword","5U.Init"],ArmorItems:[{},{},{},{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20185}}]}

# スコアを与える
# 召喚者を特定
    execute store result score @e[type=armor_stand,tag=5U.Init,distance=..5] 5U.Owner run scoreboard players get @s UserID
# ライフタイム設定
    scoreboard players set @e[type=armor_stand,tag=5U.Init,distance=..5] 5U.Life 20

# スケジュールループを開始
    schedule function asset:artifact/0210.terra_blade/trigger/sword/sword_schedule 1t replace


text:
#> asset:artifact/0210.terra_blade/trigger/sword/sword_schedule
#
#
#
# @within function
#       asset:artifact/0210.terra_blade/trigger/sword/summon_sword
#       asset:artifact/0210.terra_blade/trigger/sword/sword_schedule
#       asset:artifact/0210.terra_blade/trigger/rejoin_process

# 実行
    execute as @e[type=armor_stand,tag=5U.Sword] at @s run function asset:artifact/0210.terra_blade/trigger/sword/sword
# ループ
    execute if entity @e[type=armor_stand,tag=5U.Sword,limit=1] run schedule function asset:artifact/0210.terra_blade/trigger/sword/sword_schedule 1t replace


text:
#> asset:artifact/0210.terra_blade/trigger/sword/sword
#
#
#
# @within function asset:artifact/0210.terra_blade/trigger/sword/sword_schedule

#> Private
# @private
    #declare score_holder $4tInterval

# 4tickおきに実行するやつ
# 実行時間を移す
    scoreboard players operation $4tInterval Temporary = @s 5U.Life
# 4tickおきに実行
    scoreboard players operation $4tInterval Temporary %= $4 Const
    execute if score $4tInterval Temporary matches 0 run playsound minecraft:item.trident.throw player @a ~ ~ ~ 1.5 0.75
    execute if score $4tInterval Temporary matches 0 run playsound minecraft:entity.player.attack.sweep player @a ~ ~ ~ 1.5 1.25
# リセット
    scoreboard players reset $4tInterval

# スコアID使って対象を特定
    execute at @a if score @s 5U.Owner = @p UserID run tag @p add 5U.This

# 持ち主にTP
    execute at @p[tag=5U.This] positioned ^ ^ ^1.2 run tp @s ~ ~ ~
    execute as @p[tag=5U.This] run function api:data_get/rotation
    execute store result entity @s Pose.Head[1] float 1 run data get storage api: Rotation[0]
    execute store result entity @s Pose.Head[0] float 1 run data get storage api: Rotation[1]

# 射撃攻撃
    scoreboard players add @s 5U.Burst 1
    scoreboard players reset @s[scores={5U.Burst=2,5U.Life=10..}] 5U.Burst
    execute if entity @s[scores={5U.Burst=1}] anchored eyes positioned ^ ^ ^ run function asset:artifact/0210.terra_blade/trigger/event/summon_shot

# タグ削除
    tag @p[tag=5U.This] remove 5U.This

# 消える
    scoreboard players remove @s 5U.Life 1
    kill @s[scores={5U.Life=..0}]


text:
#> asset:artifact/0250.phoenix/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[2] append value 250


text:
#> asset:artifact/0250.phoenix/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:250} run function asset:artifact/0250.phoenix/give/2.give


text:
#> asset:artifact/0250.phoenix/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0250.phoenix/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 250
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:bow"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '[{"text":"舞焔","color":"dark_red"},{"text":"-Phoenix-","color":"red"}]'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['[{"text":"Phoenix -フェニックス-"}]','[{"text":"不死鳥と呼ばれ、火から自ら蘇る"}]','[{"text":"輪廻の外にある神鳥とされる"}]']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    data modify storage asset:artifact RemainingCount set value 30
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "mainhand"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onAttackByProjectile"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.Damage set value [120,180]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.AttackType set value [Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.ElementType set value [Fire]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 50
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    # data modify storage asset:artifact LocalCooldown set value
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value ["Flora", "Urban", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    data modify storage asset:artifact CustomNBT set value {Unbreakable:1b,HideFlags:63}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0250.phoenix/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0250.phoenix/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/check_condition/mainhand
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0250.phoenix/trigger/3.main


text:
#> asset:artifact/0250.phoenix/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0250.phoenix/trigger/2.check_condition
#> private
# @private
    #declare tag Hit

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/use/mainhand

# ここから先は神器側の効果の処理を書く
    # 対象選定 + ダメージ増加判定
        execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..150] run tag @s add Hit
        execute store result score @s Temporary run time query daytime

        # //ここから@sのTemporaryは強さ指数に変化(0..2)
        # //昼だったらTemporaryが1..12000)指数が1になる
        execute unless score @s Temporary matches 1..12000 run scoreboard players set @s Temporary 0
        execute if score @s Temporary matches 1..12000 run scoreboard players set @s Temporary 1
        # //天気が晴なら指数1増加
        execute if predicate lib:weather/is_sunny run scoreboard players add @s Temporary 1

    # 演出
        execute at @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] run particle flame ~ ~0.3 ~ 0.4 0.4 0.4 0 150 force @a
        execute if score @s Temporary matches 0 at @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] run particle dust 1 0.533 0 1 ~ ~0.3 ~ 0.4 0.4 0.4 0 100 force @a
        execute if score @s Temporary matches 1 at @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] run particle dust 1 0 0 1 ~ ~-.3 ~ 0.4 0.4 0.4 0 100 force @a
        execute if score @s Temporary matches 2 at @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] run particle dust 0.969 0 1 1 ~ ~0.3 ~ 0.4 0.4 0.4 0 100 force @a
        execute at @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] run playsound item.firecharge.use player @a[distance=..100] ~ ~ ~ 10 1 1
        execute at @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] run playsound item.firecharge.use player @a[distance=..100] ~ ~ ~ 10 1 1
    # だめーーじ
        data merge storage lib: {Argument:{Damage:60.0f,AttackType:Magic,ElementType:Fire,FixedDamage:0b}}
        execute if score @s Temporary matches 1 run data modify storage lib: Argument.Damage set value 120.0f
        execute if score @s Temporary matches 2 run data modify storage lib: Argument.Damage set value 160.0f
        execute if score @s Temporary matches 3 run data modify storage lib: Argument.Damage set value 180.0f
        function lib:damage/modifier
        execute as @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] run function lib:damage/
        data modify entity @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] Fire set value 200s
    # リセット
        scoreboard players reset @s Temporary
        function lib:damage/reset
        tag @e[type=#lib:living,type=!player,tag=Victim,tag=Hit,distance=..100,limit=1] remove Hit


text:
#> asset:artifact/0250.phoenix/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのauto/feet/legs/chest/head/mainhand/offhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{mainhand:250} run function asset:artifact/0250.phoenix/trigger/2.check_condition


text:
#> asset:artifact/0615.censored/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[3] append value 615


text:
#> asset:artifact/0615.censored/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:615} run function asset:artifact/0615.censored/give/2.give


text:
#> asset:artifact/0615.censored/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0615.censored/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 615
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true}'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['[{"text":"この","color":"white","bold":false,"underlined":false},{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true},{"text":"は","color":"white","bold":false,"underlined":false},{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true},{"text":"だけで","color":"white","bold":false,"underlined":false}]','[{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true},{"text":"しまいそうになる。","color":"white","bold":false,"underlined":false}]','[{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true},{"text":"は","color":"white","bold":false,"underlined":false},{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true},{"text":"できるようだ。","color":"white","bold":false,"underlined":false}]','[{"text":"ただ、","color":"white","bold":false,"underlined":false},{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true},{"text":"であるなら","color":"white","bold":false,"underlined":false}]','[{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true},{"text":"しかないが。","color":"white","bold":false,"underlined":false}]']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    # data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "mainhand"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onAttackByMelee"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.Damage set value ["§4§n§l[CENSORED]"]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.AttackType set value [Physical]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.ElementType set value [None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.IsRangeAttack set value "不明"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.AttackRange set value "§4§n§l[CENSORED]"
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 20
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    data modify storage asset:artifact LocalCooldown set value 20
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value ["Urban", "Nyaptov"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    # data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0615.censored/trigger/3.5.execution_boss
#
# ボス級の処刑
#
# @within function asset:artifact/0615.censored/trigger/3.main

# 演出
    execute positioned ~ ~-0.2 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~ ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.2 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.4 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.6 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.8 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    function asset:artifact/0615.censored/trigger/3.2.censored_object2
    particle block redstone_block ~ ~1.5 ~ 0.5 0.5 0.5 1 30
    particle block bedrock ~ ~1.5 ~ 0.5 0.5 0.5 1 30
    playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 1 0
    playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 1 0
    playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 1 0

# ダメージを与える
    # 与えるダメージ
        data modify storage lib: Argument.Damage set value 666.0f
    # 第一属性
        data modify storage lib: Argument.AttackType set value "Physical"
# 補正function
    execute as @p[tag=this] run function lib:damage/modifier
# 対象に
    function lib:damage/
# リセット
    function lib:damage/reset


text:
#> asset:artifact/0615.censored/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0615.censored/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
    function asset:artifact/common/check_condition/mainhand
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0615.censored/trigger/3.main


text:
#> asset:artifact/0615.censored/trigger/3.4.execution
#
# 雑魚モブの処刑
#
# @within function asset:artifact/0615.censored/trigger/3.main

# 演出
    execute positioned ~ ~-0.2 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~ ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.2 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.4 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.6 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    execute positioned ~ ~0.8 ~ run function asset:artifact/0615.censored/trigger/3.1.censored_object
    function asset:artifact/0615.censored/trigger/3.2.censored_object2
    particle block redstone_block ~ ~1.5 ~ 0.5 0.5 0.5 1 30
    particle block bedrock ~ ~1.5 ~ 0.5 0.5 0.5 1 30

# 効果
    tp ~ -30 ~
    kill @s


text:
#> asset:artifact/0615.censored/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0615.censored/trigger/2.check_condition
#> Private
# @private
    #declare score_holder $Random

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
    function asset:artifact/common/use/mainhand

# ここから先は神器側の効果の処理を書く

# 確率で処刑する
    # 疑似乱数取得
        execute store result score $Random Temporary run function lib:random/
    # ほしい範囲に剰余算
        scoreboard players operation $Random Temporary %= $100 Const
    # 処刑
        execute if score $Random Temporary matches 0..19 as @e[type=#lib:living,type=!player,tag=Victim,tag=!Enemy.Boss] at @s run function asset:artifact/0615.censored/trigger/3.4.execution
    # ボス級の処刑
        execute if score $Random Temporary matches 0..19 as @e[type=#lib:living,type=!player,tag=Victim,tag=Enemy.Boss] at @s run function asset:artifact/0615.censored/trigger/3.5.execution_boss
    # 通常攻撃
        execute if score $Random Temporary matches 20..99 as @e[type=#lib:living,type=!player,tag=Victim] at @s run function asset:artifact/0615.censored/trigger/3.6.attack
    # リセット
        scoreboard players reset $Random Temporary


text:
#> asset:artifact/0615.censored/trigger/3.1.censored_object
#
# 演出にカスタムネームを使う
#
# @within function asset:artifact/0615.censored/trigger/**

# 召喚
    summon area_effect_cloud ~ ~ ~ {CustomNameVisible:1b,Particle:"block air",Duration:20,Tags:["Object","H3.Censored"],CustomName:'{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true}'}
    summon area_effect_cloud ~ ~ ~ {CustomNameVisible:1b,Particle:"block air",Duration:20,Tags:["Object","H3.Censored"],CustomName:'{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true}'}
    summon area_effect_cloud ~ ~ ~ {CustomNameVisible:1b,Particle:"block air",Duration:20,Tags:["Object","H3.Censored"],CustomName:'{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true}'}
    summon area_effect_cloud ~ ~ ~ {CustomNameVisible:1b,Particle:"block air",Duration:20,Tags:["Object","H3.Censored"],CustomName:'{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true}'}
    summon area_effect_cloud ~ ~ ~ {CustomNameVisible:1b,Particle:"block air",Duration:20,Tags:["Object","H3.Censored"],CustomName:'{"text":"[CENSORED]","color":"dark_red","bold":true,"underlined":true}'}


text:
#> asset:artifact/0615.censored/trigger/3.3.censored_sound
#
# ピー音を鳴らす処理
#
# @within function asset:artifact/0615.censored/trigger/**

# くっっっっっそやかましい音
    execute as @e[type=area_effect_cloud,tag=H3.CensoredSound] at @s run playsound minecraft:block.note_block.flute player @a[distance=..10] ~ ~ ~ 1 1.95
    execute as @e[type=area_effect_cloud,tag=H3.CensoredSound] at @s run playsound minecraft:block.note_block.flute player @a[distance=..10] ~ ~ ~ 1 1.9

# 音をぶち切る
    execute as @a at @s unless entity @e[type=area_effect_cloud,tag=H3.CensoredSound,distance=..10] run stopsound @s player minecraft:block.note_block.flute

# 再帰
    execute if entity @e[type=area_effect_cloud,tag=H3.CensoredSound,limit=1] run schedule function asset:artifact/0615.censored/trigger/3.3.censored_sound 1t


text:
#> asset:artifact/0615.censored/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{mainhand:615} run function asset:artifact/0615.censored/trigger/2.check_condition


text:
#> asset:artifact/0615.censored/trigger/3.6.attack
#
# 通常攻撃
#
# @within function asset:artifact/0615.censored/trigger/3.main

# 演出
    execute positioned ~ ~1.5 ~ rotated 0 90 run function asset:artifact/0615.censored/trigger/particle.1
    execute positioned ~ ~1.5 ~ rotated 45 90 run function asset:artifact/0615.censored/trigger/particle.1
    execute positioned ~ ~1.5 ~ rotated 90 90 run function asset:artifact/0615.censored/trigger/particle.1
    execute positioned ~ ~1.5 ~ rotated 135 90 run function asset:artifact/0615.censored/trigger/particle.1
    playsound minecraft:entity.illusioner.mirror_move player @a ~ ~ ~ 1 0

# ダメージを与える
    # 与えるダメージ
        data modify storage lib: Argument.Damage set value 333.0f
    # 第一属性
        data modify storage lib: Argument.AttackType set value "Physical"
# 補正function
    execute as @p[tag=this] run function lib:damage/modifier
# 対象に
    function lib:damage/
# リセット
    function lib:damage/reset


text:
#> asset:artifact/0615.censored/trigger/particle.1
#
#
#
# @within function asset:artifact/0615.censored/trigger/3.6.attack

# [ImportKey]: NobwRALgngDgpmAXGAxgSwE4oDYIDRgB2AhgLYLKBhigAQCMAzGATMRmQM5LgoD2AroQhJ6ABgIo4guBi5gAHkjFgoigL4E2AEzR9OiEQDoArAXYRWQ-QTjZsaGOwq0RSjD3MQKI1aoC6QA
# 円 13
particle dragon_breath ^0 ^ ^-0.5 0 0 0 0 1
particle dragon_breath ^0.10396 ^ ^-0.48907 0 0 0 0 1
particle dragon_breath ^0.20337 ^ ^-0.45677 0 0 0 0 1
particle dragon_breath ^0.29389 ^ ^-0.40451 0 0 0 0 1
particle dragon_breath ^0.37157 ^ ^-0.33457 0 0 0 0 1
particle dragon_breath ^0.43301 ^ ^-0.25 0 0 0 0 1
particle dragon_breath ^0.47553 ^ ^-0.15451 0 0 0 0 1
particle dragon_breath ^0.49726 ^ ^-0.05226 0 0 0 0 1
particle dragon_breath ^0.49726 ^ ^0.05226 0 0 0 0 1
particle dragon_breath ^0.47553 ^ ^0.15451 0 0 0 0 1
particle dragon_breath ^0.43301 ^ ^0.25 0 0 0 0 1
particle dragon_breath ^0.37157 ^ ^0.33457 0 0 0 0 1
particle dragon_breath ^0.29389 ^ ^0.40451 0 0 0 0 1
particle dragon_breath ^0.20337 ^ ^0.45677 0 0 0 0 1
particle dragon_breath ^0.10396 ^ ^0.48907 0 0 0 0 1
particle dragon_breath ^0 ^ ^0.5 0 0 0 0 1
particle dragon_breath ^-0.10396 ^ ^0.48907 0 0 0 0 1
particle dragon_breath ^-0.20337 ^ ^0.45677 0 0 0 0 1
particle dragon_breath ^-0.29389 ^ ^0.40451 0 0 0 0 1
particle dragon_breath ^-0.37157 ^ ^0.33457 0 0 0 0 1
particle dragon_breath ^-0.43301 ^ ^0.25 0 0 0 0 1
particle dragon_breath ^-0.47553 ^ ^0.15451 0 0 0 0 1
particle dragon_breath ^-0.49726 ^ ^0.05226 0 0 0 0 1
particle dragon_breath ^-0.49726 ^ ^-0.05226 0 0 0 0 1
particle dragon_breath ^-0.47553 ^ ^-0.15451 0 0 0 0 1
particle dragon_breath ^-0.43301 ^ ^-0.25 0 0 0 0 1
particle dragon_breath ^-0.37157 ^ ^-0.33457 0 0 0 0 1
particle dragon_breath ^-0.29389 ^ ^-0.40451 0 0 0 0 1
particle dragon_breath ^-0.20337 ^ ^-0.45677 0 0 0 0 1
particle dragon_breath ^-0.10396 ^ ^-0.48907 0 0 0 0 1


text:
#> asset:artifact/0615.censored/trigger/_index.d
# @private

#> tag
# @within function
#   asset:artifact/0615.censored/trigger/**
    #declare tag H3.Censored
    #declare tag H3.CensoredSound


text:
#> asset:artifact/0615.censored/trigger/3.2.censored_object2
#
# ピー音を鳴らすエンティティを召喚
#
# @within function asset:artifact/0615.censored/trigger/**

# 音を鳴らすだけの存在を召喚
    summon area_effect_cloud ~ ~ ~ {CustomNameVisible:0b,Particle:"block air",Duration:20,Tags:["Object","H3.CensoredSound"]}

# 再帰先へ
    schedule function asset:artifact/0615.censored/trigger/3.3.censored_sound 1t


text:
#> asset:artifact/0735.collision_plate/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[3] append value 735


text:
#> asset:artifact/0735.collision_plate/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:735} run function asset:artifact/0735.collision_plate/give/2.give


text:
#> asset:artifact/0735.collision_plate/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0735.collision_plate/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 735
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '{"text":"コリジョンプレート","color":"gray"}'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['{"text":"防御力で攻撃する剣","color":"gray"}','[{"text":"防御は最大の","color":"gray"},{"text":"攻撃","color":"red","bold":true},{"text":"である！","color":"gray"}]']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    # data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "mainhand"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onAttackByMelee"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.Damage set value ["§cダメージ§f=§3(防具+防具強度)×20"]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.AttackType set value [Physical]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.ElementType set value [None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 15
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    data modify storage asset:artifact LocalCooldown set value 15
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value ["Urban", "Nyaptov", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    data modify storage asset:artifact CustomNBT set value {AttributeModifiers:[{AttributeName:"generic.armor",Name:"generic.armor",Amount:3,Operation:0,UUID:[I;1,1,735,1],Slot:"mainhand"}]}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0735.collision_plate/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0735.collision_plate/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
    function asset:artifact/common/check_condition/mainhand
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0735.collision_plate/trigger/3.main


text:
#> asset:artifact/0735.collision_plate/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0735.collision_plate/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
    function asset:artifact/common/use/mainhand

# ここから先は神器側の効果の処理を書く

# 演出
    execute at @e[type=#lib:living,tag=Victim,tag=!Uninterferable,distance=..6] run playsound minecraft:block.anvil.place player @a ~ ~ ~ 1 1.5 0
    execute at @e[type=#lib:living,tag=Victim,tag=!Uninterferable,distance=..6] run playsound minecraft:block.anvil.place player @a ~ ~ ~ 1 1 0
    execute at @e[type=#lib:living,tag=Victim,tag=!Uninterferable,distance=..6] run particle minecraft:item iron_ingot ~ ~ ~ 1 1 1 0.1 40

# まず防具と防具強度をスコアに代入
    execute store result score $KF.Armor Temporary run attribute @s generic.armor get 1.0
    execute store result score $KF.ArmorTough Temporary run attribute @s generic.armor_toughness get 1

# 計算結果をArgument.Damageに代入
    execute store result storage lib: Argument.Damage float 20.0 run scoreboard players operation $KF.Armor Temporary += $KF.ArmorTough Temporary

# ダメージ
    data modify storage lib: Argument.AttackType set value "Physical"
    data modify storage lib: Argument.ElementType set value "None"
    function lib:damage/modifier
    execute as @e[type=#lib:living,tag=Victim,tag=!Uninterferable,distance=..6] run function lib:damage/

# スコアとかストレージとかリセット
    function lib:damage/reset
    scoreboard players reset $KF.Armor Temporary
    scoreboard players reset $KF.ArmorTough Temporary


text:
#> asset:artifact/0735.collision_plate/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{mainhand:735} run function asset:artifact/0735.collision_plate/trigger/2.check_condition


text:
#> asset:artifact/0735.collision_plate/trigger/_index.d
# @private
#
#> score_holder
# @within function asset:artifact/0735.collision_plate/trigger/3.main
    #declare score_holder $KF.Armor
    #declare score_holder $KF.ArmorTough


text:
#> asset:artifact/0731.mouse_feet/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[2] append value 731


text:
#> asset:artifact/0731.mouse_feet/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:731} run function asset:artifact/0731.mouse_feet/give/2.give


text:
#> asset:artifact/0731.mouse_feet/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0731.mouse_feet/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 731
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:leather_boots"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '{"text":"ネズミの足","color":"gray"}'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['{"text":"被ダメージ時に3秒間移動速度上昇を得る","color":"gray"}','{"text":"臆病なネズミの足 叩かないで！","color":"gray"}']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    # data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "feet"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onDamageFromEntity"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.Damage set value [0,0]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.IsRangeAttack set value
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 2
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    # data modify storage asset:artifact LocalCooldown set value
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value ["Nyaptov", "Wi-ki", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    data modify storage asset:artifact CustomNBT set value {HideFlags:68,display:{color:9411002},Unbreakable:1b,AttributeModifiers:[{AttributeName:"generic.armor",Name:"generic.armor",Amount:2,Operation:0,UUID:[I;1,1,731,3],Slot:"feet"},{AttributeName:"generic.armor_toughness",Name:"generic.armor_toughness",Amount:0.5,Operation:0,UUID:[I;1,1,731,3],Slot:"feet"},{AttributeName:"generic.movement_speed",Name:"generic.movement_speed",Amount:0.05,Operation:1,UUID:[I;1,1,731,3],Slot:"feet"}]}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0731.mouse_feet/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0731.mouse_feet/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
    function asset:artifact/common/check_condition/feet
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0731.mouse_feet/trigger/3.main


text:
#> asset:artifact/0731.mouse_feet/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0731.mouse_feet/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
    function asset:artifact/common/use/feet

# ここから先は神器側の効果の処理を書く

# スピードバフ
    effect give @s speed 3 1 true

# 演出
    playsound entity.bat.ambient player @a ~ ~ ~ 0.8 2 0


text:
#> asset:artifact/0731.mouse_feet/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのfeetに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{feet:731} run function asset:artifact/0731.mouse_feet/trigger/2.check_condition


text:
#> asset:artifact/0978.fire_charm/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[2] append value 978


text:
#> asset:artifact/0978.fire_charm/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:978} run function asset:artifact/0978.fire_charm/give/2.give


text:
#> asset:artifact/0978.fire_charm/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0978.fire_charm/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 978
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '[{"text":"火","color":"red"},{"text":"のチャーム","color":"white"}]'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['[{"text":"火属性","color":"red"},{"text":"の攻撃力が5%上昇する。","color":"white"}]']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    # data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "hotbar"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "equipping"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.Damage set value [0,0]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.IsRangeAttack set value
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 0
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    # data modify storage asset:artifact LocalCooldown set value
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value "ALL"
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    # data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0978.fire_charm/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0978.fire_charm/trigger/1.trigger

# 神器IDの設定
    data modify storage asset:artifact TargetID set value 978
# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
    function asset:artifact/common/check_condition/hotbar
# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0978.fire_charm/trigger/3.main


text:
#> asset:artifact/0978.fire_charm/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0978.fire_charm/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
    function asset:artifact/common/use/hotbar

# ここから先は神器側の効果の処理を書く
    playsound ogg:block.smithing_table.smithing_table2 player @a ~ ~ ~ 1 1.3
    playsound minecraft:item.armor.equip_iron player @a ~ ~ ~ 1 1
    particle minecraft:dust 1 0.451 0 1 ~ ~1 ~ 0.2 0.2 0.2 0 20
    particle crit ~ ~1 ~ 0 0 0 0.5 10

# 補正を追加
    function asset:artifact/0978.fire_charm/trigger/add_modifier


text:
#> asset:artifact/0978.fire_charm/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのheadに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{hotbar:[978]} run function asset:artifact/0978.fire_charm/trigger/2.check_condition


text:
#> asset:artifact/0978.fire_charm/trigger/add_modifier
#
#
#
# @within function asset:artifact/0978.fire_charm/trigger/**main

# UUID設定
    data modify storage api: Argument.UUID set value [I;1,1,978,7]

# リセット
    function api:modifier/attack/fire/remove

# 個数を取得し、個数×0.5%を補正とする
    execute store result storage api: Argument.Amount double 0.05 if data storage asset:context New.Items.hotbar[{tag:{TSB:{ID:978}}}]

# UUID設定
    data modify storage api: Argument.UUID set value [I;1,1,978,7]

# 適用
    data modify storage api: Argument.Operation set value "multiply_base"
    execute unless data storage api: Argument{Amount:0.0d} run function api:modifier/attack/fire/add

# リセット
    data remove storage api: Argument


text:
#> asset:artifact/0978.fire_charm/trigger/dis_equip/main
#
# 装備を外した時のメイン処理
#
# @within function asset:artifact/0978.fire_charm/trigger/dis_equip/

# 音
    playsound minecraft:item.armor.equip_generic player @a ~ ~ ~ 1 0.8

# 火威力をリセット
    data modify storage api: Argument.UUID set value [I;1,1,978,7]
    function api:modifier/attack/fire/remove

# 手持ちのチャームを数え直して補正追加
    execute unless entity @s[tag=!DevPrivilege,predicate=player_manager:is_believe/null] run function asset:artifact/0978.fire_charm/trigger/add_modifier


text:
#> asset:artifact/0973.call_rod_spirit/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[4] append value 973


text:
#> asset:artifact/0973.call_rod_spirit/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:973} run function asset:artifact/0973.call_rod_spirit/give/2.give


text:
#> asset:artifact/0973.call_rod_spirit/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0973.call_rod_spirit/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
    data modify storage asset:artifact ID set value 973
# 神器のベースアイテム
    data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick"
# 神器の名前 (TextComponentString)
    data modify storage asset:artifact Name set value '{"text":"コール: バラージュスピリット","color":"light_purple"}'
# 神器の説明文 (TextComponentString[])
    data modify storage asset:artifact Lore set value ['{"text":"付近の敵に魔法攻撃を行う精霊を呼び出す。","color":"white"}','{"text":"既に召喚した状態では使用できない。","color":"white"}','{"text":"\\"私が手伝ってあげる！\\"","color":"gray"}']
# MP以外の消費物 (TextComponentString) (オプション)
    # data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
    # data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
    data modify storage asset:artifact Slot set value "auto"
# 神器のトリガー (string) Wikiを参照
    data modify storage asset:artifact Trigger set value "onClick"
# 神器の発動条件 (TextComponentString) (オプション)
    # data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.Damage set value [100-150]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.AttackType set value [Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.ElementType set value [None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
    data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
    # data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
    data modify storage asset:artifact MPCost set value 30
# MP必要量 (int) (オプション)
    # data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
    data modify storage asset:artifact LocalCooldown set value 600
# グローバルクールダウン (int) (オプション)
    # data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    data modify storage asset:artifact DisableCooldownMessage set value false
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
    # data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
    data modify storage asset:artifact CanUsedGod set value ["Flora", "Nyaptov", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
    # data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
    function asset:artifact/common/give


text:
#> asset:artifact/0973.call_rod_spirit/trigger/4.summon_spirit
#
# かわいいかわいいオバケを召喚
#
# @within function asset:artifact/0973.call_rod_spirit/trigger/3.main

# 本体を召喚
    execute rotated ~ 0 run summon armor_stand ^-2 ^ ^-2 {DisabledSlots:4144959,Invisible:1b,NoGravity:1b,Small:1b,Tags:["R1.SpiritInit","Friend"]}

# 疑似乱数取得
    execute store result score $Random Temporary run function lib:random/

# ほしい範囲に剰余算
    scoreboard players operation $Random Temporary %= $6 Const

# メッセージ
    execute if score $Random Temporary matches 0 run tellraw @s [{"text":"<","color":"white"},{"text":"Spirit","color":"#a9b9ca"},{"text":"> ","color":"white"},{"text":"Hello!","font":"illageralt"}]
    execute if score $Random Temporary matches 1 run tellraw @s [{"text":"<","color":"white"},{"text":"Spirit","color":"#a9b9ca"},{"text":"> ","color":"white"},{"text":"I will help you!","font":"illageralt"}]
    execute if score $Random Temporary matches 2 run tellraw @s [{"text":"<","color":"white"},{"text":"Spirit","color":"#a9b9ca"},{"text":"> ","color":"white"},{"text":"Where is your enemies?","font":"illageralt"}]
    execute if score $Random Temporary matches 3 run tellraw @s [{"text":"<","color":"white"},{"text":"Spirit","color":"#a9b9ca"},{"text":"> ","color":"white"},{"text":"Let us do it!","font":"illageralt"}]
    execute if score $Random Temporary matches 4 run tellraw @s [{"text":"<","color":"white"},{"text":"Spirit","color":"#a9b9ca"},{"text":"> ","color":"white"},{"text":"I am ready!","font":"illageralt"}]
    execute if score $Random Temporary matches 5 run tellraw @s [{"text":"<","color":"white"},{"text":"Spirit","color":"#a9b9ca"},{"text":"> ","color":"white"},{"text":"My master!","font":"illageralt"}]

# リセット
    scoreboard players reset $Random Temporary


text:
#> asset:artifact/0973.call_rod_spirit/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0973.call_rod_spirit/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/check_condition/auto

# 既に召喚済みなら使えない。ファミリアと違って召喚するのは一匹だが、合わせておくと都合がいいし、Lintを通すのも楽
    execute at @e[type=armor_stand,tag=R1.Spirit] if score @s UserID = @e[type=armor_stand,tag=R1.Spirit,distance=..0.01,sort=nearest,limit=1] R1.UserID run tag @s add R1.CannotUse
    execute if entity @s[tag=R1.CannotUse] run tag @s remove CanUsed
    execute if entity @s[tag=R1.CannotUse] run function asset:artifact/0973.call_rod_spirit/trigger/3.cannot_use

# CanUsedタグをチェックして3.main.mcfunctionを実行する
    execute if entity @s[tag=CanUsed] run function asset:artifact/0973.call_rod_spirit/trigger/3.main


text:
#> asset:artifact/0973.call_rod_spirit/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0973.call_rod_spirit/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う auto/feet/legs/chest/head/mainhand/offhandを記載してね
    function asset:artifact/common/use/auto

# ここから先は神器側の効果の処理を書く

# 精霊召喚
    function asset:artifact/0973.call_rod_spirit/trigger/4.summon_spirit

# 精霊Init
    execute as @e[type=armor_stand,tag=R1.SpiritInit,distance=..5] at @s run function asset:artifact/0973.call_rod_spirit/trigger/fairy/1.init

# 音とパーティクル neutralになってるのは妖精側の音だから
    playsound minecraft:entity.experience_orb.pickup player @a ~ ~ ~ 2 1.75
    playsound minecraft:entity.ender_eye.death player @a ~ ~ ~ 2 1
    playsound minecraft:block.amethyst_cluster.break neutral @a ~ ~ ~ 1.5 1.5
    playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 2

# 精霊さんを動かす
    schedule function asset:artifact/0973.call_rod_spirit/trigger/fairy/2.tick 1t


text:
#> asset:artifact/0973.call_rod_spirit/trigger/3.cannot_use
#
#
#
# @within function asset:artifact/0973.call_rod_spirit/trigger/2.check_condition

# 効果音
    playsound minecraft:block.note_block.bass player @s ~ ~ ~ 5 1
    playsound minecraft:block.stone_button.click_on player @s ~ ~ ~ 2 1.5

# メッセージ
    tellraw @s [{"text":"既に召喚しています。","color":"red"}]

# リセット
    tag @s remove R1.CannotUse


text:
#> asset:artifact/0973.call_rod_spirit/trigger/0.load
#
# 神器に利用するスコアボード等の初期化処理
#
# @within tag/function asset:artifact/load

#> Objective
# @within asset:artifact/0973.call_rod_spirit/trigger/**
    scoreboard objectives add R1.Tick dummy
    scoreboard objectives add R1.LifeTime dummy
    scoreboard objectives add R1.UserID dummy
    scoreboard objectives add R1.ShotCount dummy
    scoreboard objectives add R1.Speed dummy
    scoreboard objectives add R1.Range dummy
    scoreboard objectives add R1.MoveTimesPerTick dummy


text:
#> asset:artifact/0973.call_rod_spirit/trigger/rejoin_process
#
# 使い方は必ずwikiを見ること
#
# @within tag/function asset:rejoin

# このfunctionをループさせる
    execute if entity @e[type=armor_stand,tag=R1.Spirit,limit=1] run schedule function asset:artifact/0973.call_rod_spirit/trigger/fairy/2.tick 1t
    execute if entity @e[type=armor_stand,tag=R1.Shot,limit=1] run schedule function asset:artifact/0973.call_rod_spirit/trigger/shot/2.tick 1t


text:
#> asset:artifact/0973.call_rod_spirit/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのauto/feet/legs/chest/head/mainhand/offhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
    execute if data storage asset:context id{auto:973} run function asset:artifact/0973.call_rod_spirit/trigger/2.check_condition


text:
#> asset:artifact/0973.call_rod_spirit/trigger/_index.d
# @private

#> tags
# @within function asset:artifact/0973.call_rod_spirit/trigger/**
    #declare tag R1.Spirit
    #declare tag R1.SpiritInit
    #declare tag R1.Shot
    #declare tag R1.ShotInit
    #declare tag R1.IDCopyBase
    #declare tag R1.Hit
    #declare tag R1.CannotUse
    #declare tag R1.AttackMode


text:
#> asset:artifact/0973.call_rod_spirit/trigger/fairy/2.tick
#
# scheduleでループする、妖精を動かすコマンド。
#
# @within function
#   asset:artifact/0973.call_rod_spirit/trigger/fairy/2.tick
#   asset:artifact/0973.call_rod_spirit/trigger/3.main
#   asset:artifact/0973.call_rod_spirit/trigger/rejoin_process

# エンティティに実行させる
    execute as @e[type=armor_stand,tag=R1.Spirit] at @s run function asset:artifact/0973.call_rod_spirit/trigger/fairy/3.main

# エンティティがいればループ
    execute if entity @e[type=armor_stand,tag=R1.Spirit,limit=1] run schedule function asset:artifact/0973.call_rod_spirit/trigger/fairy/2.tick 1t