From ecfae4a099cd4fda897301123aa0dcadcdb6bee6 Mon Sep 17 00:00:00 2001 From: Ponpon Date: Fri, 17 Jan 2025 10:12:09 +0900 Subject: [PATCH 1/7] =?UTF-8?q?NO-ISSUE=20Add=20=E3=83=A2=E3=83=96?= =?UTF-8?q?=E3=81=B8=E3=81=AE=E6=94=BB=E6=92=83=E6=99=82=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../advancement/trigger/hurt_entity.json | 287 ++++++++++++++++++ .../function/trigger/hurt_entity/.mcfunction | 20 ++ .../hurt_entity/hit_projectile.mcfunction | 20 ++ .../hurt_entity/melee_attack.mcfunction | 39 +++ .../hurt_entity/melee_bow_attack.mcfunction | 5 + .../hurt_entity/sword_attack_sweep.mcfunction | 6 + 6 files changed, 377 insertions(+) create mode 100644 data/player/advancement/trigger/hurt_entity.json create mode 100644 data/player/function/trigger/hurt_entity/.mcfunction create mode 100644 data/player/function/trigger/hurt_entity/hit_projectile.mcfunction create mode 100644 data/player/function/trigger/hurt_entity/melee_attack.mcfunction create mode 100644 data/player/function/trigger/hurt_entity/melee_bow_attack.mcfunction create mode 100644 data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction diff --git a/data/player/advancement/trigger/hurt_entity.json b/data/player/advancement/trigger/hurt_entity.json new file mode 100644 index 0000000000..d9dcacd5c3 --- /dev/null +++ b/data/player/advancement/trigger/hurt_entity.json @@ -0,0 +1,287 @@ +{ + "criteria": { + "hit_projectile": { + "trigger": "minecraft:player_hurt_entity", + "conditions": { + "damage": { + "type": { + "tags": [ + { + "id": "minecraft:is_projectile", + "expected": true + } + ] + } + } + } + }, + "melee_attack": { + "trigger": "minecraft:player_hurt_entity", + "conditions": { + "player": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "mainhand": { + "items": "#item:bows" + } + } + } + } + } + ], + "damage": { + "dealt": { + "min": 2 + }, + "type": { + "tags": [ + { + "id": "minecraft:is_explosion", + "expected": false + }, + { + "id": "minecraft:is_fire", + "expected": false + }, + { + "id": "minecraft:is_projectile", + "expected": false + }, + { + "id": "minecraft:bypasses_armor", + "expected": false + }, + { + "id": "minecraft:bypasses_effects", + "expected": false + }, + { + "id": "minecraft:bypasses_enchantments", + "expected": false + }, + { + "id": "minecraft:bypasses_resistance", + "expected": false + }, + { + "id": "player:thorns", + "expected": false + } + ] + } + } + } + }, + "melee_attack2": { + "trigger": "minecraft:player_hurt_entity", + "conditions": { + "player": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "mainhand": { + "items": "#item:bows" + } + } + } + }, + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "mainhand": { + "items": "#item:swords" + } + } + } + } + ] + } + } + ], + "damage": { + "dealt": { + "max": 1 + }, + "type": { + "tags": [ + { + "id": "minecraft:is_explosion", + "expected": false + }, + { + "id": "minecraft:is_fire", + "expected": false + }, + { + "id": "minecraft:is_projectile", + "expected": false + }, + { + "id": "minecraft:bypasses_armor", + "expected": false + }, + { + "id": "minecraft:bypasses_effects", + "expected": false + }, + { + "id": "minecraft:bypasses_enchantments", + "expected": false + }, + { + "id": "minecraft:bypasses_resistance", + "expected": false + }, + { + "id": "player:thorns", + "expected": false + } + ] + } + } + } + }, + "melee_bow_attack": { + "trigger": "minecraft:player_hurt_entity", + "conditions": { + "player": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "mainhand": { + "items": "#item:bows" + } + } + } + } + ], + "damage": { + "dealt": { + "min": 2 + }, + "type": { + "tags": [ + { + "id": "minecraft:is_explosion", + "expected": false + }, + { + "id": "minecraft:is_fire", + "expected": false + }, + { + "id": "minecraft:is_projectile", + "expected": false + }, + { + "id": "minecraft:bypasses_armor", + "expected": false + }, + { + "id": "minecraft:bypasses_effects", + "expected": false + }, + { + "id": "minecraft:bypasses_enchantments", + "expected": false + }, + { + "id": "minecraft:bypasses_resistance", + "expected": false + }, + { + "id": "player:thorns", + "expected": false + } + ] + } + } + } + }, + "sword_attack_sweep": { + "trigger": "minecraft:player_hurt_entity", + "conditions": { + "player": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "mainhand": { + "items": "#item:swords" + } + } + } + } + ], + "damage": { + "dealt": 1, + "type": { + "tags": [ + { + "id": "minecraft:is_explosion", + "expected": false + }, + { + "id": "minecraft:is_fire", + "expected": false + }, + { + "id": "minecraft:is_projectile", + "expected": false + }, + { + "id": "minecraft:bypasses_armor", + "expected": false + }, + { + "id": "minecraft:bypasses_effects", + "expected": false + }, + { + "id": "minecraft:bypasses_enchantments", + "expected": false + }, + { + "id": "minecraft:bypasses_resistance", + "expected": false + }, + { + "id": "player:thorns", + "expected": false + } + ] + } + } + } + } + }, + "requirements": [ + [ + "hit_projectile", + "melee_attack", + "melee_attack2", + "melee_bow_attack", + "sword_attack_sweep" + ] + ], + "rewards": { + "function": "player:trigger/hurt_entity/" + } +} diff --git a/data/player/function/trigger/hurt_entity/.mcfunction b/data/player/function/trigger/hurt_entity/.mcfunction new file mode 100644 index 0000000000..6bd097e4bd --- /dev/null +++ b/data/player/function/trigger/hurt_entity/.mcfunction @@ -0,0 +1,20 @@ +#> player:trigger/hurt_entity/ +### モブへのダメージトリガー + +#モブの位置をマーク +execute at @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f}] run function calc:geometry/tp_00002 +#分岐 +execute if entity @s[advancements={player:trigger/hurt_entity={hit_projectile=true}}] run function player:trigger/hurt_entity/hit_projectile +execute if entity @s[advancements={player:trigger/hurt_entity={melee_attack=true}}] run function player:trigger/hurt_entity/melee_attack +execute if entity @s[advancements={player:trigger/hurt_entity={melee_attack2=true}}] run function player:trigger/hurt_entity/melee_attack +execute if entity @s[advancements={player:trigger/hurt_entity={melee_bow_attack=true}}] run function player:trigger/hurt_entity/melee_bow_attack +execute if entity @s[advancements={player:trigger/hurt_entity={sword_attack_sweep=true}}] run function player:trigger/hurt_entity/sword_attack_sweep + +##AbsorptionAmountリセット +execute at 0-0-0-0-2 as @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0] run function enemy:damage/update_health + +#トリガーリセット +advancement revoke @s only player:trigger/hurt_entity + +#マーカー返却 +execute as 0-0-0-0-2 run function calc:geometry/return_marker diff --git a/data/player/function/trigger/hurt_entity/hit_projectile.mcfunction b/data/player/function/trigger/hurt_entity/hit_projectile.mcfunction new file mode 100644 index 0000000000..5f82e2d826 --- /dev/null +++ b/data/player/function/trigger/hurt_entity/hit_projectile.mcfunction @@ -0,0 +1,20 @@ +#> player:trigger/hurt_entity/hit_projectile +### 投射物による攻撃 + +#投射物からロード +execute at 0-0-0-0-2 as @e[type=#entity:projectiles,limit=1,sort=nearest] run function player:trigger/projectile/load + +#物理・属性ダメージ付与 +data modify storage skill: Damage set value {Hit:1b} +execute at 0-0-0-0-2 as @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0] run function skill:damage/apply/ + +### エンチャント +#波動 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:波動" at 0-0-0-0-2 run function skill:enchant/wave_of_element/ +#血吸 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:血吸" run function skill:enchant/life_leech +#魔吸 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:魔吸" run function skill:enchant/mana_leech + +#狩人バースト用フラグ +tag @s add BurstArrow diff --git a/data/player/function/trigger/hurt_entity/melee_attack.mcfunction b/data/player/function/trigger/hurt_entity/melee_attack.mcfunction new file mode 100644 index 0000000000..d09c26fd78 --- /dev/null +++ b/data/player/function/trigger/hurt_entity/melee_attack.mcfunction @@ -0,0 +1,39 @@ +#> player:trigger/hurt_entity/melee_attack +### 近接攻撃 + +#装備を取得 +function player:load_equipments +#物理ダメージ取得 +function skill:damage/add/physical/melee +### 黒魔導士<ライトニングブロー> +execute if score @s LightningBlow matches 1.. run function skill:act/black_mage/lightning_blow/hit + +#スキル用装備リスト +function skill:equipments_to_items +data remove storage item: Item +data modify storage item: Item set from storage item: Items[{components:{"minecraft:custom_data":{Skill:{Trigger:"近接攻撃する"}}}}] + +### 忍者<連舞> +execute if score @s TsuremaiLevel matches 1.. run function skill:act/ninja/tsuremai/trigger/attack + +#属性ダメージ付与 +execute unless data storage item: Item.components."minecraft:custom_data".Skill.Damage{Melee:1b} run data modify storage skill: Damage set value {Hit:1b} +execute unless data storage item: Item.components."minecraft:custom_data".Skill.Damage{Melee:1b} at 0-0-0-0-2 as @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0] run function skill:damage/apply/elemental + +### エンチャント +#波動 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:波動" at 0-0-0-0-2 run function skill:enchant/wave_of_element/ +#血吸 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:血吸" run function skill:enchant/life_leech +#魔吸 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:魔吸" run function skill:enchant/mana_leech + +### スキル +execute if data storage item: Item.components."minecraft:custom_data".Skill{Trigger:"近接攻撃する"} run function skill:practice/ + +#近接スキルの場合、物理ダメージはスキル側で計算するため0にする +execute if data storage item: Item.components."minecraft:custom_data".Skill.Damage{Melee:1b} at 0-0-0-0-2 run data modify entity @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0,limit=1] AbsorptionAmount set value 2048f + +### 剣の薙ぎ払いの初期設定 +#剣能 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:剣能" run function skill:enchant/sweeping/init diff --git a/data/player/function/trigger/hurt_entity/melee_bow_attack.mcfunction b/data/player/function/trigger/hurt_entity/melee_bow_attack.mcfunction new file mode 100644 index 0000000000..79c3f33852 --- /dev/null +++ b/data/player/function/trigger/hurt_entity/melee_bow_attack.mcfunction @@ -0,0 +1,5 @@ +#> player:trigger/hurt_entity/melee_bow_attack +### 弓による近接攻撃 + +#ダメージを1にする +execute at 0-0-0-0-2 run data modify entity @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0,limit=1] AbsorptionAmount set value 2047f diff --git a/data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction b/data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction new file mode 100644 index 0000000000..c27f90605a --- /dev/null +++ b/data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction @@ -0,0 +1,6 @@ +#> player:trigger/hurt_entity/sword_attack_sweep +### 剣の薙ぎ払い攻撃 + +### エンチャント +#剣能 +execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:剣能" run function skill:enchant/sweeping/apply From 2b6af39312223f9ec7ff86f15d6910d6136c0747 Mon Sep 17 00:00:00 2001 From: Ponpon Date: Mon, 3 Feb 2025 23:29:18 +0900 Subject: [PATCH 2/7] =?UTF-8?q?NO-ISSUE=20Add=20=E6=AD=A6=E5=99=A8?= =?UTF-8?q?=E3=81=A7=E4=B8=8E=E3=81=88=E3=81=9F=E7=89=A9=E7=90=86=E3=83=80?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=B8=E3=82=92=E5=8F=96=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/entity/function/damage/add/physical/melee.mcfunction | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/entity/function/damage/add/physical/melee.mcfunction diff --git a/data/entity/function/damage/add/physical/melee.mcfunction b/data/entity/function/damage/add/physical/melee.mcfunction new file mode 100644 index 0000000000..a3e2d0bc94 --- /dev/null +++ b/data/entity/function/damage/add/physical/melee.mcfunction @@ -0,0 +1,4 @@ +#> entity:damage/add/physical/melee +### 与えた武器ダメージを取得 +execute store result score _ Damage run data get entity @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},limit=1] AbsorptionAmount -1 +execute store result storage entity: damage.physical int 1 run scoreboard players add _ Damage 2048 From 461d15fb3215a3d09eb6be4389d1c239f6acc9f1 Mon Sep 17 00:00:00 2001 From: Ponpon Date: Mon, 3 Feb 2025 23:35:21 +0900 Subject: [PATCH 3/7] =?UTF-8?q?NO-ISSUE=20Modify=20=E3=83=80=E3=83=A1?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E5=B1=9E=E6=80=A7=E3=81=AE=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=AB=E5=BF=9C=E3=81=98=E3=81=A6=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hurt_entity/melee_attack.mcfunction | 27 +++++-------------- .../hurt_entity/sword_attack_sweep.mcfunction | 4 --- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/data/player/function/trigger/hurt_entity/melee_attack.mcfunction b/data/player/function/trigger/hurt_entity/melee_attack.mcfunction index d09c26fd78..61ab36a6d5 100644 --- a/data/player/function/trigger/hurt_entity/melee_attack.mcfunction +++ b/data/player/function/trigger/hurt_entity/melee_attack.mcfunction @@ -4,9 +4,10 @@ #装備を取得 function player:load_equipments #物理ダメージ取得 -function skill:damage/add/physical/melee +data remove storage entity: damage +function entity:damage/add/physical/melee ### 黒魔導士<ライトニングブロー> -execute if score @s LightningBlow matches 1.. run function skill:act/black_mage/lightning_blow/hit +# execute if score @s LightningBlow matches 1.. run function skill:act/black_mage/lightning_blow/hit #スキル用装備リスト function skill:equipments_to_items @@ -14,26 +15,10 @@ data remove storage item: Item data modify storage item: Item set from storage item: Items[{components:{"minecraft:custom_data":{Skill:{Trigger:"近接攻撃する"}}}}] ### 忍者<連舞> -execute if score @s TsuremaiLevel matches 1.. run function skill:act/ninja/tsuremai/trigger/attack - -#属性ダメージ付与 -execute unless data storage item: Item.components."minecraft:custom_data".Skill.Damage{Melee:1b} run data modify storage skill: Damage set value {Hit:1b} -execute unless data storage item: Item.components."minecraft:custom_data".Skill.Damage{Melee:1b} at 0-0-0-0-2 as @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0] run function skill:damage/apply/elemental - -### エンチャント -#波動 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:波動" at 0-0-0-0-2 run function skill:enchant/wave_of_element/ -#血吸 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:血吸" run function skill:enchant/life_leech -#魔吸 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:魔吸" run function skill:enchant/mana_leech - -### スキル -execute if data storage item: Item.components."minecraft:custom_data".Skill{Trigger:"近接攻撃する"} run function skill:practice/ +# execute if score @s TsuremaiLevel matches 1.. run function skill:act/ninja/tsuremai/trigger/attack #近接スキルの場合、物理ダメージはスキル側で計算するため0にする execute if data storage item: Item.components."minecraft:custom_data".Skill.Damage{Melee:1b} at 0-0-0-0-2 run data modify entity @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0,limit=1] AbsorptionAmount set value 2048f -### 剣の薙ぎ払いの初期設定 -#剣能 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:剣能" run function skill:enchant/sweeping/init +### スキル +execute if data storage item: Item.components."minecraft:custom_data".Skill{Trigger:"近接攻撃する"} run function skill:practice/ diff --git a/data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction b/data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction index c27f90605a..72a143a710 100644 --- a/data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction +++ b/data/player/function/trigger/hurt_entity/sword_attack_sweep.mcfunction @@ -1,6 +1,2 @@ #> player:trigger/hurt_entity/sword_attack_sweep ### 剣の薙ぎ払い攻撃 - -### エンチャント -#剣能 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:剣能" run function skill:enchant/sweeping/apply From 2c0ab847a7765435dfdebb7cc87b43b2595b12f2 Mon Sep 17 00:00:00 2001 From: Ponpon Date: Tue, 4 Feb 2025 23:47:56 +0900 Subject: [PATCH 4/7] =?UTF-8?q?NO-ISSUE=20Modify=20=E6=8A=95=E6=93=B2?= =?UTF-8?q?=E7=89=A9=E3=83=80=E3=83=A1=E3=83=BC=E3=82=B8=E3=81=AE=E3=82=BB?= =?UTF-8?q?=E3=83=BC=E3=83=96=E3=83=AD=E3=83=BC=E3=83=89=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=82=B9=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/player/function/trigger/projectile/load.mcfunction | 2 +- data/player/function/trigger/projectile/save.mcfunction | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/player/function/trigger/projectile/load.mcfunction b/data/player/function/trigger/projectile/load.mcfunction index ae9df35447..2d8ffac9ed 100644 --- a/data/player/function/trigger/projectile/load.mcfunction +++ b/data/player/function/trigger/projectile/load.mcfunction @@ -5,7 +5,7 @@ data modify storage item: SelectedItem set from storage oh_my_dat: _[-4][-4][-4] data modify storage item: Equipments set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Equipments #ダメージをロード -function skill:damage/load +function entity:damage/load ### スキル execute if entity @s[tag=Skill] run function player:trigger/projectile/skill diff --git a/data/player/function/trigger/projectile/save.mcfunction b/data/player/function/trigger/projectile/save.mcfunction index 7ab1306c38..4ee67f12bf 100644 --- a/data/player/function/trigger/projectile/save.mcfunction +++ b/data/player/function/trigger/projectile/save.mcfunction @@ -5,4 +5,4 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].SelectedItem se data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Equipments set from storage item: Equipments #ダメージを保存 -function skill:damage/save +function entity:damage/save From 82d90b0d9c3d85b36f7b7b5c7fa90119ff01a8c2 Mon Sep 17 00:00:00 2001 From: Ponpon Date: Tue, 4 Feb 2025 23:48:36 +0900 Subject: [PATCH 5/7] =?UTF-8?q?NO-ISSUE=20Add=20=E6=8A=95=E6=93=B2?= =?UTF-8?q?=E7=89=A9=E3=81=AE=E7=89=A9=E7=90=86=E3=83=80=E3=83=A1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=81=AE=E8=A8=88=E7=AE=97=E3=81=A8=E4=BB=98=E4=B8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../damage/add/physical/projectile.mcfunction | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 data/entity/function/damage/add/physical/projectile.mcfunction diff --git a/data/entity/function/damage/add/physical/projectile.mcfunction b/data/entity/function/damage/add/physical/projectile.mcfunction new file mode 100644 index 0000000000..e5a0118947 --- /dev/null +++ b/data/entity/function/damage/add/physical/projectile.mcfunction @@ -0,0 +1,22 @@ +#> entity:damage/add/physical/projectile +### 投射物の物理ダメージを計算・付与 +#Add +data modify storage calc: List set value [] +data modify storage calc: List append from storage item: Equipments[].components."minecraft:attribute_modifiers".modifiers[{type:"minecraft:generic.attack_damage",operation:"add_value"}].amount +execute store result score _ Damage run function calc:list/sum/x1 +#Increase +data modify storage calc: List set value [] +data modify storage calc: List append from storage item: Equipments[].components."minecraft:attribute_modifiers".modifiers[{type:"minecraft:generic.attack_damage",operation:"add_multiplied_base"}].amount +execute store result score _ Calc run function calc:list/sum/x100 +scoreboard players add _ Calc 100 +#More +data modify storage calc: List set value [] +data modify storage calc: List append from storage item: Equipments[].components."minecraft:attribute_modifiers".modifiers[{type:"minecraft:generic.attack_damage",operation:"add_multiplied_total"}].amount +execute store result score _ _ run function calc:list/product/x100 +scoreboard players add _ _ 100 +#合計 +scoreboard players operation _ Damage *= _ _ +scoreboard players set _ _ 100 +scoreboard players operation _ Damage /= _ _ +scoreboard players operation _ Damage *= _ Calc +execute store result storage entity: damage.physical int 1 run scoreboard players operation _ Damage /= _ _ From 9c0497efaecd702185e957d4373741ebfc00d649 Mon Sep 17 00:00:00 2001 From: Ponpon Date: Tue, 4 Feb 2025 23:49:37 +0900 Subject: [PATCH 6/7] =?UTF-8?q?NO-ISSUE=20Modify=20=E3=83=80=E3=83=A1?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E5=B1=9E=E6=80=A7=E3=81=AE=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=AB=E5=BF=9C=E3=81=98=E3=81=A6=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=20=E6=8A=95=E6=93=B2=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/player/function/trigger/use/bow.mcfunction | 7 +++---- data/player/function/trigger/use/crossbow.mcfunction | 7 +++---- data/player/function/trigger/use/trident.mcfunction | 5 ++--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/data/player/function/trigger/use/bow.mcfunction b/data/player/function/trigger/use/bow.mcfunction index 1c2ccf4e5c..bcfb6d0deb 100644 --- a/data/player/function/trigger/use/bow.mcfunction +++ b/data/player/function/trigger/use/bow.mcfunction @@ -4,11 +4,10 @@ function player:load_equipments #メインハンドがトリガーのアイテムでなければ交換 execute unless data storage item: SelectedItem{id:"minecraft:bow"} run function player:trigger/use/if_not_mainhand #物理ダメージ取得 -function skill:damage/add/physical/projectile -#属性ダメージ取得 -function skill:damage/add/elemental +data remove storage entity: damage +function entity:damage/add/physical/projectile #ピアッシングエイム適用 -execute if score @s PiercingAim matches 1.. run function skill:act/hunter/piercing_aim/apply0 +# execute if score @s PiercingAim matches 1.. run function skill:act/hunter/piercing_aim/apply0 #スキル function skill:equipments_to_items data remove storage item: Item diff --git a/data/player/function/trigger/use/crossbow.mcfunction b/data/player/function/trigger/use/crossbow.mcfunction index 75beee32fc..1474e5701f 100644 --- a/data/player/function/trigger/use/crossbow.mcfunction +++ b/data/player/function/trigger/use/crossbow.mcfunction @@ -4,11 +4,10 @@ function player:load_equipments #メインハンドがトリガーのアイテムでなければ交換 execute unless data storage item: SelectedItem{id:"minecraft:crossbow"} run function player:trigger/use/if_not_mainhand #物理ダメージ取得 -function skill:damage/add/physical/projectile -#属性ダメージ取得 -function skill:damage/add/elemental +data remove storage entity: damage +function entity:damage/add/physical/projectile #ピアッシングエイム適用 -execute if score @s PiercingAim matches 1.. run function skill:act/hunter/piercing_aim/apply0 +# execute if score @s PiercingAim matches 1.. run function skill:act/hunter/piercing_aim/apply0 #スキル function skill:equipments_to_items data remove storage item: Item diff --git a/data/player/function/trigger/use/trident.mcfunction b/data/player/function/trigger/use/trident.mcfunction index 053afe9b4e..846a0d6211 100644 --- a/data/player/function/trigger/use/trident.mcfunction +++ b/data/player/function/trigger/use/trident.mcfunction @@ -4,9 +4,8 @@ function player:load_equipments #メインハンドがトリガーのアイテムでなければ交換 execute unless data storage item: SelectedItem{id:"minecraft:trident"} run function player:trigger/use/if_not_mainhand #物理ダメージ取得 -function skill:damage/add/physical/projectile -#属性ダメージ取得 -function skill:damage/add/elemental +data remove storage entity: damage +function entity:damage/add/physical/projectile ##ダメージと装備を保存 execute as @e[type=#minecraft:impact_projectiles,tag=!Initialized,distance=..2] run function player:trigger/projectile/save #トリガーリセット From 959a3d5b886de52b7fbf6e142c050a6e5be25d38 Mon Sep 17 00:00:00 2001 From: Ponpon Date: Tue, 4 Feb 2025 23:50:48 +0900 Subject: [PATCH 7/7] =?UTF-8?q?NO-ISSUE=20Modify=20=E6=8A=95=E6=93=B2?= =?UTF-8?q?=E7=89=A9=E3=81=AB=E3=82=88=E3=82=8B=E6=94=BB=E6=92=83=E3=81=AE?= =?UTF-8?q?=E3=83=80=E3=83=A1=E3=83=BC=E3=82=B8=E4=BB=98=E4=B8=8E=E5=87=A6?= =?UTF-8?q?=E7=90=86=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/hurt_entity/hit_projectile.mcfunction | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/data/player/function/trigger/hurt_entity/hit_projectile.mcfunction b/data/player/function/trigger/hurt_entity/hit_projectile.mcfunction index 5f82e2d826..8b9352bbf1 100644 --- a/data/player/function/trigger/hurt_entity/hit_projectile.mcfunction +++ b/data/player/function/trigger/hurt_entity/hit_projectile.mcfunction @@ -4,17 +4,9 @@ #投射物からロード execute at 0-0-0-0-2 as @e[type=#entity:projectiles,limit=1,sort=nearest] run function player:trigger/projectile/load -#物理・属性ダメージ付与 -data modify storage skill: Damage set value {Hit:1b} -execute at 0-0-0-0-2 as @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0] run function skill:damage/apply/ - -### エンチャント -#波動 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:波動" at 0-0-0-0-2 run function skill:enchant/wave_of_element/ -#血吸 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:血吸" run function skill:enchant/life_leech -#魔吸 -execute if data storage item: SelectedItem.components."minecraft:enchantments".levels."tusb:魔吸" run function skill:enchant/mana_leech +#物理ダメージ付与 +data modify storage entity: damage.hit set value 1b +execute at 0-0-0-0-2 as @e[tag=Enemy,nbt=!{AbsorptionAmount:2048f},distance=0] run function entity:damage/apply/physical #狩人バースト用フラグ tag @s add BurstArrow