Skip to content

Commit

Permalink
Merge branch 'master' into dev/lapis_artifact258_rework
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou authored Nov 30, 2024
2 parents 8d83157 + af80a2d commit b321b3a
Show file tree
Hide file tree
Showing 880 changed files with 6,206 additions and 5,106 deletions.
63 changes: 12 additions & 51 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1643,47 +1643,6 @@
" data modify storage api: Argument.ID set value %id%",
" function api:mob/summon"
]
},
{
"type": "file",
"rel": "data/asset/loot_tables/mob/death/%namespace%.json",
"content": {
"type": "entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "loot_table",
"name": "asset:mob/death/abstract_detect_item",
"functions": [
{
"function": "set_nbt",
"tag": "{TSB:{ID:%id%}}"
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "loot_table",
"name": "entities/%entity%"
}
]
}
]
}
}
],
"customQuestion": [
{
"name": "id",
"question": "MobのID",
"pattern": "[1-9][0-9]*",
"patternErrorMessage": "数値のみが許されるよ"
}
]
},
Expand All @@ -1701,7 +1660,7 @@
"# @within asset:mob/alias/%id%/summon",
"",
"# 元となるEntityを召喚する",
" summon %entity% ~ ~ ~ {Tags:[\"MobInit\"],DeathLootTable:\"asset:mob/death/%namespace%\"}",
" summon %entity% ~ ~ ~ {Tags:[\"MobInit\"]}",
""
]
},
Expand Down Expand Up @@ -1815,7 +1774,7 @@
]
},
{
"label": "MOB/テンプレート: _index.d ",
"label": "Mob/テンプレート: _index.d ",
"generates": [
{
"type": "file",
Expand All @@ -1832,7 +1791,7 @@
]
},
{
"label": "MOB/トリガー: 攻撃",
"label": "Mob/トリガー: 攻撃",
"generates": [
{
"type": "file",
Expand Down Expand Up @@ -1871,7 +1830,7 @@
]
},
{
"label": "MOB/トリガー: 被ダメージ",
"label": "Mob/トリガー: 被ダメージ",
"generates": [
{
"type": "file",
Expand Down Expand Up @@ -1910,7 +1869,7 @@
]
},
{
"label": "MOB/トリガー: 死亡",
"label": "Mob/トリガー: 死亡",
"generates": [
{
"type": "file",
Expand Down Expand Up @@ -2027,7 +1986,7 @@
]
},
{
"label": "MOB/特殊トリガー: 再Join",
"label": "Mob/特殊トリガー: 再Join",
"generates": [
{
"type": "file",
Expand Down Expand Up @@ -2057,7 +2016,7 @@
]
},
{
"label": "MOB/特殊トリガー: remove",
"label": "Mob/特殊トリガー: remove",
"generates": [
{
"type": "file",
Expand Down Expand Up @@ -2548,10 +2507,12 @@
"# 継承(オプション)",
" # data modify storage asset:object Extends append value ",
" # function asset:object/extends",
"# 他のモブに継承されることを許可するか (boolean) (オプション)",
"# 他のObjectに継承されることを許可するか (boolean) (オプション)",
" # data modify storage asset:object ExtendsSafe set value ",
"# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean)",
"# 継承されることを前提とした、抽象的な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 %id%",
Expand Down Expand Up @@ -2600,7 +2561,7 @@
]
},
{
"label": "Object/ 召喚処理",
"label": "Object/召喚処理",
"generates": [
{
"type": "file",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
execute unless data storage asset:temp 01.Def run scoreboard players set $Defense Temporary 100
# 耐性値に応じてメッセージを変更
# 高い
execute if score $Defense Temporary matches 190.. run data modify storage asset:temp 01.Def set value '{"text":"a","font":"tsb"}'
execute if score $Defense Temporary matches 170..189 run data modify storage asset:temp 01.Def set value '{"text":"b","font":"tsb"}'
execute if score $Defense Temporary matches 150..169 run data modify storage asset:temp 01.Def set value '{"text":"c","font":"tsb"}'
execute if score $Defense Temporary matches 130..149 run data modify storage asset:temp 01.Def set value '{"text":"d","font":"tsb"}'
execute if score $Defense Temporary matches 110..129 run data modify storage asset:temp 01.Def set value '{"text":"e","font":"tsb"}'
execute if score $Defense Temporary matches 190.. run data modify storage asset:temp 01.Def set value '{"text":"a","font":"artifact/1/info"}'
execute if score $Defense Temporary matches 170..189 run data modify storage asset:temp 01.Def set value '{"text":"b","font":"artifact/1/info"}'
execute if score $Defense Temporary matches 150..169 run data modify storage asset:temp 01.Def set value '{"text":"c","font":"artifact/1/info"}'
execute if score $Defense Temporary matches 130..149 run data modify storage asset:temp 01.Def set value '{"text":"d","font":"artifact/1/info"}'
execute if score $Defense Temporary matches 110..129 run data modify storage asset:temp 01.Def set value '{"text":"e","font":"artifact/1/info"}'

# 普通
execute if score $Defense Temporary matches 90..109 run data modify storage asset:temp 01.Def set value '{"text":"f","font":"tsb"}'
execute if score $Defense Temporary matches 90..109 run data modify storage asset:temp 01.Def set value '{"text":"f","font":"artifact/1/info"}'

# 低い
execute if score $Defense Temporary matches 70..89 run data modify storage asset:temp 01.Def set value '{"text":"g","font":"tsb"}'
execute if score $Defense Temporary matches 50..69 run data modify storage asset:temp 01.Def set value '{"text":"h","font":"tsb"}'
execute if score $Defense Temporary matches 30..49 run data modify storage asset:temp 01.Def set value '{"text":"i","font":"tsb"}'
execute if score $Defense Temporary matches 10..29 run data modify storage asset:temp 01.Def set value '{"text":"j","font":"tsb"}'
execute if score $Defense Temporary matches ..9 run data modify storage asset:temp 01.Def set value '{"text":"k","font":"tsb"}'
execute if score $Defense Temporary matches 70..89 run data modify storage asset:temp 01.Def set value '{"text":"g","font":"artifact/1/info"}'
execute if score $Defense Temporary matches 50..69 run data modify storage asset:temp 01.Def set value '{"text":"h","font":"artifact/1/info"}'
execute if score $Defense Temporary matches 30..49 run data modify storage asset:temp 01.Def set value '{"text":"i","font":"artifact/1/info"}'
execute if score $Defense Temporary matches 10..29 run data modify storage asset:temp 01.Def set value '{"text":"j","font":"artifact/1/info"}'
execute if score $Defense Temporary matches ..9 run data modify storage asset:temp 01.Def set value '{"text":"k","font":"artifact/1/info"}'
# リセット
scoreboard players reset $Defense Temporary
scoreboard players reset $Defense Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
scoreboard players operation $01.CurrentHP Temporary /= $100 Const

# 表示する
execute if entity @s[tag=!Enemy.Boss] run tellraw @p[tag=this] [{"text":"\uE01A","font":"tsb"},{"text":" ","font":"default"},{"score":{"objective":"Temporary","name":"$01.CurrentHP"},"color":"white","font":"default"},{"text":" / ","color":"white","font":"default"},{"score":{"objective":"Temporary","name":"$01.MaxHP"},"color":"white","font":"default"},{"text":" (","font":"default"},{"score":{"objective":"Temporary","name":"$01.PercentHP"},"color":"white","font":"default"},{"text":"%)","font":"default"}]
execute if entity @s[tag=!Enemy.Boss] run tellraw @p[tag=this] [{"storage":"global","nbt":"Icon.FrameWhite","interpret":true},{"text":"","font":"artifact/1/info"},{"text":"\u0002","font":"space"},{"score":{"objective":"Temporary","name":"$01.CurrentHP"},"color":"white","font":"default"},{"text":"\u0002","font":"space"},{"text":"/","font":"default"},{"text":"\u0002","font":"space"},{"score":{"objective":"Temporary","name":"$01.MaxHP"},"color":"white","font":"default"},{"text":" (","font":"default"},{"score":{"objective":"Temporary","name":"$01.PercentHP"},"color":"white","font":"default"},{"text":"%)","font":"default"}]

# 天使だったら今までのデータを気にせず秘匿
execute if entity @s[tag=Enemy.Boss] run tellraw @p[tag=this] [{"text":"\uE01A","font":"tsb"},{"text":" ??? / ???","font":"default"},{"text":" (","font":"default"},{"score":{"objective":"Temporary","name":"$01.PercentHP"},"color":"white","font":"default"},{"text":"%)","font":"default"}]
execute if entity @s[tag=Enemy.Boss] run tellraw @p[tag=this] [{"storage":"global","nbt":"Icon.FrameWhite","interpret":true},{"text":"","font":"artifact/1/info"},{"text":"\u0002","font":"space"},{"text":"???","font":"default"},{"text":"\u0002","font":"space"},{"text":"/","font":"default"},{"text":"\u0002","font":"space"},{"text":"???","font":"default"},{"text":" (","font":"default"},{"score":{"objective":"Temporary","name":"$01.PercentHP"},"color":"white","font":"default"},{"text":"%)","font":"default"}]

# 物理と魔法
# 物理耐性取得
Expand All @@ -52,7 +52,7 @@
data remove storage asset:temp 01.Def

# 表示
tellraw @p[tag=this] [{"text":"\uE018","font":"tsb"},{"storage":"asset:temp","nbt":"01.PhysicalDefense","interpret":true},{"text":" | ","font":"default"},{"text":"\uE019","font":"tsb"},{"storage":"asset:temp","nbt":"01.MagicDefense","interpret":true}]
tellraw @p[tag=this] [{"storage":"global","nbt":"Icon.FrameWhite","interpret":true},{"storage":"global","nbt":"Icon.Attack.Physical","interpret":true},{"storage":"asset:temp","nbt":"01.PhysicalDefense","interpret":true},{"text":"\u0002","font":"space"},{"text":"|","font":"default"},{"text":"\u0002","font":"space"},{"storage":"global","nbt":"Icon.FrameWhite","interpret":true},{"storage":"global","nbt":"Icon.Attack.Magic","interpret":true},{"storage":"asset:temp","nbt":"01.MagicDefense","interpret":true}]

# 炎、水、雷
# 炎耐性取得
Expand All @@ -77,7 +77,7 @@
data remove storage asset:temp 01.Def

# 表示
tellraw @p[tag=this] [{"text":"\uE01C","font":"tsb"},{"storage":"asset:temp","nbt":"01.FireDefense","interpret":true},{"text":" | ","font":"default"},{"text":"\uE01D","font":"tsb"},{"storage":"asset:temp","nbt":"01.WaterDefense","interpret":true},{"text":" | ","font":"default"},{"text":"\uE01E","font":"tsb"},{"storage":"asset:temp","nbt":"01.ThunderDefense","interpret":true}]
tellraw @p[tag=this] [{"storage":"global","nbt":"Icon.FrameWhite","interpret":true},{"storage":"global","nbt":"Icon.Attack.Fire","interpret":true},{"storage":"asset:temp","nbt":"01.FireDefense","interpret":true},{"text":"\u0002","font":"space"},{"text":"|","font":"default"},{"text":"\u0002","font":"space"},{"storage":"global","nbt":"Icon.FrameWhite","interpret":true},{"storage":"global","nbt":"Icon.Attack.Water","interpret":true},{"storage":"asset:temp","nbt":"01.WaterDefense","interpret":true},{"text":"\u0002","font":"space"},{"text":"|","font":"default"},{"text":"\u0002","font":"space"},{"storage":"global","nbt":"Icon.FrameWhite","interpret":true},{"storage":"global","nbt":"Icon.Attack.Thunder","interpret":true},{"storage":"asset:temp","nbt":"01.ThunderDefense","interpret":true}]

# 空行
tellraw @p[tag=this] {"text":" "}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
data modify storage asset:temp 02.Name set from storage lib: Array[-1]
# リセット
function lib:array/session/close
scoreboard players reset $CandidatesLength
scoreboard players reset $CandidatesLength
data remove storage asset:temp 02
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@
# data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableMPMessage set value
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
data modify storage asset:artifact DisableBreakSound set value true
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value ["Flora", "Urban", "Nyaptov", "Wi-ki", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
# data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
function asset:artifact/common/give
function asset:artifact/common/give
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@
# data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableMPMessage set value
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
data modify storage asset:artifact DisableBreakSound set value true
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value ["Flora", "Urban", "Wi-ki"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
# data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
function asset:artifact/common/give
function asset:artifact/common/give
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#> asset:artifact/0019.scriputre/give/1.trigger
#> asset:artifact/0019.scripture/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:19} run function asset:artifact/0019.scriputre/give/2.give
execute if data storage asset:context {id:19} run function asset:artifact/0019.scripture/give/2.give
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#> asset:artifact/0019.scriputre/give/2.give
#> asset:artifact/0019.scripture/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/0019.scriputre/give/1.trigger
# @within function asset:artifact/0019.scripture/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。
Expand Down Expand Up @@ -56,4 +56,4 @@
# data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
function asset:artifact/common/give
function asset:artifact/common/give
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#> asset:artifact/0019.scriputre/register
#> asset:artifact/0019.scripture/register
#
# 神器プールへの登録処理
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#> asset:artifact/0019.scriputre/trigger/1.trigger
#> asset:artifact/0019.scripture/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのauto/feet/legs/chest/head/mainhand/offhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
execute if data storage asset:context id{mainhand:19} run function asset:artifact/0019.scriputre/trigger/2.check_condition
execute if data storage asset:context id{mainhand:19} run function asset:artifact/0019.scripture/trigger/2.check_condition
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#> asset:artifact/0019.scriputre/trigger/2.check_condition
#> asset:artifact/0019.scripture/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/0019.scriputre/trigger/1.trigger
# @within function asset:artifact/0019.scripture/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね
function asset:artifact/common/check_condition/mainhand
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/0019.scriputre/trigger/3.main
execute if entity @s[tag=CanUsed] run function asset:artifact/0019.scripture/trigger/3.main
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#> asset:artifact/0019.scriputre/trigger/3.main
#> asset:artifact/0019.scripture/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/0019.scriputre/trigger/2.check_condition
# @within function asset:artifact/0019.scripture/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う auto/feet/legs/chest/head/mainhand/offhandを記載してね
function asset:artifact/common/use/mainhand
Expand All @@ -13,4 +13,4 @@
execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..10] at @s run particle end_rod ~ ~ ~ 1 1 1 0.1 100 force @a[distance=..10]

# SE
playsound minecraft:entity.arrow.hit_player player @s ~ ~ ~ 20 1
playsound minecraft:entity.arrow.hit_player player @s ~ ~ ~ 20 1
Loading

0 comments on commit b321b3a

Please sign in to comment.