2015年10月1日木曜日

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

シューターの処理は面倒です。
雪球にscoreを与えて、その雪球がblockに近づくと色がつく仕様です。
同時に一度使うと足元のblockを塗ります。
色々説明が面倒なので知りたい方がいたら説明したいと思います。



<シューター>(26)
弾の準備(2)
/execute @a[team=red,score_usedsnowball_min=1,lm=1] ~ ~ ~ /scoreboard players set @e[type=Snowball,c=1] redball 1
/execute @a[team=blue,score_usedsnowball_min=1,lm=1] ~ ~ ~ /scoreboard players set @e[type=Snowball,c=1] blueball 1

射程(3)
/scoreboard players add @e[type=Snowball,score_redball_min=1,c=1] airball 1
/scoreboard players add @e[type=Snowball,score_blueball_min=1,c=1] airball 1
/kill @e[type=Snowball,score_airsnowball_min=6]

経験値0時の使用(1)
/execute @a[score_usedsnowball_min=1,lm=0] ~ ~ ~ /kill @e[type=Snowball,score_airsnowball_min=1,c=1,r=1]


通常攻撃の処理(7x2)
(赤)
/execute @a[team=red,score_usedball_min=1,lm=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 1 replace minecraft:wool
/execute @e[type=Snowball,score_redball_min=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 1 replace minecraft:wool
/execute @e[type=Snowball,score_redball_min=1] ~ ~ ~ detect ~1 ~ ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 1 replace minecraft:wool
/execute @e[type=Snowball,score_redball_min=1] ~ ~ ~ detect ~-1 ~ ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 1 replace minecraft:wool
/execute @e[type=Snowball,score_redball_min=1] ~ ~ ~ detect ~ ~ ~1 minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 1 replace minecraft:wool
/execute @e[type=Snowball,score_redball_min=1] ~ ~ ~ detect ~ ~ ~-1 minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 1 replace minecraft:wool
/execute @e[type=Snowball,score_redball_min=1] ~ ~ ~ detect ~ ~-.5 ~ minecraft:wool -1 effect @a[team=blue,r=2] minecraft:instant_damage 1 0

(青)
/execute @a[team=red,score_usedball_min=1,lm=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 2 replace minecraft:wool
/execute @e[type=Snowball,score_blueball_min=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 2 replace minecraft:wool
/execute @e[type=Snowball,score_blueball_min=1] ~ ~ ~ detect ~1 ~ ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 2 replace minecraft:wool
/execute @e[type=Snowball,score_blueball_min=1] ~ ~ ~ detect ~-1 ~ ~ minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 2 replace minecraft:wool
/execute @e[type=Snowball,score_blueball_min=1] ~ ~ ~ detect ~ ~ ~1 minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 2 replace minecraft:wool
/execute @e[type=Snowball,score_blueball_min=1] ~ ~ ~ detect ~ ~ ~-1 minecraft:wool -1 fill ~ ~-1 ~ ~ ~-1 ~ minecraft:wool 2 replace minecraft:wool
/execute @e[type=Snowball,score_blueball_min=1] ~ ~ ~ detect ~ ~-.5 ~ minecraft:wool -1 effect @a[team=red,r=2] minecraft:instant_damage 1 0

経験値の処理(2)
/execute @a[score_usedball_min=1,lm=1] ~ ~ ~ xp -1L @a[score_usedball_min=1]
/execute @a[score_usedball_min=1,lm=0] ~ ~ ~ /say インク残量不足

識別子シューター(shooterball)
/execute @a[score_redball=1] ~ ~ ~ /scoreboard players set @e[type=Snowball,c=1] shooterball 1
/execute @a[score_blueball=1] ~ ~ ~ /scoreboard players set @e[type=Snowball,c=1] shooterball 1

リセット(2)
/scoreboard players reset @a[score_Shooter=1,score_usedball_min=1] usedball
/scoreboard players reset @a[score_Shooter=1,score_controlball_min=16] controlball




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

2015年9月29日火曜日

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

弓を使った回数を記録するscoreboardが2つ必要です。
usedbowとcontrolbowです。前者は1回使うごとにリセットされ、後者は16回使ったらリセットされます。
後者のスコアはプレイヤーに弓を供給するためのスコアです。

処理内容は赤と青ごとに弓を使ったプレイヤーのスコアをカウントし、そのカウントと方角に応じた処理を行います。
弓は発射から一定時間で消える仕様です。地面にささっても時間経過で消えます。というか空中でも時間経過で消えます。
-5の記述は地面との距離です。地面から5ブロック下を塗ることが出来ます。壁を塗ることは出来ません。

チャージャー>(34)
矢の準備(8x2)
(赤・【北、南】redarrow1)
/execute @a[team=red,score_usedbow_min=1,score_direction_min=1,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 1
/execute @a[team=red,score_usedbow_min=1,score_direction_min=5,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 1

(赤・【東、西】redarrow2
/execute @a[team=red,score_usedbow_min=1,score_direction_min=3,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 2
/execute @a[team=red,score_usedbow_min=1,score_direction_min=7,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 2

(赤・【北東、北西、南東、南西】redarrow3
/execute @a[team=red,score_usedbow_min=1,score_direction_min=2,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 3
/execute @a[team=red,score_usedbow_min=1,score_direction_min=8,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 3
/execute @a[team=red,score_usedbow_min=1,score_direction_min=4,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 3
/execute @a[team=red,score_usedbow_min=1,score_direction_min=6,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] redarrow 3

(青・【北、南】bluearrow1)
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=1,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 1
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=5,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 1

(青・【東、西】bluearrow2
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=3,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 2
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=7,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 2

(青・【北東、北西、南東、南西】bluearrow3
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=2,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 3
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=8,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 3
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=4,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 3
/execute @a[team=blue,score_usedbow_min=1,score_direction_min=6,lm=1] ~ ~ ~ /scoreboard players set @e[type=Arrow,c=1,r=1] bluearrow 3


通常攻撃の処理(3x2)
【北1・南1】【東2・西2】【北東3、北西3、南東3、南西3】
(赤)
/execute @e[type=Arrow,score_redarrow_min=1] ~ ~ ~ fill ~ ~ ~ ~ ~-5 ~2 minecraft:wool 1 replace minecraft:wool
/execute @e[type=Arrow,score_redarrow_min=2] ~ ~ ~ fill ~ ~ ~ ~2 ~-5 ~ minecraft:wool 1 replace minecraft:wool
/execute @e[type=Arrow,score_redarrow_min=3] ~ ~ ~ fill ~ ~ ~ ~1 ~-5 ~1 minecraft:wool 1 replace minecraft:wool

【北1・南1】【東2・西2】【北東3、北西3、南東3、南西3】
(青)
/execute @e[type=Arrow,score_bluearrow_min=1] ~ ~ ~ fill ~ ~ ~ ~ ~-5 ~2 minecraft:wool 2 replace minecraft:wool
/execute @e[type=Arrow,score_bluearrow_min=2] ~ ~ ~ fill ~ ~ ~ ~2 ~-5 ~ minecraft:wool 2 replace minecraft:wool
/execute @e[type=Arrow,score_bluearrow_min=3] ~ ~ ~ fill ~ ~ ~ ~1 ~-5 ~1 minecraft:wool 2 replace minecraft:wool


射程再現【赤・青】(1+1+1)
/scoreboard players add @e[type=Arrow,score_redarrow_min=1] airarrow 1
/scoreboard players add @e[type=Arrow,score_bluearrow_min=1] airarrow 1
/kill @e[type=Arrow,score_airarrow_min=8]

経験値0の時の使用【共通】(1)
/execute @a[score_usedbow_min=1,lm=0] ~ ~ ~ /kill @e[type=Arrow,score_airarrow_min=1,c=1,r=1]

矢の補給【共通】(controlbow←弓矢を使った回数のスコア)(1)
/replaceitem entity @a[score_controlbow_min=16] slot.hotbar.5 minecraft:arrow 16 0 {display:{Name:"Charger"}}

経験値の処理【共通】(2)
/execute @a[score_usedbowball_min=1,lm=1] ~ ~ ~ /xp -11L @a[score_usedball_min=1]
/execute @a[score_usedbowball_min=1,lm=0] ~ ~ ~ /say インク残量不足

チャージャー識別子(chargerarrow)(2)
/scoreboard players set @e[type=Arrow,score_redarrow_min=1,c=1,r=1] chargerarrow 1
/scoreboard players set @e[type=Arrow,score_bluearrow_min=1,c=1,r=1] chargerarrow 1

リセット回路【共通】(2)
/scoreboard players reset @a[score_usedbow_min=1] usedbow
/scoreboard players reset @a[score_controlbow_min=16] controlbow





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

2015年9月28日月曜日

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

ローラーはジャンプ攻撃と通常攻撃があります。
ココには書きませんが、人参付きの棒で使った回数を記録するスコア(usedcarrotstick)をつくってください。
処理の内容は各方角と一致した時だけ処理を実行する内容です。
前々回使ったontimeスコアも登場します。ジャンプのタイミングを検知します。

リセット回路は回路とついていますが、タイミングをずらして実行してください。
過去記事にreset回路の一元化があるのでそちらを参照してください。

方位判定スコア(8)
北、北東、東、南東、南、南西、西、北西
1,2,3,4,5,6,7,8
scoreboard players set @a[rym=160,ry=-160] direction 1
scoreboard players set @a[rym=-155,ry=-115] direction 2
scoreboard players set @a[rym=-110,ry=-70] direction 3
scoreboard players set @a[rym=-65,ry=-25] direction 4
scoreboard players set @a[rym=-20,ry=20] direction 5
scoreboard players set @a[rym=25,ry=65] direction 6
scoreboard players set @a[rym=70,ry=110] direction 7
scoreboard players set @a[rym=115,ry=155] direction 8

ローラー>(24)
各方位処理(8x2)
(赤)
/execute @a[team=red,score_direction_min=1,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~ ~-1 ~-5 detect ~ ~-1 ~ minecraft:wool -1 fill ~2 ~5 ~1 ~-2 ~-1 ~0 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_direction_min=2,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~4 ~-1 ~-4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_direction_min=3,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~5 ~-1 ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~0 ~5 ~-2 ~1 ~-1 ~2 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_direction_min=4,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~4 ~-1 ~4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_direction_min=5,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~ ~-1 ~5 detect ~ ~-1 ~ minecraft:wool -1 fill ~2 ~5 ~1 ~-2 ~-1 ~0 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_direction_min=6,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~-4 ~-1 ~4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_direction_min=7,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~-5 ~-1 ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~0 ~5 ~-2 ~1 ~-1 ~2 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_direction_min=8,score_usedcarrotstick_min=1,lm=1] ~-4 ~-1 ~-4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 1 replace minecraft:wool

(青)
/execute @a[team=blue,score_direction_min=1,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~ ~-1 ~-5 detect ~ ~-1 ~ minecraft:wool -1 fill ~2 ~5 ~1 ~-2 ~-1 ~0 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_direction_min=2,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~4 ~-1 ~-4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_direction_min=3,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~5 ~-1 ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~0 ~5 ~-2 ~1 ~-1 ~2 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_direction_min=4,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~4 ~-1 ~4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_direction_min=5,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~ ~-1 ~5 detect ~ ~-1 ~ minecraft:wool -1 fill ~2 ~5 ~1 ~-2 ~-1 ~0 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_direction_min=6,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~-4 ~-1 ~4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_direction_min=7,score_usedcarrotstick_min=1,lm=1,score_ontime_min=2,score_ontime=6] ~-5 ~-1 ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~0 ~5 ~-2 ~1 ~-1 ~2 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_direction_min=8,score_usedcarrotstick_min=1,lm=1] ~-4 ~-1 ~-4 detect ~ ~-1 ~ minecraft:wool -1 fill ~-1 ~5 ~-1 ~1 ~-1 ~1 minecraft:wool 2 replace minecraft:wool
経験値処理(3):
(共通)
/xp -1L @a[score_usedcarrotstick_min=1]
/xp -3L @a[score_usedcarrotstick_min=1,score_ontime_min=2,score_ontime=6]
/execute @a[score_usedcarrotstick_min=1,lm=0] ~ ~ ~ /say インク残量不足 @a[score_usedcarrotstick_min=1,l=0]

通常攻撃処理(2x2)
(赤)
/execute @a[team=red,score_usedcarrotstick_min=1,lm=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~1 ~ ~1 ~-1 ~-1 ~-1 minecraft:wool 1 replace minecraft:wool
/execute @a[team=red,score_usedcarrotstick_min=1,lm=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1  /effect @a[team=blue,r=3] minecraft:instant_damage 1 0

(青)
/execute @a[team=blue,score_usedcarrotstick_min=1,lm=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1 fill ~1 ~ ~1 ~-1 ~-1 ~-1 minecraft:wool 2 replace minecraft:wool
/execute @a[team=blue,score_usedcarrotstick_min=1,lm=1] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool -1  /effect @a[team=red,r=3] minecraft:instant_damage 1 0

識別子:なし

リセット回路(1):
/scoreboard players reset @a usedcarrotstick
床上処理と併用箇所
/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


前: 【コマンドブロック】スプラトゥーンコマンド公開(2)イカモードの基本処理(コピペOK!)【マインクラフト】


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

2015年9月27日日曜日

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

/scoreboardと/executeどちらもすべてクロック実行で。
スロットがいずれかの時、値をセットするというものです。

たとえばホットスロットが0ならプレイヤーの一番左のスロットです。そのとき、値を1にします。
/scoreboard players set @a[team=red] redslot 1 {SelectedItemSlot:0}


イカモードになるのを手に何も持っていない時にすることも可能ですが、こちらのほうが安全です。
今回は左から3番めのスロットの時プレイヤーが透明になる処理(ここでいうイカモード)です。


ontimeのスコアについて(前記事床の処理に使ったスコア)
ontimeが最低0~1の時は味方色白色
ontimeが2以上の時は敵色床に乗っている時です。


イカモードを忠実に再現させたい場合はイカを連続テレポートさせたり、
アーマースタンドを駆使したりとそれだけで処理をたくさん使うことになります。
めんどうなので考えるのをやめました。


#各スロットと所属チームの識別
/scoreboard objectives add redslot dummy
/scoreboard objectives add blueslot dummy

/scoreboard players set @a[team=red] redslot 1 {SelectedItemSlot:0}
/scoreboard players set @a[team=red] redslot 2 {SelectedItemSlot:1}
/scoreboard players set @a[team=red] redslot 3 {SelectedItemSlot:2}
/scoreboard players set @a[team=red] redslot 4 {SelectedItemSlot:3}
/scoreboard players set @a[team=red] redslot 5 {SelectedItemSlot:4}
/scoreboard players set @a[team=red] redslot 6 {SelectedItemSlot:5}
/scoreboard players set @a[team=red] redslot 7 {SelectedItemSlot:6}
/scoreboard players set @a[team=red] redslot 8 {SelectedItemSlot:7}
/scoreboard players set @a[team=red] redslot 9 {SelectedItemSlot:8}

/scoreboard players set @a[team=blue] blueslot 1 {SelectedItemSlot:0}
/scoreboard players set @a[team=blue] blueslot 2 {SelectedItemSlot:1}
/scoreboard players set @a[team=blue] blueslot 3 {SelectedItemSlot:2}
/scoreboard players set @a[team=blue] blueslot 4 {SelectedItemSlot:3}
/scoreboard players set @a[team=blue] blueslot 5 {SelectedItemSlot:4}
/scoreboard players set @a[team=blue] blueslot 6 {SelectedItemSlot:5}
/scoreboard players set @a[team=blue] blueslot 7 {SelectedItemSlot:6}
/scoreboard players set @a[team=blue] blueslot 8 {SelectedItemSlot:7}
/scoreboard players set @a[team=blue] blueslot 9 {SelectedItemSlot:8}

イカモードの処理
/execute @a[score_redslot_min=3,score_ontime_min=0,score_ontime=1] ~ ~ ~ /effect @a[team=blue,r=1,c=1] minecraft:invisibility 1 0
/execute @a[score_blueslot_min=3,score_ontime_min=0,score_ontime=1]~ ~ ~ /effect @a[team=red,r=1,c=1] minecraft:invisibility 1 0


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

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

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へ

【コマンドブロック】スプラトゥーン制作日記(9)TRPGが面白そうで、失踪しそうなのでその前に! 今後の方針について【マインクラフト】

コマンドブロックだけでスプラトゥーンを作っていく日記




はい、最近TRPGにはまってきて完全にマイクラから遠のいています。
コマブロより面白いであろうTRPGを見つけてしまったのが最大の要因です。

このままだとスプラが完成する前に失踪するのは間違いないので・・・。

スプラの作り方をどんどん公開していこうとおもいます
この記事を見つけた誰かがきっと完成させてくれると思います。

コードもすべて貼り付けるので、ほとんどコピペすれば良いと思いますが、それと合わせてコマンドの解説も行います。



前:【コマンドブロック】スプラトゥーン制作日記(8)バリアの再現がかなり悩ましい【マインクラフト】


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

2015年9月24日木曜日

【コマンドブロック】スプラトゥーン制作日記(8)バリアの再現がかなり悩ましい【マインクラフト】

コマンドブロックだけでスプラトゥーンを作っていく日記




バリアを作るのがかなり悩ましいです。
私が現在作っているスプラトゥーンのダメージは即時ダメージを付与するものがほとんどです。
なので、このバリアというのは即時ダメージや暗黙、ウィザーをクリアし、即時回復させつづけるものです。
これが3~5秒間付与されるものを想定しています。

早い話が無敵なのではなく、弱体化無効・超回復っていうことですね。

いまさっき面倒だなと思っていたローラーのジャンプ攻撃処理に即時ダメージをいれないことにしたのを確認したので。
やってやれないことが今わかりました。
タイトル書いてる時は「あー、ローラーの即時ダメージと塩梅どうしよう」と思っていたのが嘘のようにやる気です。

バリアのおすそ分けも再現する予定です。
明日にでも組もうかなぁ。ここ3日ほどほんの少し忙しいです。



前:【コマンドブロック】スプラトゥーン制作日記(7)スプラッシュボム。遅延1秒の再現【マインクラフト】

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

フィード