About

位置 (-1920,4,-177)

呼び出し元 初期化処理, 村人像

分岐先 MP不足演出, スキル設定変更

スニークによる範囲化可能なスキルの処理(MPコストを3倍するなど)、空腹時の実行スキルの消費MPの5倍処理、エナジーセーブの処理、MP不足時の処理などを行う。

コマンド群

No. コマンド 状態 コメント
1 /testfor @a[score_ActivatedSkill_min=1,score_Sneaking_min=1,c=1]   範囲化可能スキル判定
2 /fill ~1 ~-1 ~ ~13 ~-1 ~ minecraft:redstone_block 0 replace minecraft:lapis_block 0 条件付き  
3 /scoreboard players tag @a[score_ActivatedSkill_min=1000,score_ActivatedSkill=1009,score_Sneaking_min=1] add Sneaking 動力が必要  
4 /scoreboard players tag @a[score_ActivatedSkill_min=1020,score_ActivatedSkill=1029,score_Sneaking_min=1] add Sneaking 動力が必要  
5 /scoreboard players tag @a[score_ActivatedSkill_min=2020,score_ActivatedSkill=2029,score_Sneaking_min=1] add Sneaking 動力が必要  
6 /scoreboard players tag @a[score_ActivatedSkill_min=2060,score_ActivatedSkill=2069,score_Sneaking_min=1] add Sneaking 動力が必要  
7 /scoreboard players tag @a[score_ActivatedSkill_min=3040,score_ActivatedSkill=3049,score_Sneaking_min=1] add Sneaking 動力が必要  
8 /scoreboard players tag @a[score_ActivatedSkill_min=3060,score_ActivatedSkill=3069,score_Sneaking_min=1] add Sneaking 動力が必要  
9 /scoreboard players tag @a[score_ActivatedSkill_min=4000,score_ActivatedSkill=4009,score_Sneaking_min=1] add Sneaking 動力が必要  
10 /scoreboard players tag @a[score_ActivatedSkill_min=4200,score_ActivatedSkill=4209,score_Sneaking_min=1] add Sneaking 動力が必要  
11 /scoreboard players tag @a[score_ActivatedSkill_min=5040,score_ActivatedSkill=5049,score_Sneaking_min=1] add Sneaking 動力が必要  
12 /scoreboard players tag @a[score_ActivatedSkill_min=5080,score_ActivatedSkill=5089,score_Sneaking_min=1] add Sneaking 動力が必要  
13 /scoreboard players tag @a[score_ActivatedSkill_min=6020,score_ActivatedSkill=6029,score_Sneaking_min=1] add Sneaking 動力が必要  
14 /scoreboard players tag @a[score_ActivatedSkill_min=6200,score_ActivatedSkill=6209,score_Sneaking_min=1] add Sneaking 動力が必要  
15 /fill ~-12 ~-1 ~ ~ ~-1 ~ minecraft:lapis_block 0 replace minecraft:redstone_block 0 動力が必要  
16 /scoreboard players operation @a[tag=Sneaking] MPConsumption *= #3 Const 条件付き  
17 /scoreboard players set @a[score_Sneaking_min=1] Sneaking 0    
18 /scoreboard players tag @a[score_MPConsumption_min=1] add CostPenalty {ActiveEffects:[{Id:17b}]}   空腹時倍化処理
19 /scoreboard players operation @a[tag=CostPenalty] MPConsumption *= #5 Const 条件付き  
20 /scoreboard players tag @a[tag=CostPenalty] remove CostPenalty 条件付き  
21 /scoreboard players operation @a[score_MPConsumption_min=0,tag=EnergySave] MPConsumption /= #2 Const   エナジーセーブ EnergySave
22 /tellraw @a[score_MPConsumption_min=0,tag=EnergySave] {“text”:”エナジーセーブの効果が切れた。”,”color”:”gold”} 条件付き  
23 /scoreboard players tag @a[score_MPConsumption_min=0,tag=EnergySave] remove EnergySave 条件付き  
24 /execute @a[score_ActivatedSkill_min=0,score_MPConsumption_min=1] ~ ~ ~ /scoreboard players operation @a[c=1] MP -= @a[c=1] MPConsumption   MP消費計算
25 /scoreboard players tag @a[score_MP=-1] add LackOfMP 条件付き  
26 /clone -1920 8 ~ -1920 8 ~ -1920 8 ~ filtered force minecraft:command_block 5 ###MP不足演出予約 条件付き  
27 /scoreboard players set @a[score_MP=-1] ActivatedSkill 0 条件付き  
28 /execute @a[score_MP=-1] ~ ~ ~ /scoreboard players operation @a[c=1] MP += @a[c=1] MPConsumption 条件付き  
29 /execute @a[score_ActivatedSkill_min=0,score_MPConsumption_min=1,score_MPMaxFlag_min=1] ~ ~ ~ /scoreboard players operation @a[c=1] CoolTickCounter = @a[c=1] CoolTickSpan    
30 /scoreboard players set @a[score_ActivatedSkill_min=0,score_MPConsumption_min=1,score_MPMaxFlag_min=1] MPMaxFlag 0 条件付き  
31 /execute @a[score_InstantChangeA_min=0,c=1] ~ ~ ~ /scoreboard players set #ReserveShowSkill Global 2   スキル変更 Mode/Instant Change A/B
32 /execute @a[score_InstantChangeB_min=0,c=1] ~ ~ ~ /scoreboard players set #ReserveShowSkill Global 2    
33 /execute @a[score_ModeChangeA_min=0,c=1] ~ ~ ~ /scoreboard players set #ReserveShowSkill Global 2    
34 /execute @a[score_ModeChangeB_min=0,c=1] ~ ~ ~ /scoreboard players set #ReserveShowSkill Global 2    
35 /scoreboard players test #ReserveShowSkill Global 2 *    
36 /clone -1920 10 ~-1 -1920 16 ~ -1920 10 ~-1 filtered force minecraft:command_block 5 ###スキル変更 条件付き  

詳細

  1. ActivatedSkillが1以上であり、Sneaking(スコア)が1以上であるプレイヤーが存在するとき、以下の事柄を実行
    1. No.3 ~ No.15のコマンドブロックを実行可能状態に変更
    2. ActivatedSkill範囲化可能スキル一覧の範囲にあるすべてのプレイヤーにSneaking(タグ)を付与
    3. No.3 ~ No.15のコマンドブロックを実行不可能状態に変更
    4. Sneaking(タグ)を持つすべてのプレイヤーMPConsumptionを3倍する
  2. Sneaking(スコア)が1以上であるすべてのプレイヤーのSneakingを0に設定
  3. MPConsumptionが1以上であり、空腹エフェクトを付与されているすべてのプレイヤーにCostPenaltyを付与し、以下の事柄を実行
    1. CostPenaltyを持つすべてのプレイヤーのMPConsumptionを5倍する
    2. CostPenaltyを持つすべてのプレイヤーからCostPenaltyを削除
  4. MPConsumptionが0以上であり、EnergySaveを持つすべてのプレイヤーのMPConsumptionを二分の一倍し、以下の事柄を実行
    1. MPConsumptionが0以上であり、EnergySaveを持つすべてのプレイヤーに「エナジーセーブの効果が切れた。」とのメッセージを表示
    2. MPConsumptionが0以上であり、EnergySaveを持つすべてのプレイヤーからEnergySaveを削除
  5. ActivatedSkillが0以上であり、MPConsumptionが1以上であるすべてのプレイヤーのMPからMPConsumptionの値を引き、以下の事柄を実行
    • MPが-1以下であるすべてのプレイヤーにLackOfMPを付与し、以下の事柄を実行
      1. (-1920,8,-177)にあるMP不足演出を実行
      2. MPが-1以下であるプレイヤーのActivatedSkillを0に設定
      3. MPが-1以下であるプレイヤーのMPMPConxumptionを足し合わせる
  6. ActivatedSkillが0以上、MPConsumptionが1以上、そしてMPMaxFlagが1以上であるすべてのプレイヤーのCoolTickCounterCoolTickSpanを代入し、MPMaxFlagを0に設定
  7. 以下の条件を1つでも満たすプレイヤーが存在するとき、#ReserveShowSkillGlobalを2に設定
    • InstantChangeAが0以上
    • InstantChangeBが0以上
    • ModeChangeAが0以上
    • ModeChangeBが0以上
  8. #ReserveShowSkillGlobalが2以上であるとき、(-1920,10,-177) ~ (-1920,16,-178)にあるスキル設定変更を実行

範囲化可能スキル一覧

ActivatedSkill
1000 ~ 1009
1020 ~ 1029
2020 ~ 2029
2060 ~ 2069
3040 ~ 3049
3060 ~ 3069
4000 ~ 4009
4200 ~ 4209
5040 ~ 5049
5080 ~ 5089
6020 ~ 6029
6200 ~ 6209