diff --git a/data/entity/function/spawn/apply_status/act.mcfunction b/data/entity/function/spawn/apply_status/act.mcfunction index 0daa2bc8ba..a3015f132f 100644 --- a/data/entity/function/spawn/apply_status/act.mcfunction +++ b/data/entity/function/spawn/apply_status/act.mcfunction @@ -6,7 +6,8 @@ ### 攻撃力を計算 execute if data storage tusb_mob: "遅延ステータス"."ステータス"."物理攻撃力" run function entity:spawn/apply_status/status/attack -execute if data storage tusb_mob: "遅延ステータス"."ステータス"."魔法攻撃力" run function entity:spawn/apply_status/status/special_attack +execute if data storage tusb_mob: "遅延ステータス"."ステータス"."魔法攻撃力" run function entity:spawn/apply_status/status/magic_attack +execute if data storage tusb_mob: "遅延ステータス"."ステータス"."理外攻撃力" run function entity:spawn/apply_status/status/unreasonable_attack ### モブに他のステータスを計算して反映する execute if entity @s[tag=Mob] run function entity:spawn/apply_status/mob diff --git a/data/entity/function/spawn/apply_status/mob.mcfunction b/data/entity/function/spawn/apply_status/mob.mcfunction index e60adbc1d0..36172910d3 100644 --- a/data/entity/function/spawn/apply_status/mob.mcfunction +++ b/data/entity/function/spawn/apply_status/mob.mcfunction @@ -18,7 +18,8 @@ data modify entity @s DeathTime set value 19s function entity:spawn/apply_status/status/hp function entity:spawn/apply_status/status/mp function entity:spawn/apply_status/status/defense -function entity:spawn/apply_status/status/special_defense +function entity:spawn/apply_status/status/magic_defense +function entity:spawn/apply_status/status/unreasonable_defence scoreboard players operation @s HP = @s HPMax scoreboard players operation @s MP = @s MPMax diff --git a/data/entity/function/spawn/apply_status/status/special_attack.mcfunction b/data/entity/function/spawn/apply_status/status/magic_attack.mcfunction similarity index 80% rename from data/entity/function/spawn/apply_status/status/special_attack.mcfunction rename to data/entity/function/spawn/apply_status/status/magic_attack.mcfunction index 1d88d8db6d..c7fe64db7d 100644 --- a/data/entity/function/spawn/apply_status/status/special_attack.mcfunction +++ b/data/entity/function/spawn/apply_status/status/magic_attack.mcfunction @@ -4,4 +4,4 @@ scoreboard players set _ _ 100 execute store result score _ Calc run data get storage tusb_mob: "遅延ステータス"."ステータス"."魔法攻撃力" 0.5 scoreboard players operation _ Calc *= @s Level scoreboard players operation _ Calc /= _ _ -execute store result score @s SpecialAttack run scoreboard players add _ Calc 2 +execute store result score @s MagicAttack run scoreboard players add _ Calc 2 diff --git a/data/entity/function/spawn/apply_status/status/special_defense.mcfunction b/data/entity/function/spawn/apply_status/status/magic_defense.mcfunction similarity index 80% rename from data/entity/function/spawn/apply_status/status/special_defense.mcfunction rename to data/entity/function/spawn/apply_status/status/magic_defense.mcfunction index 12d556bae8..5bf501619a 100644 --- a/data/entity/function/spawn/apply_status/status/special_defense.mcfunction +++ b/data/entity/function/spawn/apply_status/status/magic_defense.mcfunction @@ -4,4 +4,4 @@ scoreboard players set _ _ 100 execute store result score _ Calc run data get storage tusb_mob: "遅延ステータス"."ステータス"."魔法防御力" 1 scoreboard players operation _ Calc *= @s Level scoreboard players operation _ Calc /= _ _ -execute store result score @s SpecialDefense run scoreboard players add _ Calc 5 +execute store result score @s MagicDefence run scoreboard players add _ Calc 5 diff --git a/data/entity/function/spawn/apply_status/status/unreasonable_attack.mcfunction b/data/entity/function/spawn/apply_status/status/unreasonable_attack.mcfunction new file mode 100644 index 0000000000..b481f184a2 --- /dev/null +++ b/data/entity/function/spawn/apply_status/status/unreasonable_attack.mcfunction @@ -0,0 +1,7 @@ +#> entity:spawn/apply_status/status/unreasonable_attack +scoreboard players set _ _ 100 +### 理外攻撃力を計算する +execute store result score _ Calc run data get storage tusb_mob: "遅延ステータス"."ステータス"."理外攻撃力" 0.5 +scoreboard players operation _ Calc *= @s Level +scoreboard players operation _ Calc /= _ _ +execute store result score @s UnreasonableAttack run scoreboard players add _ Calc 2 diff --git a/data/entity/function/spawn/apply_status/status/unreasonable_defence.mcfunction b/data/entity/function/spawn/apply_status/status/unreasonable_defence.mcfunction new file mode 100644 index 0000000000..f255703de4 --- /dev/null +++ b/data/entity/function/spawn/apply_status/status/unreasonable_defence.mcfunction @@ -0,0 +1,7 @@ +#> entity:spawn/apply_status/status/unreasonable_defence +scoreboard players set _ _ 100 +### 理外防御力を計算する +execute store result score _ Calc run data get storage tusb_mob: "遅延ステータス"."ステータス"."理外防御力" 1 +scoreboard players operation _ Calc *= @s Level +scoreboard players operation _ Calc /= _ _ +execute store result score @s UnreasonableDefence run scoreboard players add _ Calc 5 diff --git a/data/main/function/load_once.mcfunction b/data/main/function/load_once.mcfunction index 82b5312627..9f72f175a0 100644 --- a/data/main/function/load_once.mcfunction +++ b/data/main/function/load_once.mcfunction @@ -25,8 +25,10 @@ scoreboard objectives add MP dummy {"text":"MP"} scoreboard objectives add MPMax dummy {"text":"MP最大値"} scoreboard objectives add Attack dummy {"text":"物理攻撃力"} scoreboard objectives add Defense dummy {"text":"物理防御力"} -scoreboard objectives add SpecialAttack dummy {"text":"魔法攻撃力"} -scoreboard objectives add SpecialDefense dummy {"text":"魔法防御力"} +scoreboard objectives add MagicAttack dummy {"text":"魔法攻撃力"} +scoreboard objectives add MagicDefence dummy {"text":"魔法防御力"} +scoreboard objectives add UnreasonableAttack dummy {"text":"理外攻撃力"} +scoreboard objectives add UnreasonableDefence dummy {"text":"理外防御力"} scoreboard objectives add BaseTotal dummy {"text":"合計基礎ポイント"} scoreboard objectives add GrowTotal dummy {"text":"合計成長ポイント"} scoreboard objectives add Damage dummy {"text":"ダメージ"} diff --git a/data/skill/functions/act/common/libra/success.mcfunction b/data/skill/functions/act/common/libra/success.mcfunction index c9cbb6c767..2b6ee4894c 100644 --- a/data/skill/functions/act/common/libra/success.mcfunction +++ b/data/skill/functions/act/common/libra/success.mcfunction @@ -2,7 +2,7 @@ ### 補足成功 tag @s add LibraCaster -execute as @e[tag=Mob,distance=..0.01,sort=nearest,limit=1] run tellraw @a[tag=LibraCaster] [{"translate":"ライブラ:【 %1$s 】","with":[{"selector":"@s"}]},{"text":"\n"},{"translate":"基礎能力 | %1$s %2$s %3$s %4$s %5$s %6$s","hoverEvent":{"action":"show_text","contents":{"translate":"モブのLvによって変動する値。"}},"with":[[{"text":""},{"text":"h","font":"icon","color":"red","hoverEvent":{"action":"show_text","contents":{"translate":"体力"}}},{"text":" : "},{"score":{"objective":"HP","name":"@s"}},{"text":"/"},{"score":{"objective":"HPMax","name":"@s"}}],[{"text":""},{"text":"M","font":"icon","color":"aqua","hoverEvent":{"action":"show_text","contents":{"translate":"MP"}}},{"text":" : "},{"score":{"objective":"MP","name":"@s"}},{"text":"/"},{"score":{"objective":"MPMax","name":"@s"}}],[{"text":""},{"text":"p","font":"icon","color":"#b3414f","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"物理攻撃力"},"\n",{"translate":"殴りや投擲物の攻撃力"}]}}},{"text":" : "},{"score":{"objective":"Attack","name":"@s"}}],[{"text":""},{"text":"F","font":"icon","color":"#41b3a5","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"物理防御力"},"\n",{"translate":"殴りや投擲物に対する防御力"}]}}},{"text":" : "},{"score":{"objective":"Defense","name":"@s"}}],[{"text":""},{"text":"A","font":"icon","color":"#66b341","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"魔法攻撃力"},"\n",{"translate":"スキルの攻撃力"}]}}},{"text":" : "},{"score":{"objective":"SpecialAttack","name":"@s"}}],[{"text":""},{"text":"D","font":"icon","color":"#8e41b3","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"魔法防御力"},"\n",{"translate":"属性攻撃に対する防御力"}]}}},{"text":" : "},{"score":{"objective":"SpecialDefense","name":"@s"}}]]}] +execute as @e[tag=Mob,distance=..0.01,sort=nearest,limit=1] run tellraw @a[tag=LibraCaster] [{"translate":"ライブラ:【 %1$s 】","with":[{"selector":"@s"}]},{"text":"\n"},{"translate":"基礎能力 | %1$s %2$s %3$s %4$s %5$s %6$s","hoverEvent":{"action":"show_text","contents":{"translate":"モブのLvによって変動する値。"}},"with":[[{"text":""},{"text":"h","font":"icon","color":"red","hoverEvent":{"action":"show_text","contents":{"translate":"体力"}}},{"text":" : "},{"score":{"objective":"HP","name":"@s"}},{"text":"/"},{"score":{"objective":"HPMax","name":"@s"}}],[{"text":""},{"text":"M","font":"icon","color":"aqua","hoverEvent":{"action":"show_text","contents":{"translate":"MP"}}},{"text":" : "},{"score":{"objective":"MP","name":"@s"}},{"text":"/"},{"score":{"objective":"MPMax","name":"@s"}}],[{"text":""},{"text":"p","font":"icon","color":"#b3414f","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"物理攻撃力"},"\n",{"translate":"殴りや投擲物の攻撃力"}]}}},{"text":" : "},{"score":{"objective":"Attack","name":"@s"}}],[{"text":""},{"text":"F","font":"icon","color":"#41b3a5","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"物理防御力"},"\n",{"translate":"殴りや投擲物に対する防御力"}]}}},{"text":" : "},{"score":{"objective":"Defense","name":"@s"}}],[{"text":""},{"text":"A","font":"icon","color":"#66b341","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"魔法攻撃力"},"\n",{"translate":"スキルの攻撃力"}]}}},{"text":" : "},{"score":{"objective":"MagicAttack","name":"@s"}}],[{"text":""},{"text":"D","font":"icon","color":"#8e41b3","hoverEvent":{"action":"show_text","contents":{"text":"","extra":[{"translate":"魔法防御力"},"\n",{"translate":"属性攻撃に対する防御力"}]}}},{"text":" : "},{"score":{"objective":"MagicDefence","name":"@s"}}]]}] tag @s remove LibraCaster function makeup:skill/act/common/libra/success diff --git a/data/skill/functions/act/white_mage/sacred_pillar/act1.mcfunction b/data/skill/functions/act/white_mage/sacred_pillar/act1.mcfunction index f4d87fc690..7c773fc6bd 100644 --- a/data/skill/functions/act/white_mage/sacred_pillar/act1.mcfunction +++ b/data/skill/functions/act/white_mage/sacred_pillar/act1.mcfunction @@ -45,12 +45,12 @@ scoreboard players set _ _ 2 scoreboard players operation @s _ /= _ _ # 倍率合計 -scoreboard players operation _ SpecialAttack = @s _ -scoreboard players operation _ SpecialAttack += _ Calc +scoreboard players operation _ MagicAttack = @s _ +scoreboard players operation _ MagicAttack += _ Calc #ダメージあれば成功 -execute if score _ SpecialAttack matches ..0 run function makeup:skill/act/white_mage/sacred_pillar/failure -execute if score _ SpecialAttack matches ..0 run data modify storage skill: Success set value 0b -execute if score _ SpecialAttack matches 1.. run summon minecraft:area_effect_cloud ~ ~ ~ {Tags:[Skill,SacredPillar,NativeTask],Duration:1} -execute if score _ SpecialAttack matches 1.. as @e[tag=SacredPillar,tag=!Initialized,limit=1,distance=..0.01] run function skill:act/white_mage/sacred_pillar/success -execute if score _ SpecialAttack matches 1.. run function skill:act/white_mage/sacred_pillar/player_damage +execute if score _ MagicAttack matches ..0 run function makeup:skill/act/white_mage/sacred_pillar/failure +execute if score _ MagicAttack matches ..0 run data modify storage skill: Success set value 0b +execute if score _ MagicAttack matches 1.. run summon minecraft:area_effect_cloud ~ ~ ~ {Tags:[Skill,SacredPillar,NativeTask],Duration:1} +execute if score _ MagicAttack matches 1.. as @e[tag=SacredPillar,tag=!Initialized,limit=1,distance=..0.01] run function skill:act/white_mage/sacred_pillar/success +execute if score _ MagicAttack matches 1.. run function skill:act/white_mage/sacred_pillar/player_damage diff --git a/data/skill/functions/act/white_mage/sacred_pillar/success.mcfunction b/data/skill/functions/act/white_mage/sacred_pillar/success.mcfunction index 2bbb548fc0..45736b4755 100644 --- a/data/skill/functions/act/white_mage/sacred_pillar/success.mcfunction +++ b/data/skill/functions/act/white_mage/sacred_pillar/success.mcfunction @@ -8,7 +8,7 @@ execute if score _ Level matches 3 run data modify storage skill: Damage set fro function skill:damage/add/skill/magic #ダメージ補正 -scoreboard players operation _ Calc = _ SpecialAttack +scoreboard players operation _ Calc = _ MagicAttack execute if data storage main: difficult{world:"debug"} run tellraw @a ["[Debug]セイクリッドピラー倍率(x100) : ",{"score":{"name":"_","objective":"Calc"}}] function skill:damage/modify function skill:damage/save diff --git a/data/skill/functions/enemy/change_status/.mcfunction b/data/skill/functions/enemy/change_status/.mcfunction index 8e64234377..49cc5ac9c9 100644 --- a/data/skill/functions/enemy/change_status/.mcfunction +++ b/data/skill/functions/enemy/change_status/.mcfunction @@ -5,8 +5,8 @@ execute if data storage mob_data: Call.HP run function skill:enemy/change_status execute if data storage mob_data: Call.MP run function skill:enemy/change_status/mp execute if data storage mob_data: Call.Attack run function skill:enemy/change_status/attack execute if data storage mob_data: Call.Defense run function skill:enemy/change_status/defense -execute if data storage mob_data: Call.SpecialAttack run function skill:enemy/change_status/special_attack -execute if data storage mob_data: Call.SpecialDefense run function skill:enemy/change_status/special_defense +execute if data storage mob_data: Call.MagicAttack run function skill:enemy/change_status/magic_attack +execute if data storage mob_data: Call.MagicDefence run function skill:enemy/change_status/magic_defense #データを元に戻す data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4]."ステータス" set from storage tusb_mob: "遅延ステータス"."ステータス" diff --git a/data/skill/functions/enemy/change_status/special_attack.mcfunction b/data/skill/functions/enemy/change_status/magic_attack.mcfunction similarity index 55% rename from data/skill/functions/enemy/change_status/special_attack.mcfunction rename to data/skill/functions/enemy/change_status/magic_attack.mcfunction index 6506845ae2..a86a76fcdb 100644 --- a/data/skill/functions/enemy/change_status/special_attack.mcfunction +++ b/data/skill/functions/enemy/change_status/magic_attack.mcfunction @@ -1,14 +1,14 @@ #Set, Add -execute store result score @s Calc run data get storage mob_data: Call.SpecialAttack.Add -execute store result score @s _ run data get storage mob_data: Call.SpecialAttack.Range +execute store result score @s Calc run data get storage mob_data: Call.MagicAttack.Add +execute store result score @s _ run data get storage mob_data: Call.MagicAttack.Range execute unless score @s _ matches 0 run function skill:enemy/change_move/range execute store result score _ Calc run data get storage tusb_mob: "遅延ステータス"."ステータス"."魔法攻撃力" -execute if data storage mob_data: Call.SpecialAttack.Set store result score _ Calc run data get storage mob_data: Call.SpecialAttack.Set +execute if data storage mob_data: Call.MagicAttack.Set store result score _ Calc run data get storage mob_data: Call.MagicAttack.Set scoreboard players operation _ Calc += @s Calc #Limit -execute if data storage mob_data: Call.SpecialAttack.Limit store result score @s _ run data get storage mob_data: Call.SpecialAttack.Limit -execute if score @s Calc matches 1.. if data storage mob_data: Call.SpecialAttack.Limit run scoreboard players operation _ Calc < @s _ -execute if score @s Calc matches ..-1 if data storage mob_data: Call.SpecialAttack.Limit run scoreboard players operation _ Calc > @s _ +execute if data storage mob_data: Call.MagicAttack.Limit store result score @s _ run data get storage mob_data: Call.MagicAttack.Limit +execute if score @s Calc matches 1.. if data storage mob_data: Call.MagicAttack.Limit run scoreboard players operation _ Calc < @s _ +execute if score @s Calc matches ..-1 if data storage mob_data: Call.MagicAttack.Limit run scoreboard players operation _ Calc > @s _ execute store result storage tusb_mob: "遅延ステータス"."ステータス"."魔法攻撃力" int 1 run scoreboard players get _ Calc -function entity:spawn/apply_status/status/special_attack +function entity:spawn/apply_status/status/magic_attack diff --git a/data/skill/functions/enemy/change_status/special_defense.mcfunction b/data/skill/functions/enemy/change_status/magic_defense.mcfunction similarity index 55% rename from data/skill/functions/enemy/change_status/special_defense.mcfunction rename to data/skill/functions/enemy/change_status/magic_defense.mcfunction index 464df8f68d..33c20a3e6f 100644 --- a/data/skill/functions/enemy/change_status/special_defense.mcfunction +++ b/data/skill/functions/enemy/change_status/magic_defense.mcfunction @@ -1,14 +1,14 @@ #Set, Add -execute store result score @s Calc run data get storage mob_data: Call.SpecialDefense.Add -execute store result score @s _ run data get storage mob_data: Call.SpecialDefense.Range +execute store result score @s Calc run data get storage mob_data: Call.MagicDefence.Add +execute store result score @s _ run data get storage mob_data: Call.MagicDefence.Range execute unless score @s _ matches 0 run function skill:enemy/change_move/range execute store result score _ Calc run data get storage tusb_mob: "遅延ステータス"."ステータス"."魔法防御力" -execute if data storage mob_data: Call.SpecialDefense.Set store result score _ Calc run data get storage mob_data: Call.SpecialDefense.Set +execute if data storage mob_data: Call.MagicDefence.Set store result score _ Calc run data get storage mob_data: Call.MagicDefence.Set scoreboard players operation _ Calc += @s Calc #Limit -execute if data storage mob_data: Call.SpecialDefense.Limit store result score @s _ run data get storage mob_data: Call.SpecialDefense.Limit -execute if score @s Calc matches 1.. if data storage mob_data: Call.SpecialDefense.Limit run scoreboard players operation _ Calc < @s _ -execute if score @s Calc matches ..-1 if data storage mob_data: Call.SpecialDefense.Limit run scoreboard players operation _ Calc > @s _ +execute if data storage mob_data: Call.MagicDefence.Limit store result score @s _ run data get storage mob_data: Call.MagicDefence.Limit +execute if score @s Calc matches 1.. if data storage mob_data: Call.MagicDefence.Limit run scoreboard players operation _ Calc < @s _ +execute if score @s Calc matches ..-1 if data storage mob_data: Call.MagicDefence.Limit run scoreboard players operation _ Calc > @s _ execute store result storage tusb_mob: "遅延ステータス"."ステータス"."魔法防御力" int 1 run scoreboard players get _ Calc -function entity:spawn/apply_status/status/special_defense +function entity:spawn/apply_status/status/magic_defense diff --git a/data/skill/functions/enemy/damage/player.mcfunction b/data/skill/functions/enemy/damage/player.mcfunction index a697240ba4..67dd62eb9b 100644 --- a/data/skill/functions/enemy/damage/player.mcfunction +++ b/data/skill/functions/enemy/damage/player.mcfunction @@ -6,7 +6,7 @@ data remove storage score_damage: Argument data modify storage score_damage: Argument set from storage mob_data: Call.Player execute unless data storage score_damage: Argument.Effectiveness run data modify storage score_damage: Argument.Effectiveness set value 100 execute store result score _ _ run data get storage score_damage: Argument.Effectiveness -execute unless data storage score_damage: Argument.Damage store result storage score_damage: Argument.Damage double 0.01 run scoreboard players operation _ _ *= @s SpecialAttack +execute unless data storage score_damage: Argument.Damage store result storage score_damage: Argument.Damage double 0.01 run scoreboard players operation _ _ *= @s MagicAttack #モブ名取得 data modify storage mob_data: MobName set from entity @s CustomName diff --git a/data/skill/functions/enemy/heal/.mcfunction b/data/skill/functions/enemy/heal/.mcfunction index 2e6c33e6e2..a9f9870666 100644 --- a/data/skill/functions/enemy/heal/.mcfunction +++ b/data/skill/functions/enemy/heal/.mcfunction @@ -9,7 +9,7 @@ scoreboard players set @s _ 10000 scoreboard players set @s Calc 10000 ###ステータス取得 -scoreboard players operation _ Calc = @s SpecialAttack +scoreboard players operation _ Calc = @s MagicAttack execute if data storage mob_data: Call.Multiplier store result score @s _ run data get storage mob_data: Call.Multiplier 10000 execute if data storage mob_data: Call.Range store result score # _ run data get storage mob_data: Call.Range 100 @@ -27,4 +27,4 @@ scoreboard players set 00000000-0000-0000-0000-000000000000 _ 0 execute as @e[tag=Enemy,distance=..32] if score @s HP < @s HPMax run function skill:enemy/heal/search ###演出 -execute if score 00000000-0000-0000-0000-000000000000 _ matches 1 run function makeup:skill/enemy/heal/ \ No newline at end of file +execute if score 00000000-0000-0000-0000-000000000000 _ matches 1 run function makeup:skill/enemy/heal/