Skip to content

Commit

Permalink
本召喚AI の調整
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat committed Aug 26, 2024
1 parent 58c8f58 commit 0147ac2
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,33 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/4_0_summon_book/

#> ScoreHolder
# @private
#declare score_holder $AW.Book

# Markerを呼び出す
execute at @e[type=marker,tag=AW.Marker.SummonPoint,distance=..100] run tp 0-0-0-0-0 ^ ^ ^ ~ 0

# 演出のためにランダムな方向を向かせる
execute store result entity 0-0-0-0-0 Rotation[0] float 0.01 run random value 0..36000

# 魔導書召喚上限
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=#lib:living,tag=Enemy,tag=!Enemy.Boss,distance=..25]
scoreboard players set $AW.Book Temporary 0
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=399},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=400},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=401},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=402},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary

# 魔導書召喚
execute if score $AW.Temp Temporary matches ..25 at 0-0-0-0-0 positioned ^ ^ ^10 run function asset:mob/0392.ecual_first/ai/general/9.summon_book
execute if score $AW.Book Temporary matches ..12 at 0-0-0-0-0 positioned ^ ^ ^10 run function asset:mob/0392.ecual_first/ai/general/9.summon_book

# Makerを戻してあげる
execute in overworld run tp 0-0-0-0-0 0.0 0.0 0.0

# スコアリセット
scoreboard players reset $AW.Temp Temporary
scoreboard players reset $AW.Book Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,33 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/4_0_summon_book/

#> ScoreHolder
# @private
#declare score_holder $AW.Book

# Markerを呼び出す
execute at @e[type=marker,tag=AW.Marker.SummonPoint,distance=..100] run tp 0-0-0-0-0 ^ ^ ^ ~ 0

# 演出のためにランダムな方向を向かせる
execute store result entity 0-0-0-0-0 Rotation[0] float 0.01 run random value 0..36000

# 魔導書召喚上限
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=#lib:living,tag=Enemy,tag=!Enemy.Boss,distance=..25]
scoreboard players set $AW.Book Temporary 0
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=399},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=400},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=401},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary
execute at 0-0-0-0-0 store result score $AW.Temp Temporary if entity @e[type=wither_skeleton,scores={MobID=402},distance=..35]
scoreboard players operation $AW.Book Temporary += $AW.Temp Temporary

# 魔導書召喚
execute if score $AW.Temp Temporary matches ..15 at 0-0-0-0-0 positioned ^ ^ ^10 run function asset:mob/0392.ecual_first/ai/general/9.summon_book
execute if score $AW.Book Temporary matches ..8 at 0-0-0-0-0 positioned ^ ^ ^10 run function asset:mob/0392.ecual_first/ai/general/9.summon_book

# Makerを戻してあげる
execute in overworld run tp 0-0-0-0-0 0.0 0.0 0.0

# スコアリセット
scoreboard players reset $AW.Temp Temporary
scoreboard players reset $AW.Book Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ particle end_rod ^-1.0 ^0.0 ^0.0 ^-1.0 ^1000000000.0 ^0.0 0.00000000030 0 force
particle end_rod ^-0.5 ^0.0 ^0.866 ^-0.5 ^1000000000.0 ^0.866 0.00000000030 0 force @a[distance=..32]

# 魔導書分岐
execute store result score $AW.Temp Temporary run random value 1..5
execute if score $AW.Temp Temporary matches 1..5 run data modify storage api: Argument.ID set value 257
# execute if score $AW.Temp Temporary matches 2 run data modify storage api: Argument.ID set value 363
# execute if score $AW.Temp Temporary matches 3 run data modify storage api: Argument.ID set value 369
# execute if score $AW.Temp Temporary matches 4 run data modify storage api: Argument.ID set value 371
# execute if score $AW.Temp Temporary matches 5 run data modify storage api: Argument.ID set value 373
execute store result score $AW.Temp Temporary run random value 1..4
execute if score $AW.Temp Temporary matches 1 run data modify storage api: Argument.ID set value 399
execute if score $AW.Temp Temporary matches 2 run data modify storage api: Argument.ID set value 400
execute if score $AW.Temp Temporary matches 3 run data modify storage api: Argument.ID set value 401
execute if score $AW.Temp Temporary matches 4 run data modify storage api: Argument.ID set value 402
function api:mob/summon

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

# スコア初期化
scoreboard players set @s AW.AnimationTick 0
scoreboard players set @s AW.AnimationNum 30
scoreboard players set @s AW.AnimationNum 40
scoreboard players set @s AW.FalterCount 0

# animated javaモデル召喚
Expand Down

0 comments on commit 0147ac2

Please sign in to comment.