Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dev/ella_mob_390_ra…
Browse files Browse the repository at this point in the history
…bbit
  • Loading branch information
EllaCoat committed Aug 25, 2024
2 parents 99e54a4 + 41443d0 commit a7b9bee
Show file tree
Hide file tree
Showing 75 changed files with 502 additions and 307 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
playsound block.sculk_sensor.clicking hostile @a ~ ~ ~ 0.8 0 0
playsound block.fire.ambient hostile @a ~ ~ ~ 1.5 0.8 0
playsound ogg:mob.vex.idle1 hostile @a ~ ~ ~ 0.8 0 0
execute as @e[type=#lib:living,tag=Enemy,tag=!NotTarget,distance=..10,sort=random,limit=5] run particle heart ~ ~1.2 ~ 0.4 0.4 0.4 0 20 normal @a
execute as @e[type=#lib:living,tag=Enemy,tag=!NotTarget,distance=..10,sort=nearest,limit=5] at @s run particle heart ~ ~1.2 ~ 0.4 0.4 0.4 0 20 normal @a

# 回復
# 難易度値によって回復量が変動 150N
function api:global_vars/get_difficulty
execute store result storage api: Argument.Heal int 150 run data get storage api: Return.Difficulty
function api:heal/modifier
execute as @e[type=#lib:living,tag=Enemy,tag=!NotTarget,distance=..10,sort=random,limit=5] run function api:heal/
execute as @e[type=#lib:living,tag=Enemy,tag=!NotTarget,distance=..10,sort=nearest,limit=5] run function api:heal/
function api:heal/reset

# リセット
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

# もし周囲にモブが多すぎた場合挙動が変わる
# 数のカウント
execute store result score $Count Temporary if entity @e[type=#lib:hostile,tag=Enemy,distance=..30]
execute store result score $Count Temporary if entity @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,distance=..30]
# 30以上モブがいない場合
execute unless score $Count Temporary matches 30.. run function asset:mob/0258.enemy_teleporter/tick/teleport
# 30以上モブがいる場合
execute if score $Count Temporary matches 30.. run function asset:mob/0258.enemy_teleporter/tick/weak_teleport
# リセット
scoreboard players reset $Count Temporary
scoreboard players reset $Count Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# @within function asset:mob/0258.enemy_teleporter/tick/branch

# なるべく離れてるモブを引き寄せ
execute if entity @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=15..25,sort=random,limit=3] run tp ~ ~ ~
execute if entity @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=15..25,sort=random,limit=3] run tp ~ ~ ~

# もしも周囲に敵がいないならどこの誰でもいいから引き寄せ
execute unless entity @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=!Uninterferable,distance=..25,sort=nearest,limit=3] run tp ~ ~ ~
execute unless entity @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=..25,sort=nearest,limit=3] run tp ~ ~ ~

# 演出
playsound ogg:block.respawn_anchor.set_spawn1 hostile @a ~ ~ ~ 1 1.4
particle dust 0.427 0 0.514 1 ~ ~3 ~ 0.7 3 0.7 0 150

# 自害
kill @s
kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# @within function asset:mob/0258.enemy_teleporter/tick/branch

# 近くにいるモブだけをテレポート
execute as @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=..15,sort=random,limit=3] run tp ~ ~ ~
execute as @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=..15,sort=random,limit=3] run tp ~ ~ ~

# 演出
playsound ogg:block.respawn_anchor.set_spawn1 hostile @a ~ ~ ~ 1 1.4
particle dust 0.427 0 0.514 1 ~ ~3 ~ 0.7 3 0.7 0 150

# 自害
kill @s
kill @s
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#> asset:mob/0264.dark_summoner/death/1.trigger
#> asset:mob/0264.dark_summoner/_/death
#
# Mobの死亡時に実行されるfunction
#
# @within tag/function asset:mob/death

execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/death/2.death
execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/death/
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#> asset:mob/0264.dark_summoner/hurt/1.trigger
#> asset:mob/0264.dark_summoner/_/hurt
#
# Mobの被ダメージに実行されるfunction
#
# @within tag/function asset:mob/hurt

execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/hurt/2.hurt
execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/hurt/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:mob/0264.dark_summoner/_/init
#
# Mobの召喚時に実行されるfunction
#
# @within tag/function asset:mob/initialize

execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/init/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:mob/0264.dark_summoner/_/register
#
#
#
# @within tag/function asset:mob/register

execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:mob/0264.dark_summoner/_/summon
#
#
#
# @within tag/function asset:mob/summon

execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/summon/
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#> asset:mob/0264.dark_summoner/tick/1.trigger
#> asset:mob/0264.dark_summoner/_/tick
#
# Mobが生きている間毎tick実行されるfunction
#
# @within tag/function asset:mob/tick

execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/tick/2.tick
execute if data storage asset:context {id:264} run function asset:mob/0264.dark_summoner/tick/
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
#> tag
# @within function asset:mob/0264.dark_summoner/**
#declare tag 7C.CastStart
#declare tag 7C.Teleported
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:mob/0264.dark_summoner/death/
#
# Mobの死亡時の処理
#
# @within function asset:mob/0264.dark_summoner/_/death

# 音
playsound minecraft:entity.vex.ambient hostile @a ~ ~ ~ 1 0.7
playsound minecraft:entity.enderman.ambient hostile @a ~ ~ ~ 1 0.5
playsound minecraft:entity.phantom.death hostile @a ~ ~ ~ 1 0.7

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#> asset:mob/0264.dark_summoner/hurt/2.hurt
#> asset:mob/0264.dark_summoner/hurt/
#
# Mobの被ダメージ時の処理
#
# @within function asset:mob/0264.dark_summoner/hurt/1.trigger
# @within function asset:mob/0264.dark_summoner/_/hurt

# サウンド
playsound minecraft:entity.donkey.hurt hostile @a ~ ~ ~ 1 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:mob/0264.dark_summoner/init/
#
# Mob召喚時のInit処理
#
# @within function asset:mob/0264.dark_summoner/_/init

# ハード以上なら即詠唱に入って召喚する
execute if predicate api:global_vars/difficulty/min/hard run function asset:mob/0264.dark_summoner/init/quick_summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:mob/0264.dark_summoner/init/quick_summon
#
# 即召喚するための処理
#
# @within function asset:mob/0264.dark_summoner/init/

# ポーズ変更
item replace entity @s armor.head with stick{CustomModelData:20215}

# 自身にTagを付与
tag @s add 7C.CastStart

# スコア設定
scoreboard players set @s 7C.Attack 75
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#> asset:mob/0264.dark_summoner/0.load
#> asset:mob/0264.dark_summoner/load
#
# MOBに利用するスコアボード等の初期化処理
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#> asset:mob/0264.dark_summoner/summon/2.summon
#> asset:mob/0264.dark_summoner/register
#
# Mobの召喚時の処理
# Mobのデータを指定
#
# @within function asset:mob/0264.dark_summoner/summon/1.trigger
# @within function asset:mob/0264.dark_summoner/_/register

# 元となるMobを召喚する
summon zombie ~ ~ ~ {Tags:["MobInit","AlwaysInvisible","AlwaysSlowFall"],DeathLootTable:"asset:mob/death/0264.dark_summoner",Silent:1b}
# 継承 (int) (オプション)
# data modify storage asset:mob Extends append value
# function asset:mob/extends

# 他のモブに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:mob ExtendsSafe set value true
# ID (int)
data modify storage asset:mob ID set value 264
# Type (string) Wikiを参照
Expand All @@ -14,18 +18,26 @@
data modify storage asset:mob Interferable set value true
# 名前 (TextComponentString) (オプション)
data modify storage asset:mob Name set value '{"text":"ダークサモナー","color":"#B638FF","italic":false}'
# Mobの説明文 (TextComponentString[]) (オプション)
# data modify storage asset:mob Lore set value
# 武器
# メインハンド (Compound(Item)) (オプション)
#data modify storage asset:mob Weapon.Mainhand set value {id:"minecraft:stick",Count:1b,tag:{CustomModelData:20179}}
# data modify storage asset:mob Weapon.Mainhand set value
# オフハンド (Compound(Item)) (オプション)
# data modify storage asset:mob Weapon.Offhand set value
# 武器ドロップ率 ([float, float]) (オプション)
data modify storage asset:mob WeaponDropChances set value [0.0f,0.0f]
# data modify storage asset:mob WeaponDropChances set value
# 防具
# 頭 (Compound(Item)) (オプション)
data modify storage asset:mob Armor.Head set value {id:"minecraft:stick",Count:1b,tag:{CustomModelData:20214}}
# 胴 (Compound(Item)) (オプション)
#data modify storage asset:mob Armor.Chest set value {id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:4404559}}}
# data modify storage asset:mob Armor.Chest set value
# 脚 (Compound(Item)) (オプション)
# data modify storage asset:mob Armor.Legs set value
# 足 (Compound(Item)) (オプション)
# data modify storage asset:mob Armor.Feet set value
# 防具ドロップ率 ([float, float]) (オプション)
#data modify storage asset:mob ArmorDropChances set value [0.0f,0.0f,0.0f,0.0f]
# data modify storage asset:mob ArmorDropChances set value
# 体力 (double) (オプション)
data modify storage asset:mob Health set value 2500
# 攻撃力 (double) (オプション)
Expand All @@ -44,13 +56,13 @@
# 物理倍率 (float) (オプション)
# data modify storage asset:mob Resist.Physical set value
# 魔法倍率 (float) (オプション)
# data modify storage asset:mob Resist.Magic set value
data modify storage asset:mob Resist.Magic set value 0.5
# 火倍率 (float) (オプション)
# data modify storage asset:mob Resist.Fire set value
# 水倍率 (float) (オプション)
# data modify storage asset:mob Resist.Water set value
# 雷倍率 (float) (オプション)
# data modify storage asset:mob Resist.Thunder set value

# MobInitタグ持ちを対象にして召喚関数呼び出し
execute as @e[type=zombie,tag=MobInit,distance=..0.01] run function asset:mob/common/summon
# フィールド
# data modify storage asset:mob Field set value {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:mob/0264.dark_summoner/summon/
#
# Mob召喚処理の呼び出し時に実行されるfunction
#
# @within asset:mob/0264.dark_summoner/_/summon

# 元となるMobを召喚する
summon zombie ~ ~ ~ {Silent:1b,Tags:["MobInit","AlwaysInvisible","AlwaysSlowFall"],DeathLootTable:"asset:mob/death/0264.dark_summoner"}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:mob/0264.dark_summoner/summon/debug
#
# モブの動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

# モブを召喚
data modify storage api: Argument.ID set value 264
function api:mob/summon
20 changes: 20 additions & 0 deletions Asset/data/asset/functions/mob/0264.dark_summoner/tick/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:mob/0264.dark_summoner/tick/
#
# Mobのtick時の処理
#
# @within function asset:mob/0264.dark_summoner/_/tick

# パーティクル
particle minecraft:falling_dust black_concrete ~ ~0.5 ~ 0.1 0 0.1 0 1

# 付近にプレイヤーがいるなら詠唱動作へ移行 Predicateなどが完成したらそれに移行したい
execute if entity @s[tag=!7C.CastStart] positioned ^ ^ ^12.5 if entity @p[distance=..12.5] at @s run function asset:mob/0264.dark_summoner/tick/cast_start

# 一度詠唱動作に入ると離れても唱える
execute if entity @s[tag=7C.CastStart] run function asset:mob/0264.dark_summoner/tick/casting

# 攻撃キャンセル
execute unless entity @p[distance=..30] run function asset:mob/0264.dark_summoner/tick/cast_finish

# 首固定
data modify entity @s Rotation[1] set value 0.0f

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#> asset:mob/0264.dark_summoner/tick/event/cast_finish
#
#> asset:mob/0264.dark_summoner/tick/cast_finish
#
# 詠唱終了
#
# @within function
# asset:mob/0264.dark_summoner/tick/event/casting
# asset:mob/0264.dark_summoner/tick/2.tick
# asset:mob/0264.dark_summoner/tick/
# asset:mob/0264.dark_summoner/tick/casting

# リセット
scoreboard players reset @s 7C.Attack
tag @s remove 7C.CastStart
tag @s remove 7C.Teleported

# ポーズ変更
item replace entity @s armor.head with stick{CustomModelData:20214}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#> asset:mob/0264.dark_summoner/tick/event/cast_start
#> asset:mob/0264.dark_summoner/tick/cast_start
#
# 詠唱開始
#
#
# @within function asset:mob/0264.dark_summoner/tick/2.tick
# @within function asset:mob/0264.dark_summoner/tick/

# SFX
playsound minecraft:entity.enderman.ambient hostile @a ~ ~ ~ 1.5 0.7
Expand All @@ -15,4 +15,4 @@
tag @s add 7C.CastStart

# ポーズ変更
item replace entity @s armor.head with stick{CustomModelData:20215}
item replace entity @s armor.head with stick{CustomModelData:20215}
Loading

0 comments on commit a7b9bee

Please sign in to comment.