查看: 1035|回复: 2

[已经过期] 有没有挖墙这样的脚本?

[复制链接]
梦石
0
星屑
2039
在线时间
659 小时
注册时间
2014-2-15
回帖
60
发表于 2017-12-16 20:17:01 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 资深萝莉控 于 2017-12-17 11:58 编辑
  1. #==============================================================================
  2. # ■ DungeonRect
  3. #==============================================================================
  4. class DungeonRect
  5.   #--------------------------------------------------------------------------
  6.   # ● 公開インスタンス変数
  7.   #--------------------------------------------------------------------------
  8.   attr_reader   :room                     # 部屋
  9.   attr_accessor :lx                       # 矩形の左上x座標
  10.   attr_accessor :ly                       # 矩形の左上y座標
  11.   attr_accessor :hx                       # 矩形の右上x座標
  12.   attr_accessor :hy                       # 矩形の右上y座標
  13.   attr_accessor :done_split_h             # 横分割完了フラグ
  14.   attr_accessor :done_split_v             # 縦分割完了フラグ
  15.   #--------------------------------------------------------------------------
  16.   # ● オブジェクト初期化
  17.   #--------------------------------------------------------------------------
  18.   def initialize(lx, ly, hx, hy)   
  19.     @lx = lx
  20.     @ly = ly
  21.     @hx = hx
  22.     @hy = hy
  23.     @done_split_h = false
  24.     @done_split_v = false
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 部屋の作成
  28.   #--------------------------------------------------------------------------
  29.   def add_room(lx, ly, hx, hy)
  30.     @room = DungeonRoom.new(lx, ly, hx, hy)
  31.   end
  32. end

  33. #==============================================================================
  34. # ■ DungeonRoom
  35. #==============================================================================
  36. class DungeonRoom
  37.   #--------------------------------------------------------------------------
  38.   # ● 公開インスタンス変数
  39.   #--------------------------------------------------------------------------
  40.   attr_accessor :lx                       # 部屋の左上x座標
  41.   attr_accessor :ly                       # 部屋の左上y座標
  42.   attr_accessor :hx                       # 部屋の右上x座標
  43.   attr_accessor :hy                       # 部屋の右上y座標
  44.   attr_accessor :discover                 # 部屋に入ったことがあるかどうか
  45.   #--------------------------------------------------------------------------
  46.   # ● オブジェクト初期化
  47.   #--------------------------------------------------------------------------
  48.   def initialize(lx, ly, hx, hy)
  49.     @lx = lx
  50.     @ly = ly
  51.     @hx = hx
  52.     @hy = hy
  53.     @discover = false
  54.   end
  55. end

  56. #==============================================================================
  57. # ■ Game_Dungeon
  58. #==============================================================================
  59. class Game_Dungeon
  60.   #--------------------------------------------------------------------------
  61.   # ● 公開インスタンス変数
  62.   #--------------------------------------------------------------------------
  63.   attr_reader   :rects                    # 区画情報
  64.   attr_reader   :room_table               # 部屋&踏破情報テーブル
  65.   attr_reader   :curse_rate               # 装備以外の道具が呪われている確率
  66.   attr_reader   :sleep_rate               # モンスターが眠っている確率
  67.   attr_reader   :drop_rate                # モンスターの共通アイテムドロップ率
  68.   attr_reader   :floor_w                  # 余白を含まないフロアの幅
  69.   attr_reader   :floor_h                  # 余白を含まないフロアの高さ
  70.   attr_reader   :floor_bgm                # フロアのBGM
  71.   attr_reader   :floor_bgs                # フロアのBGS
  72.   attr_reader   :floor_house_bgm          # フロアのモンスターハウスBGM
  73.   attr_reader   :floor_shop_bgm           # フロアのお店BGM
  74.   attr_reader   :floor_thief_bgm          # フロアの泥棒BGM
  75.   attr_reader   :floor_shop               # お店の部屋ID
  76.   attr_reader   :floor_house              # モンスターハウスの部屋ID
  77.   attr_reader   :floor_shop_guard         # 番犬ID
  78.   #--------------------------------------------------------------------------
  79.   # ○ ランダムダンジョンの生成
  80.   #--------------------------------------------------------------------------
  81.   def create_dungeon
  82.     set_dungeon_params(@floor_id)
  83.     @map = RPG::Map.new(@floor_w + 16, @floor_h + 12)
  84.     if @many_room   # 部屋数最大フロアなら部屋サイズを計算
  85.       n = @floor_w / @rect_min
  86.       @many_rect_w = @rect_min + (@floor_w % @rect_min) / n
  87.       n = @floor_h / @rect_min
  88.       @many_rect_h = @rect_min + (@floor_h % @rect_min) / n
  89.     end
  90.     for x in 0...@map.width
  91.       for y in 0...@map.height
  92.         @map.data[x, y, 0] = @tile[2]
  93.       end
  94.     end
  95.     @rects = []
  96.     @couples = []
  97.     @grounds = []
  98.     @room_table = Table.new(@map.width, @map.height, 2)  # 部屋判定テーブルの作成
  99.     @rects.push(DungeonRect.new(8, 6, @map.width - 9, @map.height - 7))
  100.     split_rect(@rects[0])
  101.     i = 0
  102.     for rect in @rects        # 部屋の生成
  103.       if @many_room           # 部屋数が最大になるようにする
  104.         w = @many_rect_w - @room_margin * 2 - 1
  105.         h = @many_rect_h - @room_margin * 2 - 1
  106.         x = rect.lx + @room_margin
  107.         y = rect.ly + @room_margin
  108.       else
  109.         if rand(100) < @max_room_rate or @rects.size == 1 # 最高サイズ
  110.           w = rect.hx - rect.lx - @room_margin * 2
  111.           h = rect.hy - rect.ly - @room_margin * 2
  112.         else                                              # ランダム
  113.           w = rand((rect.hx - rect.lx - @room_margin * 2 + 1) - @room_min) + @room_min
  114.           h = rand((rect.hy - rect.ly - @room_margin * 2 + 1) - @room_min) + @room_min
  115.         end
  116.         x = rand(rect.hx - rect.lx - w - @room_margin * 2 + 1) + (rect.lx + @room_margin)
  117.         y = rand(rect.hy - rect.ly - h - @room_margin * 2 + 1) + (rect.ly + @room_margin)
  118.       end
  119.       rect.add_room(x, y, x + w, y + h)
  120.       set_ground(x, y, x + w, y + h)
  121.     end
  122.     couple_more     # 分割線を増やす
  123.     for couple in @couples    # 通路の生成
  124.       if couple[0] == 0     # 横分割の場合
  125.         x1 = couple[1].hx
  126.         y1 = rand(couple[1].room.hy - (couple[1].room.ly + 1)) + (couple[1].room.ly + 1)
  127.         x2 = couple[2].lx
  128.         y2 = rand(couple[2].room.hy - (couple[2].room.ly + 1)) + (couple[2].room.ly + 1)
  129.         next if @map.data[x1 - 1, y1 - 1, 0] == @tile[0]
  130.         next if @map.data[x1 - 1, y1 + 1, 0] == @tile[0]
  131.         next if @map.data[x2 + 1, y2 - 1, 0] == @tile[0]
  132.         next if @map.data[x2 + 1, y2 + 1, 0] == @tile[0]
  133.         set_ground(x1, y1, x2, y2)
  134.         set_ground(couple[1].room.hx, y1, x1, y1)
  135.         set_ground(couple[2].room.lx, y2, x2, y2)
  136.       else                  # 縦分割の場合
  137.         x1 = rand(couple[1].room.hx - (couple[1].room.lx + 1)) + (couple[1].room.lx + 1)
  138.         y1 = couple[1].hy
  139.         x2 = rand(couple[2].room.hx - (couple[2].room.lx + 1)) + (couple[2].room.lx + 1)
  140.         y2 = couple[2].ly
  141.         next if @map.data[x1 - 1, y1 - 1, 0] == @tile[0]
  142.         next if @map.data[x1 + 1, y1 - 1, 0] == @tile[0]
  143.         next if @map.data[x2 - 1, y2 + 1, 0] == @tile[0]
  144.         next if @map.data[x2 + 1, y2 + 1, 0] == @tile[0]
  145.         set_ground(x1, y1, x2, y2)
  146.         set_ground(x1, couple[1].room.hy, x1, y1)
  147.         set_ground(x2, couple[2].room.ly, x2, y2)
  148.       end
  149.     end
  150.     set_wall    # 壁のセット
  151.     for rect in @rects
  152.       for x in rect.room.lx..rect.room.hx
  153.         for y in rect.room.ly..rect.room.hy
  154.           @room_table[x, y, 0] = @room_table[x, y, 0] | 2 # 部屋フラグをセット
  155.           @map.data[x, y, 0] = @tile[1] if rand(32) == 0  # 別タイルを混ぜる
  156.         end
  157.       end
  158.     end
  159.     for i in 0...@rects.size
  160.       rect = @rects[i]
  161.       for x in rect.room.lx - 1..rect.room.hx + 1
  162.         for y in rect.room.ly - 1..rect.room.hy + 1
  163.           @room_table[x, y, 1] = i + 1    # 部屋IDをセット
  164.         end
  165.       end
  166.     end
  167.     set_shop    # お店の作成
  168.     set_house   # モンスターハウスの作成
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ○ ダンジョンパラメータのセット
  172.   #--------------------------------------------------------------------------
  173.   def set_dungeon_params(floor_id)
  174.     set_dungeon_params(DUNG::DG_BASE[floor_id]) if DUNG::DG_BASE[floor_id] != nil
  175.     if DUNG::DG_SIZE[floor_id] != nil
  176.       @floor_w = DUNG::DG_SIZE[floor_id][0]
  177.       @floor_h = DUNG::DG_SIZE[floor_id][1]
  178.     end
  179.     @room_min = DUNG::DG_ROOM_MIN[floor_id] if DUNG::DG_ROOM_MIN[floor_id] != nil
  180.     @room_margin = [DUNG::DG_ROOM_MARGIN[floor_id], 2].max if DUNG::DG_ROOM_MARGIN[floor_id] != nil
  181.     @rect_min = @room_min + @room_margin * 2
  182.     @nosplit_rate = DUNG::DG_NOSPLIT_RATE[floor_id] if DUNG::DG_NOSPLIT_RATE[floor_id] != nil
  183.     @add_couple_rate = DUNG::DG_ADD_COUPLE_RATE[floor_id] if DUNG::DG_ADD_COUPLE_RATE[floor_id] != nil
  184.     @many_room = (rand(100) < DUNG::DG_MANY_ROOM_RATE[floor_id]) if DUNG::DG_MANY_ROOM_RATE[floor_id] != nil
  185.     @max_room_rate = DUNG::DG_MAX_ROOM_RATE[floor_id] if DUNG::DG_MAX_ROOM_RATE[floor_id] != nil
  186.     if DUNG::DG_TILE[floor_id] != nil
  187.       @tile = [ DUNG::DG_TILE[floor_id][0],
  188.                 DUNG::DG_TILE[floor_id][0] + 64 - (DUNG::DG_TILE[floor_id][0] - 1552) / 16 * 8,
  189.                 DUNG::DG_TILE[floor_id][1], DUNG::DG_TILE[floor_id][1] + 394,
  190.                 DUNG::DG_TILE[floor_id][2], DUNG::DG_TILE[floor_id][3] ]
  191.     end
  192.     @curse_rate = DUNG::DG_CURSE_RATE[floor_id] if DUNG::DG_CURSE_RATE[floor_id] != nil
  193.     @sleep_rate = DUNG::DG_SLEEP_RATE[floor_id] if DUNG::DG_SLEEP_RATE[floor_id] != nil
  194.     @drop_rate = DUNG::DG_DROP_RATE[floor_id] if DUNG::DG_DROP_RATE[floor_id] != nil
  195.     @floor_bgm = DUNG::DG_BGM[floor_id] if DUNG::DG_BGM[floor_id] != nil
  196.    
  197.    # p "bbb"
  198.    
  199.     @floor_bgs = DUNG::DG_BGS[floor_id] if DUNG::DG_BGS[floor_id] != nil
  200.     @floor_house_bgm = DUNG::DG_HOUSE_BGM[floor_id] if DUNG::DG_HOUSE_BGM[floor_id] != nil
  201.     @floor_shop_bgm = DUNG::DG_SHOP_BGM[floor_id] if DUNG::DG_SHOP_BGM[floor_id] != nil
  202.     @floor_thief_bgm = DUNG::DG_THIEF_BGM[floor_id] if DUNG::DG_THIEF_BGM[floor_id] != nil
  203.     @floor_weather = DUNG::DG_WEATHER[floor_id] if DUNG::DG_WEATHER[floor_id] != nil
  204.     @floor_monster_num = DUNG::DG_MONSTER_NUM[floor_id] if DUNG::DG_MONSTER_NUM[floor_id] != nil
  205.     @floor_monster_max = DUNG::DG_MONSTER_MAX[floor_id] if DUNG::DG_MONSTER_MAX[floor_id] != nil

  206.    
  207.    # p floor_id
  208.    
  209.     @floor_monster_table = DUNG::DG_MONSTER_TABLE[floor_id] if DUNG::DG_MONSTER_TABLE[floor_id] != nil
  210.     @floor_item_max = DUNG::DG_ITEM_MAX[floor_id] if DUNG::DG_ITEM_MAX[floor_id] != nil
  211.     @floor_item_table = DUNG::DG_ITEM_TABLE[floor_id] if DUNG::DG_ITEM_TABLE[floor_id] != nil
  212.     @floor_gold_rate = DUNG::DG_GOLD_RATE[floor_id] if DUNG::DG_GOLD_RATE[floor_id] != nil
  213.     @floor_trap_max = DUNG::DG_TRAP_MAX[floor_id] if DUNG::DG_TRAP_MAX[floor_id] != nil
  214.     @floor_trap_num = DUNG::DG_TRAP_NUM[floor_id] if DUNG::DG_TRAP_NUM[floor_id] != nil
  215.     @floor_trap_table = DUNG::DG_TRAP_TABLE[floor_id] if DUNG::DG_TRAP_TABLE[floor_id] != nil
  216.     @floor_repop_turn = DUNG::DG_REPOP_TURN[floor_id] if DUNG::DG_REPOP_TURN[floor_id] != nil
  217.     @floor_repop_rate = DUNG::DG_REPOP_RATE[floor_id] if DUNG::DG_REPOP_RATE[floor_id] != nil
  218.     @floor_shop_rate = DUNG::DG_SHOP_RATE[floor_id] if DUNG::DG_SHOP_RATE[floor_id] != nil
  219.     @floor_shop_keeper = DUNG::DG_SHOP_KEEPER[floor_id] if DUNG::DG_SHOP_KEEPER[floor_id] != nil
  220.     @floor_shop_guard = DUNG::DG_SHOP_GUARD[floor_id] if DUNG::DG_SHOP_GUARD[floor_id] != nil
  221.     @floor_house_rate = DUNG::DG_HOUSE_RATE[floor_id] if DUNG::DG_HOUSE_RATE[floor_id] != nil
  222.     @floor_house_monster_num = DUNG::DG_HOUSE_MONSTER_NUM[floor_id] if DUNG::DG_HOUSE_MONSTER_NUM[floor_id] != nil
  223.     @floor_house_item_num = DUNG::DG_HOUSE_ITEM_NUM[floor_id] if DUNG::DG_HOUSE_ITEM_NUM[floor_id] != nil
  224.     @floor_house_trap_num = DUNG::DG_HOUSE_TRAP_NUM[floor_id] if DUNG::DG_HOUSE_TRAP_NUM[floor_id] != nil
  225.   end
  226.   #--------------------------------------------------------------------------
  227.   # ○ ダンジョンの区分け
  228.   #--------------------------------------------------------------------------
  229.   def split_rect(parent_rect)
  230.     if rand(100) < @nosplit_rate and not @many_room
  231.       parent_rect.done_split_h = true
  232.       parent_rect.done_split_v = true
  233.     end
  234.     if parent_rect.hx - parent_rect.lx <= @rect_min * 2
  235.       parent_rect.done_split_h = true
  236.     end
  237.     if parent_rect.hy - parent_rect.ly <= @rect_min * 2
  238.       parent_rect.done_split_v = true
  239.     end
  240.     return if parent_rect.done_split_h and parent_rect.done_split_v
  241.     @rects.push(DungeonRect.new(parent_rect.lx, parent_rect.ly,
  242.     parent_rect.hx, parent_rect.hy))
  243.     if !parent_rect.done_split_h        # 横に分割
  244.       if @many_room                     # 部屋数が最大になるように分割する
  245.         split_x = parent_rect.lx + @many_rect_w
  246.       else                              # ランダム分割
  247.         split_x = rand((parent_rect.hx - @rect_min + 1) - (parent_rect.lx + @rect_min)) +
  248.         (parent_rect.lx + @rect_min)
  249.       end
  250.       parent_rect.hx = split_x
  251.       @rects[@rects.size - 1].lx = split_x
  252.       parent_rect.done_split_h = true
  253.       @couples.push([0, parent_rect, @rects[@rects.size - 1]])
  254.     elsif !parent_rect.done_split_v     # 縦に分割
  255.       if @many_room                     # 部屋数が最大になるように分割する
  256.         split_y = parent_rect.ly + @many_rect_h
  257.       else                              # ランダム分割
  258.         split_y = rand((parent_rect.hy - @rect_min + 1) - (parent_rect.ly + @rect_min)) +
  259.         (parent_rect.ly + @rect_min)
  260.       end
  261.       parent_rect.hy = split_y
  262.       @rects[@rects.size - 1].ly = split_y
  263.       parent_rect.done_split_v = true
  264.       @couples.push([1, parent_rect, @rects[@rects.size - 1]])
  265.     end
  266.     i = @rects.size - 1
  267.     split_rect(parent_rect)
  268.     split_rect(@rects[i])
  269.   end
  270.   #--------------------------------------------------------------------------
  271.   # ○ 指定した矩形範囲を床にする
  272.   #--------------------------------------------------------------------------
  273.   def set_ground(lx, ly, hx, hy)
  274.     if lx > hx
  275.       x1 = hx
  276.       x2 = lx
  277.     else
  278.       x1 = lx
  279.       x2 = hx
  280.     end
  281.     if ly > hy
  282.       y1 = hy
  283.       y2 = ly
  284.     else
  285.       y1 = ly
  286.       y2 = hy
  287.     end
  288.     for x in x1..x2
  289.       for y in y1..y2
  290.         @map.data[x, y, 0] = @tile[0]
  291.         @room_table[x, y, 0] = @room_table[x, y, 0] | 9 # 通行可能&斜めフラグをセット
  292.       end
  293.     end
  294.     @grounds.push(DungeonRoom.new(x1, y1, x2, y2))  # 床を記録する
  295.   end
  296.   #--------------------------------------------------------------------------
  297.   # ○ 壁のセット
  298.   #--------------------------------------------------------------------------
  299.   def set_wall
  300.     for rect in @grounds
  301.       y = rect.ly - 1
  302.       for x in rect.lx - 1..rect.hx + 1
  303.         set_special_wall(x, y)
  304.       end
  305.     end
  306.     for rect in @grounds       # 壁グラフィックのセット
  307.       for x in rect.lx - 1..rect.hx + 1
  308.         set_wall_graph(x, rect.ly - 1)
  309.         set_wall_graph(x, rect.ly - 2)
  310.         set_wall_graph(x, rect.hy + 1)
  311.       end
  312.       for y in rect.ly - 1..rect.hy + 1
  313.         set_wall_graph(rect.lx - 1, y)
  314.         set_wall_graph(rect.hx + 1, y)
  315.       end
  316.     end
  317.   end
  318.   #--------------------------------------------------------------------------
  319.   # ○ 特殊壁のセット
  320.   #--------------------------------------------------------------------------
  321.   def set_special_wall(x, y)
  322.     return if @room_table[x, y, 0] & 1 != 0
  323.     return if @room_table[x, y + 1, 0] & 1 == 0   # 下が通行不可能なら次へ
  324.     if same_tile?(x, y - 1, @tile[2])
  325.       @map.data[x, y, 0] = @tile[3]
  326.     else
  327.       @map.data[x, y, 0] = @tile[0]
  328.       @map.data[x, y, 2] = @tile[4]
  329.     end
  330.   end
  331.   #--------------------------------------------------------------------------
  332.   # ○ 壁グラフィックのセット
  333.   #--------------------------------------------------------------------------
  334.   def set_wall_graph(x, y)
  335.     if @map.data[x, y, 0] == @tile[2]   # 床タイプのオートタイル
  336.       n = 0
  337.       n += 1 unless same_tile?(x - 1, y, @tile[2])   # 左がない
  338.       n += 1 unless same_tile?(x + 1, y, @tile[2])   # 右がない
  339.       n += 1 unless same_tile?(x, y - 1, @tile[2])   # 上がない
  340.       n += 1 unless same_tile?(x, y + 1, @tile[2])   # 下がない
  341.       if n == 0
  342.         n += 1 unless same_tile?(x - 1, y - 1, @tile[2])
  343.         n += 2 unless same_tile?(x + 1, y - 1, @tile[2])
  344.         n += 4 unless same_tile?(x + 1, y + 1, @tile[2])
  345.         n += 8 unless same_tile?(x - 1, y + 1, @tile[2])
  346.       elsif n == 1
  347.         if !same_tile?(x - 1, y, @tile[2])      # 左がない
  348.           n = 16
  349.           n += 1 unless same_tile?(x + 1, y - 1, @tile[2])   # 右上がない
  350.           n += 2 unless same_tile?(x + 1, y + 1, @tile[2])   # 右下がない
  351.         elsif !same_tile?(x, y - 1, @tile[2])   # 上がない
  352.           n = 20
  353.           n += 1 unless same_tile?(x + 1, y + 1, @tile[2])   # 右下がない
  354.           n += 2 unless same_tile?(x - 1, y + 1, @tile[2])   # 左下がない
  355.         elsif !same_tile?(x + 1, y, @tile[2])   # 右がない
  356.           n = 24
  357.           n += 1 unless same_tile?(x - 1, y + 1, @tile[2])   # 左下がない
  358.           n += 2 unless same_tile?(x - 1, y - 1, @tile[2])   # 左上がない
  359.         else                                    # 下がない
  360.           n = 28
  361.           n += 1 unless same_tile?(x - 1, y - 1, @tile[2])   # 左上がない
  362.           n += 2 unless same_tile?(x + 1, y - 1, @tile[2])   # 右上がない
  363.         end
  364.       elsif n == 2
  365.         if !same_tile?(x - 1, y, @tile[2])
  366.           n = !same_tile?(x + 1, y, @tile[2]) ? 32 :
  367.               same_tile?(x, y - 1, @tile[2]) ? 40 : 34
  368.         else
  369.           n = same_tile?(x + 1, y, @tile[2]) ? 33 :
  370.               same_tile?(x, y - 1, @tile[2]) ? 38 : 36
  371.         end
  372.       elsif n == 3
  373.         n = same_tile?(x, y + 1, @tile[2]) ? 42 :
  374.             same_tile?(x + 1, y, @tile[2]) ? 43 :
  375.             same_tile?(x, y - 1, @tile[2]) ? 44 : 45
  376.       else
  377.         n = 46
  378.       end
  379.       @map.data[x, y, 0] += n
  380.     elsif @map.data[x, y, 0] == @tile[3]    # 壁タイプのオートタイル
  381.       if @map.data[x - 1, y, 0] == @tile[0] or
  382.          @map.data[x - 1, y, 0] == @tile[1]
  383.         @map.data[x, y, 0] += 1
  384.       end
  385.       if @map.data[x + 1, y, 0] == @tile[0] or
  386.          @map.data[x + 1, y, 0] == @tile[1]
  387.         @map.data[x, y, 0] += 4
  388.       end
  389.     end
  390.   end
  391.   #--------------------------------------------------------------------------
  392.   # ○ 指定座標にあるのが同じオートタイルかどうかを返す
  393.   #--------------------------------------------------------------------------
  394.   def same_tile?(x, y, id)
  395.     return true if y < 0      # 画面外なら同じタイルがあるとする
  396.     n = @map.data[x, y, 0]
  397.     return (n >= id and n < id + 48)
  398.   end
  399.   #--------------------------------------------------------------------------
  400.   # ○ 分割線を増やす
  401.   #--------------------------------------------------------------------------
  402.   def couple_more
  403.     rect_map = {}
  404.     for rect in @rects
  405.       for x in rect.lx...rect.hx
  406.         for y in rect.ly...rect.hy
  407.           rect_map[[x, y]] = rect if rect_map[[x, y]] == nil
  408.         end
  409.       end
  410.     end
  411.     for x in 8...@map.width - 10
  412.       for y in 6...@map.height - 8
  413.         if rect_map[[x, y]] != rect_map[[x + 1, y]]
  414.           if rand(100) < @add_couple_rate
  415.             @couples.push([0, rect_map[[x, y]], rect_map[[x + 1, y]]])
  416.           end
  417.         end
  418.         if rect_map[[x, y]] != rect_map[[x, y + 1]]
  419.           if rand(100) < @add_couple_rate
  420.             @couples.push([1, rect_map[[x, y]], rect_map[[x, y + 1]]])
  421.           end
  422.         end
  423.       end
  424.     end
  425.   end
  426.   #--------------------------------------------------------------------------
  427.   # ○ 指定した矩形の壁を壊す
  428.   #--------------------------------------------------------------------------
  429.   def delete_wall(lx, ly, hx, hy)
  430.     for x in lx..hx
  431.       for y in ly..hy
  432.         next unless valid?(x, y)                # 有効範囲外なら次へ
  433.         next if @room_table[x, y, 0] & 1 != 0   # 壁でなければ次へ
  434.         @map.data[x, y, 0] = @tile[0]
  435.         @map.data[x, y, 2] = 0
  436.         @room_table[x, y, 0] = @room_table[x, y, 0] | 9
  437.       end
  438.       set_special_wall(x, ly - 1)
  439.       set_special_wall(x, hy + 1)
  440.     end
  441.     for x in lx - 1..hx + 1
  442.       set_wall_graph(x, ly - 1)
  443.       set_wall_graph(x, ly - 2)
  444.       set_wall_graph(x, hy + 1)
  445.     end
  446.     for y in ly..hy
  447.       set_wall_graph(lx - 1, y)
  448.       set_wall_graph(hx + 1, y)
  449.     end
  450.   end
  451.   #--------------------------------------------------------------------------
  452.   # ○ すべての壁を壊す(大部屋)
  453.   #--------------------------------------------------------------------------
  454.   def delete_wall_all
  455.     @rects = []
  456.     @couples = []
  457.     @grounds = []
  458.     @rects.push(DungeonRect.new(8, 6, @map.width - 9, @map.height - 7))
  459.     @rects[0].add_room(8, 6, @map.width - 9, @map.height - 7)
  460.     set_ground(8, 6, @map.width - 9, @map.height - 7)
  461.     rect = @rects[0]
  462.     for x in rect.room.lx - 1..rect.room.hx + 1
  463.       for y in rect.room.ly - 1..rect.room.hy + 1
  464.         @room_table[x, y, 0] = @room_table[x, y, 0] | 2 # 部屋フラグを立てる
  465.         @room_table[x, y, 1] = 1            # 部屋IDをセット
  466.         @map.data[x, y, 2] = 0              # 特殊壁を削除
  467.       end
  468.     end
  469.     set_wall
  470.     if @floor_house >= 0      # モンスターハウス
  471.       @floor_house = 0
  472.       start_house unless house?
  473.     end
  474.     if @floor_shop >= 0       # お店
  475.       @floor_shop = 0
  476.       start_shop unless shop? or house?
  477.     end
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ○ お店の作成
  481.   #--------------------------------------------------------------------------
  482.   def set_shop
  483.     @floor_shop = -1
  484.     return if rand(100) >= @floor_shop_rate
  485.     return if @rects.size <= 2                 # 部屋数によって制限
  486.     for i in 0...@rects.size
  487.       room = @rects[i].room
  488.       next if room.hx - room.lx < 4 or room.hy - room.ly < 4  # 部屋サイズ制限
  489.       n = 0
  490.       for x in room.lx..room.hx
  491.         n += 1 if @room_table[x, room.ly - 1, 0] & 1 != 0
  492.         n += 1 if @room_table[x, room.hy + 1, 0] & 1 != 0
  493.       end
  494.       for y in room.ly..room.hy
  495.         n += 1 if @room_table[room.lx - 1, y, 0] & 1 != 0
  496.         n += 1 if @room_table[room.hx + 1, y, 0] & 1 != 0
  497.       end
  498.       next if n >= 2        # 通路が2本以上あればお店を作らない
  499.       @floor_shop = i       # お店の部屋ID
  500.       return
  501.     end
  502.   end
  503.   #--------------------------------------------------------------------------
  504.   # ○ モンスターハウスの作成
  505.   #--------------------------------------------------------------------------
  506.   def set_house
  507.     @floor_house = -1
  508.     return if rand(100) >= @floor_house_rate
  509.     if @rects.size == 1
  510.       i = 0
  511.     else
  512.       i = rand(@rects.size)
  513.       i = (i + 1) % @rects.size if i == @floor_shop       # お店は除外する
  514.     end
  515.     @floor_house = i
  516.   end
  517. end

复制代码
  1. #==============================================================================
  2. # ■ Scene_Dungeon
  3. #==============================================================================
  4. class Scene_Dungeon < Scene_Base
  5.   
  6.   #--------------------------------------------------------------------------
  7.   # ● アイテムの効果
  8.   #--------------------------------------------------------------------------
  9.   def effect_item(ditem, target, user = nil)
  10.     note = ditem.item.note
  11.     user = target if user == nil
  12.    
  13.    
  14.   #  p ditem
  15. #~         # 帰還★追加
  16. #~     if note =~ /<帰還>/i
  17. #~       p"帰還ー"
  18. #~       $scene = Scene_Map.new
  19. #~       $game_temp.map_bgm.play
  20. #~       $game_temp.map_bgs.play
  21. #~     end   
  22.    
  23.     # HP回復
  24.     if ditem.item.hp_recovery > 0
  25.       n = ditem.item.hp_recovery
  26.       target.battler.hp += n
  27.       $game_temp.heap_message.push(sprintf(Vocab::DgHpRecover, target.name, n))
  28.     end
  29.    
  30.     # ダメージ
  31.     if ditem.item.base_damage > 0
  32.       target.animation_id = DUNG::ANIME_DAMAGE    # ダメージアニメーション
  33.       wait_for_animation
  34.       target.battler.make_obj_damage_value(user.battler, ditem.item)
  35.       target.battler.execute_damage(user.battler)
  36.       if target.battler.hp_damage == 0
  37.         text = "\\C[6]%s\\C[0]はダメージを受けない。"
  38.         $game_temp.heap_message.push(sprintf(text, target.name))
  39.       else
  40.         text = Vocab::DgHpDamage
  41.         $game_temp.heap_message.push(sprintf(text,
  42.         target.name, target.battler.hp_damage))
  43.         target.dead(user) if target.battler.dead?     # 死亡処理
  44.       end
  45.       damage_player(user) if target.is_a?(Game_DungeonPlayer)
  46.     end

  47.     # 満腹度回復
  48.     if ditem.item.mp_recovery != 0
  49.       if target.is_a?(Game_DungeonPlayer)
  50.         $game_party.gain_energy(ditem.item.mp_recovery * 20)
  51.         if ditem.category == 80     # 食料の場合のメッセージ表示
  52.           if $game_party.energy_max?
  53.             $game_temp.heap_message.push(sprintf(Vocab::DgFoodMax, target.name))
  54.           else
  55.             $game_temp.heap_message.push(sprintf(Vocab::DgFood, target.name))
  56.           end
  57.         end
  58.       end
  59.     end
  60.    
  61.     # 最大HPの変化
  62.     if note =~ /<最大HP([\+\-\=])(\d+)>/i
  63.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  64.         maxhp = target.battler.maxhp
  65.         case $1
  66.         when '+'; target.battler.maxhp += $2.to_i
  67.         when '-'; target.battler.maxhp -= $2.to_i
  68.         when '='; target.battler.maxhp = $2.to_i
  69.         end
  70.         n = (target.battler.maxhp - maxhp).abs  # 最大HP変化量の絶対値
  71.         if target.battler.maxhp > maxhp       # 最大HPが上がった
  72.           $game_temp.heap_message.push(sprintf(
  73.           "\\C[6]%s\\C[0]の最大HPが\\C[4]%d\\C[0]上がった!", target.name, n))
  74.         elsif target.battler.maxhp < maxhp    # 最大HPが下がった
  75.           $game_temp.heap_message.push(sprintf(
  76.           "\\C[6]%s\\C[0]の最大HPが\\C[4]%d\\C[0]下がった。", target.name, n))
  77.         end
  78.       end
  79.     end

  80.     # レベルの変化
  81.     if note =~ /<レベル([\+\-\=])(\d+)>/i
  82.       if target.is_a?(Game_DungeonPlayer)     # プレイヤーの場合
  83.         level = target.battler.level
  84.         case $1
  85.         when '+'
  86.           target.battler.change_level(level + $2.to_i, false)
  87.         when '-'
  88.           n = [$2.to_i, level - 1].max        # 下げられるレベルを取得
  89.           target.battler.change_level(level - $2.to_i, false) if n > 0
  90.         when '='
  91.           target.battler.change_level($2.to_i, false)
  92.         end
  93.         if target.battler.level > level       # レベルが上がった
  94.           Sound.play_levelup
  95.           $game_temp.heap_message.push(sprintf(
  96.           Vocab::DgLevelup, target.name, target.battler.level))
  97.         elsif target.battler.level < level    # レベルが下がった
  98.           Sound.play_leveldown
  99.           n = level - target.battler.level
  100.           $game_temp.heap_message.push(sprintf(
  101.           Vocab::DgLeveldown, target.name, n))
  102.         end
  103.       else                                    # モンスターの場合
  104.         case $1
  105.         when '+'; target.levelup($2.to_i)
  106.         when '-'; target.leveldown($2.to_i)
  107.         end
  108.       end
  109.     end

  110.     # 最大満腹度の変化
  111.     if note =~ /<最大満腹度([\+\-\=])(\d+)>/i
  112.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  113.         maxenergy = $game_party.energy_max
  114.         case $1
  115.         when '+'; $game_party.gain_energy_max($2.to_i * 20)
  116.         when '-'; $game_party.gain_energy_max($2.to_i * -20)
  117.         when '='; $game_party.energy_max = $2.to_i * 20
  118.         end
  119.         n = (($game_party.energy_max - maxenergy) / 20).abs # 最大満腹度変化量の絶対値
  120.         if $game_party.energy_max > maxenergy       # 最大満腹度が上がった
  121.           $game_temp.heap_message.push(sprintf(
  122.           "\\C[6]%s\\C[0]の最大満腹度が\\C[4]%d\\C[0]上がった!", target.name, n))
  123.         elsif $game_party.energy_max < maxenergy    # 最大満腹度が下がった
  124.           $game_temp.heap_message.push(sprintf(
  125.           "\\C[6]%s\\C[0]の最大満腹度が\\C[4]%d\\C[0]%%下がった。", target.name, n))
  126.         end
  127.       end
  128.     end

  129.     # ちからの変化
  130.     if note =~ /<ちから([\+\-\=])(\d+)>/i
  131.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  132.         case $1
  133.         when '+'
  134.           $game_party.gain_power($2.to_i)
  135.           $game_temp.heap_message.push(sprintf(
  136.           "\\C[6]%s\\C[0]のちからが回復した。", target.name))
  137.         when '-'
  138.           $game_party.gain_power(-$2.to_i)
  139.           $game_temp.heap_message.push(sprintf(
  140.           "\\C[6]%s\\C[0]のちからが下がった。", target.name))
  141.         when '='
  142.           $game_party.power = $2.to_i
  143.           $game_temp.heap_message.push(sprintf(
  144.           "\\C[6]%s\\C[0]のちからが\\C[4]%d\\C[0]になった。", target.name, $2.to_i))
  145.         end
  146.       end
  147.     end

  148.     # 最大ちからの変化
  149.     if note =~ /<最大ちから([\+\-\=])(\d+)>/i
  150.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  151.         maxpower = $game_party.power_max
  152.         case $1
  153.         when '+'; $game_party.gain_power_max($2.to_i)
  154.         when '-'; $game_party.gain_power_max(-$2.to_i)
  155.         when '='; $game_party.power_max = $2.to_i
  156.         end
  157.         n = ($game_party.power_max - maxpower).abs  # 最大ちから変化量の絶対値
  158.         if $game_party.power_max > maxpower       # 最大ちからが上がった
  159.           $game_temp.heap_message.push(sprintf(
  160.           "\\C[6]%s\\C[0]の最大ちからが\\C[4]%d\\C[0]上がった!", target.name, n))
  161.         elsif $game_party.power_max < maxpower    # 最大ちからが下がった
  162.           $game_temp.heap_message.push(sprintf(
  163.           "\\C[6]%s\\C[0]の最大ちからが\\C[4]%d\\C[0]下がった。", target.name, n))
  164.         end
  165.       end
  166.     end

  167.     # めぐすり
  168.     if ditem.item.plus_state_set.include?(DUNG::STATE_GODSIGHT)
  169.       target.battler.add_state(DUNG::STATE_GODSIGHT)
  170.       if target.is_a?(Game_DungeonPlayer)     # 全ワナ発見(プレイヤー限定
  171.         for trap in $game_dungeon.traps do trap.discover end
  172.         $game_temp.heap_message.push(sprintf(
  173.         "\\C[6]%s\\C[0]はものがよく見えるようになった。", target.name))
  174.       end
  175.     end

  176.     # 鈍足、狂戦士、無敵、混乱、深い眠り、倍速、くちなし、パワーアップ、かなしばり
  177.     for id in [DUNG::STATE_SLOW, DUNG::STATE_BERSERK, DUNG::STATE_UNDEAD,
  178.                DUNG::STATE_CONFUSE, DUNG::STATE_DSLEEP, DUNG::STATE_FAST,
  179.                DUNG::STATE_SILENT, DUNG::STATE_POWERUP, DUNG::STATE_STOP]
  180.       if ditem.item.plus_state_set.include?(id)
  181.         target.battler.add_state(id)
  182.         state = $data_states[id]
  183.         $game_temp.heap_message.push(sprintf(state.message1, target.name))
  184.       end
  185.     end
  186.    
  187.     # 爆睡
  188.     if ditem.item.plus_state_set.include?(DUNG::STATE_HDSLEEP)
  189.       target.battler.add_state(DUNG::STATE_HDSLEEP)
  190.       target.battler.add_state(DUNG::STATE_FAST)
  191.       $game_temp.heap_message.push(sprintf(
  192.       "\\C[6]%s\\C[0]は深い眠りについた。", target.name))
  193.     end

  194.     # 迷子
  195.     if note =~ /<迷子>/i
  196.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  197.         $game_dungeon.reset_map
  198.         @map_window.refresh_ground
  199.         $game_temp.refresh_map = true
  200.         @map_window.update
  201.         $game_temp.heap_message.push(sprintf(
  202.         "\\C[6]%s\\C[0]はマップを忘れてしまった。", target.name))
  203.       end
  204.     end

  205.     # 松明
  206.     if note =~ /<松明>/i
  207.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  208.         $game_dungeon.change_floor_state(8, true) # フロアの松明効果をオン
  209.         $game_dungeon.complete_map            # 地図を完成させる
  210.         @map_window.refresh_ground
  211.         $game_temp.refresh_map = true
  212.         $game_temp.heap_message.push("フロア全体が明るくなった。")
  213.       end
  214.     end

  215.     # 拾えず
  216.     if note =~ /<拾えず>/i
  217.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  218.         $game_dungeon.change_floor_state(16, true) # フロアの拾えず効果をオン
  219.         $game_temp.heap_message.push(sprintf(
  220.         "\\C[6]%s\\C[0]はアイテムが拾えなくなった。", target.name))
  221.       end
  222.     end

  223.     # 大部屋
  224.     if note =~ /<大部屋>/i
  225.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  226.         $game_dungeon.delete_wall_all
  227.         $game_dungeon.draw_map($game_dplayer.x, $game_dplayer.y)
  228.         @map_window.refresh_ground
  229.         $game_temp.refresh_map = true
  230.         $game_temp.refresh_light = true
  231.         $game_temp.heap_message.push("フロアの壁がすべて崩れた。")
  232.       end
  233.     end

  234.     # 大爆発 or 爆発
  235.     if note =~ /<大爆発>/i or note =~ /<爆発>/i
  236.       $game_dungeon.delete_wall(target.x - 1, target.y - 1,   # 周囲の壁破壊
  237.       target.x + 1, target.y + 1)
  238.       for monster in $game_dplayer.beside_characters(false)
  239.         monster.dead unless monster.is_a?(Game_DungeonPlayer) # 隣接キャラ消滅
  240.       end
  241.       for x in target.x - 1..target.x + 1
  242.         for y in target.y - 1..target.y + 1
  243.           item = $game_dungeon.item_xy(x, y)
  244.           item.erase if item != nil                 # 隣接アイテムを消滅させる
  245.         end
  246.       end
  247.       if target.is_a?(Game_DungeonPlayer)                     # プレイヤー限定
  248.         $game_dungeon.draw_map($game_dplayer.x, $game_dplayer.y)
  249.         $game_temp.refresh_map = true
  250.         if note =~ /<大爆発>/i
  251.           target.battler.hp = 1                               # HPを1にする
  252.         else
  253.           target.battler.hp /= 2                              # HPを半分にする
  254.         end
  255.       else
  256.         target.dead
  257.       end
  258.     end

  259.     # 盾強化
  260.     if note =~ /<盾強化>/i
  261.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  262.         armor = $game_party.darmor
  263.         if armor == nil
  264.           $game_temp.heap_message.push("防具を装備していなかった。")
  265.         else
  266.           if rand(100) < 10       # 低確率で+3
  267.             $game_temp.heap_message.push(sprintf(
  268.             "ラッキー! %sが大幅に強化された。", armor.name))
  269.             armor.gain_plus(3)
  270.           else
  271.             $game_temp.heap_message.push(sprintf(
  272.             "%sが強化された。", armor.name))
  273.             armor.gain_plus(1)
  274.           end
  275.         end
  276.       end
  277.       
  278.   #━━━━━盾 表示更新━━━━━━━━━━━━━━━━━━━━
  279. $win2 = nil #盾
  280. GC.start

  281. $soubi_kousin = true
  282. #━━━━━━━━━━━━━━━━━━━━━━━━━        
  283.       
  284.       
  285.       
  286.       
  287.       
  288.     end

  289.     # 剣強化
  290.     if note =~ /<剣強化>/i
  291.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  292.         weapon = $game_party.dweapon
  293.         if weapon == nil
  294.           $game_temp.heap_message.push("武器を装備していなかった。")
  295.         else
  296.           if rand(100) < 10       # 低確率で+3
  297.             $game_temp.heap_message.push(sprintf(
  298.             "ラッキー! %sが大幅に強化された。", weapon.name))
  299.             weapon.gain_plus(3)
  300.           else
  301.             $game_temp.heap_message.push(sprintf(
  302.             "%sが強化された。", weapon.name))
  303.             weapon.gain_plus(1)
  304.           end
  305.         end
  306.       end
  307.       
  308. #━━━━━武器 表示更新━━━━━━━━━━━━━━━━━━━━
  309.     $win = nil
  310.     GC.start
  311. $soubi_kousin = true
  312. #━━━━━━━━━━━━━━━━━━━━━━━━━      
  313.       
  314.       
  315.       
  316.       
  317.       
  318.       
  319.       
  320.       
  321.       
  322.       
  323.       
  324.       
  325.       
  326.       
  327.       
  328.       
  329.       
  330.       
  331.       
  332.       
  333.       
  334.       
  335.     end

  336.     # ワナ増殖
  337.     if note =~ /<ワナ増殖>/i
  338.       for i in 0...10
  339.         x, y = $game_dungeon.random_pos(1)
  340.         $game_dungeon.add_trap(x, y, $game_dungeon.random_trap)
  341.       end
  342.       $game_temp.heap_message.push("フロアのワナが増えた。")
  343.     end

  344.     # 全滅
  345.     if note =~ /<全滅>/i
  346.       for monster in $game_dungeon.monsters
  347.         next if monster.battler.dead?
  348.         next if monster.battler.state?(DUNG::STATE_SHOP_KEEPER)
  349.         monster.battler.hp = 0
  350.         monster.dead($game_dplayer)
  351.       end
  352.     end

  353.     # 一時しのぎ
  354.     if note =~ /<一時しのぎ>/i
  355.       x, y = target.drop_pos($game_dungeon.stairs.x, $game_dungeon.stairs.y)
  356.       target.moveto(x, y) if x != nil
  357.       target.battler.add_state(DUNG::STATE_STOP)
  358.     end

  359.     # 入れ替え
  360.     if note =~ /<入れ替え>/i
  361.       x = $game_dplayer.x
  362.       y = $game_dplayer.y
  363.       $game_dplayer.moveto(target.x, target.y)
  364.       target.moveto(x, y)
  365.     end

  366.     # 装備はずし
  367.     if note =~ /<装備はずし>/i
  368.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  369.         if $game_party.equips.empty?
  370.           $game_temp.heap_message.push("しかしたいしたことはなかった。")
  371.         else
  372.           for item in $game_party.equips do item.change_equip(false) end
  373.           $game_temp.heap_message.push("装備がはずれてしまった。")
  374.         end
  375.       end
  376.     end
  377.    
  378.     # サビ
  379.     if note =~ /<サビ>/i
  380.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  381.         result = false
  382.         weapon = $game_party.dweapon
  383.         if weapon != nil and not weapon.coated?
  384.           weapon.gain_plus(-1)
  385.           result = true
  386.         end
  387.         armor = $game_party.darmor
  388.         if armor != nil and not armor.coated?
  389.           armor.gain_plus(-1)
  390.           result = true
  391.         end
  392.         if result
  393.           $game_temp.heap_message.push("装備が錆びてしまった。")
  394.         else
  395.           $game_temp.heap_message.push("しかしたいしたことはなかった。")
  396.         end
  397.       end
  398.     end

  399.     # デロデロ
  400.     if note =~ /<デロデロ>/i
  401.       if target.is_a?(Game_DungeonPlayer)     # プレイヤー限定
  402.         if $game_party.spoil_ditem
  403.           $game_temp.heap_message.push("食料が腐ってしまった。")
  404.         else
  405.           $game_temp.heap_message.push("しかしたいしたことはなかった。")
  406.         end
  407.       end
  408.     end
  409.    
  410.     # 警報
  411.     if note =~ /<警報>/i
  412.       for monster in $game_dungeon.monsters
  413.         monster.battler.remove_state(DUNG::STATE_SLEEP)   # 浅い眠りを解除
  414.         monster.battler.remove_state(DUNG::STATE_DSLEEP)  # 深い眠りを解除
  415.         monster.battler.remove_state(DUNG::STATE_HDSLEEP) # 爆睡状態を解除
  416.         monster.battler.remove_state(DUNG::STATE_STOP)    # かなしばりを解除
  417.       end
  418.       $game_temp.heap_message.push("眠っていたモンスターが目を覚ました。")
  419.     end
  420.    
  421.     # 召喚
  422.     if note =~ /<召喚>/i
  423.       for x in target.x - 1..target.x + 1
  424.         for y in target.y - 1..target.y + 1
  425.           if target.passable?(x, y)
  426.             $game_dungeon.add_monster(x, y, $game_dungeon.random_monster, false)
  427.           end
  428.         end
  429.       end
  430.     end
  431.    
  432.     # ワープ
  433.     if note =~ /<ワープ>/i
  434.       x, y = $game_dungeon.random_pos(2)
  435.       target.moveto(x, y)
  436.     end
  437.    
  438. #~         # 帰還★追加
  439. #~     if note =~ /<帰還>/i
  440. #~       p"帰還ー"
  441. #~       $scene = Scene_Map.new
  442. #~       $game_temp.map_bgm.play
  443. #~       $game_temp.map_bgs.play
  444. #~     end

  445.     if note =~ /<帰還>/i
  446.    #   p"帰還ー"

  447.     #  $game_temp.heap_message.push("脱出の巻物を使った! スタート地点に戻れる!")

  448.       $scene = Scene_Map.new
  449.   #    $game_temp.map_bgm.play
  450.    #   $game_temp.map_bgs.play
  451.       $game_temp.common_event_id = 7
  452.       
  453.       
  454.     end   
  455.    
  456.   end
  457.   #--------------------------------------------------------------------------
  458.   # ● アイテムに使うアイテムの効果
  459.   #--------------------------------------------------------------------------
  460.   def effect_item_for_item(ditem, target_index)
  461.     note = ditem.item.note
  462.     target_ditem = @item_window.ditem_index(target_index)
  463.    
  464. #p"帰還の巻物はなぜかこっちにくるので、ここに設定する いや、アイテムを「使用者」にしたらいけた"   


  465.         # 帰還★追加
  466. #~     if note =~ /<帰還>/i
  467. #~    #   p"帰還ー"
  468. #~  
  469. #~       $game_temp.heap_message.push("脱出の巻物を使った! スタート地点に戻れる!")

  470. #~       $scene = Scene_Map.new
  471. #~   #    $game_temp.map_bgm.play
  472. #~    #   $game_temp.map_bgs.play
  473. #~       $game_temp.common_event_id = 7
  474. #~      
  475. #~      
  476. #~     end   

  477.     # 識別
  478.     if note =~ /<識別>/i
  479.       if rand(100) < 15
  480.         for item in $game_party.ditems
  481.           item.change_judge(true)
  482.           $game_dungeon.judge_item(item)
  483.         end
  484.         $game_temp.heap_message.push("ラッキー! すべてのアイテムを識別できた。")
  485.       else
  486.         target_ditem.change_judge(true)
  487.         judge_item(target_ditem)
  488.       end
  489.     end

  490.     # 解呪
  491.     if note =~ /<解呪>/i
  492.       if rand(100) < 15
  493.         for item in $game_party.ditems
  494.           item.change_curse(false)
  495.         end
  496.         $game_temp.heap_message.push("ラッキー! すべてのアイテムを解呪できた。")
  497.       else
  498.         if target_ditem.cursed?
  499.           target_ditem.change_curse(false)
  500.           $game_temp.heap_message.push(sprintf(
  501.           "%sの呪いが解けた。", target_ditem.name))
  502.         else
  503.           $game_temp.heap_message.push(sprintf(
  504.           "%sは呪われていなかった。", target_ditem.name))
  505.         end
  506.       end
  507.     end

  508.     # 壷強化
  509.     if note =~ /<壷強化>/i
  510.       if target_ditem.category == 55
  511.         if target_ditem.plus == DUNG::POT_MAX
  512.           $game_temp.heap_message.push(sprintf(
  513.           "%sはこれ以上大きくできない。", target_ditem.name))
  514.         else
  515.           $game_temp.heap_message.push(sprintf(
  516.           "%sの容量が\\C[4]1\\C[0]増えた。", target_ditem.name))
  517.           target_ditem.gain_plus(1)
  518.         end
  519.       else
  520.         $game_temp.heap_message.push("しかし何も起こらなかった。")
  521.       end
  522.     end

  523.     # メッキ
  524.     if note =~ /<メッキ>/i
  525.       if target_ditem.category >= 95    # 剣か盾のみ
  526.         $game_temp.heap_message.push(sprintf(
  527.         "%sは錆びに強くなった。", target_ditem.name))
  528.         target_ditem.change_coat(true)
  529.       else
  530.         $game_temp.heap_message.push("しかし何も起こらなかった。")
  531.       end
  532.     end

  533.     # 吸引
  534.     if note =~ /<吸引>/i
  535.       if target_ditem.category == 55 and      # 中身の入った壷のみ
  536.          target_ditem.in_items.size > 0
  537.         while(target_ditem.in_items.size > 0)
  538.           in_item = target_ditem.in_items.pop
  539.           id = $game_dungeon.add_item($game_dplayer.x, $game_dplayer.y, in_item)
  540.           $game_dungeon.items[id].drop($game_dplayer.x, $game_dplayer.y)
  541.         end
  542.         $game_temp.heap_message.push("壷の中身を吸い出した。")
  543.       else
  544.         $game_temp.heap_message.push("しかし何も起こらなかった。")
  545.       end
  546.     end

  547.   end
  548.   #--------------------------------------------------------------------------
  549.   # ● 壷に入れたときのアイテムの効果
  550.   #--------------------------------------------------------------------------
  551.   def effect_item_storage(ditem)
  552.     note = ditem.item.note
  553.    
  554.     # 底抜け
  555.     if note =~ /<底抜け>/i
  556.       ditem.in_items.pop    # 入れたアイテムを削除
  557.     end

  558.     # 識別
  559.     if note =~ /<識別>/i
  560.       $game_dungeon.judge_item(ditem.in_items[ditem.in_items.size - 1])
  561.     end

  562.     # 変化
  563.     if note =~ /<変化>/i
  564.       ditem.in_items.pop    # 入れたアイテムを削除
  565.       ditem.in_items.push($game_dungeon.random_item)  # ランダムアイテムを入れる
  566.     end
  567.    
  568.     # 分裂
  569.     if note =~ /<分裂>/i
  570.       if ditem.plus > 0     # 容量が残っていれば入れたアイテムをもうひとつ入れる
  571.         ditem.in_items.push(ditem.in_items[ditem.in_items.size - 1].clone)
  572.         ditem.gain_plus(-1)
  573.       end
  574.     end

  575.     # 合成
  576.     if note =~ /<合成>/i
  577.       new_ditem = ditem.in_items[ditem.in_items.size - 1]   # 入れたアイテム
  578.       if ditem.in_items[ditem.in_items.size - 1].category == new_ditem.category
  579.         if new_ditem.category >= 95
  580.         end
  581.       end
  582.       ditem.in_items.pop    # 入れたアイテムを削除
  583.     end

  584.   end
  585.   
  586.   #--------------------------------------------------------------------------
  587.   # ● 武器の効果
  588.   #     hit_flag  : 攻撃がモンスターに当たったかどうか
  589.   #--------------------------------------------------------------------------
  590.   def effect_weapon(hit_flag)
  591.     weapon = $game_party.dweapon
  592.     return if weapon == nil       # 素手なら終了
  593.     extends = weapon.extends + weapon.item.extends
  594.     for id in extends.uniq
  595.       next if id < 128
  596.       case id
  597.       when 128    # 掘る
  598.         x, y = $game_dplayer.pos_direction
  599.         if $game_dungeon.room_table[x, y, 0] & 1 == 0
  600.           $game_dungeon.delete_wall(x, y, x, y)
  601.         end
  602.       when 129    # 壊れる
  603.       when 135    # 使うたびに弱くなる
  604.       end
  605.     end
  606.   end
  607.    
  608. end

复制代码
  1. #==============================================================================
  2. # ■ 設定項目
  3. #
  4. # フロア全体サイズの補足
  5. #   地図の仕様上、縦サイズを横の75%程度に設定するといい感じになります。
  6. #   全体サイズの大きいフロアは作成に時間がかかります。
  7. #
  8. # 使用するタイルの補足
  9. #   [床, 壁, 1セル壁用特殊タイル, 階段]
  10. #   以上4つのタイルIDを設定してください。1セル壁用特殊タイルは上下を
  11. #   通行可能タイルにはさまれた壁で使用するもので、上層タイルを設定します。
  12. #   床(1552~1559, 1568~1575, 1584~1591)
  13. #   壁(5888,5936,5984~6220, 6656,6704~6692, 7424,7472~7760)48刻み
  14. #   特殊壁(536~543)
  15. #   階段(256~259, 264~267)
  16. #
  17. # モンスターハウス設定の補足
  18. #   狭い部屋がモンスターハウスになる場合、モンスター数は部屋面積の80%、
  19. #   ワナとアイテムは40%をそれぞれ上限とします。
  20. #==============================================================================
  21. module DUNG

  22.   DIR_INPUT_DELAY   = 4       # 移動入力の遅延(大きいと斜め移動しやすくなる)
  23.   B_INPUT_DELAY     = 8       # Bボタンでのメニュー入力受付時間
  24.   USE_ROTATE        = true    # 演出にスプライトの回転を使う(falseで使わない)
  25.   MAP_HIDE          = true    # 向き変更時に地図を非表示にする(falseで常に表示)
  26.   AUTO_TURN         = true    # 攻撃してきた敵の方を向く機能(falseで使わない)
  27.   START_EFFECT_COUNT = 120    # ダンジョン開始演出の時間

  28.   POWER_MAX         = 99      # 最大ちからの上限
  29.   ENERGY_MAX        = 250     # 最大満腹度の上限
  30.   AUTO_RECOVER_RATE = 100     # 最大HPをこの値で割った分が1ターンの回復量
  31.   HUNGRY_DAMAGE     = 5       # 空腹時にこの値ずつHPが減っていく
  32.   POT_MAX           = 9       # 壷の最大容量
  33.   THROW_DISTANCE    = 15      # 物を投げたときの飛距離
  34.   MAGIC_DISTANCE    = 15      # 魔法弾の飛距離
  35.   THROW_HIT_RATE    = 80      # 投げたものの命中率
  36.   TRAP_EXE_RATE     = 90      # 未発見ワナの起動確率
  37.   TRAP_EXE_RATE_DC  = 60      # 発見済みワナの起動確率
  38.   
  39.   # 特殊状態として利用するステートのIDを設定
  40.   STATE_SLEEP       = 17      # 浅い眠り
  41.   STATE_GODSIGHT    = 18      # よく見え
  42.   STATE_SLOW        = 19      # 鈍足状態
  43.   STATE_BERSERK     = 20      # 狂戦士
  44.   STATE_UNDEAD      = 21      # 無敵
  45.   STATE_CONFUSE     = 22      # 混乱
  46.   STATE_DSLEEP      = 23      # 深い眠り
  47.   STATE_FAST        = 24      # 倍速
  48.   STATE_HDSLEEP     = 25      # 爆睡
  49.   STATE_POWERUP     = 26      # パワーアップ
  50.   STATE_SHARE       = 27      # 痛み分け
  51.   STATE_STOP        = 28      # かなしばり
  52.   STATE_SILENT      = 29      # くちなし
  53.   STATE_FAKE        = 30      # 身代わり
  54.   STATE_SHOP_KEEPER = 31      # 店主
  55.   STATE_WAIT        = 32      # 待ち伏せ
  56.   STATE_RANDOM_MOVE = 33      # ふらふら移動
  57.   STATE_UNVISIBLE   = 34      # 不可視
  58.   STATE_REFLECT     = 35      # 魔法弾反射
  59.   STATE_FLAME       = 36      # 投擲無効
  60.   STATE_HEALER      = 37      # 魔物狙い
  61.   STATE_PASS_WALL   = 38      # 壁抜け
  62.   STATE_RUNAWAY     = 39      # 逃走
  63.   STATE_NOMOVE      = 40      # 移動しない

  64.   GOLD_ICON         = 194     # お金のアイコンインデックス
  65.   CURSE_ICON        = 157     # 呪われたアイテムのアイコンインデックス
  66.   MAGIC_ICON        = 110     # 魔法弾のアイコンインデックス
  67.   HP_GAUGE_RATE     = 4       # HPゲージの1ドット当たりのHP量
  68.   HP_GAUGE_MIN      = 15      # HPゲージの長さの下限値
  69.   
  70.   ANIME_ATTACK      = 1       # 素手(or未設定)攻撃のアニメーションID
  71.   ANIME_DAMAGE      = 81      # 被ダメージアニメーションID
  72.   ANIME_EAT         = 82      # 食料を食べるアニメーションID
  73.   ANIME_DRINK       = 82      # 草を飲むアニメーションID
  74.   ANIME_READ        = 83      # 巻物を読むアニメーションID
  75.   
  76.   NOJUDGE_NAME_HERB = [
  77.     "あかい草", "みどり色の草", "あおい草", "き色の草", "もも色の草",
  78.     "みず色の草", "しろい草", "くろい草", "むらさき色の草", "べに色の草",
  79.     "しゅ色の草", "そら色の草", "こん色の草", "はい色の草", "ちゃ色の草",
  80.     "にじ色の草", "しろくろの草", "こうはくの草", "かっ色の草", "きみどりの草",
  81.     "はだ色の草", "色のない草"
  82.   ]
  83.   NOJUDGE_NAME_SCROLL = [
  84.     "イヌの巻物", "ネコの巻物", "サルの巻物", "キジの巻物", "ネズミの巻物",
  85.     "ゴリラの巻物", "パンダの巻物", "ラクダの巻物", "ウシの巻物", "トラの巻物",
  86.     "ウサギの巻物", "リュウの巻物", "ヘビの巻物", "ウマの巻物", "ヒツジの巻物",
  87.     "ニワトリの巻物", "イヌの巻物", "イノシシの巻物", "シカの巻物", "サイの巻物",
  88.     "キリンの巻物", "トカゲの巻物", "ライオンの巻物", "クマの巻物", "スズメの巻物",
  89.     "ツルの巻物", "ウグイスの巻物", "カエルの巻物", "カメの巻物", "オオカミの巻物",
  90.     "アルパカの巻物", "クジラの巻物"
  91.   ]
  92.   NOJUDGE_NAME_WAND = [
  93.     "ヒノキの杖", "カシの杖", "サクラの杖", "ウメの杖", "モミジの杖",
  94.     "マツの杖", "タケの杖", "イシの杖", "ヤナギの杖", "クリの杖",
  95.     "ホネの杖", "キバの杖", "スギの杖", "キリの杖", "セイドウの杖"
  96.   ]
  97.   NOJUDGE_NAME_POT = [
  98.     "ほそい壷", "ふとい壷", "まるい壷", "しかくい壷", "ひし型の壷",
  99.     "みかづき形の壷", "さんかくの壷", "たまご型の壷", "ほし型の壷", "はんげつ形の壷",
  100.     "だるま型の壷", "ひょうたん型の壷", "あさい壷", "ふかい壷", "くびれた壷",
  101.     "ゆがんだ壷", "でこぼこの壷", "かたむいた壷"
  102.   ]
  103.   NOJUDGE_NAME_RING = [
  104.     "ダイヤの指輪", "サファイアの指輪", "ルビーの指輪", "アメジストの指輪",
  105.     "エメラルドの指輪", "オパールの指輪", "トルコ石の指輪", "サンゴの指輪",
  106.     "ヒスイの指輪", "コハクの指輪", "メノウの指輪", "パールの指輪",
  107.     "ジルコニアの指輪", "トパーズの指輪", "ザクロ石の指輪", "ラピスラズリの指輪"
  108.   ]
  109.   
  110.   DG_BASE = {}                # 設定省略時に使う親フロア
  111.   DG_SIZE = {}                # フロア全体のサイズ
  112.   DG_ROOM_MIN = {}            # 部屋の最小サイズ
  113.   DG_ROOM_MARGIN = {}         # 部屋の周りの余白(部屋と区画の間隔です、下限2)
  114.   DG_NOSPLIT_RATE = {}        # 数値が大きいほど部屋数が少なくなりやすい(%)
  115.   DG_ADD_COUPLE_RATE = {}     # 数値が大きいほど通路が複雑になりやすい(%)
  116.   DG_MANY_ROOM_RATE = {}      # 部屋数が最大になるようにフロア作る確率(%)
  117.   DG_MAX_ROOM_RATE = {}       # 区画内での最高サイズの部屋を強制的に作る確率(%)
  118.   DG_TILE = {}                # 使用するタイル
  119.   DG_MONSTER_NUM = {}         # モンスターの初期配置数
  120.   DG_MONSTER_MAX = {}         # モンスターの最大数
  121.   DG_MONSTER_TABLE = {}       # 出現モンスター(エネミーIDと出現率の配列)
  122.   DG_ITEM_MAX = {}            # アイテム初期配置数の最大
  123.   DG_ITEM_TABLE = {}          # 出現アイテム(アイテムタイプ,ID,出現率の配列)
  124.   DG_GOLD_RATE = {}           # お金出現率(%)
  125.   DG_DROP_RATE = {}           # モンスターの共通アイテムドロップ率(1/n)
  126.   DG_TRAP_MAX = {}            # トラップの最大数
  127.   DG_TRAP_NUM = {}            # トラップの初期配置数
  128.   DG_TRAP_TABLE = {}          # 出現トラップ(ID,出現率の配列)
  129.   DG_CURSE_RATE = {}          # 剣と盾以外のものが呪われている確率
  130.   DG_SLEEP_RATE = {}          # 出現モンスターが眠っている確率
  131.   DG_REPOP_TURN = {}          # モンスター再出現間隔(経過するまで再出現判定なし)
  132.   DG_REPOP_RATE = {}          # モンスター再出現確率
  133.   DG_BGM = {}                 # フロアのBGM
  134.   DG_BGS = {}                 # フロアのBGS
  135.   DG_HOUSE_BGM = {}           # フロアのモンスターハウスBGM
  136.   DG_SHOP_BGM = {}            # フロアのお店BGM
  137.   DG_THIEF_BGM = {}           # フロアの泥棒BGM
  138.   DG_WEATHER = {}             # フロアの天候
  139.   DG_SHOP_RATE = {}           # お店の出現率
  140.   DG_SHOP_KEEPER = {}         # 店主のモンスターID
  141.   DG_SHOP_GUARD = {}          # 番犬のモンスターID
  142.   DG_HOUSE_RATE = {}          # モンスターハウス出現率
  143.   DG_HOUSE_MONSTER_NUM = {}   # モンスターハウスにいるモンスターの数
  144.   DG_HOUSE_ITEM_NUM = {}      # モンスターハウスにあるアイテムの数
  145.   DG_HOUSE_TRAP_NUM = {}      # モンスターハウスにあるワナの数

  146.   DG_NAME = {}                # ダンジョンの名前
  147.   DG_FLOOR = {}               # ダンジョンのフロア構成
  148.   DG_JUDGE_ITEM = {}          # ダンジョンの識別済みアイテムカテゴリー

  149.   #--------------------------------------------------------------------------
  150.   # ○ フロアパターン1の設定
  151.   #--------------------------------------------------------------------------
  152.   DG_BASE[1]            = nil # 設定省略時に使う親フロア
  153.   DG_SIZE[1]            = [50, 37]  # フロア全体のサイズ
  154.   DG_ROOM_MIN[1]        = 5   # 部屋の最小サイズ
  155.   DG_ROOM_MARGIN[1]     = 2   # 部屋の周りの余白(部屋と区画の間隔です、下限2)
  156.   DG_NOSPLIT_RATE[1]    = 10  # 数値が大きいほど部屋数が少なくなりやすい(%)
  157.   DG_ADD_COUPLE_RATE[1] = 4   # 数値が大きいほど通路が複雑になりやすい(%)
  158.   DG_MANY_ROOM_RATE[1]  = 10  # 部屋数が最大になるようにフロア作る確率(%)
  159.   DG_MAX_ROOM_RATE[1]   = 20  # 区画内での最高サイズの部屋を強制的に作る確率(%)
  160.   DG_TILE[1] = [1552, 5888, 536, 265] # 使用するタイルパターン
  161.   DG_MONSTER_NUM[1]     = 8   # モンスターの初期配置数
  162.   DG_MONSTER_MAX[1]     = 20#32  # モンスターの最大数
  163.   DG_MONSTER_TABLE[1] = [     # 出現モンスター
  164. #   [3, 10], [4, 8]
  165. [1, 10], [2, 10], [3, 10], [4, 10]
  166.   ]
  167.   DG_ITEM_MAX[1]        = 10  # アイテム初期配置数の最大
  168.   DG_ITEM_TABLE[1] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  169.   for i in 1..18    do DG_ITEM_TABLE[1].push([0, i, 5]) end    # 草
  170.   for i in 31..52   do DG_ITEM_TABLE[1].push([0, i, 5]) end    # 巻物
  171.   for i in 61..68   do DG_ITEM_TABLE[1].push([0, i, 5]) end    # 杖
  172.   for i in 81..85   do DG_ITEM_TABLE[1].push([0, i, 5]) end    # 壷
  173.   for i in 101..104 do DG_ITEM_TABLE[1].push([0, i, 5]) end    # 食料
  174.   for i in 111..113 do DG_ITEM_TABLE[1].push([0, i, 5]) end    # 矢
  175.    
  176.   for i in 1..9     do DG_ITEM_TABLE[1].push([1, i, 5]) end    # 武器 1..8
  177.   for i in 1..5     do DG_ITEM_TABLE[1].push([2, i, 5]) end    # 防具 1..5
  178.   for i in 21..26   do DG_ITEM_TABLE[1].push([2, i, 5]) end    # 指輪
  179.   DG_GOLD_RATE[1]       = 11  # お金出現率(%)
  180.   DG_DROP_RATE[1]       = 16  # モンスターの共通アイテムドロップ率(1/n)
  181.   DG_TRAP_MAX[1]        = 30  # トラップの最大数
  182.   DG_TRAP_NUM[1]        = 5  # トラップの初期配置数
  183.   DG_TRAP_TABLE[1] = []       # 出現ワナ
  184.   for i in 121..137 do DG_TRAP_TABLE[1].push([i, 5]) end
  185.   DG_CURSE_RATE[1]      = 5#8   # 剣と盾以外のものが呪われている確率
  186.   DG_SLEEP_RATE[1]      = 80  # 出現モンスターが眠っている確率
  187.   DG_REPOP_TURN[1]      = 20  # モンスター再出現間隔(経過するまで再出現判定なし)
  188.   DG_REPOP_RATE[1]      = 10  # モンスター再出現確率
  189.   DG_BGM[1]             = ["Audio/BGM/Dungeon1.mid", 100, 100]
  190.   DG_BGS[1]             = ["Audio/BGS/Drips.ogg", 80, 100]
  191.   DG_HOUSE_BGM[1]       = ["Audio/BGM/Battle1.mid", 100, 100]
  192.   DG_SHOP_BGM[1]        = ["Audio/BGM/Scene4.mid", 100, 100]
  193.   DG_THIEF_BGM[1]       = ["Audio/BGM/Battle5.mid", 100, 100]
  194.   DG_WEATHER[1]         = [0, 0]  # フロアの天候
  195.   DG_SHOP_RATE[1]       = 10#30  # お店の出現率
  196.   DG_SHOP_KEEPER[1]     = 55   # 店主のモンスターID
  197.   DG_SHOP_GUARD[1]      = 55   # 番犬のモンスターID
  198.   DG_HOUSE_RATE[1]      = 15  # モンスターハウス出現率
  199.   DG_HOUSE_MONSTER_NUM[1] = 10#20  # モンスターハウスにいるモンスターの数
  200.   DG_HOUSE_ITEM_NUM[1]  = 20  # モンスターハウスにあるアイテムの数
  201.   DG_HOUSE_TRAP_NUM[1]  = 20  # モンスターハウスにあるワナの数
  202.   
  203.   #--------------------------------------------------------------------------
  204.   # ○ フロアパターン2の設定
  205.   #--------------------------------------------------------------------------
  206.   DG_BASE[2] = 1              # 設定省略時に使う親フロア
  207.   DG_MONSTER_TABLE[2] = [     # 出現モンスター
  208. [1, 10], [2, 10], [3, 10], [4, 10], [5, 5], [6, 5]
  209.   ]
  210.   DG_TILE[2] = [1570, 6752, 77, 267] #[1591, 7760, 543, 267] # 使用するタイルパターン

  211.   #--------------------------------------------------------------------------
  212.   # ○ フロアパターン3の設定
  213.   #--------------------------------------------------------------------------
  214.   DG_BASE[3] = 1              # 設定省略時に使う親フロア
  215.   
  216.   DG_MONSTER_TABLE[3] = [     # 出現モンスター
  217. [1, 10], [2, 10], [3, 10], [4, 10], [5, 5], [6, 5]
  218.   ]
  219. #  DG_TILE[3] = [1591, 7760, 543, 267] # 使用するタイルパターン  
  220.   DG_TILE[3] = [1588, 7616, 540, 264]#[1570, 6752, 77, 267] # 使用するタイルパターン
  221.   
  222.   
  223. #~   DG_REPOP_RATE[3]      = 0  # モンスター再出現確率
  224. #~   DG_MONSTER_NUM[3]     = 5   # モンスターの初期配置数
  225. #~   DG_MONSTER_MAX[3]     = 5  # モンスターの最大数
  226. #~   
  227.   
  228.   
  229. #~   DG_MONSTER_TABLE[3] = [     # 出現モンスター
  230. #~       [1, 10]


  231. #~   ]
  232.   
  233.   
  234.   
  235. #~   DG_ITEM_MAX[3]        = 50  # アイテム初期配置数の最大
  236. #~   DG_ITEM_TABLE[3] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  237. #~   for i in 1..8     do DG_ITEM_TABLE[3].push([1, i, 5]) end    # 武器
  238. #~   for i in 1..5     do DG_ITEM_TABLE[3].push([2, i, 5]) end    # 防具
  239. #~   for i in 21..26   do DG_ITEM_TABLE[3].push([2, i, 5]) end    # 指輪  
  240. #~   
  241.   
  242.   
  243.   
  244. #~   
  245. #~   
  246. #~   DG_TILE[3] = [1570, 6752, 77, 267] # 使用するタイルパターン
  247. #~   
  248. #~ #▼テスト用設定  
  249. #~   DG_TRAP_MAX[3]        = 0  # トラップの最大数
  250. #~   DG_TRAP_NUM[3]        = 0  # トラップの初期配置数

  251.   

  252.   #--------------------------------------------------------------------------
  253.   # ○ フロアパターン4の設定
  254.   #--------------------------------------------------------------------------
  255.   DG_BASE[4] = 1              # 設定省略時に使う親フロア
  256.   DG_MONSTER_TABLE[4] = [     # 出現モンスター
  257. [2, 3], [3, 3], [4, 3], [5, 10], [6, 10], [7, 5], [8, 5], [9, 5]

  258.   ]
  259.   DG_TILE[4] = [1586, 7520, 538, 267]#[1586, 7520, 538, 267] # 使用するタイルパターン

  260.   #--------------------------------------------------------------------------
  261.   # ○ フロアパターン5の設定 ★BOSS
  262.   #--------------------------------------------------------------------------
  263.   DG_BASE[5] = 1             # 設定省略時に使う親フロア
  264.   DG_MONSTER_TABLE[5] = [     # 出現モンスター
  265.    # [7, 8], [17, 8], [24, 10], [27, 10]
  266.    
  267.    [41, 10]#[20, 10]# [41, 10]
  268.   ]
  269.   DG_TILE[5] = [1591, 7760, 543, 267]#[1588, 7616, 540, 264] # 使用するタイルパターン
  270.   
  271.   
  272.   DG_MONSTER_NUM[5]     = 1#20#1   # モンスターの初期配置数
  273.   DG_MONSTER_MAX[5]     = 1#20#1#32  # モンスターの最大数
  274.   DG_SHOP_RATE[5]       = 0#30  # お店の出現率
  275.   DG_HOUSE_RATE[5]      = 0  # モンスターハウス出現率
  276.   DG_REPOP_RATE[5]      = 0  # モンスター再出現確率


  277.   
  278.   #--------------------------------------------------------------------------
  279.   # ○ フロアパターン10まで
  280.   #--------------------------------------------------------------------------
  281. #~  DG_TILE[6] = [1552, 5888, 536, 265] # 使用するタイルパターン
  282. #~   DG_TILE[7] = [1570, 6752, 77, 267] #[1591, 7760, 543, 267] # 使用するタイルパターン
  283. #~   DG_TILE[8] = [1588, 7616, 540, 264]#[1570, 6752, 77, 267] # 使用するタイルパターン
  284. #~   DG_TILE[9] = [1586, 7520, 538, 267]#[1586, 7520, 538, 267] # 使用するタイルパターン
  285. #~   DG_TILE[10] = [1591, 7760, 543, 267]#[1588, 7616, 540, 264] # 使用するタイルパターン
  286.   
  287. DG_BASE[6] = 1  
  288. DG_MONSTER_TABLE[6] = [
  289. [2, 3], [3, 3], [4, 3], [5, 10], [6, 10], [7, 5], [8, 5], [9, 5], [10, 5], [33, 5]]

  290. DG_BASE[7] = 2
  291. DG_MONSTER_TABLE[7] = [
  292. [2, 3], [3, 3], [4, 3], [5, 10], [6, 10], [7, 5], [8, 5], [9, 5], [10, 5], [33, 5]]

  293. DG_BASE[8] = 3
  294. DG_MONSTER_TABLE[8] = [
  295. [5, 3], [6, 3], [7, 5], [8, 5], [9, 10], [10, 10],[11, 5],[12, 3], [33, 5]]

  296. DG_BASE[9] = 4   
  297. DG_MONSTER_TABLE[9] = [
  298. [6, 3], [7, 3], [8, 5], [9, 5], [10, 10],[11, 10],[12, 5],[13, 3], [33, 5]]

  299. DG_BASE[10] = 5
  300. DG_MONSTER_TABLE[10] = [[42, 10]]
  301.   
  302.   #--------------------------------------------------------------------------
  303.   # ○ フロアパターン15まで
  304.   #--------------------------------------------------------------------------
  305. DG_BASE[11] = 1  
  306. DG_MONSTER_TABLE[11] = [
  307. [6, 3], [7, 3], [8, 5], [9, 5], [10, 10],[11, 10],[12, 5],[13, 3], [33, 5]]

  308. DG_BASE[12] = 2
  309. DG_MONSTER_TABLE[12] = [
  310. [8, 2], [9, 3], [10, 4],[11, 5],[12, 6],[13, 8],[14, 10], [15, 8],[16, 3], [17, 3]]

  311. DG_BASE[13] = 3
  312. DG_MONSTER_TABLE[13] = [
  313. [8, 1], [9, 2], [10, 3],[11, 3],[12, 5],[13, 8],[14, 10], [15, 10],[16, 5], [17, 3]]

  314. DG_BASE[14] = 4   
  315. DG_MONSTER_TABLE[14] = [
  316. [8, 1], [9, 2], [10, 3],[11, 3],[12, 5],[13, 8],[14, 10], [15, 10],[16, 10], [17, 10]]

  317. DG_BASE[15] = 5
  318. DG_MONSTER_TABLE[15] = [[43, 10]]  

  319.   #--------------------------------------------------------------------------
  320.   # ○ フロアパターン20まで
  321.   #--------------------------------------------------------------------------
  322. DG_BASE[16] = 1  
  323. DG_MONSTER_TABLE[16] = [
  324. [11, 3],[12, 3],[13, 3],[14, 5],[15, 5],[16, 7], [17, 7], [18, 8], [19, 3], [20, 3]]

  325. DG_BASE[17] = 2
  326. DG_MONSTER_TABLE[17] = [
  327. [11, 2],[12, 2],[13, 2],[14, 3],[15, 5],[16, 8], [17, 10], [18, 10], [19, 3], [20, 3]]

  328. DG_BASE[18] = 3
  329. DG_MONSTER_TABLE[18] = [
  330. [11, 1],[12, 1],[13, 1],[14, 3],[15, 5],[16, 5], [17, 8], [18, 10], [19, 7], [20, 5]]

  331. DG_BASE[19] = 4   
  332. DG_MONSTER_TABLE[19] = [
  333. [12, 1],[14, 3],[15, 5],[16, 5], [17, 8], [18, 8], [19, 10], [20, 10],[21, 5],[22, 3],[23, 3]]

  334. DG_BASE[20] = 5
  335. DG_MONSTER_TABLE[20] = [[44, 10]]  


  336.   #--------------------------------------------------------------------------
  337.   # ○ フロアパターン21~60まで エクセルで作成
  338.   #--------------------------------------------------------------------------
  339.   
  340. DG_BASE[21] = 1
  341. DG_BASE[22] = 2
  342. DG_BASE[23] = 3
  343. DG_BASE[24] = 4
  344. DG_BASE[25] = 5

  345. DG_BASE[26] = 1
  346. DG_BASE[27] = 2
  347. DG_BASE[28] = 3
  348. DG_BASE[29] = 4
  349. DG_BASE[30] = 5

  350. DG_BASE[31] = 1
  351. DG_BASE[32] = 2
  352. DG_BASE[33] = 3
  353. DG_BASE[34] = 4
  354. DG_BASE[35] = 5

  355. DG_BASE[36] = 1
  356. DG_BASE[37] = 2
  357. DG_BASE[38] = 3
  358. DG_BASE[39] = 4
  359. DG_BASE[40] = 5

  360. DG_BASE[41] = 1
  361. DG_BASE[42] = 2
  362. DG_BASE[43] = 3
  363. DG_BASE[44] = 4
  364. DG_BASE[45] = 5

  365. DG_BASE[46] = 1
  366. DG_BASE[47] = 2
  367. DG_BASE[48] = 3
  368. DG_BASE[49] = 4
  369. DG_BASE[50] = 5

  370. DG_BASE[51] = 1
  371. DG_BASE[52] = 2
  372. DG_BASE[53] = 3
  373. DG_BASE[54] = 4
  374. DG_BASE[55] = 5

  375. DG_BASE[56] = 1
  376. DG_BASE[57] = 2
  377. DG_BASE[58] = 3
  378. DG_BASE[59] = 4
  379. DG_BASE[60] = 5

  380. DG_MONSTER_TABLE[21] = [[12,3],[14,4],[15,7],[16,8],[17,10],[18,10],[19,7],[20,5],[21,3],[22,3],[23,3]]
  381. DG_MONSTER_TABLE[22] = [[12,3],[14,4],[15,7],[16,8],[17,10],[18,10],[19,7],[20,5],[21,3],[22,3],[23,3]]
  382. DG_MONSTER_TABLE[23] = [[16,3],[17,4],[18,7],[19,8],[20,10],[21,10],[22,7],[23,5],[24,3],[25,3]]
  383. DG_MONSTER_TABLE[24] = [[16,3],[17,4],[18,7],[19,8],[20,10],[21,10],[22,7],[23,5],[24,3],[25,3],[26,3]]
  384. DG_MONSTER_TABLE[25] = [[45,3]]
  385. DG_MONSTER_TABLE[26] = [[17,3],[18,4],[19,7],[20,8],[21,10],[22,10],[23,7],[24,5],[25,3],[26,3],[27,3]]
  386. DG_MONSTER_TABLE[27] = [[17,3],[20,4],[21,7],[22,8],[23,10],[24,10],[25,7],[26,5],[27,3],[28,3],[29,3]]
  387. DG_MONSTER_TABLE[28] = [[17,3],[20,4],[21,7],[22,8],[23,10],[24,10],[25,7],[26,5],[27,3],[28,3],[29,3],[30,10]]
  388. DG_MONSTER_TABLE[29] = [[17,3],[20,4],[21,7],[22,8],[23,10],[24,10],[25,7],[26,5],[27,3],[28,3],[29,3],[30,10],[31,10]]
  389. DG_MONSTER_TABLE[30] = [[46,3]]
  390. DG_MONSTER_TABLE[31] = [[17,3],[20,4],[22,7],[23,8],[24,10],[25,10],[26,7],[27,5],[28,3],[29,3],[30,3],[31,10],[32,10]]
  391. DG_MONSTER_TABLE[32] = [[17,3],[20,4],[23,7],[24,8],[25,10],[26,10],[27,7],[28,5],[29,3],[30,3],[31,3],[32,10]]
  392. DG_MONSTER_TABLE[33] = [[17,3],[20,4],[24,7],[25,8],[26,10],[27,10],[28,7],[29,5],[30,3],[31,3],[32,3]]
  393. DG_MONSTER_TABLE[34] = [[17,3],[27,4],[29,7],[30,10],[31,3],[32,3]]
  394. DG_MONSTER_TABLE[35] = [[47,3]]
  395. DG_MONSTER_TABLE[36] = [[17,3],[27,4],[29,7],[30,8],[31,3],[32,3]]
  396. DG_MONSTER_TABLE[37] = [[17,3],[30,4],[31,7],[32,3]]
  397. DG_MONSTER_TABLE[38] = [[17,3],[30,4],[31,7],[32,3]]
  398. DG_MONSTER_TABLE[39] = [[17,3],[23,4],[27,7],[29,8],[30,10],[31,3],[32,3]]
  399. DG_MONSTER_TABLE[40] = [[48,3]]
  400. DG_MONSTER_TABLE[40] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  401. DG_MONSTER_TABLE[41] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  402. DG_MONSTER_TABLE[42] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  403. DG_MONSTER_TABLE[43] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  404. DG_MONSTER_TABLE[44] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  405. DG_MONSTER_TABLE[45] = [[49,3]]
  406. DG_MONSTER_TABLE[46] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  407. DG_MONSTER_TABLE[47] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  408. DG_MONSTER_TABLE[48] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  409. DG_MONSTER_TABLE[49] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  410. DG_MONSTER_TABLE[50] = [[50,3]]
  411. DG_MONSTER_TABLE[51] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  412. DG_MONSTER_TABLE[52] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  413. DG_MONSTER_TABLE[53] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  414. DG_MONSTER_TABLE[54] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  415. DG_MONSTER_TABLE[55] = [[51,3]]
  416. DG_MONSTER_TABLE[56] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  417. DG_MONSTER_TABLE[57] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,10],[31,5],[32,3]]
  418. DG_MONSTER_TABLE[58] = [[17,1],[21,1],[24,1],[26,8],[27,10],[29,10],[30,7],[31,10],[32,3]]
  419. DG_MONSTER_TABLE[59] = [[17,1],[21,1],[24,1],[26,1],[27,1],[29,2],[30,2],[31,2],[32,10]]
  420. DG_MONSTER_TABLE[60] = [[52,3]]


  421.   
  422.   
  423.   #--------------------------------------------------------------------------
  424.   # ○ フロアパターン99の設定 未使用
  425.   #--------------------------------------------------------------------------
  426.   DG_BASE[99] = 1             # 設定省略時に使う親フロア
  427. #~   DG_CURSE_RATE[99] = 100     # 剣と盾以外のものが呪われている確率
  428.   DG_WEATHER[99] = [3, 8]     # フロアの天候
  429.   DG_ITEM_TABLE[99] = []      # 出現アイテム
  430.   DG_ITEM_TABLE[99].push([0, 32, 5])
  431. #~   DG_ITEM_TABLE[99].push([2, 65, 5])
  432. #~   DG_ITEM_TABLE[99].push([0, 56, 5])
  433. #~   DG_ITEM_TABLE[99].push([5, 0, 1000])  # お金
  434.   DG_MONSTER_TABLE[99] = [    # 出現モンスター
  435.     [1, 10]
  436.   ]
  437.   DG_TRAP_TABLE[99] = [       # 出現ワナ
  438.     [121, 5]
  439.   ]
  440.   DG_SHOP_RATE[99] = 100      # お店の出現率

  441.   #--------------------------------------------------------------------------
  442.   # ○ フロアパターン101の設定 イージー
  443.   #--------------------------------------------------------------------------
  444.   DG_BASE[101]            = nil # 設定省略時に使う親フロア
  445.   DG_SIZE[101]            = [50, 37]  # フロア全体のサイズ
  446.   DG_ROOM_MIN[101]        = 5   # 部屋の最小サイズ
  447.   DG_ROOM_MARGIN[101]     = 2   # 部屋の周りの余白(部屋と区画の間隔です、下限2)
  448.   DG_NOSPLIT_RATE[101]    = 10  # 数値が大きいほど部屋数が少なくなりやすい(%)
  449.   DG_ADD_COUPLE_RATE[101] = 4   # 数値が大きいほど通路が複雑になりやすい(%)
  450.   DG_MANY_ROOM_RATE[101]  = 10  # 部屋数が最大になるようにフロア作る確率(%)
  451.   DG_MAX_ROOM_RATE[101]   = 20  # 区画内での最高サイズの部屋を強制的に作る確率(%)
  452.   DG_TILE[101] = [1552, 5888, 536, 265] # 使用するタイルパターン
  453.   DG_MONSTER_NUM[101]     = 8   # モンスターの初期配置数
  454.   DG_MONSTER_MAX[101]     = 20#32  # モンスターの最大数
  455.   DG_MONSTER_TABLE[101] = [     # 出現モンスター
  456. #   [3, 10], [4, 8]
  457. [1, 10], [2, 10], [3, 10], [4, 10]
  458.   ]
  459.   DG_ITEM_MAX[101]        = 10  # アイテム初期配置数の最大
  460.   DG_ITEM_TABLE[101] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  461.   for i in 1..18    do DG_ITEM_TABLE[101].push([0, i, 5]) end    # 草
  462.   for i in 31..52   do DG_ITEM_TABLE[101].push([0, i, 5]) end    # 巻物
  463.   for i in 61..68   do DG_ITEM_TABLE[101].push([0, i, 5]) end    # 杖
  464.   for i in 81..85   do DG_ITEM_TABLE[101].push([0, i, 5]) end    # 壷
  465.   for i in 101..104 do DG_ITEM_TABLE[101].push([0, i, 5]) end    # 食料
  466.   for i in 111..113 do DG_ITEM_TABLE[101].push([0, i, 5]) end    # 矢
  467.    
  468.   for i in 1..9     do DG_ITEM_TABLE[101].push([1, i, 5]) end    # 武器 1..8
  469.   for i in 1..5     do DG_ITEM_TABLE[101].push([2, i, 5]) end    # 防具 1..5
  470.   for i in 21..26   do DG_ITEM_TABLE[101].push([2, i, 5]) end    # 指輪
  471.   DG_GOLD_RATE[101]       = 11  # お金出現率(%)
  472.   DG_DROP_RATE[101]       = 16  # モンスターの共通アイテムドロップ率(1/n)
  473.   DG_TRAP_MAX[101]        = 5  # トラップの最大数
  474.   DG_TRAP_NUM[101]        = 2  # トラップの初期配置数
  475.   DG_TRAP_TABLE[101] = []       # 出現ワナ #ここでエラーでる
  476.   for i in 121..137 do DG_TRAP_TABLE[101].push([i, 5]) end
  477.   DG_CURSE_RATE[101]      = 0#0#8   # 剣と盾以外のものが呪われている確率
  478.   DG_SLEEP_RATE[101]      = 80  # 出現モンスターが眠っている確率
  479.   DG_REPOP_TURN[101]      = 20  # モンスター再出現間隔(経過するまで再出現判定なし)
  480.   DG_REPOP_RATE[101]      = 10  # モンスター再出現確率
  481.   DG_BGM[101]             = ["Audio/BGM/Dungeon1.mid", 100, 100]
  482.   DG_BGS[101]             = ["Audio/BGS/Drips.ogg", 80, 100]
  483.   DG_HOUSE_BGM[101]       = ["Audio/BGM/Battle1.mid", 100, 100]
  484.   DG_SHOP_BGM[101]        = ["Audio/BGM/Scene4.mid", 100, 100]
  485.   DG_THIEF_BGM[101]       = ["Audio/BGM/Battle5.mid", 100, 100]
  486.   DG_WEATHER[101]         = [0, 0]  # フロアの天候
  487.   DG_SHOP_RATE[101]       = 10#30  # お店の出現率
  488.   DG_SHOP_KEEPER[101]     = 55   # 店主のモンスターID
  489.   DG_SHOP_GUARD[101]      = 55   # 番犬のモンスターID
  490.   DG_HOUSE_RATE[101]      = 5  # モンスターハウス出現率
  491.   DG_HOUSE_MONSTER_NUM[101] = 10#20  # モンスターハウスにいるモンスターの数
  492.   DG_HOUSE_ITEM_NUM[101]  = 20  # モンスターハウスにあるアイテムの数
  493.   DG_HOUSE_TRAP_NUM[101]  = 5  # モンスターハウスにあるワナの数

  494.   #--------------------------------------------------------------------------
  495.   # ○ フロアパターン102の設定
  496.   #--------------------------------------------------------------------------
  497.   DG_BASE[102] = 101              # 設定省略時に使う親フロア
  498.   DG_MONSTER_TABLE[102] = [     # 出現モンスター
  499. [1, 10], [2, 10], [3, 10], [4, 10], [5, 5], [6, 5]
  500.   ]
  501.   DG_TILE[102] = [1570, 6752, 77, 267] #[1591, 7760, 543, 267] # 使用するタイルパターン
  502.   #--------------------------------------------------------------------------
  503.   # ○ フロアパターン103の設定
  504.   #--------------------------------------------------------------------------
  505.   DG_BASE[103] = 101            # 設定省略時に使う親フロア
  506.   DG_MONSTER_TABLE[103] = [     # 出現モンスター
  507. [1, 10], [2, 10], [3, 10], [4, 10], [5, 5], [6, 5]
  508.   ]
  509.   DG_TILE[103] = [1588, 7616, 540, 264]#[1570, 6752, 77, 267] # 使用するタイルパターン
  510.   #--------------------------------------------------------------------------
  511.   # ○ フロアパターン104の設定
  512.   #--------------------------------------------------------------------------
  513.   DG_BASE[104] = 101              # 設定省略時に使う親フロア
  514.   DG_MONSTER_TABLE[104] = [     # 出現モンスター
  515. [2, 3], [3, 3], [4, 3], [5, 10], [6, 10], [7, 5], [8, 5], [9, 5]
  516.   ]
  517.   DG_TILE[104] = [1586, 7520, 538, 267]#[1586, 7520, 538, 267] # 使用するタイルパターン
  518.   #--------------------------------------------------------------------------
  519.   # ○ フロアパターン105の設定 ★BOSS
  520.   #--------------------------------------------------------------------------
  521.   DG_BASE[105] = 101             # 設定省略時に使う親フロア
  522.   DG_MONSTER_TABLE[105] = [     # 出現モンスター
  523.    [41, 10]#[20, 10]# [41, 10]
  524.   ]
  525.   DG_TILE[105] = [1591, 7760, 543, 267]#[1588, 7616, 540, 264] # 使用するタイルパターン
  526.   DG_MONSTER_NUM[105]     = 1#20#1   # モンスターの初期配置数
  527.   DG_MONSTER_MAX[105]     = 1#20#1#32  # モンスターの最大数
  528.   DG_SHOP_RATE[105]       = 0#30  # お店の出現率
  529.   DG_HOUSE_RATE[105]      = 0  # モンスターハウス出現率
  530.   DG_REPOP_RATE[105]      = 0  # モンスター再出現確率
  531.   
  532.   #--------------------------------------------------------------------------
  533.   # ○ フロアパターン110まで
  534.   #--------------------------------------------------------------------------
  535. DG_BASE[106] = 101
  536. DG_MONSTER_TABLE[106] = [
  537. [2, 3], [3, 3], [4, 3], [5, 10], [6, 10], [7, 5], [8, 5], [9, 5], [10, 5], [33, 5]]

  538. DG_BASE[107] = 102
  539. DG_MONSTER_TABLE[107] = [
  540. [2, 3], [3, 3], [4, 3], [5, 10], [6, 10], [7, 5], [8, 5], [9, 5], [10, 5], [33, 5]]

  541. DG_BASE[108] = 103
  542. DG_MONSTER_TABLE[108] = [
  543. [5, 3], [6, 3], [7, 5], [8, 5], [9, 10], [10, 10],[11, 5],[12, 3], [33, 5]]

  544. DG_BASE[109] = 104   
  545. DG_MONSTER_TABLE[109] = [
  546. [6, 3], [7, 3], [8, 5], [9, 5], [10, 10],[11, 10],[12, 5],[13, 3], [33, 5]]

  547. DG_BASE[110] = 105
  548. DG_MONSTER_TABLE[110] = [[42, 10]]
  549.   
  550.   #--------------------------------------------------------------------------
  551.   # ○ フロアパターン115まで
  552.   #--------------------------------------------------------------------------
  553. DG_BASE[111] = 101  
  554. DG_MONSTER_TABLE[111] = [
  555. [6, 3], [7, 3], [8, 5], [9, 5], [10, 10],[11, 10],[12, 5],[13, 3], [33, 5]]

  556. DG_BASE[112] = 102
  557. DG_MONSTER_TABLE[112] = [
  558. [8, 2], [9, 3], [10, 4],[11, 5],[12, 6],[13, 8],[14, 10], [15, 8],[16, 3], [17, 3]]

  559. DG_BASE[113] = 103
  560. DG_MONSTER_TABLE[113] = [
  561. [8, 1], [9, 2], [10, 3],[11, 3],[12, 5],[13, 8],[14, 10], [15, 10],[16, 5], [17, 3]]

  562. DG_BASE[114] = 104   
  563. DG_MONSTER_TABLE[114] = [
  564. [8, 1], [9, 2], [10, 3],[11, 3],[12, 5],[13, 8],[14, 10], [15, 10],[16, 10], [17, 10]]

  565. DG_BASE[115] = 105
  566. DG_MONSTER_TABLE[115] = [[43, 10]]  

  567.   #--------------------------------------------------------------------------
  568.   # ○ フロアパターン120まで
  569.   #--------------------------------------------------------------------------
  570. DG_BASE[116] = 101  
  571. DG_MONSTER_TABLE[116] = [
  572. [11, 3],[12, 3],[13, 3],[14, 5],[15, 5],[16, 7], [17, 7], [18, 8], [19, 3], [20, 3]]

  573. DG_BASE[117] = 102
  574. DG_MONSTER_TABLE[117] = [
  575. [11, 2],[12, 2],[13, 2],[14, 3],[15, 5],[16, 8], [17, 10], [18, 10], [19, 3], [20, 3]]

  576. DG_BASE[118] = 103
  577. DG_MONSTER_TABLE[118] = [
  578. [11, 1],[12, 1],[13, 1],[14, 3],[15, 5],[16, 5], [17, 8], [18, 10], [19, 7], [20, 5]]

  579. DG_BASE[119] = 104   
  580. DG_MONSTER_TABLE[119] = [
  581. [12, 1],[14, 3],[15, 5],[16, 5], [17, 8], [18, 8], [19, 10], [20, 10],[21, 5],[22, 3],[23, 3]]

  582. DG_BASE[120] = 105
  583. DG_MONSTER_TABLE[120] = [[44, 10]]
  584.   
  585.   #--------------------------------------------------------------------------
  586.   # ○ フロアパターン121~160まで エクセルで作成
  587.   #--------------------------------------------------------------------------
  588. DG_BASE[121] = 101
  589. DG_BASE[122] = 102
  590. DG_BASE[123] = 103
  591. DG_BASE[124] = 104
  592. DG_BASE[125] = 105

  593. DG_BASE[126] = 101
  594. DG_BASE[127] = 102
  595. DG_BASE[128] = 103
  596. DG_BASE[129] = 104
  597. DG_BASE[130] = 105

  598. DG_BASE[131] = 101
  599. DG_BASE[132] = 102
  600. DG_BASE[133] = 103
  601. DG_BASE[134] = 104
  602. DG_BASE[135] = 105

  603. DG_BASE[136] = 101
  604. DG_BASE[137] = 102
  605. DG_BASE[138] = 103
  606. DG_BASE[139] = 104
  607. DG_BASE[140] = 105

  608. DG_BASE[141] = 101
  609. DG_BASE[142] = 102
  610. DG_BASE[143] = 103
  611. DG_BASE[144] = 104
  612. DG_BASE[145] = 105

  613. DG_BASE[146] = 101
  614. DG_BASE[147] = 102
  615. DG_BASE[148] = 103
  616. DG_BASE[149] = 104
  617. DG_BASE[150] = 105

  618. DG_BASE[151] = 101
  619. DG_BASE[152] = 102
  620. DG_BASE[153] = 103
  621. DG_BASE[154] = 104
  622. DG_BASE[155] = 105

  623. DG_BASE[156] = 101
  624. DG_BASE[157] = 102
  625. DG_BASE[158] = 103
  626. DG_BASE[159] = 104
  627. DG_BASE[160] = 105  
  628.   
  629.   
  630. DG_MONSTER_TABLE[121] = [[12,3],[14,4],[15,7],[16,8],[17,10],[18,10],[19,7],[20,5],[21,3],[22,3],[23,3]]
  631. DG_MONSTER_TABLE[122] = [[12,3],[14,4],[15,7],[16,8],[17,10],[18,10],[19,7],[20,5],[21,3],[22,3],[23,3]]
  632. DG_MONSTER_TABLE[123] = [[16,3],[17,4],[18,7],[19,8],[20,10],[21,10],[22,7],[23,5],[24,3],[25,3]]
  633. DG_MONSTER_TABLE[124] = [[16,3],[17,4],[18,7],[19,8],[20,10],[21,10],[22,7],[23,5],[24,3],[25,3],[26,3]]
  634. DG_MONSTER_TABLE[125] = [[45,3]]
  635. DG_MONSTER_TABLE[126] = [[17,3],[18,4],[19,7],[20,8],[21,10],[22,10],[23,7],[24,5],[25,3],[26,3],[27,3]]
  636. DG_MONSTER_TABLE[127] = [[17,3],[20,4],[21,7],[22,8],[23,10],[24,10],[25,7],[26,5],[27,3],[28,3],[29,3]]
  637. DG_MONSTER_TABLE[128] = [[17,3],[20,4],[21,7],[22,8],[23,10],[24,10],[25,7],[26,5],[27,3],[28,3],[29,3],[30,10]]
  638. DG_MONSTER_TABLE[129] = [[17,3],[20,4],[21,7],[22,8],[23,10],[24,10],[25,7],[26,5],[27,3],[28,3],[29,3],[30,10],[31,10]]
  639. DG_MONSTER_TABLE[130] = [[46,3]]
  640. DG_MONSTER_TABLE[131] = [[17,3],[20,4],[22,7],[23,8],[24,10],[25,10],[26,7],[27,5],[28,3],[29,3],[30,3],[31,10],[32,10]]
  641. DG_MONSTER_TABLE[132] = [[17,3],[20,4],[23,7],[24,8],[25,10],[26,10],[27,7],[28,5],[29,3],[30,3],[31,3],[32,10]]
  642. DG_MONSTER_TABLE[133] = [[17,3],[20,4],[24,7],[25,8],[26,10],[27,10],[28,7],[29,5],[30,3],[31,3],[32,3]]
  643. DG_MONSTER_TABLE[134] = [[17,3],[27,4],[29,7],[30,10],[31,3],[32,3]]
  644. DG_MONSTER_TABLE[135] = [[47,3]]
  645. DG_MONSTER_TABLE[136] = [[17,3],[27,4],[29,7],[30,8],[31,3],[32,3]]
  646. DG_MONSTER_TABLE[137] = [[17,3],[30,4],[31,7],[32,3]]
  647. DG_MONSTER_TABLE[138] = [[17,3],[30,4],[31,7],[32,3]]
  648. DG_MONSTER_TABLE[139] = [[17,3],[23,4],[27,7],[29,8],[30,10],[31,3],[32,3]]
  649. DG_MONSTER_TABLE[140] = [[48,3]]

  650. #DG_MONSTER_TABLE[140] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]

  651. DG_MONSTER_TABLE[141] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  652. DG_MONSTER_TABLE[142] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  653. DG_MONSTER_TABLE[143] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  654. DG_MONSTER_TABLE[144] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  655. DG_MONSTER_TABLE[145] = [[49,3]]



  656. #~ DG_MONSTER_TABLE[146] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  657. #~ DG_MONSTER_TABLE[147] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  658. #~ DG_MONSTER_TABLE[148] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  659. #~ DG_MONSTER_TABLE[149] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  660. #~ DG_MONSTER_TABLE[150] = [[50,3]]
  661. #~ DG_MONSTER_TABLE[151] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  662. #~ DG_MONSTER_TABLE[152] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  663. #~ DG_MONSTER_TABLE[153] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  664. #~ DG_MONSTER_TABLE[154] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  665. #~ DG_MONSTER_TABLE[155] = [[51,3]]
  666. #~ DG_MONSTER_TABLE[156] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,7],[31,5],[32,3]]
  667. #~ DG_MONSTER_TABLE[157] = [[17,3],[21,4],[24,7],[26,8],[27,10],[29,10],[30,10],[31,5],[32,3]]
  668. #~ DG_MONSTER_TABLE[158] = [[17,1],[21,1],[24,1],[26,8],[27,10],[29,10],[30,7],[31,10],[32,3]]
  669. #~ DG_MONSTER_TABLE[159] = [[17,1],[21,1],[24,1],[26,1],[27,1],[29,2],[30,2],[31,2],[32,10]]
  670. #~ DG_MONSTER_TABLE[160] = [[52,3]]

  671. #--------------------------------------------------------------------------
  672. #アイテム設定
  673. #--------------------------------------------------------------------------
  674. #ハード 20-29F
  675. for f in 20..29
  676. DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  677.   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  678.   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  679.   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  680.   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  681.   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  682.   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  683.    
  684.   for i in 1..10     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 雷神の剣ついか
  685.   for i in 1..6     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  686.   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  687. end
  688. for f in 30..39
  689. DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  690.   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  691.   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  692.   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  693.   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  694.   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  695.   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  696.    
  697.   for i in 1..11     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 剣ついか
  698.   for i in 1..7     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  699.   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  700. end
  701. for f in 40..49
  702. DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  703.   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  704.   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  705.   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  706.   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  707.   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  708.   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  709.    
  710.   for i in 1..12     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 剣ついか
  711.   for i in 1..8     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  712.   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  713. end
  714. for f in 50..60
  715. DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  716.   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  717.   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  718.   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  719.   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  720.   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  721.   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  722.    
  723.   for i in 1..13     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 剣ついか
  724.   for i in 1..9     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  725.   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  726. end
  727. #イージー
  728. for f in 120..129
  729. DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  730.   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  731.   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  732.   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  733.   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  734.   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  735.   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  736.    
  737.   for i in 1..10     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 雷神の剣ついか
  738.   for i in 1..6     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  739.   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  740. end
  741. for f in 130..139
  742. DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  743.   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  744.   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  745.   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  746.   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  747.   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  748.   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  749.    
  750.   for i in 1..11     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 剣ついか
  751.   for i in 1..7     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  752.   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  753. end
  754. for f in 140..145
  755. DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  756.   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  757.   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  758.   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  759.   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  760.   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  761.   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  762.    
  763.   for i in 1..12     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 剣ついか
  764.   for i in 1..8     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  765.   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  766. end
  767. #~ for f in 150..160
  768. #~  DG_ITEM_TABLE[f] = []       # 出現アイテム ★たくさん代入するほど出やすいっぽい
  769. #~   for i in 1..18    do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 草
  770. #~   for i in 31..52   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 巻物
  771. #~   for i in 61..68   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 杖
  772. #~   for i in 81..85   do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 壷
  773. #~   for i in 101..104 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 食料
  774. #~   for i in 111..113 do DG_ITEM_TABLE[f].push([0, i, 5]) end    # 矢
  775. #~     
  776. #~   for i in 1..13     do DG_ITEM_TABLE[f].push([1, i, 5]) end    # 武器 剣ついか
  777. #~   for i in 1..9     do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 防具 1..5
  778. #~   for i in 21..26   do DG_ITEM_TABLE[f].push([2, i, 5]) end    # 指輪
  779. #~ end


  780.   
  781.   #--------------------------------------------------------------------------
  782.   # ○ ダンジョン1の設定 ★ハード
  783.   #--------------------------------------------------------------------------
  784.   DG_NAME[1] = "もっと不気味なダンジョン"      # ダンジョン名
  785.   DG_FLOOR[1] = [                          # 使用するフロアパターン
  786.    # nil, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, nil
  787.         nil,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,nil

  788.   ]
  789.   DG_JUDGE_ITEM[1] = []#[55, 60, 65, 70, 90, 95, 100]#[55, 60, 65, 70, 90]#[55, 60, 65, 70, 75,80,85,90,95,100]#[55, 60, 65, 70, 90]#これだと剣は未鑑定                    # 識別済みのアイテム種別
  790.   
  791.   #--------------------------------------------------------------------------
  792.   # ○ ダンジョン2の設定
  793.   #--------------------------------------------------------------------------
  794.   DG_NAME[2] = "ボステストダンジョン"
  795.   DG_FLOOR[2] = [
  796.     nil, 5, nil
  797. #    nil, 99, nil
  798.    
  799.   ]
  800.   DG_JUDGE_ITEM[2] = [
  801.     55, 60, 65, 70, 90
  802.   ]

  803.   #--------------------------------------------------------------------------
  804.   # ○ ダンジョン3の設定 ★イージー
  805.   #--------------------------------------------------------------------------
  806.   DG_NAME[3] = "不気味なダンジョン"    # ダンジョン名
  807.   DG_FLOOR[3] = [                          # 使用するフロアパターン
  808.         nil,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,nil#146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,nil
  809. #        nil,101,nil

  810.         ]
  811.   DG_JUDGE_ITEM[3] = [                     # 識別済みのアイテム種別
  812.     55, 60, 65, 70, 90
  813.   ]
  814.   
  815. end

  816. # ダンジョンメッセージには以下の制御文字が使えます
  817. #     \\C[n]    文字色変更
  818. #     \\I[n]    アイテムアイコン描画
  819. #     \\.       ウェイト15フレーム
  820. module Vocab
  821.   DgCurse =     "%sは呪われている!"
  822.   DgGather =    "%sを拾った。"
  823.   DgSwing =     "\\C[6]%s\\C[0]は%sを振った!"
  824.   DgThrow =     "\\C[6]%s\\C[0]は%sを投げた!"
  825.   DgShot =      "\\C[6]%s\\C[0]は%sを投げた"#撃った!"
  826.   DgRide =      "%sの上に乗った。"
  827.   DgDrop =      "%sを地面に置いた。"
  828.   DgEquip =     "%sを装備した。"
  829.   DgEvasion =   "\\C[6]%s\\C[0]の攻撃はあたらなかった。"
  830.   DgEat =       "\\C[6]%s\\C[0]は%sを食べた!"
  831.   DgDrink =     "\\C[6]%s\\C[0]は%sを飲んだ!"
  832.   DgRead =      "\\C[6]%s\\C[0]は%sを読んだ!"
  833.   DgJudge =     "なんと!%sは%sだった!"
  834.   DgHpRecover = "\\C[6]%s\\C[0]のHPが\\C[4]%d\\C[0]回復した!"
  835.   DgHpDamage =  "\\C[6]%s\\C[0]は\\C[4]%d\\C[0]のダメージを受けた!"
  836.   DgHungry = [
  837.     "お腹が減ってきた…",
  838.     "お腹が減りすぎて目が回ってきた。",
  839.     "だめだ! もう倒れそうだ!",
  840.     "早く…何か食べないと…",
  841.     "飢え死にしてしまう!"
  842.   ]
  843.   DgFood =      "\\C[6]%s\\C[0]のお腹がふくれた。"
  844.   DgFoodMax =   "\\C[6]%s\\C[0]は満腹になった。"
  845.   DgDead =      "\\C[6]%s\\C[0]はたおれた。\\."
  846.   DgExp =       "\\C[6]%s\\C[0]は\\C[4]%d\\C[0]の経験値を得た。\\."
  847.   DgLevelup =   "\\C[6]%s\\C[0]はレベル\\C[4]%d\\C[0]になった!"
  848.   DgLeveldown = "\\C[6]%s\\C[0]のレベルが\\C[4]%d\\C[0]下がった。"
  849.   DgOnTrap =    "%sをふんだ。"
  850.   DgMissTrap =  "しかし作動しなかった。"
  851.   DgSilent =    "\\C[6]%s\\C[0]は口が使えない。"
  852.   DgShopIn =    "いらっしゃいませ。"
  853.   DgShopOut =   "ありがとうございました。"
  854.   DgShopSell =  "お客様が店に置いた商品を\\C[4]%d\\C[0]Gで買い取ります。"
  855.   DgShopBuy =   "代金\\C[4]%d\\C[0]Gいただきます。"
  856.   DgShopFailed = "お金が足りません。"
  857.   DgThief =     "ドロボー!"
  858.   DgHouse =     "モンスターハウスだ!"
  859. end

  860. module Sound
  861.   def self.play_curse         # 呪いME
  862.     Audio.me_play("Audio/ME/Shock.mid", 80, 100)
  863.   end
  864.   def self.play_levelup       # レベルアップSE
  865.     Audio.me_play("Audio/SE/Applause.ogg", 80, 100)
  866.   end
  867.   def self.play_leveldown     # レベルダウンSE
  868.     Audio.me_play("Audio/SE/Down.ogg", 80, 50)
  869.   end
  870.   def self.play_gather        # 拾うSE
  871.     Audio.se_play("Audio/SE/Open1.ogg", 80, 150)
  872.   end
  873.   def self.play_remove        # はずすSE
  874.     Audio.se_play("Audio/SE/Open3.ogg", 80, 150)
  875.   end
  876.   def self.play_throw         # 投げるSE
  877.     Audio.se_play("Audio/SE/Wind10.ogg", 80, 150)
  878.   end
  879.   def self.play_sort          # 整頓SE
  880.     Audio.se_play("Audio/SE/Chime2.ogg", 80, 150)
  881.   end
  882.   def self.play_move          # すすむSE
  883.     Audio.se_play("Audio/SE/Move.ogg", 80, 100)
  884.   end
  885.   def self.play_trap          # 踏むSE
  886.     Audio.se_play("Audio/SE/Switch2.ogg", 80, 100)
  887.   end
  888.   def self.play_pot_break     # 壷が割れるSE
  889.     Audio.se_play("Audio/SE/Crash.ogg", 80, 80)
  890.   end
  891.   def self.play_shot          # 矢を撃つSE
  892.     Audio.se_play("Audio/SE/Bow1.ogg", 80, 100)
  893.   end
  894. end

  895. #==============================================================================
  896. # ■ 設定はここまで
  897. #==============================================================================

  898. module DUNG::Commands
  899.   module_function
  900.   #--------------------------------------------------------------------------
  901.   # ○ ダンジョンの開始
  902.   #--------------------------------------------------------------------------
  903.   def dungeon_start(dungeon_id)
  904.     $game_temp.map_bgm = RPG::BGM.last
  905.     $game_temp.map_bgs = RPG::BGS.last
  906.     RPG::BGM.stop
  907.     RPG::BGS.stop
  908.     Sound.play_move
  909.     $game_dungeon.new_game(dungeon_id)
  910.     $scene = Scene_Dungeon.new
  911.   end
  912.   #--------------------------------------------------------------------------
  913.   # ○ ダンジョン用パラメータの初期化
  914.   #--------------------------------------------------------------------------
  915.   def reset_dparam
  916.     $game_party.reset_dparam
  917.   end
  918.   #--------------------------------------------------------------------------
  919.   # ○ ダンジョン用アイテムの初期化
  920.   #--------------------------------------------------------------------------
  921.   def reset_ditem
  922.    # p"アイテム初期化"
  923.     $game_party.reset_ditem
  924.   end
  925.   #--------------------------------------------------------------------------
  926.   # ○ ダンジョン用アイテムの追加
  927.   #--------------------------------------------------------------------------
  928.   def gain_ditem(type, id, plus = nil, option = nil, extends = [])
  929.     ditem = Game_DItem.new(type, id, plus, option, extends)
  930.     $game_party.gain_ditem(ditem)
  931.   end
  932.   #--------------------------------------------------------------------------
  933.   # ○ ダンジョン用お金の初期化
  934.   #--------------------------------------------------------------------------
  935.   def reset_dgold
  936.     $game_party.reset_dgold
  937.   end
  938.   #--------------------------------------------------------------------------
  939.   # ○ 満腹度の初期化
  940.   #--------------------------------------------------------------------------
  941.   def reset_energy
  942.     $game_party.reset_energy
  943.   end
  944.   #--------------------------------------------------------------------------
  945.   # ○ ちからの初期化
  946.   #--------------------------------------------------------------------------
  947.   def reset_power
  948.     $game_party.reset_power
  949.   end
  950. end
  951. class Game_Interpreter
  952.   include DUNG::Commands
  953. end


  954. module RPG
  955.   class Item < UsableItem
  956.     def category
  957.       return 85 if @note =~ /<矢>/i
  958.       return 80 if @note =~ /<食料>/i
  959.       return 75 if @note =~ /<肉>/i
  960.       return 70 if @note =~ /<草>/i
  961.       return 65 if @note =~ /<巻物>/i
  962.       return 60 if @note =~ /<杖>/i
  963.       return 55 if @note =~ /<壷>/i
  964.       return 50 if @note =~ /<お金>/i
  965.       return 10 if @note =~ /<ワナ>/i
  966.     end
  967.   end
  968.   class Weapon < BaseItem
  969.     def category
  970.       return 100
  971.     end
  972.     def extends
  973.       result = []
  974.       result.push(128) if note =~ /<掘>/i
  975.       result.push(129) if note =~ /<壊>/i
  976.       return result
  977.     end
  978.     def speed
  979.       return agi
  980.     end
  981.   end
  982.   class Armor < BaseItem
  983.     def category
  984.       return (kind == 0 ? 95 : 90)
  985.     end
  986.     def speed
  987.       return agi
  988.     end
  989.   end
  990. end

复制代码
就是像elona里面那样可以把墙破坏一样,我记得vx有看见过类似的脚本,只不过他是在迷宫里面可以实现。在迷宫里面可以挖墙就好。上面的是vx不知道可不可以转va
梦石
0
星屑
9292
在线时间
2504 小时
注册时间
2011-5-20
回帖
14521

开拓者

发表于 2017-12-17 17:45:09 | 显示全部楼层
首先直接拉进去看看能不能用,不能再做修改
有的脚本可能是可以通用的
xp里有直接改指定位置图块id再刷新地图的破坏墙壁的方式

如果只是单个迷宫地图要这样做的话用事件也可以,对墙壁事件使用某个道具,然后把事件变空白

点评

那个这个脚本不通用,事件的话我用是随机迷宫生产的那个脚本,根本不知道哪里是墙怎么做事件。  发表于 2017-12-17 18:08
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部