Puzzdra::DungeonSimulator start 2014-07-24 22:01:51 +0900
パーティ:
稲田の女神・クシナダヒメ
道明守の玄武・メイメイ
天道の皇祖神・イザナギ
神魔の執行者・メタトロン
夜刻武神・ツクヨミ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 最低3ドロップ保証付き陣 | |
# ex. @data["to"] = [0,1,2,3,4] # 火〜闇 | |
lambda do |drops| | |
new_colors = @data["to"] * 3 | |
new_colors += (30 - new_colors.size).times.map do | |
@data["to"].sample | |
end | |
new_colors.shuffle! | |
drops.each.with_index do |d, i| | |
d.color = new_colors[i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drop = Struct.new(:color, :reinforced) | |
drops = 30.times.map { Drop.new rand(6), false } | |
drops.each_slice(6) { |d| p d.map(&:color) } | |
puts (0..5).map { |i| [i, drops.count { |d| d.color == i }].join(": ") }.join(", ") | |
# => | |
# [2, 5, 0, 4, 4, 4] | |
# [0, 3, 4, 3, 3, 5] | |
# [0, 2, 5, 5, 4, 2] | |
# [0, 2, 3, 3, 1, 5] | |
# [3, 2, 5, 5, 1, 2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TRY_COUNT = 10000 | |
SKILL_UP_PROB = 0.25 | |
p TRY_COUNT.times.inject(0) { |sum, _| | |
skill_lvs = [1, 1, 1] | |
size = skill_lvs.size | |
times = 0 | |
sum += loop do | |
times += 1 | |
skill_lvs[rand size] += 1 if rand < SKILL_UP_PROB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "./puzzdra_field" | |
field = PuzzdraField.new( | |
%w/100001 | |
100001 | |
100001 | |
110011 | |
011110/.map { |s| s.split(//) }, | |
combo_mode: :traditional, | |
) |
-
何これ
- A列車で行こう3Dのコンストラクションモードで作ったユーザシナリオ
-
シナリオコンセプト
- 現実の地形を用いる
- 標高データが公開されているのでデータは用意しやすい
- 現実の地形を用いる
-
酷い地形でも現実の地形なら許される気がする
OlderNewer