Skip to content

Commit

Permalink
Merge branch 'master' into rework/haiiro_artifact-trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou committed Nov 15, 2024
2 parents 815fa58 + 9821e44 commit f7d4948
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
# @within function asset:artifact/alias/65500/attack

# ここから先は神器側の効果の処理を書く
execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..5] run data modify entity @s Motion[1] set value 2.5d
data modify storage api: Argument.Damage set value 1
data modify storage api: Argument.AttackType set value "Physical"
function api:damage/modifier
execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..6] run function api:damage/
function api:damage/reset
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ data modify storage asset:artifact AttackInfo.BypassResist set value 1b
data modify storage asset:artifact AttackInfo.IsRangeAttack set value "always"
data modify storage asset:artifact AttackInfo.AttackRange set value "1.5"

data modify storage asset:artifact MPCost set value 5
data modify storage asset:artifact MPRequire set value 10
# data modify storage asset:artifact MPCost set value 5
# data modify storage asset:artifact MPRequire set value 10

data modify storage asset:artifact MPHealWhenHit set value 5

data modify storage asset:artifact LocalCooldown set value 80

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
# SubTriggers? : Trigger[]
# Condition? : TextComponent
# AttackInfo? : Component
# MPCost : int
# MPCost? : int
# MPRequire? : int
# MPHealWhenHit? : int
# CostText? : TextComponent
# LocalCooldown? : int
# SpecialCooldown? : int
Expand Down Expand Up @@ -64,6 +65,7 @@
data modify storage asset:artifact Item.tag.TSB.SubTriggers set from storage asset:artifact SubTriggers
data modify storage asset:artifact Item.tag.TSB.MPCost set from storage asset:artifact MPCost
data modify storage asset:artifact Item.tag.TSB.MPRequire set from storage asset:artifact MPRequire
data modify storage asset:artifact Item.tag.TSB.MPHealWhenHit set from storage asset:artifact MPHealWhenHit
data modify storage asset:artifact Item.tag.TSB.CanUsedGod set from storage asset:artifact CanUsedGod
data modify storage asset:artifact Item.tag.TSB.RemainingCount set from storage asset:artifact RemainingCount
data modify storage asset:artifact Item.tag.TSB.RemainingCountMax set from storage asset:artifact RemainingCountMax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
execute if data storage asset:artifact AttackInfo run function asset_manager:artifact/create/trigger/attack_info
# 3? 必要MP
execute if data storage asset:artifact MPRequire run loot replace block 10000 0 10000 container.3 loot asset_manager:artifact/generate_lore/mp_require
# 4 消費MP
loot replace block 10000 0 10000 container.4 loot asset_manager:artifact/generate_lore/mp_cost
# 5? 消費アイテム
execute if data storage asset:artifact CostText run loot replace block 10000 0 10000 container.5 loot asset_manager:artifact/generate_lore/cost_item
# 6? クールタイム
# 4? 消費MP
execute if data storage asset:artifact MPCost run loot replace block 10000 0 10000 container.4 loot asset_manager:artifact/generate_lore/mp_cost
# 5? ヒット時MP回復
execute if data storage asset:artifact MPHealWhenHit run loot replace block 10000 0 10000 container.5 loot asset_manager:artifact/generate_lore/mp_heal_when_hit
# 6? 消費アイテム
execute if data storage asset:artifact CostText run loot replace block 10000 0 10000 container.6 loot asset_manager:artifact/generate_lore/cost_item
# 7? クールタイム
function asset_manager:artifact/create/trigger/cooldown/

# Lore一括追加
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#> asset_manager:artifact/create/trigger/cooldown/make_duration.m
#
#
#
# @input args
# CooldownPath: DataPath
# IconPath: DataPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,8 @@
execute unless data storage asset:artifact RemainingCountMax if data storage asset:artifact RemainingCount run data modify storage asset:artifact RemainingCountMax set from storage asset:artifact RemainingCount
execute unless data storage asset:artifact Slot run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Slot","color":"red"}]
# execute unless data storage asset:artifact Trigger run
execute if data storage asset:artifact Trigger run function asset_manager:artifact/give/validate/trigger
# execute unless data storage asset:artifact SubTriggers[0] run
# execute unless data storage asset:artifact Condition run
# execute unless data storage asset:artifact AttackInfo run
# execute unless data storage asset:artifact CostText run
# execute unless data storage asset:artifact MPCost run
# execute unless data storage asset:artifact MPRequire run
# execute unless data storage asset:artifact LocalCooldown run
# execute unless data storage asset:artifact SpecialCooldown run
# execute unless data storage asset:artifact DisableCooldownMessage run
# execute unless data storage asset:artifact DisableMPMessage run
# execute unless data storage asset:artifact DisableBreakSound run
execute unless data storage asset:artifact CanUsedGod run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" CanUsedGod","color":"red"}]
# execute unless data storage asset:artifact EquipID run
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset_manager:artifact/give/validate/trigger
#
#
#
# @within function asset_manager:artifact/give/

# execute unless data storage asset:artifact Condition run
# execute unless data storage asset:artifact AttackInfo run
# execute unless data storage asset:artifact CostText run
execute unless data storage asset:artifact MPCost unless data storage asset:artifact MPHealWhenHit run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" MPCost","color":"red"},{"text":" or","color":"white"},{"text":" MPHealWhenHit","color":"red"}]
# execute unless data storage asset:artifact MPRequire run
# execute unless data storage asset:artifact LocalCooldown run
# execute unless data storage asset:artifact TypeCooldown run
# execute unless data storage asset:artifact SpecialCooldown run
# execute unless data storage asset:artifact DisableCooldownMessage run
# execute unless data storage asset:artifact DisableMPMessage run
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

# 神器データの取得

Check failure on line 7 in TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction

View workflow job for this annotation

GitHub Actions / lint

Failed to resolve namespaced ID “asset_manager:artifact/data/current/get” in cache category “function” (rule: “strictFunctionCheck”)

Check failure on line 7 in TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction

View workflow job for this annotation

GitHub Actions / lint

Failed to resolve namespaced ID “asset_manager:artifact/data/current/get” in cache category “function” (rule: “strictFunctionCheck”)
function asset_manager:artifact/data/current/get
# 神器処理内で利用される DamageAPI 用に MP 回復量のデータを追加する
# data remove storage api: PersistentArgument.AdditionalMPHeal
# execute store result storage api: PersistentArgument.AdditionalMPHeal int 1 run data get storage asset:artifact TargetItems[0].tag.TSB.MPHealWhenHit
# MP減少処理
function asset_manager:artifact/use/remove_mp
execute if data storage asset:artifact TargetItems[0].tag.TSB.MPCost run function asset_manager:artifact/use/remove_mp
# 種別クールダウン保存
execute if data storage asset:artifact TargetItems[0].tag.TSB.TypeCooldown run function asset_manager:artifact/use/update_type_cooldown.m with storage asset:artifact TargetItems[0].tag.TSB.TypeCooldown
# 特殊クールダウン保存
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "generic",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "debug_stick",
"functions": [
{
"function": "set_lore",
"entity": "this",
"lore": [
[
{
"text": "",
"color": "white",
"italic": false
},
{
"text": "ヒット時MP回復: "
},
{
"storage": "asset:artifact",
"nbt": "MPHealWhenHit"
}
]
]
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

# 諸々リセット
scoreboard players reset $max Temporary
scoreboard players reset $size Temporary
data remove storage lib: isScarcityHistoryIncluded
data remove storage lib: Random
data remove storage lib: RecentHits
Expand Down

0 comments on commit f7d4948

Please sign in to comment.