Skip to content

Commit

Permalink
#311 カブシスの買値範囲と売値乱数を変更
Browse files Browse the repository at this point in the history
  • Loading branch information
NePonpon committed Apr 25, 2024
1 parent b831c43 commit b532305
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ scoreboard players remove _ Random 1

execute store result score _ _ run data get storage mob_data: StockVillager.Recipe.buy.Count
scoreboard players operation _ _ += _ Random
execute if score _ _ matches ..6 run scoreboard players set _ _ 6
execute if score _ _ matches 10.. run scoreboard players set _ _ 10
execute if score _ _ matches ..6 run scoreboard players set _ _ 7
execute if score _ _ matches 12.. run scoreboard players set _ _ 11
#tellraw @a ["次の売値: ",{"score":{"name":"_","objective":"_"}}]
execute store result storage mob_data: StockVillager.Recipe.buy.Count byte 1 run scoreboard players get _ _
#execute store result storage mob_data: StockVillager.Recipe.maxUses int 1 run scoreboard players get _ _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ execute if score # _ matches 0 run scoreboard players operation # _ = # Calc
#tellraw @a ["影響値: ",{"score":{"name":"#","objective":"_"}}]

# 変動値を求める
# 基本は -12 ~ 1
# 基本は -10 ~ 1
execute store result score _ Random run function calc:random
scoreboard players set _ _ 14
scoreboard players set _ _ 12
scoreboard players operation _ Random %= _ _
scoreboard players remove _ Random 12
scoreboard players remove _ Random 10

#tellraw @a ["乱数: ",{"score":{"name":"_","objective":"Random"}}]

Expand Down

0 comments on commit b532305

Please sign in to comment.