2015年9月26日土曜日

【コマンドブロック】スプラトゥーンコマンド公開(1)床の処理(コピペOK!)【マインクラフト】

一番最初に床処理について書きます。
ここで登場するontimeのスコアが他の処理にも関わってくるためです。
/executeから始まるコマブロはすべてクロック実行させてください。

用意するスコア
ontimeというプレイヤーの時間を記録するスコアを制作します。
特定の床に居る時だけ処理を行う床を使うために使います。

処理を実行しない時のスコア
赤・青チームともに白い羊毛に乗っている時はスコア0をセットし続けます。
スコアが0の時赤チーム床上処理と青チーム床上処理は動きません。

赤チーム床上処理
赤チームが青チームの羊毛の上にいる時処理を行うのですが、絶妙なタイミングを指定しています。
@a[team=red,score_ontime_min=20] の部分は床に1秒乗ってから発動することを指定しています。
そのとき/effect以下を実行します。
実際につくってみると、敵の床に乗っている時即時ダメージ、ウィザー、盲目、移動速度低下をうけます。
自分のチームの色にのっていると即時回復と再生速度を付与します。

この即時回復と再生速度の余力で敵の床に乗っても即死することはありません。
ただ、ウィザーでHPが確認しづらくなるため難しいです。


青チームはその逆の処理ですです。
赤床ならダメージ系、青床なら回復系をそれぞれ処理します。


なお、赤青といっていますが、ただしくはwool 1(オレンジ)とwool 2(赤紫)です。
白はwool 0の羊毛を指しています。


<!--

床上処理

-!>
用意するスコア
/scoreboard objectives add ontime stat.playOneMinute

#処理を実行しない時
/execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 0 /scoreboard players set @a[r=1,c=1] ontime 0
/execute @a[team=red] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 /scoreboard players set @a[team=red,r=1,c=1] ontime 0
/execute @a[team=blue] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 2 /scoreboard players set @a[team=blue,r=1,c=1] ontime 0


#赤チーム床上処理
#赤チーム。敵陣即時ダメージ、ウィザー、盲目、移動速度低下
/execute @a[team=red,score_ontime_min=20] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 2 /effect @a[team=red,r=1,c=1] minecraft:instant_damage 1 0
/execute @a[team=red,score_ontime_min=20] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 2 /effect @a[team=red,r=1,c=1] minecraft:wither 2 100
/execute @a[team=red,score_ontime_min=20] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 2 /effect @a[team=red,c=1,r=1] minecraft:blindness 2 0
/execute @a[team=red,score_ontime_min=5] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 2 /effect @a[team=red,c=1,r=1] minecraft:slowness 1 2

#赤チーム。自陣即時回復、再生速度
/execute @a[team=red,score_ontime_min=0] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 /effect @a[team=red,r=1,c=1] minecraft:instant_health 1 0 true
/execute @a[team=red,score_ontime_min=0] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 /effect @a[team=red,r=1,c=1] minecraft:regeneration 2 100 true


#青チーム床上処理
#青チーム。敵陣即時ダメージ、ウィザー、盲目、移動速度低下
/execute @a[team=blue,score_ontime_min=20] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 /effect @a[team=blue,r=1,c=1] minecraft:instant_damage 1 0
/execute @a[team=blue,score_ontime_min=20] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 /effect @a[team=blue,r=1,c=1] minecraft:wither 2 100
/execute @a[team=blue,score_ontime_min=20] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 /effect @a[team=blue,c=1,r=1] minecraft:blindness 2 0
/execute @a[team=blue,score_ontime_min=5] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 /effect @a[team=blue,c=1,r=1] minecraft:slowness 1 2

#青チーム。自陣即時回復、再生速度
/execute @a[team=blue,score_ontime_min=0] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 2 /effect @e[team=blue,r=1,c=1] minecraft:instant_health 1 0 true
/execute @a[team=blue,score_ontime_min=0] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 2 /effect @e[team=blue,r=1,c=1] minecraft:regeneration 2 100 true





にほんブログ村 ゲームブログ Minecraftへ

0 件のコメント:

フィード