Skip to content

Commit 89355be

Browse files
committed
…あー、完成?
1 parent 0b18de8 commit 89355be

File tree

15 files changed

+210
-0
lines changed

15 files changed

+210
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#> asset:mob/0423.edge_mage/attack/
2+
#
3+
# Mobの攻撃時の処理
4+
#
5+
# @within function asset:mob/alias/423/attack
6+
7+
# バニラの攻撃じゃなかったら return
8+
execute unless data storage asset:context Attack{IsVanilla:true} run return fail
9+
10+
# 乱数を取る
11+
execute store result score @s Temporary run random value 0..2
12+
13+
# 共通の演出
14+
playsound minecraft:item.trident.throw hostile @a ~ ~ ~ 1 1.2
15+
playsound minecraft:entity.witch.throw hostile @a ~ ~ ~ 1 0.5
16+
17+
# 攻撃
18+
# ダメージ量
19+
data modify storage lib: Argument.Damage set value 40.0f
20+
# 第一属性
21+
data modify storage lib: Argument.AttackType set value "Magic"
22+
# 第二属性を設定したり演出変えたり
23+
execute if score @s Temporary matches 0 at @p[tag=Victim,distance=..8] run function asset:mob/0423.edge_mage/attack/fire
24+
execute if score @s Temporary matches 1 at @p[tag=Victim,distance=..8] run function asset:mob/0423.edge_mage/attack/water
25+
execute if score @s Temporary matches 2 at @p[tag=Victim,distance=..8] run function asset:mob/0423.edge_mage/attack/thunder
26+
# 補正functionを実行
27+
function lib:damage/modifier
28+
# ダメージを与える
29+
execute as @p[tag=Victim,distance=..8] at @s run function lib:damage/
30+
# リセット
31+
function lib:damage/reset
32+
33+
# リセット
34+
scoreboard players reset @s Temporary
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#> asset:mob/0423.edge_mage/attack/fire
2+
#
3+
#
4+
#
5+
# @within function asset:mob/0423.edge_mage/attack/
6+
7+
# 属性セット
8+
data modify storage lib: Argument.ElementType set value "Fire"
9+
10+
# 演出
11+
particle minecraft:flame ~ ~1 ~ 0.3 0.5 0.3 0.01 10
12+
particle minecraft:dust 1 0.5 0 1 ~ ~1 ~ 0.2 0.5 0.2 0.01 20
13+
playsound minecraft:entity.blaze.shoot hostile @a ~ ~ ~ 1 1.5
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#> asset:mob/0423.edge_mage/attack/thunder
2+
#
3+
#
4+
#
5+
# @within function asset:mob/0423.edge_mage/attack/
6+
7+
# 属性セット
8+
data modify storage lib: Argument.ElementType set value "Thunder"
9+
10+
# 演出
11+
particle minecraft:electric_spark ~ ~1 ~ 0.1 0.5 0.1 1 10
12+
particle minecraft:dust 1 1 0.25 1 ~ ~1 ~ 0.2 0.5 0.2 0.01 20
13+
playsound minecraft:entity.firework_rocket.twinkle hostile @a ~ ~ ~ 1 1.5
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#> asset:mob/0423.edge_mage/attack/water
2+
#
3+
#
4+
#
5+
# @within function asset:mob/0423.edge_mage/attack/
6+
7+
# 属性セット
8+
data modify storage lib: Argument.ElementType set value "Water"
9+
10+
# 演出
11+
particle minecraft:bubble_pop ~ ~1 ~ 0.3 0.5 0.3 0.01 10
12+
particle minecraft:dust 0 0.5 1 1 ~ ~1 ~ 0.2 0.5 0.2 0.01 20
13+
playsound minecraft:entity.generic.swim hostile @a ~ ~ ~ 1 0.7
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#> asset:mob/0423.edge_mage/death/
2+
#
3+
# Mobの死亡時の処理
4+
#
5+
# @within function asset:mob/alias/423/death
6+
7+
# 演出
8+
playsound minecraft:entity.vex.ambient hostile @a ~ ~ ~ 1 0.7
9+
playsound minecraft:entity.phantom.hurt hostile @a ~ ~ ~ 1 0.5
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#> asset:mob/0423.edge_mage/hurt/
2+
#
3+
# Mobのダメージ時の処理
4+
#
5+
# @within function asset:mob/alias/423/hurt
6+
7+
# サウンド
8+
playsound minecraft:entity.vex.hurt hostile @a ~ ~ ~ 1 0.5
9+
playsound minecraft:entity.vex.hurt hostile @a ~ ~ ~ 1 0.7
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#> asset:mob/0423.edge_mage/register
2+
#
3+
# Mobのデータを指定
4+
#
5+
# @within function asset:mob/alias/423/register
6+
7+
# 他のモブに継承されることを許可するか (boolean) (オプション)
8+
# data modify storage asset:mob ExtendsSafe set value
9+
# 継承されることを前提とした、抽象的なモブであるかどうか(boolean)
10+
data modify storage asset:mob IsAbstract set value false
11+
# ID (int)
12+
data modify storage asset:mob ID set value 423
13+
# Type (string) Wikiを参照
14+
data modify storage asset:mob Type set value "Enemy"
15+
# 干渉可能か否か (boolean)
16+
data modify storage asset:mob Interferable set value true
17+
# 名前 (TextComponentString) (オプション)
18+
data modify storage asset:mob Name set value '{"text":"エッジメイジ","color":"white"}'
19+
# Mobの説明文 (TextComponentString[]) (オプション)
20+
data modify storage asset:mob Lore set value ['{"text":"魔力を込めた剣で斬りかかってくる、メイジ一派の前線役。","color":"white"}','{"text":"一応魔法使いなので、魔法攻撃には耐性があるが、物理攻撃には弱い。","color":"white"}']
21+
# 武器
22+
# メインハンド (Compound(Item)) (オプション)
23+
data modify storage asset:mob Weapon.Mainhand set value {id:"minecraft:stick",Count:1b,tag:{CustomModelData:57,Enchantments:[{id:"minecraft:knockback",lvl:1s}]}}
24+
# オフハンド (Compound(Item)) (オプション)
25+
# data modify storage asset:mob Weapon.Offhand set value
26+
# 武器ドロップ率 ([float, float]) (オプション)
27+
# data modify storage asset:mob WeaponDropChances set value
28+
# 防具
29+
# 頭 (Compound(Item)) (オプション)
30+
data modify storage asset:mob Armor.Head set value {id:"minecraft:stick",Count:1b,tag:{CustomModelData:20067}}
31+
# 胴 (Compound(Item)) (オプション)
32+
data modify storage asset:mob Armor.Chest set value {id:"minecraft:iron_chestplate",Count:1b}
33+
# 防具ドロップ率 ([float, float]) (オプション)
34+
# data modify storage asset:mob ArmorDropChances set value
35+
# 体力 (double) (オプション)
36+
data modify storage asset:mob Health set value 3200
37+
# 攻撃力 (double) (オプション)
38+
# data modify storage asset:mob AttackDamage set value 1d
39+
# 防御力 (double) (オプション) // 被ダメージがある程度大きい場合1ptにつき0.8%カット、小さい場合1ptにつき約4%カット 20pt以上は頭打ち
40+
data modify storage asset:mob Defense set value -3
41+
# 移動速度 (double) (オプション)
42+
data modify storage asset:mob Speed set value 0.25d
43+
# 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る
44+
# 物理倍率 (float) (オプション)
45+
data modify storage asset:mob Resist.Physical set value 1.2
46+
# 魔法倍率 (float) (オプション)
47+
data modify storage asset:mob Resist.Magic set value 0.5
48+
# 火倍率 (float) (オプション)
49+
data modify storage asset:mob Resist.Fire set value 1
50+
# 水倍率 (float) (オプション)
51+
data modify storage asset:mob Resist.Water set value 1
52+
# 雷倍率 (float) (オプション)
53+
data modify storage asset:mob Resist.Thunder set value 1
54+
# フィールド
55+
# data modify storage asset:mob Field.myValue set value
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/0423.edge_mage/summon/
2+
#
3+
# Object召喚処理の呼び出し時に実行されるfunction
4+
#
5+
# @within asset:mob/alias/423/summon
6+
7+
# 元となるEntityを召喚する
8+
summon zombie ~ ~ ~ {Tags:["MobInit","AlwaysInvisible"],Silent:1b,DeathLootTable:"minecraft:empty"}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/0423.edge_mage/tick/
2+
#
3+
# Mobのtick時の処理
4+
#
5+
# @within asset:mob/alias/423/tick
6+
7+
# パーティクル
8+
particle minecraft:falling_dust iron_block ~ ~1 ~ 0.1 0 0.1 0 1
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/alias/423/attack
2+
#
3+
# Mobの攻撃時の処理のエイリアス
4+
#
5+
# @within asset_manager:mob/triggers/attack/attack.m
6+
7+
# 本来の処理を呼び出す
8+
function asset:mob/0423.edge_mage/attack/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/alias/423/death
2+
#
3+
# Mobの死亡時の処理のエイリアス
4+
#
5+
# @within asset_manager:mob/triggers/death/death.m
6+
7+
# 本来の処理を呼び出す
8+
function asset:mob/0423.edge_mage/death/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/alias/423/hurt
2+
#
3+
# Mobのダメージ時の処理のエイリアス
4+
#
5+
# @within asset_manager:mob/triggers/hurt/hurt.m
6+
7+
# 本来の処理を呼び出す
8+
function asset:mob/0423.edge_mage/hurt/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/alias/423/register
2+
#
3+
# Mobのデータ指定処理のエイリアス
4+
#
5+
# @within asset_manager:mob/triggers/summon/register.m
6+
7+
# 元の登録処理を呼び出す
8+
function asset:mob/0423.edge_mage/register
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/alias/423/summon
2+
#
3+
# Mob召喚処理のエイリアス
4+
#
5+
# @within asset_manager:mob/triggers/summon/summon.m
6+
7+
# 本来の処理を呼び出す
8+
function asset:mob/0423.edge_mage/summon/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:mob/alias/423/tick
2+
#
3+
# Tick時処理のエイリアス
4+
#
5+
# @within asset_manager:mob/triggers/tick/tick.m
6+
7+
# 元のTick処理を呼び出す
8+
function asset:mob/0423.edge_mage/tick/

0 commit comments

Comments
 (0)