Skip to content

Commit

Permalink
NO-ISSUE Modify ダメージ属性の変更に応じて処理を変更
Browse files Browse the repository at this point in the history
  • Loading branch information
NePonpon committed Feb 3, 2025
1 parent 2b6af39 commit 461d15f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
27 changes: 6 additions & 21 deletions data/player/function/trigger/hurt_entity/melee_attack.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,21 @@
#装備を取得
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
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/
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 461d15f

Please sign in to comment.