About

呼び出し元 毎tick実行するコマンド群10

狩人のスキルの1つであるニフラムトラップを実行する。

コマンド群

初期実行部コマンド群

位置 (-1920,15,-166)

No. コマンド 状態
1 /execute @a[score_ActivatedSkill_min=3070,score_ActivatedSkill=3079] ~ ~ ~ /execute @e[r=6,tag=TrapPoint,c=1] ~ ~ ~ /summon Arrow ~ ~ ~ {Silent:true,damage:0d,life:800s,Tags:[FlyingObject,TypeChecked],Passengers:[{id:AreaEffectCloud,Radius:5f,RadiusOnUse:0f,DurationOnUse:0f,Duration:400,RadiusPerTick:0f,WaitTime:0,Age:0,Particle:witchMagic,CustomName:”☠”,CustomNameVisible:true,Tags:[Poof,TypeChecked]}]}  
2 /clone -1920 ~2 ~ -1920 ~2 ~ -1920 ~2 ~ filtered force minecraft:command_block 5 ###ニフラムトラップ処理起動 条件付き

ニフラムクロック部コマンド群

位置 (-1920,17,-166)

No. コマンド 状態
1 /execute @r[type=AreaEffectCloud,tag=Poof,c=3] ~ ~ ~ /playsound block.fire.ambient master @a[r=16] ~ ~ ~ 0.5 2 0  
2 /execute @r[type=AreaEffectCloud,tag=Poof,c=3] ~ ~ ~ /particle witchMagic ~ ~ ~ 5 0.1 5 0.1 10 force 条件付き
3 /execute @r[type=AreaEffectCloud,tag=Poof,c=1] ~ ~ ~ /scoreboard players tag @r[r=5,type=!Player,tag=Poofable,c=3] add PoofCheck 条件付き
4 /scoreboard players tag @e[tag=PoofCheck] remove Poofable 条件付き
5 /clone -1920 ~-1 ~ -1920 ~-1 ~ -1920 ~-1 ~ filtered force minecraft:command_block 5 ###ニフラム判定&適用 条件付き
6 /scoreboard players test #EntityCount Global 1 *  
7 /clone -1920 ~ ~ -1920 ~ ~ -1920 ~ ~ filtered force minecraft:command_block 5 ###ループ 条件付き

No.1のコマンドブロックについて

No.1のコマンドブロックには以下のタグが付与されている。

CommandStats:{AffectedEntitiesObjective:"Global",AffectedEntitiesName:"#EntityCount"}

ニフラム適用部コマンド群

位置 (-1920,16,-166)

No. コマンド 状態
1 /scoreboard players tag @e[tag=PoofCheck] remove PoofCheck {ArmorItems:[{Count:1b}]}  
2 /scoreboard players tag @e[tag=PoofCheck] remove PoofCheck {ArmorItems:[{Count:0b}]}  
3 /entitydata @e[tag=PoofCheck] {:,ArmorItems:[{},{},{id:minecraft:wooden_button,Count:0b,Damage:0s,tag:{AttributeModifiers:[{Name:”Poof”,AttributeName:”generic.maxHealth”,Operation:0,Amount:-300d,UUIDMost:9007L,UUIDLeast:9007L}]}}]}  
4 /entitydata @e[tag=PoofCheck] {:} 条件付き
5 /scoreboard players tag @e[tag=PoofCheck] remove PoofCheck 条件付き

詳細

初期実行部

  1. ActivatedSkillが3070 ~ 3079であるすべてのプレイヤーから半径6m以内の1つのTrapPointに、ニフラムトラップポイント(Poofを持つ)を召喚
  2. ニフラムクロック部を実行

ニフラムクロック部

  1. Poofを持つニフラムトラップポイントが存在するとき、以下の事柄を実行
    1. Poofを持つニフラムトラップポイントをランダムに3体選び、それらから半径16m以内のすべてのプレイヤーに、効果音を鳴らす
    2. a.で実行できたPoofを持ったエンティティ数を#EntityCountGlobalに代入
    3. Poofを持つニフラムトラップポイントをランダムに3体選び、その座標上にパーティクルを表示
    4. Poofを持つニフラムトラップポイントをランダムに1体選び、そこからさらに半径5m以内Poofableを持つエンティティをランダムに3体選び、PoofCheckを付与
    5. PoofCheckを持つすべてのエンティティから、Poofableを削除
    6. ニフラム適用部を実行
  2. #EntityCountGlobalが1以上であるとき、ニフラムクロック部を再び実行

ニフラム適用部

  1. PoofCheckを持ち、装備のスタック数が1もしくは0(装備をしていないということではない)であるエンティティから、PoofCheckを削除
  2. PoofCheckを持つすべてのエンティティに、最大体力を300減らすニフラム用ボタンを胴に装備させる
  3. PoofCheckを持つすべてのエンティティのタグを読み込み、ニフラム用ボタンの効果を適用させ、キルする
  4. PoofCheckを持つすべてのエンティティからPoofCheckを削除

ニフラムトラップポイント

/summon Arrow ~ ~ ~ {Silent:true,damage:0d,life:800s,Tags:[FlyingObject,TypeChecked],Passengers:[{id:AreaEffectCloud,Radius:5f,RadiusOnUse:0f,DurationOnUse:0f,Duration:400,RadiusPerTick:0f,WaitTime:0,Age:0,Particle:witchMagic,CustomName:"☠",CustomNameVisible:true,Tags:[Poof,TypeChecked]}]}
Name (None)
Type Arrow
Tags FlyingObject, TypeChecked
life 800 (20秒後に消滅)
  • Passengers
Name
Type AEC
Tags Poof,TypeChecked
Duration 400 (20sec)