Skip to content

Commit

Permalink
Merge branch 'master' into dev/ella_mob_421
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou authored Jan 6, 2025
2 parents 7e93922 + bcfac12 commit 9a770e8
Show file tree
Hide file tree
Showing 797 changed files with 13,445 additions and 5,976 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"ブレイブソード","color":"light_purple"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"複数の敵を巻き込む、強力な斬撃を放つ。"}','{"text":"\\"勇気を刃に込めて!\\"","color":"gray"}']
data modify storage asset:artifact Lore set value ['{"text":"複数の敵を巻き込む斬撃を放つ。"}','{"text":"コンボフィニッシュでは、敵を貫通する衝撃波を放つ。"}','{"text":"\\"勇気の刃\\"","color":"gray"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value
# data modify storage asset:artifact ConsumeItem.Count set value
Expand All @@ -29,31 +29,36 @@
# 神器の発動条件 (TextComponentString) (オプション)
# data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.Damage set value ["300-350 / 250-300"]
data modify storage asset:artifact AttackInfo.Damage set value ["125-175 / 105-155"]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackType set value [Physical]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.ElementType set value [None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never"
data modify storage asset:artifact AttackInfo.IsRangeAttack set value "every"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 15
# data modify storage asset:artifact MPCost set value 25
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value 100
# MP回復量
data modify storage asset:artifact MPHealWhenHit set value 4
# 神器のクールダウン (int) (オプション)
data modify storage asset:artifact LocalCooldown set value 5
# data modify storage asset:artifact LocalCooldown set value 5
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
data modify storage asset:artifact TypeCooldown.Type set value "shortRange"
data modify storage asset:artifact TypeCooldown.Duration set value 5
# グローバルクールダウン (int) (オプション)
# data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
data modify storage asset:artifact DisableCooldownMessage set value true
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableMPMessage set value
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value "ALL"
data modify storage asset:artifact CanUsedGod set value ["Rumor","Flora","Urban"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
data modify storage asset:artifact CustomNBT set value {HideFlags:6,Unbreakable:1b}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@

#> 定義類はここに
# @within function asset:artifact/0976.brave_sword/trigger/**
scoreboard objectives add R4.Tick dummy
scoreboard objectives add R4.Combo dummy
scoreboard objectives add R4.Wait dummy
scoreboard objectives add R4.UserID dummy
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed,tag=!R4.FinishCoolTime] run function asset:artifact/0976.brave_sword/trigger/3.main
execute if entity @s[tag=CanUsed] run function asset:artifact/0976.brave_sword/trigger/3.main

# リセット
scoreboard players reset $R4.LatestUseTick Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@
#
# @within function asset:artifact/0976.brave_sword/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
function asset:artifact/common/use/auto
# 先にLatestUseTickを取っておく
execute store result score $R4.LatestUseTick Temporary run data get storage asset:context Items.mainhand.tag.TSB.LatestUseTick

# ここから先は神器側の効果の処理を書く
# 使用時に前回の使用時のTickとの差が開いていた場合、コンボカウントをリセットする
execute unless score @s R4.Combo matches -2147483648..2147483647 run scoreboard players set @s R4.Combo 0
execute store result score $R4.Temp Temporary run time query gametime
scoreboard players operation $R4.Temp Temporary -= $R4.LatestUseTick Temporary
execute unless score $R4.Temp Temporary matches ..30 run scoreboard players set @s R4.Combo 0

# スコア持ってないなら0に
execute unless entity @s[scores={R4.Combo=0..}] run scoreboard players set @s R4.Combo 0

# 攻撃
execute if entity @s[scores={R4.Combo=0}] run function asset:artifact/0976.brave_sword/trigger/combo/slash1
execute if entity @s[scores={R4.Combo=1}] run function asset:artifact/0976.brave_sword/trigger/combo/slash2
execute if entity @s[scores={R4.Combo=2}] run function asset:artifact/0976.brave_sword/trigger/combo/slash3
# コンボフィニッシュを出したあとは、前回の使用時とのTickの差が13Tick以上でないと使用処理がキャンセルされる
execute if score @s R4.Combo matches 3.. unless score $R4.Temp Temporary matches 13.. run scoreboard players reset $R4.Temp Temporary
execute if score @s R4.Combo matches 3.. unless score $R4.Temp Temporary matches 13.. run return fail
execute if score @s R4.Combo matches 3.. if score $R4.Temp Temporary matches 13.. run scoreboard players reset @s R4.Combo

# Init
execute rotated ~ 0 anchored eyes positioned ^ ^-1.8 ^ as @e[type=armor_stand,tag=R4.SlashInit,distance=..0.5,sort=nearest,limit=1] run function asset:artifact/0976.brave_sword/trigger/slash_entity/init
# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
function asset:artifact/common/use/auto

# コンボカウント
scoreboard players set @s R4.Wait 13
# コンボカウント加算
scoreboard players add @s R4.Combo 1
scoreboard players set @s[scores={R4.Combo=3..}] R4.Combo 0

# スケジュール開始
schedule function asset:artifact/0976.brave_sword/trigger/slash_entity/1.tick 1t replace
schedule function asset:artifact/0976.brave_sword/trigger/combo/1.tick 1t replace
# 攻撃
execute if score @s R4.Combo matches 1 anchored eyes run function asset:artifact/0976.brave_sword/trigger/combo/slash1
execute if score @s R4.Combo matches 2 anchored eyes run function asset:artifact/0976.brave_sword/trigger/combo/slash2
execute if score @s R4.Combo matches 3 anchored eyes run function asset:artifact/0976.brave_sword/trigger/combo/slash3

# リセット
scoreboard players reset $R4.Temp Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@

#> tag
# @within function asset:artifact/0976.brave_sword/trigger/**
#declare tag R4.SlashInit
#declare tag R4.SlashSweep
#declare tag R4.SlashFinish
#declare tag R4.SlashShot
#declare tag R4.SlashShotInit
#declare tag R4.OwnerPlayer
#declare tag R4.FinishCoolTime
#declare tag R4.Combo1
#declare tag R4.Combo2
#declare tag R4.Combo3
#declare tag R4.Hit
#declare score_holder $R4.Temp
#declare score_holder $R4.LatestUseTick

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,9 @@
#
# @within function asset:artifact/0976.brave_sword/trigger/combo/**

# どうしてもダメージを受けてほしい(HurtTimeで反応を起こすモブもいるので)
effect give @s[type=#lib:undead] instant_health
effect give @s[type=!#lib:undead] instant_damage

# 引数の設定
#ダメージブレのための処理
# 疑似乱数取得
execute store result score $RandomDamage Temporary run function lib:random/
# 剰余算する。追加ダメージ。
scoreboard players operation $RandomDamage Temporary %= $51 Const
# 最低ダメージ設定
scoreboard players add $RandomDamage Temporary 300
#ダメージセット
execute store result storage lib: Argument.Damage float 1 run scoreboard players get $RandomDamage Temporary
# ダメージ値設定
execute store result storage lib: Argument.Damage float 1 run random value 125..175
# 第一属性
data modify storage lib: Argument.AttackType set value "Physical"
# 第二属性
Expand All @@ -28,11 +17,11 @@
function lib:damage/

# ノクバ耐性を考慮して吹っ飛ばす
data modify storage lib: Argument.VectorMagnitude set value -0.2
data modify storage lib: Argument.VectorMagnitude set value -0.7
data modify storage lib: Argument.KnockbackResist set value true
execute as @s at @s facing entity @p[tag=this] feet rotated ~ ~25 run function lib:motion/
execute as @s at @s facing entity @p[tag=this] feet rotated ~ ~5 run function lib:motion/

# リセット
tag @s remove R4.Hit
function lib:damage/reset
scoreboard players reset $RandomDamage Temporary
data remove storage lib: Argument
data remove storage lib: Argument
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
# @within function asset:artifact/0976.brave_sword/trigger/3.main

# 演出
playsound minecraft:entity.witch.throw player @a ~ ~ ~ 1.5 1
playsound minecraft:item.trident.throw player @a ~ ~ ~ 1.5 0.8
playsound minecraft:entity.witch.throw player @a ~ ~ ~ 1 1
playsound minecraft:item.trident.throw player @a ~ ~ ~ 1 0.8
playsound minecraft:item.axe.scrape player @a ~ ~ ~ 1 1.5

# 斬撃
execute if entity @s[y_rotation=-22.5..22.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[-90F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=22.5..67.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[-45F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=67.5..114.9] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[0F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=115..157.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[45F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=157.5..-157.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[90F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=-157.5..-114.9] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[135F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=-115..-67.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[180F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=-67.5..-22.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[-135F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,180.0f,0.1f]},DisabledSlots:4144959}
data modify storage api: Argument.ID set value 2001
data modify storage api: Argument.FieldOverride set value {Color:50175,Frames:[20335,20336,20337],Scale:[4f,4f,0.1f],Transformation:{left_rotation:[0.561f,-0.43f,0.43f,0.561f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f]}}
execute positioned ^ ^ ^1.5 positioned ~ ~-0.5 ~ run function api:object/summon

# 攻撃
execute positioned ^ ^ ^1.5 as @e[type=#lib:living,tag=Enemy,tag=!Uninterferable,distance=..2] run function asset:artifact/0976.brave_sword/trigger/combo/damage
# 攻撃判定
# ターゲット指定
execute positioned ^ ^ ^1 run tag @e[type=#lib:living,type=!player,tag=!Uninterferable,distance=..3] add R4.Hit
execute as @e[type=#lib:living,type=!player,tag=R4.Hit,tag=!Uninterferable,distance=..3] positioned ^ ^ ^-100 run tag @s[type=#lib:living,type=!player,tag=R4.Hit,tag=!Uninterferable,distance=..100] remove R4.Hit
# ダメージ処理へ
execute as @e[type=#lib:living,type=!player,tag=R4.Hit,tag=!Uninterferable,distance=..3] run function asset:artifact/0976.brave_sword/trigger/combo/damage
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
# @within function asset:artifact/0976.brave_sword/trigger/3.main

# 演出
playsound minecraft:entity.witch.throw player @a ~ ~ ~ 1.5 1.2
playsound minecraft:item.trident.throw player @a ~ ~ ~ 1.5 1
playsound minecraft:entity.witch.throw player @a ~ ~ ~ 1 1.2
playsound minecraft:item.trident.throw player @a ~ ~ ~ 1 1
playsound minecraft:item.axe.scrape player @a ~ ~ ~ 1 2

# 斬撃
execute if entity @s[y_rotation=-22.5..22.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[-90F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=22.5..67.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[-45F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=67.5..114.9] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[0F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=115..157.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[45F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=157.5..-157.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[90F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=-157.5..-114.9] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[135F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=-115..-67.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[180F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
execute if entity @s[y_rotation=-67.5..-22.4] rotated ~ 0 anchored eyes run summon armor_stand ^ ^-1.8 ^ {Rotation:[-135F,0F],Tags:["R4.SlashSweep","R4.SlashInit","Object"],NoGravity:1b,Invisible:1b,Pose:{RightArm:[0.1f,-25.0f,0.1f]},DisabledSlots:4144959}
data modify storage api: Argument.ID set value 2001
data modify storage api: Argument.FieldOverride set value {Color:50175,Frames:[20335,20336,20337],Scale:[4f,4f,0.1f],Transformation:{left_rotation:[-0.596f,-0.38f,-0.596f,0.38f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f]}}
execute positioned ^ ^ ^1.5 positioned ~ ~-0.5 ~ run function api:object/summon

# 攻撃
execute positioned ^ ^ ^1.5 as @e[type=#lib:living,tag=Enemy,tag=!Uninterferable,distance=..2] run function asset:artifact/0976.brave_sword/trigger/combo/damage
# 攻撃判定
# ターゲット指定
execute positioned ^ ^ ^1 run tag @e[type=#lib:living,type=!player,tag=!Uninterferable,distance=..3] add R4.Hit
execute as @e[type=#lib:living,type=!player,tag=R4.Hit,tag=!Uninterferable,distance=..3] positioned ^ ^ ^-100 run tag @s[type=#lib:living,type=!player,tag=R4.Hit,tag=!Uninterferable,distance=..100] remove R4.Hit
# ダメージ処理へ
execute as @e[type=#lib:living,type=!player,tag=R4.Hit,tag=!Uninterferable,distance=..3] run function asset:artifact/0976.brave_sword/trigger/combo/damage
Loading

0 comments on commit 9a770e8

Please sign in to comment.