From b41b07a05c3db69a5213759c13b0fa1ace3c62f0 Mon Sep 17 00:00:00 2001 From: uran247 <35622683+uran247@users.noreply.github.com> Date: Tue, 31 Dec 2024 16:14:54 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=B1=20[Mob213]=20TerribleSonicBomber?= =?UTF-8?q?=E3=81=A8=E6=84=89=E5=BF=AB=E3=81=AA=E4=BB=B2=E9=96=93=E3=81=9F?= =?UTF-8?q?=E3=81=A1=E3=81=AE=E8=BF=BD=E5=8A=A0=20(#443)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_index.d.mcfunction | 14 ++++ .../death/.mcfunction | 16 +++++ .../hurt/.mcfunction | 10 +++ .../init/.mcfunction | 44 ++++++++++++ .../register.mcfunction | 71 +++++++++++++++++++ .../remove/.mcfunction | 19 +++++ .../summon/.mcfunction | 8 +++ .../summon/debug.mcfunction | 10 +++ .../tick/.mcfunction | 46 ++++++++++++ .../tick/motions/attack_motion.mcfunction | 54 ++++++++++++++ .../motions/attack_motion_prepare.mcfunction | 52 ++++++++++++++ .../tick/motions/cruise_motion.mcfunction | 27 +++++++ .../motions/escape_after_attack.mcfunction | 22 ++++++ .../tick/motions/initial_motion.mcfunction | 7 ++ .../motions/set_next_attack_time.mcfunction | 21 ++++++ .../tick/motions/use_weapon.mcfunction | 21 ++++++ .../tick/weapons/brimstone.mcfunction | 27 +++++++ .../tick/weapons/brimstone_prepare.mcfunction | 21 ++++++ .../tick/weapons/drone.mcfunction | 15 ++++ .../tick/weapons/drone_prepare.mcfunction | 17 +++++ .../tick/weapons/gatling.mcfunction | 59 +++++++++++++++ .../tick/weapons/gatling_prepare.mcfunction | 24 +++++++ .../tick/weapons/snakeeye.mcfunction | 25 +++++++ .../tick/weapons/snakeeye_prepare.mcfunction | 17 +++++ .../tick/weapons/storm_shadow.mcfunction | 19 +++++ .../weapons/storm_shadow_prepare.mcfunction | 20 ++++++ .../mob/0214.drone/_index.d.mcfunction | 7 ++ .../mob/0214.drone/damage.mcfunction | 25 +++++++ .../mob/0214.drone/death/.mcfunction | 12 ++++ .../functions/mob/0214.drone/init/.mcfunction | 8 +++ .../mob/0214.drone/register.mcfunction | 65 +++++++++++++++++ .../mob/0214.drone/summon/.mcfunction | 8 +++ .../mob/0214.drone/summon/debug.mcfunction | 10 +++ .../functions/mob/0214.drone/tick/.mcfunction | 21 ++++++ .../0214.drone/tick/attack_motion.mcfunction | 14 ++++ .../0214.drone/tick/cruise_motion.mcfunction | 11 +++ .../mob/0214.drone/tick/suicide.mcfunction | 16 +++++ .../functions/mob/alias/213/death.mcfunction | 8 +++ .../functions/mob/alias/213/hurt.mcfunction | 8 +++ .../functions/mob/alias/213/init.mcfunction | 8 +++ .../mob/alias/213/register.mcfunction | 8 +++ .../functions/mob/alias/213/remove.mcfunction | 8 +++ .../functions/mob/alias/213/summon.mcfunction | 8 +++ .../functions/mob/alias/213/tick.mcfunction | 8 +++ .../functions/mob/alias/214/death.mcfunction | 8 +++ .../functions/mob/alias/214/init.mcfunction | 8 +++ .../mob/alias/214/register.mcfunction | 8 +++ .../functions/mob/alias/214/summon.mcfunction | 8 +++ .../functions/mob/alias/214/tick.mcfunction | 8 +++ .../detect_hit_entity/.mcfunction | 8 +++ .../object/2082.storm_shadow/init/.mcfunction | 24 +++++++ .../init/facing_target_pos.m.mcfunction | 9 +++ .../object/2082.storm_shadow/kill/.mcfunction | 30 ++++++++ .../2082.storm_shadow/register.mcfunction | 20 ++++++ .../2082.storm_shadow/summon/.mcfunction | 8 +++ .../2082.storm_shadow/summon/debug.mcfunction | 10 +++ .../object/2082.storm_shadow/tick/.mcfunction | 14 ++++ .../detect_hit_entity/.mcfunction | 8 +++ .../object/2083.brimstone/init/.mcfunction | 19 +++++ .../object/2083.brimstone/kill/.mcfunction | 29 ++++++++ .../object/2083.brimstone/register.mcfunction | 21 ++++++ .../object/2083.brimstone/summon/.mcfunction | 8 +++ .../2083.brimstone/summon/debug.mcfunction | 10 +++ .../object/2083.brimstone/tick/.mcfunction | 17 +++++ .../object/2083.brimstone/turn.mcfunction | 10 +++ .../object/2084.snake_eye/_index.d.mcfunction | 2 + .../object/2084.snake_eye/init/.mcfunction | 17 +++++ .../object/2084.snake_eye/kill/.mcfunction | 29 ++++++++ .../object/2084.snake_eye/register.mcfunction | 21 ++++++ .../object/2084.snake_eye/summon/.mcfunction | 8 +++ .../2084.snake_eye/summon/debug.mcfunction | 10 +++ .../object/2084.snake_eye/tick/.mcfunction | 14 ++++ .../detect_hit_entity/.mcfunction | 8 +++ .../2087.patriot/hit_entity/.mcfunction | 24 +++++++ .../object/2087.patriot/init/.mcfunction | 16 +++++ .../object/2087.patriot/register.mcfunction | 19 +++++ .../object/2087.patriot/summon/.mcfunction | 8 +++ .../2087.patriot/summon/debug.mcfunction | 10 +++ .../object/2087.patriot/tick/.mcfunction | 17 +++++ .../2088.patriot_launcher/_index.d.mcfunction | 25 +++++++ .../2088.patriot_launcher/init/.mcfunction | 27 +++++++ .../2088.patriot_launcher/register.mcfunction | 25 +++++++ .../2088.patriot_launcher/summon/.mcfunction | 8 +++ .../summon/debug.mcfunction | 10 +++ .../2088.patriot_launcher/tick/.mcfunction | 17 +++++ .../tick/missile_launch.mcfunction | 14 ++++ .../tick/set_repair_gauge.mcfunction | 31 ++++++++ .../tick/tick_active.mcfunction | 40 +++++++++++ .../tick/tick_broken.mcfunction | 55 ++++++++++++++ .../alias/2082/detect_hit_entity.mcfunction | 8 +++ .../object/alias/2082/init.mcfunction | 8 +++ .../object/alias/2082/kill.mcfunction | 8 +++ .../object/alias/2082/register.mcfunction | 8 +++ .../object/alias/2082/summon.mcfunction | 8 +++ .../object/alias/2082/tick.mcfunction | 8 +++ .../alias/2083/detect_hit_entity.mcfunction | 8 +++ .../object/alias/2083/init.mcfunction | 8 +++ .../object/alias/2083/kill.mcfunction | 8 +++ .../object/alias/2083/register.mcfunction | 8 +++ .../object/alias/2083/summon.mcfunction | 8 +++ .../object/alias/2083/tick.mcfunction | 8 +++ .../object/alias/2084/init.mcfunction | 8 +++ .../object/alias/2084/kill.mcfunction | 8 +++ .../object/alias/2084/register.mcfunction | 8 +++ .../object/alias/2084/summon.mcfunction | 8 +++ .../object/alias/2084/tick.mcfunction | 8 +++ .../alias/2087/detect_hit_entity.mcfunction | 8 +++ .../object/alias/2087/hit_entity.mcfunction | 8 +++ .../object/alias/2087/init.mcfunction | 8 +++ .../object/alias/2087/register.mcfunction | 8 +++ .../object/alias/2087/summon.mcfunction | 8 +++ .../object/alias/2087/tick.mcfunction | 8 +++ .../object/alias/2088/init.mcfunction | 8 +++ .../object/alias/2088/register.mcfunction | 8 +++ .../object/alias/2088/summon.mcfunction | 8 +++ .../object/alias/2088/tick.mcfunction | 8 +++ 116 files changed, 1895 insertions(+) create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/death/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/hurt/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/init/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/remove/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/cruise_motion.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/escape_after_attack.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/initial_motion.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/set_next_attack_time.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/use_weapon.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone_prepare.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone_prepare.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling_prepare.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye_prepare.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow.mcfunction create mode 100644 Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow_prepare.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/damage.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/death/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/init/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/summon/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/tick/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/tick/attack_motion.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/tick/cruise_motion.mcfunction create mode 100644 Asset/data/asset/functions/mob/0214.drone/tick/suicide.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/213/death.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/213/hurt.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/213/init.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/213/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/213/remove.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/213/summon.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/213/tick.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/214/death.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/214/init.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/214/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/214/summon.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/214/tick.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/detect_hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/init/facing_target_pos.m.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/kill/.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/register.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/2082.storm_shadow/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/detect_hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/kill/.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/register.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/2083.brimstone/turn.mcfunction create mode 100644 Asset/data/asset/functions/object/2084.snake_eye/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/object/2084.snake_eye/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/2084.snake_eye/kill/.mcfunction create mode 100644 Asset/data/asset/functions/object/2084.snake_eye/register.mcfunction create mode 100644 Asset/data/asset/functions/object/2084.snake_eye/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/2084.snake_eye/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/2084.snake_eye/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/2087.patriot/detect_hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/2087.patriot/hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/2087.patriot/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/2087.patriot/register.mcfunction create mode 100644 Asset/data/asset/functions/object/2087.patriot/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/2087.patriot/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/2087.patriot/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/register.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/tick/missile_launch.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/tick/set_repair_gauge.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_active.mcfunction create mode 100644 Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_broken.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2082/detect_hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2082/init.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2082/kill.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2082/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2082/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2082/tick.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2083/detect_hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2083/init.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2083/kill.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2083/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2083/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2083/tick.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2084/init.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2084/kill.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2084/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2084/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2084/tick.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2087/detect_hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2087/hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2087/init.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2087/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2087/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2087/tick.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2088/init.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2088/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2088/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/2088/tick.mcfunction diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/_index.d.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/_index.d.mcfunction new file mode 100644 index 0000000000..a967942f44 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/_index.d.mcfunction @@ -0,0 +1,14 @@ +#> asset:mob/0213.terrible_sonic_bomber/_index.d +# @private + +#> tag +# @within +# function asset:mob/0213.terrible_sonic_bomber/** +# function asset:mob/0214.drone/** + #declare tag 5X.Centre #旋回中心座標を示す、基本的には呪われた剣の位置と一致する。イギリス綴りなので誤字ではない + +#> tag_inter_object +# @within +# function asset:mob/0213.terrible_sonic_bomber/** +# function asset:object/2083.brimstone/** + #declare tag 5X.BrimstoneTarget #旋回中心座標を示す、基本的には呪われた剣の位置と一致する。イギリス綴りなので誤字ではない diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/death/.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/death/.mcfunction new file mode 100644 index 0000000000..168593beb8 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/death/.mcfunction @@ -0,0 +1,16 @@ +#> asset:mob/0213.terrible_sonic_bomber/death/ +# +# Mobの死亡時の処理 +# +# @within function asset:mob/alias/213/death + +# super +function asset:mob/super.death + +# remove markers +kill @e[tag=5X.Centre] + +# remove objects and mobs +execute as @e[scores={ObjectID=2082..2088}] on passengers run kill @s +execute as @e[scores={MobID=214}] run function api:mob/remove +kill @e[scores={ObjectID=2082..2088}] diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/hurt/.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/hurt/.mcfunction new file mode 100644 index 0000000000..2187cc5252 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/hurt/.mcfunction @@ -0,0 +1,10 @@ +#> asset:mob/0213.terrible_sonic_bomber/hurt/ +# +# Mobのダメージ時の処理 +# +# @within function asset:mob/alias/213/hurt + +# super +function asset:mob/super.hurt + +# TODO 被弾時の演出を書く diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/init/.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/init/.mcfunction new file mode 100644 index 0000000000..04d6060daf --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/init/.mcfunction @@ -0,0 +1,44 @@ +#> asset:mob/0213.terrible_sonic_bomber/init/ +# +# Mobのinit時の処理 +# +# @within asset:mob/alias/213/init + +#> prv +# @private + #declare score_holder $initial_motion_end_time + +#モブの見た目をライドする +# アニジャバのsummonを実行 +# アニジャバのrootをファントムに乗せる +# TODO:召喚時につけなきゃいけないタグを確認する + + +# super +function asset:mob/super.init + +#ファントムのNBTをいじる +data modify entity @s Size set value 32 + +#モブのデータに以下の情報を記録 + # 初期モーション終了時間を記録 + execute store result score $initial_motion_end_time Temporary run time query gametime + execute store result storage asset:context this.initial_motion_end_time int 1 run scoreboard players add $initial_motion_end_time Temporary 30 + + # 次回攻撃時刻を記録 + execute store result storage asset:context this.next_attack_time int 1 run scoreboard players add $initial_motion_end_time Temporary 120 + +# 旋回中心座標を示すマーカーを置く +summon marker ~ ~ ~ {Tags:["Uninterferable","5X.Centre"]} + +# 対空砲召喚 +data modify storage api: Argument.ID set value 2088 +function api:object/summon + + +#タイトルで何をやるか説明 +title @a[distance=..128] title {"text":"対空砲を守り敵を迎撃せよ","color":"white","bold":true} + + +# reset +scoreboard players reset $initial_motion_end_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/register.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/register.mcfunction new file mode 100644 index 0000000000..8262e92719 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/register.mcfunction @@ -0,0 +1,71 @@ +#> asset:mob/0213.terrible_sonic_bomber/register +# +# Mobのデータを指定 +# +# @within function asset:mob/alias/213/register + + #継承 (int) (オプション) + data modify storage asset:mob Extends append value 2000 + function asset:mob/extends +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:mob ExtendsSafe set value +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false +# ID (int) + data modify storage asset:mob ID set value 213 +# Type (string) Wikiを参照 + data modify storage asset:mob Type set value "Enemy.Boss" +# 干渉可能か否か (boolean) + data modify storage asset:mob Interferable set value true +# 名前 (TextComponentString) (オプション) + data modify storage asset:mob Name set value '{"text":"Terrible Sonic Bomber"}' +# Mobの説明文 (TextComponentString[]) (オプション) + data modify storage asset:mob Lore set value ['{"text":"TBD"}'] +# 武器 + # メインハンド (Compound(Item)) (オプション) + # data modify storage asset:mob Weapon.Mainhand set value + # オフハンド (Compound(Item)) (オプション) + # data modify storage asset:mob Weapon.Offhand set value +# 武器ドロップ率 ([float, float]) (オプション) + # data modify storage asset:mob WeaponDropChances set value +# 防具 + # 頭 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Head set value + # 胴 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Chest set value + # 脚 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Legs set value + # 足 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Feet set value +# 防具ドロップ率 ([float, float]) (オプション) + # data modify storage asset:mob ArmorDropChances set value +# 体力 (double) (オプション) + data modify storage asset:mob Health set value 20000 +# 攻撃力 (double) (オプション) + # data modify storage asset:mob AttackDamage set value +# 防御力 (double) (オプション) // 被ダメージがある程度大きい場合1ptにつき0.8%カット、小さい場合1ptにつき約4%カット 20pt以上は頭打ち + data modify storage asset:mob Defense set value 0 +# 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす + # data modify storage asset:mob SpecialDefense set value +# 移動速度 (double) (オプション) + # data modify storage asset:mob Speed set value +# 索敵範囲 (double) (オプション) + # data modify storage asset:mob FollowRange set value +# ノックバック耐性 (double) (オプション) + # data modify storage asset:mob KnockBackResist set value +# 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る + # 物理倍率 (float) (オプション) + # data modify storage asset:mob Resist.Physical set value + # 魔法倍率 (float) (オプション) + data modify storage asset:mob Resist.Magic set value 0.4 + # 火倍率 (float) (オプション) + # data modify storage asset:mob Resist.Fire set value + # 水倍率 (float) (オプション) + # data modify storage asset:mob Resist.Water set value + # 雷倍率 (float) (オプション) + data modify storage asset:mob Resist.Thunder set value 0.25 +# フィールド + data modify storage asset:mob Field.TargetCoordinates set value [] + data modify storage asset:mob Field.UsingWeapon set value "" + data modify storage asset:mob Field.AttackDistance set value 50 + data modify storage asset:mob Field.InitialMotionTime set value 200 diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/remove/.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/remove/.mcfunction new file mode 100644 index 0000000000..cefe3c484e --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/remove/.mcfunction @@ -0,0 +1,19 @@ +#> asset:mob/0213.terrible_sonic_bomber/remove/ +# +# 天使が居なくなる際に実行される処理 +# +# @within asset:mob/alias/213/remove + +# Todo: ミサイルを消す +# Todo: 対空砲を消す + +# super +function asset:mob/super.remove + +# remove markers +kill @e[tag=5X.Centre] + +# remove objects +execute as @e[scores={ObjectID=2082..2088}] on passengers run kill @s +execute as @e[scores={MobID=214}] run function api:mob/remove +kill @e[scores={ObjectID=2082..2088}] diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/.mcfunction new file mode 100644 index 0000000000..8284ebe1ba --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0213.terrible_sonic_bomber/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:mob/alias/213/summon + +# 元となるEntityを召喚する + summon phantom ~ ~ ~ {Tags:["MobInit","AntiBurn"],DeathLootTable:"empty",NoAI:1b} diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/debug.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/debug.mcfunction new file mode 100644 index 0000000000..8c38f5fa87 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:mob/0213.terrible_sonic_bomber/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 213 + function api:mob/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/.mcfunction new file mode 100644 index 0000000000..e5e5abf4ec --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/.mcfunction @@ -0,0 +1,46 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/ +# +# Mobのtick時の処理 +# +# @within asset:mob/alias/213/tick + +#> prv +# @private + #declare score_holder $current_gametime + #declare score_holder $initial_motion_end_time + #declare score_holder $next_attack_time + +# 現在時間を記録 +execute store result score $current_gametime Temporary run time query gametime + + +# 初期モーション終了時間前の場合 +# 上へゆっくり昇っていく +execute store result score $initial_motion_end_time Temporary run data get storage asset:context this.initial_motion_end_time +execute if score $initial_motion_end_time Temporary > $current_gametime Temporary run function asset:mob/0213.terrible_sonic_bomber/tick/motions/initial_motion + + +# 初期モーション終了時間ぴったり +# モデルを表示 +# TBD + +# それ以降 + +execute if score $initial_motion_end_time Temporary < $current_gametime Temporary store result score $next_attack_time Temporary run data get storage asset:context this.next_attack_time + +# 巡行移動モーション +execute if score $initial_motion_end_time Temporary < $current_gametime Temporary if score $next_attack_time Temporary >= $current_gametime Temporary run function asset:mob/0213.terrible_sonic_bomber/tick/motions/cruise_motion + +# 攻撃モーション準備 +execute if score $initial_motion_end_time Temporary < $current_gametime Temporary if score $next_attack_time Temporary = $current_gametime Temporary run function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare + +# 攻撃モーション実行 +execute if score $initial_motion_end_time Temporary < $current_gametime Temporary if score $next_attack_time Temporary < $current_gametime Temporary run function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion + + #tellraw @a [{"score":{"objective":"Temporary","name":"$next_attack_time"}}] + + +# reset +scoreboard players reset $initial_motion_end_time Temporary +scoreboard players reset $current_gametime Temporary +scoreboard players reset $next_attack_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion.mcfunction new file mode 100644 index 0000000000..3d2c56ce5f --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion.mcfunction @@ -0,0 +1,54 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/ + +#> prv +# @private + #declare score_holder $current_gametime_for_attack + #declare score_holder $attack_start_time + #declare score_holder $attack_end_time + #declare score_holder $use_weapon + #declare score_holder $flare_time + +# 現在時間を記録 + execute store result score $current_gametime_for_attack Temporary run time query gametime + +# 移動処理 +# 中心座標を中心に旋回 + execute unless entity @e[tag=5X.Centre,distance=..105] facing entity @e[tag=5X.Centre,distance=..128,limit=1] eyes rotated ~80 0 run tp @s ~ ~ ~ ~ ~ + +# 直進 + execute rotated as @s run tp @s ^ ^ ^3 + +# 対空砲付近を飛ぶときはフレアを出す(3tickおき) + execute store result score $flare_time Temporary run time query gametime + scoreboard players operation $flare_time Temporary %= $3 Const + execute if entity @e[tag=5X.Centre,distance=..60] if score $flare_time Temporary matches 0 run particle minecraft:lava ^ ^-1 ^-2 1.5 0 1.5 1 24 force + + +# 攻撃処理 +# 使用武器を取得 + execute store result score $use_weapon Temporary run data get storage asset:context this.use_weapon + +# 攻撃開始時刻になったら攻撃開始 + execute store result score $attack_start_time Temporary run data get storage asset:context this.attack_start_time + execute store result score $attack_end_time Temporary run data get storage asset:context this.attack_end_time + + execute if score $current_gametime_for_attack Temporary = $attack_start_time Temporary if score $current_gametime_for_attack Temporary < $attack_end_time Temporary run function asset:mob/0213.terrible_sonic_bomber/tick/motions/use_weapon + + +# 攻撃終了後の処理 + execute if score $current_gametime_for_attack Temporary >= $attack_end_time Temporary run function asset:mob/0213.terrible_sonic_bomber/tick/motions/set_next_attack_time + execute if score $current_gametime_for_attack Temporary = $attack_end_time Temporary run function asset:mob/0213.terrible_sonic_bomber/tick/motions/escape_after_attack + + #tellraw @a [{"text": "use_weapon"},{"score":{"objective":"Temporary","name":"$use_weapon"}}] + #tellraw @a [{"text": "attack_start_time"},{"score":{"objective":"Temporary","name":"$use_weapon"}}] + +# reset + scoreboard players reset $current_gametime_for_attack Temporary + scoreboard players reset $attack_start_time Temporary + scoreboard players reset $attack_end_time Temporary + scoreboard players reset $use_weapon Temporary + scoreboard players reset $flare_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare.mcfunction new file mode 100644 index 0000000000..f6102c54fa --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare.mcfunction @@ -0,0 +1,52 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/ + +#> prv +# @private + #declare score_holder $attack_start_time + #declare score_holder $weapon_num + #declare score_holder $health_per + +# 攻撃武器選択 HP半分以下なら選択肢変化 + function api:mob/get_health_percent + execute store result score $health_per Temporary run data get storage api: Return.HealthPer 100 + +# 乱数によるスキル選択 + data modify storage lib: Args.key set value "5XWeapon" + execute if score $health_per Temporary matches 50.. run data modify storage lib: Args.max set value 3 + execute if score $health_per Temporary matches ..49 run data modify storage lib: Args.max set value 4 + data modify storage lib: Args.scarcity_history_size set value 2 + execute store result score $weapon_num Temporary run function lib:random/with_biased/manual.m with storage lib: Args + scoreboard players add $weapon_num Temporary 1 + #scoreboard players set $weapon_num Temporary -4 + #tellraw @a [{"score":{"name":"$health_per","objective":"Temporary"},"color":"blue"}] + + # 対空砲が破壊されていた場合武器が変化する攻撃はIDを変更、将来的にも乱数の範囲に入らない負の値にしておく + execute if entity @e[tag=PatriotLauncher.IsBroken,distance=..128] if score $weapon_num Temporary matches 4 run scoreboard players set $weapon_num Temporary -4 + + execute store result storage asset:context this.use_weapon int 1 run scoreboard players get $weapon_num Temporary + +# 攻撃開始と終了時間指定(デフォルト値) + execute store result score $attack_start_time Temporary run time query gametime + execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 20 + execute store result storage asset:context this.attack_end_time int 1 run scoreboard players add $attack_start_time Temporary 20 + +# 攻撃内容に応じて向きを変える + execute if score $weapon_num Temporary matches 1..2 facing entity @e[tag=5X.Centre,limit=1] eyes rotated ~ 0 run tp @s ~ ~ ~ ~ ~ + execute if score $weapon_num Temporary matches 4 facing entity @p eyes rotated ~ 0 run tp @s ~ ~ ~ ~ ~ + execute if score $weapon_num Temporary matches -4 at @p positioned ~ ~10 ~ facing entity @s eyes facing ^ ^ ^-1 positioned as @s run tp @s ~ ~ ~ ~ ~ + +# 武器ごとの処理 + execute if score $weapon_num Temporary matches 1 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow_prepare + execute if score $weapon_num Temporary matches 2 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/brimstone_prepare + execute if score $weapon_num Temporary matches 3 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/drone_prepare + execute if score $weapon_num Temporary matches 4 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye_prepare + execute if score $weapon_num Temporary matches -4 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/gatling_prepare + +# reset + scoreboard players reset $attack_start_time Temporary + scoreboard players reset $weapon_num Temporary + scoreboard players reset $health_per Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/cruise_motion.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/cruise_motion.mcfunction new file mode 100644 index 0000000000..6996b41e4c --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/cruise_motion.mcfunction @@ -0,0 +1,27 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/motions/cruise_motion +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/ + +#> prv +# @private + #declare score_holder $flare_time + +# 中心座標を中心に旋回 + execute unless entity @e[tag=5X.Centre,distance=..95] facing entity @e[tag=5X.Centre,distance=..128,limit=1] eyes rotated ~80 0 run tp @s ~ ~ ~ ~ ~ + +# 直進 + execute rotated as @s run tp @s ^ ^ ^3 + +# 攻撃後などで低空にいた場合は上昇 + execute at @e[tag=5X.Centre,distance=..128,limit=1] positioned ~-100 ~30 ~-100 if entity @s[dx=199,dy=-100,dz=199] at @s run tp @s ~ ~0.5 ~ + +# 対空砲付近を飛ぶときはフレアを出す(3tickおき) + execute store result score $flare_time Temporary run time query gametime + scoreboard players operation $flare_time Temporary %= $3 Const + execute if entity @e[tag=5X.Centre,distance=..60] if score $flare_time Temporary matches 0 run particle minecraft:lava ^ ^-1 ^-2 1.5 0 1.5 1 24 force + #say cruise + +# reset + scoreboard players reset $flare_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/escape_after_attack.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/escape_after_attack.mcfunction new file mode 100644 index 0000000000..6f09001d9e --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/escape_after_attack.mcfunction @@ -0,0 +1,22 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/motions/escape_after_attack +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion + +#> prv +# @private + #declare score_holder $use_weapon + +#離脱 + execute store result score $use_weapon Temporary run data get storage asset:context this.use_weapon + + execute if score $use_weapon Temporary matches 1 run tp @s ~ ~ ~ ~60 ~ + execute if score $use_weapon Temporary matches 2 run tp @s ~ ~ ~ ~ ~ + execute if score $use_weapon Temporary matches 3 run tp @s ~ ~ ~ ~ ~ + execute if score $use_weapon Temporary matches 4 run tp @s ~ ~ ~ ~ ~ + execute if score $use_weapon Temporary matches -4 run tp @s ~ ~ ~ ~ ~ + execute if score $use_weapon Temporary matches -4 run playsound minecraft:entity.donkey.death hostile @a[distance=..128] ~ ~ ~ 8.0 0.7 1 + +# reset + scoreboard players reset $use_weapon Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/initial_motion.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/initial_motion.mcfunction new file mode 100644 index 0000000000..ac58f26fab --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/initial_motion.mcfunction @@ -0,0 +1,7 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/motions/initial_motion +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/ + +tp @s ~ ~1 ~ diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/set_next_attack_time.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/set_next_attack_time.mcfunction new file mode 100644 index 0000000000..2803ff8c42 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/set_next_attack_time.mcfunction @@ -0,0 +1,21 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/motions/set_next_attack_time +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion + +#> prv +# @private + #declare score_holder $current_next_attack_time + #declare score_holder $next_attack_time + +# 次回攻撃時刻を記録 +execute store result score $next_attack_time Temporary run time query gametime +execute store result score $current_next_attack_time Temporary run data get storage asset:context this.next_attack_time +execute if score $current_next_attack_time Temporary < $next_attack_time Temporary store result storage asset:context this.next_attack_time int 1 run scoreboard players add $next_attack_time Temporary 60 + +# 標的タグを外す +tag @a remove 5X.BrimstoneTarget + +# reset +scoreboard players reset $next_attack_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/use_weapon.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/use_weapon.mcfunction new file mode 100644 index 0000000000..d2caf61e02 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/motions/use_weapon.mcfunction @@ -0,0 +1,21 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/motions/use_weapon +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion + +#> prv +# @private + #declare score_holder $use_weapon + +#発射 + execute store result score $use_weapon Temporary run data get storage asset:context this.use_weapon + + execute if score $use_weapon Temporary matches 1 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow + execute if score $use_weapon Temporary matches 2 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/brimstone + execute if score $use_weapon Temporary matches 3 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/drone + execute if score $use_weapon Temporary matches 4 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye + execute if score $use_weapon Temporary matches -4 run function asset:mob/0213.terrible_sonic_bomber/tick/weapons/gatling + +# reset + scoreboard players reset $use_weapon Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone.mcfunction new file mode 100644 index 0000000000..85ebf9a4f1 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone.mcfunction @@ -0,0 +1,27 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/brimstone +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/use_weapon + +#> prv +# @private + #declare score_holder $attack_start_time + +# 攻撃対象を取得 +execute store result storage api: Argument.FieldOverride.TargetPlayerID int 1 run scoreboard players get @p[tag=5X.BrimstoneTarget] UserID + +# オブジェクト召喚 +execute if entity @p[tag=5X.BrimstoneTarget] run data modify storage api: Argument.ID set value 2083 +execute if entity @p[tag=5X.BrimstoneTarget] store result storage api: Argument.FieldOverride.MobUUID int 1 run scoreboard players get @s MobUUID +execute if entity @p[tag=5X.BrimstoneTarget] run function api:object/summon + +# 対象を次回攻撃対象から外す +tag @p[tag=5X.BrimstoneTarget] remove 5X.BrimstoneTarget + +# 次回攻撃開始時間指定 +execute store result score $attack_start_time Temporary run time query gametime +execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 3 + +# reset +scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone_prepare.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone_prepare.mcfunction new file mode 100644 index 0000000000..6aee24f6ea --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/brimstone_prepare.mcfunction @@ -0,0 +1,21 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/brimstone_prepare +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare + +#> prv +# @private + #declare score_holder $attack_start_time + +# 攻撃開始と終了時間指定 +execute store result score $attack_start_time Temporary run time query gametime +execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 20 +execute store result storage asset:context this.attack_end_time int 1 run scoreboard players add $attack_start_time Temporary 17 + +# 対象候補指定 +tag @a remove 5X.BrimstoneTarget +tag @a[distance=..256] add 5X.BrimstoneTarget + +# reset +scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone.mcfunction new file mode 100644 index 0000000000..435ec3a363 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone.mcfunction @@ -0,0 +1,15 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/drone +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/use_weapon + +# ドローン召喚 + data modify storage api: Argument.ID set value 214 + execute anchored eyes positioned ^2 ^ ^-2 positioned ~ ~-2 ~ run function api:mob/summon + + data modify storage api: Argument.ID set value 214 + execute anchored eyes positioned ^ ^ ^-4 positioned ~ ~-2 ~ run function api:mob/summon + + data modify storage api: Argument.ID set value 214 + execute anchored eyes positioned ^-2 ^ ^-2 positioned ~ ~-2 ~ run function api:mob/summon diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone_prepare.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone_prepare.mcfunction new file mode 100644 index 0000000000..8ea69b42f6 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/drone_prepare.mcfunction @@ -0,0 +1,17 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/drone_prepare +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare + +#> prv +# @private + #declare score_holder $attack_start_time + +# 攻撃開始と終了時間指定 +execute store result score $attack_start_time Temporary run time query gametime +execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 20 +execute store result storage asset:context this.attack_end_time int 1 run scoreboard players add $attack_start_time Temporary 1 + +# reset +scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling.mcfunction new file mode 100644 index 0000000000..0d9f75b43a --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling.mcfunction @@ -0,0 +1,59 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/gatling +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/use_weapon + +#> prv +# @private + #declare score_holder $attack_start_time + +# 攻撃座標指定 + data modify entity 0-0-0-0-0 Pos set from storage asset:context this.gatling.target_pos + data modify entity 0-0-0-0-0 Rotation set from storage asset:context this.gatling.target_rot + #tellraw @a [{"storage":"asset:context","nbt":"this.gatling.target_pos"}] + +# ダメージ + data modify storage api: Argument.Damage set value 20f + data modify storage api: Argument.AttackType set value "Physical" + data modify storage api: Argument.ElementType set value "None" + data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}' + function api:damage/modifier + execute at 0-0-0-0-0 positioned ^ ^ ^-0.5 positioned ~-0.5 ~-0.5 ~-0.5 as @a[tag=!PlayerShouldInvulnerable,dx=0] run function api:damage/ + + data modify storage api: Argument.Damage set value 20f + data modify storage api: Argument.AttackType set value "Physical" + data modify storage api: Argument.ElementType set value "None" + data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}' + function api:damage/modifier_continuation + execute at 0-0-0-0-0 positioned ^ ^ ^ positioned ~-0.5 ~-0.5 ~-0.5 as @a[tag=!PlayerShouldInvulnerable,dx=0] run function api:damage/ + + data modify storage api: Argument.Damage set value 20f + data modify storage api: Argument.AttackType set value "Physical" + data modify storage api: Argument.ElementType set value "None" + data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}' + function api:damage/modifier_continuation + execute at 0-0-0-0-0 positioned ^ ^ ^0.5 positioned ~-0.5 ~-0.5 ~-0.5 as @a[tag=!PlayerShouldInvulnerable,dx=0] run function api:damage/ + + function api:damage/reset + + #say attack + +# 着弾音 + execute at 0-0-0-0-0 run playsound minecraft:entity.breeze.death hostile @a[distance=..16] ~ ~ ~ 1.0 1.5 1.0 + execute at 0-0-0-0-0 run playsound minecraft:entity.breeze.hurt hostile @a[distance=..16] ~ ~ ~ 1.0 2 1.0 + +# particle + execute at 0-0-0-0-0 run particle explosion ~ ~0.5 ~ 0.5 0.5 0.5 0 3 normal + +# 次回攻撃座標指定 + execute at 0-0-0-0-0 run tp 0-0-0-0-0 ^ ^ ^1 + data modify storage asset:context this.gatling.target_pos set from entity 0-0-0-0-0 Pos + +# 次回攻撃開始時間指定 + execute store result score $attack_start_time Temporary run time query gametime + execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 1 + +# reset + scoreboard players reset $attack_start_time Temporary + execute in overworld run tp 0-0-0-0-0 0.0 0.0 0.0 0.0 0.0 diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling_prepare.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling_prepare.mcfunction new file mode 100644 index 0000000000..c5c3f6a3a4 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/gatling_prepare.mcfunction @@ -0,0 +1,24 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/gatling_prepare +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare + +#> prv +# @private + #declare score_holder $attack_start_time + +# 攻撃開始と終了時間指定 + execute store result score $attack_start_time Temporary run time query gametime + execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 5 + execute store result storage asset:context this.attack_end_time int 1 run scoreboard players add $attack_start_time Temporary 28 + +# 攻撃座標指定 + execute positioned as @p rotated as @s rotated ~ 0 positioned ^ ^ ^-20 run tp 0-0-0-0-0 ~ ~ ~ ~ ~ + data modify storage asset:context this.gatling.target_pos set from entity 0-0-0-0-0 Pos + data modify storage asset:context this.gatling.target_rot set from entity 0-0-0-0-0 Rotation + #tellraw @a [{"storage":"asset:context","nbt":"this.gatling.target_pos"}] + execute in overworld run tp 0-0-0-0-0 0.0 0.0 0.0 0.0 0.0 + +# reset + scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye.mcfunction new file mode 100644 index 0000000000..8b0bf6f18c --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye.mcfunction @@ -0,0 +1,25 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/use_weapon + +#> prv +# @private + #declare score_holder $attack_start_time + +# オブジェクト召喚 +data modify storage api: Argument.ID set value 2084 +execute store result storage api: Argument.FieldOverride.MobUUID int 1 run scoreboard players get @s MobUUID +execute positioned ^2 ^ ^ run function api:object/summon + +data modify storage api: Argument.ID set value 2084 +execute store result storage api: Argument.FieldOverride.MobUUID int 1 run scoreboard players get @s MobUUID +execute positioned ^-2 ^ ^ run function api:object/summon + +# 次回攻撃開始時間指定 +execute store result score $attack_start_time Temporary run time query gametime +execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 3 + +# reset +scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye_prepare.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye_prepare.mcfunction new file mode 100644 index 0000000000..3e57c2ab14 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye_prepare.mcfunction @@ -0,0 +1,17 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/snakeeye_prepare +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare + +#> prv +# @private + #declare score_holder $attack_start_time + +# 攻撃開始と終了時間指定 +execute store result score $attack_start_time Temporary run time query gametime +execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 20 +execute store result storage asset:context this.attack_end_time int 1 run scoreboard players add $attack_start_time Temporary 18 + +# reset +scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow.mcfunction new file mode 100644 index 0000000000..33e27b936b --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow.mcfunction @@ -0,0 +1,19 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/use_weapon + +#> prv +# @private + #declare score_holder $attack_start_time + + +# オブジェクト召喚 +data modify storage api: Argument.FieldOverride.target_pos set from storage asset:context this.storm_shadow.target_pos +data modify storage api: Argument.ID set value 2082 +execute store result storage api: Argument.FieldOverride.MobUUID int 1 run scoreboard players get @s MobUUID +function api:object/summon + +# reset +scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow_prepare.mcfunction b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow_prepare.mcfunction new file mode 100644 index 0000000000..a1a4593d58 --- /dev/null +++ b/Asset/data/asset/functions/mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow_prepare.mcfunction @@ -0,0 +1,20 @@ +#> asset:mob/0213.terrible_sonic_bomber/tick/weapons/storm_shadow_prepare +# +# +# +# @within function asset:mob/0213.terrible_sonic_bomber/tick/motions/attack_motion_prepare + +#> prv +# @private + #declare score_holder $attack_start_time + +# 攻撃開始と終了時間指定 +execute store result score $attack_start_time Temporary run time query gametime +execute store result storage asset:context this.attack_start_time int 1 run scoreboard players add $attack_start_time Temporary 20 +execute store result storage asset:context this.attack_end_time int 1 run scoreboard players add $attack_start_time Temporary 1 + +# 攻撃座標指定 対空砲の1番近くにいるプレイヤーの座標が攻撃目標 +execute at @e[tag=5X.Centre,limit=1] run data modify storage asset:context this.storm_shadow.target_pos set from entity @p Pos + +# reset +scoreboard players reset $attack_start_time Temporary diff --git a/Asset/data/asset/functions/mob/0214.drone/_index.d.mcfunction b/Asset/data/asset/functions/mob/0214.drone/_index.d.mcfunction new file mode 100644 index 0000000000..6f8d844f94 --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/_index.d.mcfunction @@ -0,0 +1,7 @@ +#> asset:mob/0214.drone/_index.d +# @private + +#> tag +# @within function asset:mob/0214.drone/** + #declare tag 5Y.IsAttacking + #declare tag 5Y.Suicide diff --git a/Asset/data/asset/functions/mob/0214.drone/damage.mcfunction b/Asset/data/asset/functions/mob/0214.drone/damage.mcfunction new file mode 100644 index 0000000000..fac4f7a2ef --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/damage.mcfunction @@ -0,0 +1,25 @@ +#> asset:mob/0214.drone/damage +# +# +# +# @within +# function asset:mob/0214.drone/tick/suicide +# function asset:mob/0214.drone/death/ + +# 周囲の敵と対空砲にダメージ +# particle +particle minecraft:large_smoke ~ ~ ~ 1.2 0.8 1.2 0.1 100 normal +particle minecraft:flame ~ ~ ~ 0.6 0.3 0.6 0.05 50 normal + +# damage +data modify storage api: Argument.Damage set value 10f +data modify storage api: Argument.AttackType set value "Physical" +data modify storage api: Argument.ElementType set value "Fire" +data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}' +data modify storage api: Argument.MobUUID set from storage asset:context this.MobUUID +function api:damage/modifier_manual +execute as @a[tag=!PlayerShouldInvulnerable,distance=..3] run function api:damage/ +function api:damage/reset + +# 対空砲へのダメージ +tag @e[scores={ObjectID=2088},distance=..3] add PatriotLauncher.HitMissile diff --git a/Asset/data/asset/functions/mob/0214.drone/death/.mcfunction b/Asset/data/asset/functions/mob/0214.drone/death/.mcfunction new file mode 100644 index 0000000000..ba2a29eefd --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/death/.mcfunction @@ -0,0 +1,12 @@ +#> asset:mob/0214.drone/death/ +# +# Mobの死亡時の処理 +# +# @within function asset:mob/alias/214/death + +# 周囲の敵と対空砲にダメージ +# particle +execute unless entity @s[tag=5Y.Suicide] run function asset:mob/0214.drone/damage + +# エンジン音停止 +stopsound @a[distance=..128] hostile minecraft:entity.bee.loop diff --git a/Asset/data/asset/functions/mob/0214.drone/init/.mcfunction b/Asset/data/asset/functions/mob/0214.drone/init/.mcfunction new file mode 100644 index 0000000000..face06720b --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/init/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0214.drone/init/ +# +# Mobのinit時の処理 +# +# @within asset:mob/alias/214/init + +# 初期向き設定 +execute facing entity @e[tag=5X.Centre,distance=..128,limit=1] eyes rotated ~-90 0 run tp @s ~ ~ ~ ~ ~ diff --git a/Asset/data/asset/functions/mob/0214.drone/register.mcfunction b/Asset/data/asset/functions/mob/0214.drone/register.mcfunction new file mode 100644 index 0000000000..95e5620208 --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/register.mcfunction @@ -0,0 +1,65 @@ +#> asset:mob/0214.drone/register +# +# Mobのデータを指定 +# +# @within function asset:mob/alias/214/register + +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:mob ExtendsSafe set value +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false +# ID (int) + data modify storage asset:mob ID set value 214 +# Type (string) Wikiを参照 + data modify storage asset:mob Type set value "Enemy" +# 干渉可能か否か (boolean) + data modify storage asset:mob Interferable set value true +# 名前 (TextComponentString) (オプション) + data modify storage asset:mob Name set value '{"text":"自爆ドローン"}' +# Mobの説明文 (TextComponentString[]) (オプション) + data modify storage asset:mob Lore set value ['{"text":"TBD"}'] +# 武器 + # メインハンド (Compound(Item)) (オプション) + # data modify storage asset:mob Weapon.Mainhand set value + # オフハンド (Compound(Item)) (オプション) + # data modify storage asset:mob Weapon.Offhand set value +# 武器ドロップ率 ([float, float]) (オプション) + # data modify storage asset:mob WeaponDropChances set value +# 防具 + # 頭 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Head set value + # 胴 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Chest set value + # 脚 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Legs set value + # 足 (Compound(Item)) (オプション) + # data modify storage asset:mob Armor.Feet set value +# 防具ドロップ率 ([float, float]) (オプション) + # data modify storage asset:mob ArmorDropChances set value +# 体力 (double) (オプション) + data modify storage asset:mob Health set value 1000 +# 攻撃力 (double) (オプション) + # data modify storage asset:mob AttackDamage set value +# 防御力 (double) (オプション) // 被ダメージがある程度大きい場合1ptにつき0.8%カット、小さい場合1ptにつき約4%カット 20pt以上は頭打ち + data modify storage asset:mob Defense set value 0 +# 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす + # data modify storage asset:mob SpecialDefense set value +# 移動速度 (double) (オプション) + # data modify storage asset:mob Speed set value +# 索敵範囲 (double) (オプション) + # data modify storage asset:mob FollowRange set value +# ノックバック耐性 (double) (オプション) + # data modify storage asset:mob KnockBackResist set value +# 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る + # 物理倍率 (float) (オプション) + # data modify storage asset:mob Resist.Physical set value + # 魔法倍率 (float) (オプション) + # data modify storage asset:mob Resist.Magic set value + # 火倍率 (float) (オプション) + # data modify storage asset:mob Resist.Fire set value + # 水倍率 (float) (オプション) + # data modify storage asset:mob Resist.Water set value + # 雷倍率 (float) (オプション) + # data modify storage asset:mob Resist.Thunder set value +# フィールド + # data modify storage asset:mob Field.myValue set value diff --git a/Asset/data/asset/functions/mob/0214.drone/summon/.mcfunction b/Asset/data/asset/functions/mob/0214.drone/summon/.mcfunction new file mode 100644 index 0000000000..c255e74ea8 --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0214.drone/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:mob/alias/214/summon + +# 元となるEntityを召喚する + summon phantom ~ ~ ~ {Tags:["MobInit","AntiBurn"],DeathLootTable:"empty",NoAI:1b} diff --git a/Asset/data/asset/functions/mob/0214.drone/summon/debug.mcfunction b/Asset/data/asset/functions/mob/0214.drone/summon/debug.mcfunction new file mode 100644 index 0000000000..acf740af5b --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:mob/0214.drone/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 214 + function api:mob/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/0214.drone/tick/.mcfunction b/Asset/data/asset/functions/mob/0214.drone/tick/.mcfunction new file mode 100644 index 0000000000..d5e243f38b --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/tick/.mcfunction @@ -0,0 +1,21 @@ +#> asset:mob/0214.drone/tick/ +# +# Mobのtick時の処理 +# +# @within asset:mob/alias/214/tick + +# 攻撃実行中の同モブが近くにいなければ自分が実行中になる +execute unless entity @e[tag=5Y.IsAttacking,distance=..30] run tag @s add 5Y.IsAttacking + +# 自分の状態に応じてモーション打ち分け +execute if entity @s[tag=5Y.IsAttacking] run function asset:mob/0214.drone/tick/attack_motion +execute unless entity @s[tag=5Y.IsAttacking] run function asset:mob/0214.drone/tick/cruise_motion + +# 対空砲が近くにいたら自爆 +execute if entity @e[scores={ObjectID=2088},distance=..3] run function asset:mob/0214.drone/tick/suicide + +# プレイヤーに接触したら自爆 +execute unless entity @e[scores={ObjectID=2088},distance=..3] if entity @p[tag=!PlayerShouldInvulnerable,distance=..1] run function asset:mob/0214.drone/tick/suicide + +# エンジン音 +playsound minecraft:entity.bee.loop hostile @a[distance=..30] ~ ~ ~ 0.2 0.68 0.2 diff --git a/Asset/data/asset/functions/mob/0214.drone/tick/attack_motion.mcfunction b/Asset/data/asset/functions/mob/0214.drone/tick/attack_motion.mcfunction new file mode 100644 index 0000000000..d6b1c900ae --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/tick/attack_motion.mcfunction @@ -0,0 +1,14 @@ +#> asset:mob/0214.drone/tick/attack_motion +# +# +# +# @within function asset:mob/0214.drone/tick/ + +# 中心座標を向く +execute facing entity @e[tag=5X.Centre,distance=..128,limit=1] eyes rotated ~ 0 run tp @s ~ ~ ~ ~ ~ + +# 直進 +execute at @s run tp @s ^ ^ ^0.5 + +# 中心座標の高さにくるまで下降 +execute at @e[tag=5X.Centre,distance=..128,limit=1] positioned ~-100 ~1 ~-100 if entity @s[dx=199,dy=100,dz=199] at @s run tp @s ~ ~-0.5 ~ diff --git a/Asset/data/asset/functions/mob/0214.drone/tick/cruise_motion.mcfunction b/Asset/data/asset/functions/mob/0214.drone/tick/cruise_motion.mcfunction new file mode 100644 index 0000000000..9f4fb3edef --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/tick/cruise_motion.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0214.drone/tick/cruise_motion +# +# +# +# @within function asset:mob/0214.drone/tick/ + +# 中心座標を中心に旋回 +execute unless entity @e[tag=5X.Centre,distance=..95] facing entity @e[tag=5X.Centre,distance=..128,limit=1] eyes rotated ~-80 0 run tp @s ~ ~ ~ ~ ~ + +# 直進 +tp @s ^ ^ ^0.5 diff --git a/Asset/data/asset/functions/mob/0214.drone/tick/suicide.mcfunction b/Asset/data/asset/functions/mob/0214.drone/tick/suicide.mcfunction new file mode 100644 index 0000000000..0a1e7b8834 --- /dev/null +++ b/Asset/data/asset/functions/mob/0214.drone/tick/suicide.mcfunction @@ -0,0 +1,16 @@ +#> asset:mob/0214.drone/tick/suicide +# +# +# +# @within function asset:mob/0214.drone/tick/ + +# 周囲の敵と対空砲にダメージ +execute unless entity @s[tag=5Y.Suicide] run function asset:mob/0214.drone/damage + +# 自爆したことのフラグ付け +tag @s add 5Y.Suicide + +# エンジン音停止 +stopsound @a[distance=..128] hostile minecraft:entity.bee.loop + +function api:mob/kill diff --git a/Asset/data/asset/functions/mob/alias/213/death.mcfunction b/Asset/data/asset/functions/mob/alias/213/death.mcfunction new file mode 100644 index 0000000000..69b4268e26 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/213/death.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/213/death +# +# Mobの死亡時の処理のエイリアス +# +# @within asset_manager:mob/triggers/death/death.m + +# 本来の処理を呼び出す + function asset:mob/0213.terrible_sonic_bomber/death/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/213/hurt.mcfunction b/Asset/data/asset/functions/mob/alias/213/hurt.mcfunction new file mode 100644 index 0000000000..b38a188ba2 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/213/hurt.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/213/hurt +# +# Mobのダメージ時の処理のエイリアス +# +# @within asset_manager:mob/triggers/hurt/hurt.m + +# 本来の処理を呼び出す + function asset:mob/0213.terrible_sonic_bomber/hurt/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/213/init.mcfunction b/Asset/data/asset/functions/mob/alias/213/init.mcfunction new file mode 100644 index 0000000000..17a68f8487 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/213/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/213/init +# +# Init処理のエイリアス +# +# @within asset_manager:mob/triggers/init/init.m + +# 元のInit処理を呼び出す + function asset:mob/0213.terrible_sonic_bomber/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/213/register.mcfunction b/Asset/data/asset/functions/mob/alias/213/register.mcfunction new file mode 100644 index 0000000000..98d023e245 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/213/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/213/register +# +# Mobのデータ指定処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/register.m + +# 元の登録処理を呼び出す + function asset:mob/0213.terrible_sonic_bomber/register \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/213/remove.mcfunction b/Asset/data/asset/functions/mob/alias/213/remove.mcfunction new file mode 100644 index 0000000000..c2b90bfcac --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/213/remove.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/213/init +# +# Remove処理のエイリアス +# +# @within asset_manager:mob/remove/remove.m + +# 元のInit処理を呼び出す + function asset:mob/0213.terrible_sonic_bomber/remove/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/213/summon.mcfunction b/Asset/data/asset/functions/mob/alias/213/summon.mcfunction new file mode 100644 index 0000000000..1dec6f1135 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/213/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/213/summon +# +# Mob召喚処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/summon.m + +# 本来の処理を呼び出す + function asset:mob/0213.terrible_sonic_bomber/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/213/tick.mcfunction b/Asset/data/asset/functions/mob/alias/213/tick.mcfunction new file mode 100644 index 0000000000..fcb6bb7935 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/213/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/213/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:mob/triggers/tick/tick.m + +# 元のTick処理を呼び出す + function asset:mob/0213.terrible_sonic_bomber/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/214/death.mcfunction b/Asset/data/asset/functions/mob/alias/214/death.mcfunction new file mode 100644 index 0000000000..52317b181c --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/214/death.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/214/death +# +# Mobの死亡時の処理のエイリアス +# +# @within asset_manager:mob/triggers/death/death.m + +# 本来の処理を呼び出す + function asset:mob/0214.drone/death/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/214/init.mcfunction b/Asset/data/asset/functions/mob/alias/214/init.mcfunction new file mode 100644 index 0000000000..dad5ef8a46 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/214/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/214/init +# +# Init処理のエイリアス +# +# @within asset_manager:mob/triggers/init/init.m + +# 元のInit処理を呼び出す + function asset:mob/0214.drone/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/214/register.mcfunction b/Asset/data/asset/functions/mob/alias/214/register.mcfunction new file mode 100644 index 0000000000..8be1bbda94 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/214/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/214/register +# +# Mobのデータ指定処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/register.m + +# 元の登録処理を呼び出す + function asset:mob/0214.drone/register \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/214/summon.mcfunction b/Asset/data/asset/functions/mob/alias/214/summon.mcfunction new file mode 100644 index 0000000000..3810b3f8a8 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/214/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/214/summon +# +# Mob召喚処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/summon.m + +# 本来の処理を呼び出す + function asset:mob/0214.drone/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/214/tick.mcfunction b/Asset/data/asset/functions/mob/alias/214/tick.mcfunction new file mode 100644 index 0000000000..fa49c6e8ea --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/214/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/214/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:mob/triggers/tick/tick.m + +# 元のTick処理を呼び出す + function asset:mob/0214.drone/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/detect_hit_entity/.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/detect_hit_entity/.mcfunction new file mode 100644 index 0000000000..88830ad0e3 --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/detect_hit_entity/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2082.storm_shadow/detect_hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/2082/detect_hit_entity + +# 判定 + execute positioned ~-1 ~-1 ~-1 if entity @p[tag=!PlayerShouldInvulnerable,dx=1,dy=1,dz=1] run data modify storage asset:context IsHitEntity set value true diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/init/.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/init/.mcfunction new file mode 100644 index 0000000000..1cea372881 --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/init/.mcfunction @@ -0,0 +1,24 @@ +#> asset:object/2082.storm_shadow/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/2082/init + +# スピード設定 + data modify storage asset:context this.Speed set value 4 + data modify storage asset:context this.Range set value 256 + data modify storage asset:context this.MovePerStep set value 0.5 + +# super.init呼び出し + function asset:object/super.init + +# 向きを指定座標へ向ける + # tellraw @p [{"storage":"asset:context","nbt":"this.target_pos"}] + + data modify storage asset:temp args.x set from storage asset:context this.target_pos[0] + data modify storage asset:temp args.y set from storage asset:context this.target_pos[1] + data modify storage asset:temp args.z set from storage asset:context this.target_pos[2] + function asset:object/2082.storm_shadow/init/facing_target_pos.m with storage asset:temp args + + data remove storage asset:temp args + \ No newline at end of file diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/init/facing_target_pos.m.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/init/facing_target_pos.m.mcfunction new file mode 100644 index 0000000000..7b36db7d09 --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/init/facing_target_pos.m.mcfunction @@ -0,0 +1,9 @@ +#> asset:object/2082.storm_shadow/init/facing_target_pos.m +# +# +# +# @within function asset:object/2082.storm_shadow/init/ + +$execute facing $(x) $(y) $(z) run tp @s ~ ~ ~ ~ ~ +#$say execute facing $(x) $(y) $(z) run tp @s ~ ~ ~ ~ ~ +#execute facing -3445.8884610082728 128 -896.8211085601577 run tp @s ~ ~ ~ ~ ~ diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/kill/.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/kill/.mcfunction new file mode 100644 index 0000000000..4054765c29 --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/kill/.mcfunction @@ -0,0 +1,30 @@ +#> asset:object/2082.storm_shadow/kill/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/2082/kill + + +# hit entityとhit block両方で同じ処理書くのも冗長なのでここで書く +# plausound +playsound entity.generic.explode hostile @a ~ ~ ~ 1 0.5 1 + +# particle +particle minecraft:large_smoke ~ ~ ~ 1.2 0.8 1.2 0.1 200 normal +particle minecraft:flame ~ ~ ~ 0.6 0.3 0.6 0.05 100 normal + +# damage +data modify storage api: Argument.Damage set value 40f +data modify storage api: Argument.AttackType set value "Physical" +data modify storage api: Argument.ElementType set value "Fire" +data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}' +data modify storage api: Argument.MobUUID set from storage asset:context this.MobUUID +function api:damage/modifier_manual +execute as @a[tag=!PlayerShouldInvulnerable,distance=..3] run function api:damage/ +function api:damage/reset + +# 対空砲へのダメージ +tag @e[scores={ObjectID=2088},distance=..8] add PatriotLauncher.HitMissile + +# 消滅 +kill @s diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/register.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/register.mcfunction new file mode 100644 index 0000000000..a086ba1561 --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/register.mcfunction @@ -0,0 +1,20 @@ +#> asset:object/2082.storm_shadow/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/2082/register + +# 継承(オプション) + # projetcileを継承 + data modify storage asset:object Extends append value 1 + function asset:object/extends + +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false + +# ID (int) + data modify storage asset:object ID set value 2082 +# フィールド(オプション) + # data modify storage asset:object Field.myValue set value diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/summon/.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/summon/.mcfunction new file mode 100644 index 0000000000..38d7bcef7c --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2082.storm_shadow/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/2082/summon + +# 元となるEntityを召喚する + summon item_display ~ ~ ~ {Tags:["ObjectInit"],item:{id:"minecraft:tnt",Count:1b},teleport_duration:1} diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/summon/debug.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/summon/debug.mcfunction new file mode 100644 index 0000000000..457877993d --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/2082.storm_shadow/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 2082 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/2082.storm_shadow/tick/.mcfunction b/Asset/data/asset/functions/object/2082.storm_shadow/tick/.mcfunction new file mode 100644 index 0000000000..841dce8655 --- /dev/null +++ b/Asset/data/asset/functions/object/2082.storm_shadow/tick/.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/2082.storm_shadow/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/2082/tick + +# Tick加算 +scoreboard players add @s General.Object.Tick 1 + +# super +function asset:object/super.tick + +# 消滅処理 +kill @s[scores={General.Object.Tick=1000..}] diff --git a/Asset/data/asset/functions/object/2083.brimstone/detect_hit_entity/.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/detect_hit_entity/.mcfunction new file mode 100644 index 0000000000..abedd38677 --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/detect_hit_entity/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2083.brimstone/detect_hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/2083/detect_hit_entity + +# 判定 + execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @p[tag=!PlayerShouldInvulnerable,dx=0] run data modify storage asset:context IsHitEntity set value true diff --git a/Asset/data/asset/functions/object/2083.brimstone/init/.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/init/.mcfunction new file mode 100644 index 0000000000..a2f1a13e8a --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/init/.mcfunction @@ -0,0 +1,19 @@ +#> asset:object/2083.brimstone/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/2083/init + +# スピード設定 + data modify storage asset:context this.Speed set value 3 + data modify storage asset:context this.Range set value 256 + data modify storage asset:context this.MovePerStep set value 0.5 + +# super.init呼び出し + function asset:object/super.init + +# 向きを指定プレイヤーへ向ける + # tellraw @p [{"storage":"asset:context","nbt":"this.target_pos"}] + + function asset:object/2083.brimstone/turn with storage asset:context this + #execute facing entity @p[tag=5X.BrimstoneTarget] eyes run tp @s ~ ~ ~ ~ ~ diff --git a/Asset/data/asset/functions/object/2083.brimstone/kill/.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/kill/.mcfunction new file mode 100644 index 0000000000..2e31693359 --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/kill/.mcfunction @@ -0,0 +1,29 @@ +#> asset:object/2083.brimstone/kill/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/2083/kill + +# hit entityとhit block両方で同じ処理書くのも冗長なのでここで書く +# plausound +playsound entity.generic.explode hostile @a ~ ~ ~ 1 0.5 1 + +# particle +particle minecraft:large_smoke ~ ~ ~ 0.6 0.4 0.6 0.1 100 normal +particle minecraft:flame ~ ~ ~ 0.3 0.2 0.3 0.05 50 normal + +# damage +data modify storage api: Argument.Damage set value 20f +data modify storage api: Argument.AttackType set value "Physical" +data modify storage api: Argument.ElementType set value "None" +data modify storage api: Argument.BypassArmorDefense set value true +data modify storage api: Argument.BypassToughness set value true +data modify storage api: Argument.BypassEnchantments set value true +data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}' +data modify storage api: Argument.MobUUID set from storage asset:context this.MobUUID +function api:damage/modifier_manual +execute as @a[tag=!PlayerShouldInvulnerable,distance=..3] run function api:damage/ +function api:damage/reset + +# 消滅 +kill @s diff --git a/Asset/data/asset/functions/object/2083.brimstone/register.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/register.mcfunction new file mode 100644 index 0000000000..21f5cd4f1c --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/register.mcfunction @@ -0,0 +1,21 @@ +#> asset:object/2083.brimstone/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/2083/register + +# 継承(オプション) + # projetcileを継承 + data modify storage asset:object Extends append value 1 + function asset:object/extends +# 他のObjectに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false +# Tickするかどうか(boolean) (オプション) + # data modify storage asset:object IsTicking set value + +# ID (int) + data modify storage asset:object ID set value 2083 +# フィールド(オプション) + # data modify storage asset:object Field.myValue set value diff --git a/Asset/data/asset/functions/object/2083.brimstone/summon/.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/summon/.mcfunction new file mode 100644 index 0000000000..8b85348c50 --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2083.brimstone/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/2083/summon + +# 元となるEntityを召喚する + summon item_display ~ ~ ~ {Tags:["ObjectInit"],item:{id:"minecraft:honey_block",Count:1b},teleport_duration:1} diff --git a/Asset/data/asset/functions/object/2083.brimstone/summon/debug.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/summon/debug.mcfunction new file mode 100644 index 0000000000..afae1e28b2 --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/2083.brimstone/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 2083 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/2083.brimstone/tick/.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/tick/.mcfunction new file mode 100644 index 0000000000..32458e4881 --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/tick/.mcfunction @@ -0,0 +1,17 @@ +#> asset:object/2083.brimstone/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/2083/tick + +# Tick加算 + scoreboard players add @s General.Object.Tick 1 + +# 方向転換 + function asset:object/2083.brimstone/turn with storage asset:context this + +# super + execute at @s run function asset:object/super.tick + +# 消滅処理 + kill @s[scores={General.Object.Tick=1000..}] diff --git a/Asset/data/asset/functions/object/2083.brimstone/turn.mcfunction b/Asset/data/asset/functions/object/2083.brimstone/turn.mcfunction new file mode 100644 index 0000000000..50d01291c6 --- /dev/null +++ b/Asset/data/asset/functions/object/2083.brimstone/turn.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/2083.brimstone/turn +# +# +# +# @within +# function asset:object/2083.brimstone/init/ +# function asset:object/2083.brimstone/tick/ + +$execute if entity @p[scores={UserID=$(TargetPlayerID)},distance=15..] facing entity @p[scores={UserID=$(TargetPlayerID)}] eyes run tp @s ~ ~ ~ ~ ~ +# $say $(TargetPlayerID) diff --git a/Asset/data/asset/functions/object/2084.snake_eye/_index.d.mcfunction b/Asset/data/asset/functions/object/2084.snake_eye/_index.d.mcfunction new file mode 100644 index 0000000000..8b08eeb8f8 --- /dev/null +++ b/Asset/data/asset/functions/object/2084.snake_eye/_index.d.mcfunction @@ -0,0 +1,2 @@ +#> asset:object/2084.snake_eye/_index.d +# @private diff --git a/Asset/data/asset/functions/object/2084.snake_eye/init/.mcfunction b/Asset/data/asset/functions/object/2084.snake_eye/init/.mcfunction new file mode 100644 index 0000000000..56be0529a1 --- /dev/null +++ b/Asset/data/asset/functions/object/2084.snake_eye/init/.mcfunction @@ -0,0 +1,17 @@ +#> asset:object/2084.snake_eye/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/2084/init + +# スピード設定 + data modify storage asset:context this.Speed set value 2 + data modify storage asset:context this.Range set value 256 + data modify storage asset:context this.MovePerStep set value 0.5 + +# super.init呼び出し + function asset:object/super.init + +# 向きを発射母機と合わせる + # tellraw @p [{"storage":"asset:context","nbt":"this.target_pos"}] + execute rotated as @e[tag=Enemy.Boss,sort=nearest,limit=1] run tp @s ~ ~ ~ ~ 80 diff --git a/Asset/data/asset/functions/object/2084.snake_eye/kill/.mcfunction b/Asset/data/asset/functions/object/2084.snake_eye/kill/.mcfunction new file mode 100644 index 0000000000..087e3d6bf2 --- /dev/null +++ b/Asset/data/asset/functions/object/2084.snake_eye/kill/.mcfunction @@ -0,0 +1,29 @@ +#> asset:object/2084.snake_eye/kill/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/2084/kill + +# hit entityとhit block両方で同じ処理書くのも冗長なのでここで書く +# plausound +playsound entity.generic.explode hostile @a ~ ~ ~ 1 0.5 1 + +# particle +particle minecraft:large_smoke ~ ~ ~ 2 1 2 0.1 200 normal +particle minecraft:flame ~ ~ ~ 1 0.6 1 0.05 100 normal + +# damage +data modify storage api: Argument.Damage set value 60f +data modify storage api: Argument.AttackType set value "Physical" +data modify storage api: Argument.ElementType set value "Fire" +data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}' +data modify storage api: Argument.MobUUID set from storage asset:context this.MobUUID +function api:damage/modifier_manual +execute as @a[tag=!PlayerShouldInvulnerable,distance=..8] run function api:damage/ +function api:damage/reset + +# 対空砲へのダメージ +tag @e[scores={ObjectID=2088},distance=..8] add PatriotLauncher.HitMissile + +# 消滅 +kill @s diff --git a/Asset/data/asset/functions/object/2084.snake_eye/register.mcfunction b/Asset/data/asset/functions/object/2084.snake_eye/register.mcfunction new file mode 100644 index 0000000000..ee3411b4b0 --- /dev/null +++ b/Asset/data/asset/functions/object/2084.snake_eye/register.mcfunction @@ -0,0 +1,21 @@ +#> asset:object/2084.snake_eye/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/2084/register + +# 継承(オプション) + # projetcileを継承 + data modify storage asset:object Extends append value 1 + function asset:object/extends +# 他のObjectに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false +# Tickするかどうか(boolean) (オプション) + # data modify storage asset:object IsTicking set value + +# ID (int) + data modify storage asset:object ID set value 2084 +# フィールド(オプション) + # data modify storage asset:object Field.myValue set value diff --git a/Asset/data/asset/functions/object/2084.snake_eye/summon/.mcfunction b/Asset/data/asset/functions/object/2084.snake_eye/summon/.mcfunction new file mode 100644 index 0000000000..da97b88243 --- /dev/null +++ b/Asset/data/asset/functions/object/2084.snake_eye/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2084.snake_eye/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/2084/summon + +# 元となるEntityを召喚する + summon item_display ~ ~ ~ {Tags:["ObjectInit"],item:{id:"minecraft:slime_block",Count:1b},teleport_duration:1} diff --git a/Asset/data/asset/functions/object/2084.snake_eye/summon/debug.mcfunction b/Asset/data/asset/functions/object/2084.snake_eye/summon/debug.mcfunction new file mode 100644 index 0000000000..3c022ab5ce --- /dev/null +++ b/Asset/data/asset/functions/object/2084.snake_eye/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/2084.snake_eye/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 2084 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/2084.snake_eye/tick/.mcfunction b/Asset/data/asset/functions/object/2084.snake_eye/tick/.mcfunction new file mode 100644 index 0000000000..6385b5cdeb --- /dev/null +++ b/Asset/data/asset/functions/object/2084.snake_eye/tick/.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/2084.snake_eye/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/2084/tick + +# Tick加算 +scoreboard players add @s General.Object.Tick 1 + +# super +execute at @s run function asset:object/super.tick + +# 消滅処理 +kill @s[scores={General.Object.Tick=1000..}] diff --git a/Asset/data/asset/functions/object/2087.patriot/detect_hit_entity/.mcfunction b/Asset/data/asset/functions/object/2087.patriot/detect_hit_entity/.mcfunction new file mode 100644 index 0000000000..628e5720ea --- /dev/null +++ b/Asset/data/asset/functions/object/2087.patriot/detect_hit_entity/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2087.patriot/detect_hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/2087/detect_hit_entity + +# 判定 + execute positioned ~-2 ~-2 ~-2 if entity @e[tag=Enemy.Boss,dx=3,dy=3,dz=3] run data modify storage asset:context IsHitEntity set value true diff --git a/Asset/data/asset/functions/object/2087.patriot/hit_entity/.mcfunction b/Asset/data/asset/functions/object/2087.patriot/hit_entity/.mcfunction new file mode 100644 index 0000000000..6876db2501 --- /dev/null +++ b/Asset/data/asset/functions/object/2087.patriot/hit_entity/.mcfunction @@ -0,0 +1,24 @@ +#> asset:object/2087.patriot/hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/2087/hit_entity + +# ダメージ +data modify storage api: Argument.Damage set value 700f +data modify storage api: Argument.AttackType set value "Physical" +data modify storage api: Argument.ElementType set value "Fire" +data modify storage api: Argument.FixedDamage set value true +function api:damage/modifier +execute as @e[type=#lib:living,tag=Enemy,distance=..7] run function api:damage/ +function api:damage/reset + +# sound +playsound minecraft:entity.firework_rocket.twinkle_far master @a[distance=..128] ~ ~ ~ 1.0 0.76 1 +playsound minecraft:entity.firework_rocket.large_blast_far master @a[distance=..128] ~ ~ ~ 1.0 0.61 1 + +# particle +particle minecraft:large_smoke ~ ~ ~ 1.5 0.8 1.5 0.1 200 force + +# super呼び出し +function asset:object/super.method diff --git a/Asset/data/asset/functions/object/2087.patriot/init/.mcfunction b/Asset/data/asset/functions/object/2087.patriot/init/.mcfunction new file mode 100644 index 0000000000..5d31344075 --- /dev/null +++ b/Asset/data/asset/functions/object/2087.patriot/init/.mcfunction @@ -0,0 +1,16 @@ +#> asset:object/2087.patriot/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/2087/init + +# スピード設定 + data modify storage asset:context this.Speed set value 8 + data modify storage asset:context this.Range set value 1024 + data modify storage asset:context this.MovePerStep set value 0.5 + +# super.init呼び出し + function asset:object/super.init + +# 向きをボスへ向ける + execute facing entity @e[tag=Enemy.Boss,distance=..128,limit=1] eyes run tp @s ~ ~ ~ ~ ~ diff --git a/Asset/data/asset/functions/object/2087.patriot/register.mcfunction b/Asset/data/asset/functions/object/2087.patriot/register.mcfunction new file mode 100644 index 0000000000..39744eb961 --- /dev/null +++ b/Asset/data/asset/functions/object/2087.patriot/register.mcfunction @@ -0,0 +1,19 @@ +#> asset:object/2087.patriot/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/2087/register + +# 継承(オプション) + # projetcileを継承 + data modify storage asset:object Extends append value 1 + function asset:object/extends +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false + +# ID (int) + data modify storage asset:object ID set value 2087 +# フィールド(オプション) + data modify storage asset:object Field.TargetPlayerID set value 0 diff --git a/Asset/data/asset/functions/object/2087.patriot/summon/.mcfunction b/Asset/data/asset/functions/object/2087.patriot/summon/.mcfunction new file mode 100644 index 0000000000..c79b85aa08 --- /dev/null +++ b/Asset/data/asset/functions/object/2087.patriot/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2087.patriot/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/2087/summon + +# 元となるEntityを召喚する + summon item_display ~ ~ ~ {Tags:["ObjectInit"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[3f,3f,3f]},item:{id:"minecraft:firework_rocket",Count:1b}} diff --git a/Asset/data/asset/functions/object/2087.patriot/summon/debug.mcfunction b/Asset/data/asset/functions/object/2087.patriot/summon/debug.mcfunction new file mode 100644 index 0000000000..feb73480da --- /dev/null +++ b/Asset/data/asset/functions/object/2087.patriot/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/2087.patriot/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 2087 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/2087.patriot/tick/.mcfunction b/Asset/data/asset/functions/object/2087.patriot/tick/.mcfunction new file mode 100644 index 0000000000..b852227804 --- /dev/null +++ b/Asset/data/asset/functions/object/2087.patriot/tick/.mcfunction @@ -0,0 +1,17 @@ +#> asset:object/2087.patriot/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/2087/tick + +# Tick加算 +scoreboard players add @s General.Object.Tick 1 + +# 向きをボスへ向ける +execute facing entity @e[tag=Enemy.Boss,distance=..128,limit=1] eyes run tp @s ~ ~ ~ ~ ~ + +#命中判定 +execute at @s run function asset:object/super.tick + +# 消滅処理 +kill @s[scores={General.Object.Tick=1000..}] diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/_index.d.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/_index.d.mcfunction new file mode 100644 index 0000000000..e1443ca179 --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/_index.d.mcfunction @@ -0,0 +1,25 @@ +#> asset:object/2088.patriot_launcher/_index.d +# @private + +#> patriot_launcher +# @within +# function asset:object/2088.patriot_launcher/** + #declare tag PatriotLauncher.Body + #declare tag PatriotLauncher.DisplayName + #declare tag PatriotLauncher.RepairGauge + + +#> suffer_damage +# @within +# function asset:mob/0214.drone/** +# function asset:object/2088.patriot_launcher/** +# function asset:object/2082.storm_shadow/** +# function asset:object/2083.brimstone/** +# function asset:object/2084.snake_eye/** + #declare tag PatriotLauncher.HitMissile + +#> is_broken +# @within +# function asset:object/2088.patriot_launcher/** +# function asset:mob/0213.terrible_sonic_bomber/** + #declare tag PatriotLauncher.IsBroken diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/init/.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/init/.mcfunction new file mode 100644 index 0000000000..a8ec9ab707 --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/init/.mcfunction @@ -0,0 +1,27 @@ +#> asset:object/2088.patriot_launcher/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/2088/init + +#> prv +# @private + #declare tag PatriotLauncher.ObjectInit + +# 見た目召喚 +summon block_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,2f,4f]},block_state:{Name:"minecraft:white_concrete"},Tags:["PatriotLauncher.ObjectInit","PatriotLauncher.Body"]} +summon text_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,4f,0f],scale:[2f,2f,4f]},billboard:"center",text:'{"color":"#ffffff","text":"対空砲"}',Tags:["PatriotLauncher.ObjectInit","PatriotLauncher.DisplayName"]} +summon text_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,5f,0f],scale:[2f,2f,4f]},billboard:"center",text:'{"color":"#ffffff","text":""}',Tags:["PatriotLauncher.ObjectInit","PatriotLauncher.RepairGauge"]} +ride @e[type=block_display,tag=PatriotLauncher.ObjectInit,tag=PatriotLauncher.Body,limit=1] mount @s +ride @e[type=text_display,tag=PatriotLauncher.ObjectInit,tag=PatriotLauncher.DisplayName,limit=1] mount @s +ride @e[type=text_display,tag=PatriotLauncher.ObjectInit,tag=PatriotLauncher.RepairGauge,limit=1] mount @s + +# データセット + data modify storage asset:context this.Durability set value 10 + data modify storage asset:context this.RepairTime set value 0 + data modify storage asset:context this.IsBroken set value 0b + data modify storage asset:context this.IsActive set value 1b + data modify storage asset:context this.MissileCooltime set from storage asset:context this.MaxMissileCooltime + +# reset +tag @e[tag=PatriotLauncher.ObjectInit] remove PatriotLauncher.ObjectInit diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/register.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/register.mcfunction new file mode 100644 index 0000000000..8521d5be69 --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/register.mcfunction @@ -0,0 +1,25 @@ +#> asset:object/2088.patriot_launcher/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/2088/register + +# 継承(オプション) + # data modify storage asset:object Extends append value + # function asset:object/extends +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false + +# ID (int) + data modify storage asset:object ID set value 2088 +# フィールド(オプション) + # data modify storage asset:object Field.myValue set value + data modify storage asset:object Field.Durability set value 10 + data modify storage asset:object Field.RepairTime set value 0 + data modify storage asset:object Field.MaxRepairTime set value 51200 + data modify storage asset:object Field.IsBroken set value 0b + data modify storage asset:object Field.IsActive set value 1b + data modify storage asset:object Field.MissileCooltime set value 0 + data modify storage asset:object Field.MaxMissileCooltime set value 220 diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/summon/.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/summon/.mcfunction new file mode 100644 index 0000000000..9adb41d614 --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/2088.patriot_launcher/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/2088/summon + +# 元となるEntityを召喚する + summon item_display ~ ~ ~ {Tags:["ObjectInit"]} diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/summon/debug.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/summon/debug.mcfunction new file mode 100644 index 0000000000..ee2aabf1a7 --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/2088.patriot_launcher/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 2088 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/tick/.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/.mcfunction new file mode 100644 index 0000000000..2cbde75b4b --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/.mcfunction @@ -0,0 +1,17 @@ +#> asset:object/2088.patriot_launcher/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/2088/tick + +# Tick加算 + scoreboard players add @s General.Object.Tick 1 + +# 消滅処理 + # kill @s[scores={General.Object.Tick=1000..}] + +# 生きている場合の処理 +execute if data storage asset:context this{IsBroken:0b} run function asset:object/2088.patriot_launcher/tick/tick_active + +# 死んでいる場合の処理 +execute if data storage asset:context this{IsBroken:1b} run function asset:object/2088.patriot_launcher/tick/tick_broken diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/tick/missile_launch.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/missile_launch.mcfunction new file mode 100644 index 0000000000..7156c9a7be --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/missile_launch.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/2088.patriot_launcher/tick/missile_launch +# +# +# +# @within function asset:object/2088.patriot_launcher/tick/tick_active + + +# sound +playsound entity.generic.explode neutral @a ~ ~ ~ 1 2 1 +playsound minecraft:entity.breeze.death master @a ~ ~ ~ 1.0 0.5 1 + +# オブジェクト召喚 +data modify storage api: Argument.ID set value 2087 +function api:object/summon diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/tick/set_repair_gauge.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/set_repair_gauge.mcfunction new file mode 100644 index 0000000000..361a7878f8 --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/set_repair_gauge.mcfunction @@ -0,0 +1,31 @@ +#> asset:object/2088.patriot_launcher/tick/set_repair_gauge +# +# +# +# @within function asset:object/2088.patriot_launcher/tick/tick_broken + +#> prv +# @private + #declare score_holder $RepairRatioE1 # E1なので10倍してる + #declare score_holder $MaxRepairTimeE1 # E1なので10倍してる + +# 10 - 10*(修理値/最大修理値) を出したいので 10 + (-10*修理値/最大修理値)に変形して計算 +execute store result score $RepairRatioE1 Temporary run data get storage asset:context this.RepairTime -10 +execute store result score $MaxRepairTimeE1 Temporary run data get storage asset:context this.MaxRepairTime 1 +scoreboard players operation $RepairRatioE1 Temporary /= $MaxRepairTimeE1 Temporary +scoreboard players add $RepairRatioE1 Temporary 10 + #tellraw @a [{"score":{"objective":"Temporary","name":"$RepairRatioE1"}}] + #tellraw @a [{"score":{"objective":"Temporary","name":"$MaxRepairTimeE1"}}] + +# textに反映 +execute if score $RepairRatioE1 Temporary matches 0 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:□□□□□□□□□□"}' +execute if score $RepairRatioE1 Temporary matches 1 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■□□□□□□□□□"}' +execute if score $RepairRatioE1 Temporary matches 2 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■□□□□□□□□"}' +execute if score $RepairRatioE1 Temporary matches 3 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■□□□□□□□"}' +execute if score $RepairRatioE1 Temporary matches 4 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■■□□□□□□"}' +execute if score $RepairRatioE1 Temporary matches 5 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■■■□□□□□"}' +execute if score $RepairRatioE1 Temporary matches 6 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■■■■□□□□"}' +execute if score $RepairRatioE1 Temporary matches 7 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■■■■■□□□"}' +execute if score $RepairRatioE1 Temporary matches 8 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■■■■■■□□"}' +execute if score $RepairRatioE1 Temporary matches 9 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■■■■■■■□"}' +execute if score $RepairRatioE1 Temporary matches 10 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":"修理:■■■■■■■■■■"}' diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_active.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_active.mcfunction new file mode 100644 index 0000000000..ee8f1967f9 --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_active.mcfunction @@ -0,0 +1,40 @@ +#> asset:object/2088.patriot_launcher/tick/tick_active +# +# +# +# @within function asset:object/2088.patriot_launcher/tick/ + +#> prv +# @private + #declare score_holder $MissileCooltime + #declare score_holder $CurrentDurability + +# 耐久値の減少処理 + execute store result score $CurrentDurability Temporary run data get storage asset:context this.Durability + execute if entity @s[tag=PatriotLauncher.HitMissile] run scoreboard players set $CurrentDurability Temporary 0 + tag @s remove PatriotLauncher.HitMissile + +# 耐久が0の場合死亡状態へ遷移して処理をキャンセル +# 回復までの時間は修理者無しで20秒想定(tickごとに128回復 128*20tick*20s) + execute if score $CurrentDurability Temporary matches ..0 on passengers run data modify entity @s block_state.Name set value "minecraft:black_concrete" + execute if score $CurrentDurability Temporary matches ..0 on passengers run tag @s add PatriotLauncher.IsBroken + execute if score $CurrentDurability Temporary matches ..0 run data modify storage asset:context this.IsBroken set value 1b + execute if score $CurrentDurability Temporary matches ..0 run data modify storage asset:context this.RepairTime set from storage asset:context this.MaxRepairTime + execute if score $CurrentDurability Temporary matches ..0 on passengers if entity @s[type=text_display,tag=PatriotLauncher.DisplayName] run data modify entity @s text set value '[{"bold":true,"color":"#FFFFFF","text":"PRESS "},{"color":"#FFFFFF","keybind":"key.sneak"}]' + execute if score $CurrentDurability Temporary matches ..0 run return run scoreboard players reset $CurrentDurability Temporary + +# 向きを敵の方へ向ける + execute facing entity @e[tag=Enemy.Boss,distance=..128,limit=1] eyes run tp @s ~ ~ ~ ~ ~ + execute on passengers facing entity @e[tag=Enemy.Boss,distance=..128,limit=1] eyes run tp @s ~ ~ ~ ~ ~ + +# 次の発射までのカウント + execute store result score $MissileCooltime Temporary run data get storage asset:context this.MissileCooltime + execute store result storage asset:context this.MissileCooltime int 1 run scoreboard players remove $MissileCooltime Temporary 1 + +# 発射時間が来ていた場合ミサイル発射 + execute if score $MissileCooltime Temporary matches 0 run function asset:object/2088.patriot_launcher/tick/missile_launch + execute if score $MissileCooltime Temporary matches 0 run data modify storage asset:context this.MissileCooltime set from storage asset:context this.MaxMissileCooltime + +# reset + scoreboard players reset $MissileCooltime Temporary + scoreboard players reset $CurrentDurability Temporary diff --git a/Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_broken.mcfunction b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_broken.mcfunction new file mode 100644 index 0000000000..1db66e362d --- /dev/null +++ b/Asset/data/asset/functions/object/2088.patriot_launcher/tick/tick_broken.mcfunction @@ -0,0 +1,55 @@ +#> asset:object/2088.patriot_launcher/tick/tick_broken +# +# +# +# @within function asset:object/2088.patriot_launcher/tick/ + +#> prv +# @private + #declare score_holder $RepairValue + #declare score_holder $RepairPlayer + #declare score_holder $RepairTime + #declare score_holder $MaxRepairTime + +# 修理値を決定 +execute store result score $RepairPlayer Temporary if entity @a[predicate=lib:is_sneaking,distance=..8] +execute if score $RepairPlayer Temporary matches 0 run scoreboard players set $RepairValue Temporary 128 +execute if score $RepairPlayer Temporary matches 1 run scoreboard players set $RepairValue Temporary 256 +execute if score $RepairPlayer Temporary matches 2 run scoreboard players set $RepairValue Temporary 320 +execute if score $RepairPlayer Temporary matches 3 run scoreboard players set $RepairValue Temporary 352 +execute if score $RepairPlayer Temporary matches 4.. run scoreboard players set $RepairValue Temporary 368 + +# RepairPlayerがいるならパーティクル +execute if score $RepairPlayer Temporary matches 1.. run particle happy_villager ~ ~2 ~ 1 1 1 1 10 + +# 修理時間減らす +execute store result score $RepairTime Temporary run data get storage asset:context this.RepairTime +execute store result storage asset:context this.RepairTime int 1 run scoreboard players operation $RepairTime Temporary -= $RepairValue Temporary + +# ミサイル命中時の修理時間減速 +execute if entity @s[tag=PatriotLauncher.HitMissile] store result storage asset:context this.RepairTime int 1 run scoreboard players add $RepairTime Temporary 3000 +execute store result score $MaxRepairTime Temporary run data get storage asset:context this.MaxRepairTime +execute if score $RepairTime Temporary >= $MaxRepairTime Temporary run data modify storage asset:context this.RepairTime set from storage asset:context this.MaxRepairTime +function asset:object/2088.patriot_launcher/tick/set_repair_gauge +tag @s remove PatriotLauncher.HitMissile + #tellraw @a [{"text":"repair time "},{"score":{"objective":"Temporary","name":"$RepairTime"}}] + #tellraw @a [{"text":"repair value "},{"score":{"objective":"Temporary","name":"$RepairValue"}}] + +# 修理時間0以下になったら修理完了 +execute if score $RepairTime Temporary matches ..0 run data modify storage asset:context this.Durability set value 10 +execute if score $RepairTime Temporary matches ..0 run data modify storage asset:context this.RepairTime set value 0 +execute if score $RepairTime Temporary matches ..0 run data modify storage asset:context this.IsBroken set value 0b +execute if score $RepairTime Temporary matches ..0 run data modify storage asset:context this.IsActive set value 1b +execute if score $RepairTime Temporary matches ..0 run data modify storage asset:context this.MissileCooltime set from storage asset:context this.MaxMissileCooltime +execute if score $RepairTime Temporary matches ..0 on passengers run data modify entity @s block_state.Name set value "minecraft:white_concrete" +execute if score $RepairTime Temporary matches ..0 on passengers run tag @s remove PatriotLauncher.IsBroken +execute if score $RepairTime Temporary matches ..0 on passengers if entity @s[type=text_display,tag=PatriotLauncher.DisplayName] run data modify entity @s text set value '{"color":"#ffffff","text":"対空砲"}' +execute if score $RepairTime Temporary matches ..0 on passengers if entity @s[type=text_display,tag=PatriotLauncher.RepairGauge] run data modify entity @s text set value '{"color":"#ffffff","text":""}' + +# reset +scoreboard players reset $RepairValue Temporary +scoreboard players reset $RepairTime Temporary +scoreboard players reset $RepairPlayer Temporary + +#プレイヤーが修理中の場合修理値をn+m*p増加 +#修理値gはmaxになったら修理状態へ戻す diff --git a/Asset/data/asset/functions/object/alias/2082/detect_hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/2082/detect_hit_entity.mcfunction new file mode 100644 index 0000000000..9391197bbd --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2082/detect_hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2082/detect_hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/2082.storm_shadow/detect_hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2082/init.mcfunction b/Asset/data/asset/functions/object/alias/2082/init.mcfunction new file mode 100644 index 0000000000..13027ceb7f --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2082/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2082/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/2082.storm_shadow/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2082/kill.mcfunction b/Asset/data/asset/functions/object/alias/2082/kill.mcfunction new file mode 100644 index 0000000000..d08c681f46 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2082/kill.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2082/kill +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/2082.storm_shadow/kill/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2082/register.mcfunction b/Asset/data/asset/functions/object/alias/2082/register.mcfunction new file mode 100644 index 0000000000..d8e5a7f994 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2082/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2082/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/2082.storm_shadow/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2082/summon.mcfunction b/Asset/data/asset/functions/object/alias/2082/summon.mcfunction new file mode 100644 index 0000000000..8f8278229a --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2082/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2082/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/2082.storm_shadow/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2082/tick.mcfunction b/Asset/data/asset/functions/object/alias/2082/tick.mcfunction new file mode 100644 index 0000000000..c2b0650c9e --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2082/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2082/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/2082.storm_shadow/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2083/detect_hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/2083/detect_hit_entity.mcfunction new file mode 100644 index 0000000000..568ed24ab2 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2083/detect_hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2083/detect_hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/2083.brimstone/detect_hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2083/init.mcfunction b/Asset/data/asset/functions/object/alias/2083/init.mcfunction new file mode 100644 index 0000000000..0e9a32e83e --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2083/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2083/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/2083.brimstone/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2083/kill.mcfunction b/Asset/data/asset/functions/object/alias/2083/kill.mcfunction new file mode 100644 index 0000000000..7c04eae101 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2083/kill.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2083/kill +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/2083.brimstone/kill/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2083/register.mcfunction b/Asset/data/asset/functions/object/alias/2083/register.mcfunction new file mode 100644 index 0000000000..d569677e8f --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2083/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2083/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/2083.brimstone/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2083/summon.mcfunction b/Asset/data/asset/functions/object/alias/2083/summon.mcfunction new file mode 100644 index 0000000000..140bb8e58c --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2083/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2083/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/2083.brimstone/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2083/tick.mcfunction b/Asset/data/asset/functions/object/alias/2083/tick.mcfunction new file mode 100644 index 0000000000..b54a70d156 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2083/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2083/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/2083.brimstone/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2084/init.mcfunction b/Asset/data/asset/functions/object/alias/2084/init.mcfunction new file mode 100644 index 0000000000..6909ea6871 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2084/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2084/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/2084.snake_eye/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2084/kill.mcfunction b/Asset/data/asset/functions/object/alias/2084/kill.mcfunction new file mode 100644 index 0000000000..6cd935aab8 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2084/kill.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2084/kill +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/2084.snake_eye/kill/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2084/register.mcfunction b/Asset/data/asset/functions/object/alias/2084/register.mcfunction new file mode 100644 index 0000000000..7d93f00bad --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2084/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2084/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/2084.snake_eye/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2084/summon.mcfunction b/Asset/data/asset/functions/object/alias/2084/summon.mcfunction new file mode 100644 index 0000000000..bc624762dd --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2084/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2084/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/2084.snake_eye/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2084/tick.mcfunction b/Asset/data/asset/functions/object/alias/2084/tick.mcfunction new file mode 100644 index 0000000000..da4fe35f23 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2084/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2084/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/2084.snake_eye/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2087/detect_hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/2087/detect_hit_entity.mcfunction new file mode 100644 index 0000000000..44a005eb06 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2087/detect_hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2087/detect_hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/2087.patriot/detect_hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2087/hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/2087/hit_entity.mcfunction new file mode 100644 index 0000000000..7eaf3c3ab6 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2087/hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2087/hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/2087.patriot/hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2087/init.mcfunction b/Asset/data/asset/functions/object/alias/2087/init.mcfunction new file mode 100644 index 0000000000..30f926b9b3 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2087/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2087/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/2087.patriot/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2087/register.mcfunction b/Asset/data/asset/functions/object/alias/2087/register.mcfunction new file mode 100644 index 0000000000..7cf48a05cc --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2087/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2087/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/2087.patriot/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2087/summon.mcfunction b/Asset/data/asset/functions/object/alias/2087/summon.mcfunction new file mode 100644 index 0000000000..f82b42cb0b --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2087/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2087/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/2087.patriot/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2087/tick.mcfunction b/Asset/data/asset/functions/object/alias/2087/tick.mcfunction new file mode 100644 index 0000000000..4a1f6503c9 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2087/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2087/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/2087.patriot/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2088/init.mcfunction b/Asset/data/asset/functions/object/alias/2088/init.mcfunction new file mode 100644 index 0000000000..8456b29f78 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2088/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2088/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/2088.patriot_launcher/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2088/register.mcfunction b/Asset/data/asset/functions/object/alias/2088/register.mcfunction new file mode 100644 index 0000000000..26519eb218 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2088/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2088/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/2088.patriot_launcher/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2088/summon.mcfunction b/Asset/data/asset/functions/object/alias/2088/summon.mcfunction new file mode 100644 index 0000000000..7340cc2dee --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2088/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2088/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/2088.patriot_launcher/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/2088/tick.mcfunction b/Asset/data/asset/functions/object/alias/2088/tick.mcfunction new file mode 100644 index 0000000000..fd4df6103a --- /dev/null +++ b/Asset/data/asset/functions/object/alias/2088/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/2088/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/2088.patriot_launcher/tick/