查看: 1755|回复: 1

[有事请教] 幫整合戰鬥難度腳本至設置腳本裏頭

[复制链接]
梦石
0
星屑
2179
在线时间
379 小时
注册时间
2023-6-6
回帖
16
发表于 2023-9-15 22:58:29 | 显示全部楼层 |阅读模式
悬赏80星屑未解决

跪求神人將以下戰鬥難度腳本
[fold=戰鬥難易度腳本]
[prelang="ruby"]#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ◆戦闘難易度 - KGC_BattleDifficulty◆
#_/----------------------------------------------------------------------------
#_/  戦闘難易度の設定機能を追加します。
#_/  (メニュー等に表示する場合は[MenuAlter][TitleOption]参照)
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================

module KGC
  # ◆難易度配列
  #  ≪"名称", HP, SP, 他能力値, EXP, ゴールド, トレジャー出現率≫
  #  各項目の倍率を指定(百分率)。
  BD_DIFFICULTY_LIST = [
    ["Rookie",   60,  50,  60, 100, 100, 100],
    ["Easy",     80,  80,  70, 100, 100, 100],
    ["Normal",  100, 100, 100, 100, 100, 100],
    ["Hard",    150, 130, 120, 100, 100, 100],
    ["Mania",   200, 180, 150, 100, 100, 100],
    ["Unknown", 300, 260, 200, 100, 100, 100],
    ["Divine",  500, 400, 300, 100, 100, 100]
  ]
  # ◆初期難易度
  #  BD_DIFFICULTY_LIST のインデックス。
  BD_INITIAL_DIFFICULTY = 2
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

$imported = {} if $imported == nil
$imported["BattleDifficulty"] = true

module Difficulty
  #--------------------------------------------------------------------------
  # ● 難易度設定取得
  #--------------------------------------------------------------------------
  def self.get
    # 難易度設定を返す
    return KGC::BD_DIFFICULTY_LIST[$game_system.difficulty]
  end
  #--------------------------------------------------------------------------
  # ● 難易度設定変更
  #--------------------------------------------------------------------------
  def self.set(index)
    # 範囲外ならば変更しない
    return if index < 0 || index >= KGC::BD_DIFFICULTY_LIST.size
    $game_system.difficulty = index
  end
  #--------------------------------------------------------------------------
  # ● 能力値補正済みエネミー取得
  #--------------------------------------------------------------------------
  def self.get_revised_enemy(enemy)
    en = enemy.clone
    diff = self.get
    en.maxhp = en.maxhp * diff[1] / 100
    en.maxsp = en.maxsp * diff[2] / 100
    en.str   = en.str   * diff[3] / 100
    en.dex   = en.dex   * diff[3] / 100
    en.agi   = en.agi   * diff[3] / 100
    en.int   = en.int   * diff[3] / 100
    en.atk   = en.atk   * diff[3] / 100
    en.pdef  = en.pdef  * diff[3] / 100
    en.mdef  = en.mdef  * diff[3] / 100
    en.exp   = en.exp   * diff[4] / 100
    en.gold  = en.gold  * diff[4] / 100
    if en.treasure_prob < 100
      en.treasure_prob = [en.treasure_prob * diff[5] / 100, 100].min
    end
    return en
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_System
#==============================================================================

class Game_System
  attr_accessor :difficulty  # 難易度
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias initialize_KGC_BattleDifficulty initialize
  def initialize
    # 元の処理を実行
    initialize_KGC_BattleDifficulty

    @difficulty = KGC::BD_INITIAL_DIFFICULTY
  end
  #--------------------------------------------------------------------------
  # ● 難易度一覧
  #--------------------------------------------------------------------------
  def difficulty_list
    return KGC::BD_DIFFICULTY_LIST
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Enemy
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # ● 基本 MaxHP の取得
  #--------------------------------------------------------------------------
  alias base_maxhp_KGC_BattleDifficulty base_maxhp
  def base_maxhp
    n = base_maxhp_KGC_BattleDifficulty
    n *= Difficulty.get[1]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本 MaxSP の取得
  #--------------------------------------------------------------------------
  alias base_maxsp_KGC_BattleDifficulty base_maxsp
  def base_maxsp
    n = base_maxsp_KGC_BattleDifficulty
    n *= Difficulty.get[2]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本腕力の取得
  #--------------------------------------------------------------------------
  alias base_str_KGC_BattleDifficulty base_str
  def base_str
    n = base_str_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本器用さの取得
  #--------------------------------------------------------------------------
  alias base_dex_KGC_BattleDifficulty base_dex
  def base_dex
    n = base_dex_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本素早さの取得
  #--------------------------------------------------------------------------
  alias base_agi_KGC_BattleDifficulty base_agi
  def base_agi
    n = base_agi_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本魔力の取得
  #--------------------------------------------------------------------------
  alias base_int_KGC_BattleDifficulty base_int
  def base_int
    n = base_int_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本攻撃力の取得
  #--------------------------------------------------------------------------
  alias base_atk_KGC_BattleDifficulty base_atk
  def base_atk
    n = base_atk_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本物理防御の取得
  #--------------------------------------------------------------------------
  alias base_pdef_KGC_BattleDifficulty base_pdef
  def base_pdef
    n = base_pdef_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本魔法防御の取得
  #--------------------------------------------------------------------------
  alias base_mdef_KGC_BattleDifficulty base_mdef
  def base_mdef
    n = base_mdef_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● 基本回避修正の取得
  #--------------------------------------------------------------------------
  alias base_eva_KGC_BattleDifficulty base_eva
  def base_eva
    n = base_eva_KGC_BattleDifficulty
    n *= Difficulty.get[3]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● EXP の取得
  #--------------------------------------------------------------------------
  alias exp_KGC_BattleDifficulty exp
  def exp
    n = exp_KGC_BattleDifficulty
    n *= Difficulty.get[4]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● ゴールドの取得
  #--------------------------------------------------------------------------
  alias gold_KGC_BattleDifficulty gold
  def gold
    n = gold_KGC_BattleDifficulty
    n *= Difficulty.get[5]
    return n / 100
  end
  #--------------------------------------------------------------------------
  # ● トレジャー出現率の取得
  #--------------------------------------------------------------------------
  alias treasure_prob_KGC_BattleDifficulty treasure_prob
  def treasure_prob
    n = treasure_prob_KGC_BattleDifficulty
    if n < 100
      n *= Difficulty.get[6]
      return [n / 100, 100].min
    else
      return n
    end
  end
end[/pre][/fold]

與以下設置腳本整合
意思就是可以在以下的設置裡面調整以上那個戰鬥難易度
[fold=設置腳本][pre lang="ruby"]# * KShlenam XP
#   The Options Menu Script with Dash Feature included!
#   Scripter : Kyonides Arkanthes
#   v1.0.6 - 2023-07-20

# * Aliased Methods * #
# Game_System#initialize #play_bgm #play_bgs #play_se
# Game_Map#initialize

# - Open the Menu - #
# KShlenam.open
# KShlenam.open(LastSceneIndex, :title)

# - Disable Dash on a given Map - #
# $game_map.add_anti_dash(MAPID)

# - Enable Dash on a given Map - #
# $game_map.remove_anti_dash(MAPID)

# - Is Dash disabled on Current Map? - #
# $game_map.disable_dash?

# - Is Dash disabled on a given Map? - #
# $game_map.anti_dash?(MAPID)

module KShlenam
  # Place the Backdrop in the Titles directory
  BACKDROP = "SystemBack"
  BACKDROP_TITLE = "bar title"
  BACKDROP_VOLUME = "bar volume back"
  VOLUME_BAR = "bar volume"
  CURSOR_BARS = ["bar cursor", "bar cursor2"]
  TITLE = "   系統設定"
  TITLE_FONT_NAME = "文泉驛微米黑"
  TITLE_FONT_SIZE = 26
  LABELS_OFFSET_X = 112
  LABELS_OFFSET_Y = 76
  LABELS = %w{背景音樂 背景音效 系統音效 效果音效}
  BGM_NAME = "Fireside Tales"
  BGM_VOLUME = 80
  BGS_VOLUME = 80
  ME_VOLUME  = 70
  SE_VOLUME  = 70
  AUTO_DASH  = false
  FULLSCREEN = false
  LABEL_DASH = "跑步模式"
  LABELS_STATES = %w{開啟 關閉}
  LABEL_FULLSCREEN = "全螢幕模式"
  DASH_BUTTON = Input::A
  BD_DIFFICULTY_LIST = [
    ["Rookie",   60,  50,  60, 100, 100, 100],
    ["Easy",     80,  80,  70, 100, 100, 100],
    ["Normal",  100, 100, 100, 100, 100, 100],
    ["Hard",    150, 130, 120, 100, 100, 100],
    ["Mania",   200, 180, 150, 100, 100, 100],
    ["Unknown", 300, 260, 200, 100, 100, 100],
    ["Divine",  500, 400, 300, 100, 100, 100]
  ]
  BD = "戰鬥難度"
  # Add as many MAP IDs as needed - Effect can be nullified in game.
  NO_DASH_MAPS = []

  extend self
  attr_accessor :volume_levels
  @volume_levels = [BGM_VOLUME, BGS_VOLUME, ME_VOLUME, SE_VOLUME]

  def open(index=0, scene_type=nil)
    $scene = Scene.new(index, scene_type)
  end

  unless $HiddenChest or $MKXP
    @fullscreen = Win32API.new('user32', 'keybd_event', %w(l l l l), '')
  end

  def toggle_fullscreen
    if $HiddenChest or $MKXP
      Graphics.fullscreen = $game_system.fullscreen
    else
      @fullscreen.call(18, 0, 0, 0)
      @fullscreen.call(13, 0, 0, 0)
      @fullscreen.call(13, 0, 2, 0)
      @fullscreen.call(18, 0, 2, 0)
    end
  end

class Spriteset
  def initialize
    @viewports = []
    @back_bars = []
    @bars = []
    @bars_max = KShlenam.volume_levels.size
    @total = @bars_max + 2
    @label_width = 100
    bmap = RPG::Cache.system(VOLUME_BAR).dup
    @max_width = bmap.width
    bmap.dispose
    @backdrop = Sprite.new
    @backdrop.bitmap = RPG::Cache.system(BACKDROP).dup
    @backdrop.opacity = 160
    @title = Sprite.new
    @title.bitmap = b = RPG::Cache.system(BACKDROP_TITLE).dup
    @title.set_xy(320 - b.width / 2, 12)
    @title.opacity = 200
    b.font.name = TITLE_FONT_NAME
    b.font.size = TITLE_FONT_SIZE
    @title.draw_shadow1(0, 4, b.width, 36, TITLE, 1)
    @labels = Sprite.new
    @labels.set_xy(LABELS_OFFSET_X, LABELS_OFFSET_Y)
    @labels.bitmap = b = Bitmap.new(@label_width, 308)
    b.draw_text(0, @bars_max * 56 - 2, @label_width, 28, LABEL_DASH, 1)
    @labels.draw_shadow1(0, @bars_max * 56 - 2, @label_width, 28, LABEL_DASH, 1)
    b.draw_text(0, @bars_max * 56 + 54, @label_width, 28, LABEL_FULLSCREEN, 1)
    @labels.draw_shadow1(0, @bars_max * 56 + 54, @label_width, 28, LABEL_FULLSCREEN, 1)
    @levels = Sprite.new
    @levels.x = LABELS_OFFSET_X + @label_width + @max_width + 20
    @levels.y = LABELS_OFFSET_Y
    @levels.bitmap = Bitmap.new(@label_width, 192)
    @bars_max.times {|n| make_bars(n) }
    dw = b.text_size(LABEL_DASH).width
    @dash_x = LABELS_OFFSET_X + dw + 94
    @dash_y = LABELS_OFFSET_Y + @bars_max * 28 * 2 - 2
    dcw = 64
    @dash_labels = Sprite.new
    @dash_labels.set_xy(@dash_x, @dash_y)
    @dash_labels.bitmap = b = Bitmap.new(dcw * 2, 56)
    @full_y = @dash_y + 56
    @full_labels = Sprite.new
    @full_labels.set_xy(@dash_x, @full_y)
    @full_labels.bitmap = b = Bitmap.new(dcw * 2, 56)
    2.times do |n|
      label = LABELS_STATES[n]
      @dash_labels.bitmap.draw_text(dcw * n, 0, dcw, 28, label, 1)
      @dash_labels.draw_shadow1(dcw * n, 0, dcw, 28, label, 1)
      @full_labels.bitmap.draw_text(dcw * n, 0, dcw, 28, label, 1)
      @full_labels.draw_shadow1(dcw * n, 0, dcw, 28, label, 1)
    end
    make_cursors
  end

  def make_bars(pos)
    bx = LABELS_OFFSET_X + @label_width + 4
    by = LABELS_OFFSET_Y + pos * 56
    @back_bars << bar = Sprite.new
    bar.set_xyz(bx, by, 50)
    bar.bitmap = b = RPG::Cache.system(BACKDROP_VOLUME).dup
    bar.color.set(0, 0, 0, 128)
    @bars << bar = Sprite.new
    bar.set_xyz(bx, by, 100)
    bar.bitmap = RPG::Cache.system(VOLUME_BAR).dup
    @labels.draw_shadow1(0, pos * 56 - 2, @label_width, 28, LABELS[pos])
    bar_update(pos)
  end

  def bar_update(pos)
    volume = get_volume(pos)
    area = @bars[pos].src_rect
    area.width = @max_width / 100 * volume
    ay = pos * 56 - 2
    @levels.clear_area(0, ay, 56, 28)
    @levels.draw_shadow1(0, ay, 56, 28, volume.to_s)
  end
  
  def make_cursors
    @cursor = Sprite.new
    @cursor.bitmap = RPG::Cache.system(CURSOR_BARS[0]).dup
    @cursor.x = LABELS_OFFSET_X + (@label_width - @cursor.bitmap.width) / 2
    @cursor.y = LABELS_OFFSET_Y
    @cursor.opacity = 200
    #-----
    @dash_cursor = Sprite.new
    @dash_cursor.bitmap = RPG::Cache.system(CURSOR_BARS[1]).dup
    @dash_cursor.set_xy(@dash_x, @dash_y + 2)
    @full_cursor = Sprite.new
    @full_cursor.bitmap = RPG::Cache.system(CURSOR_BARS[1]).dup
    @full_cursor.set_xy(@dash_x, @full_y + 2)
  end
  #-----------------------------------------------------------------
  #-----------------------------------------------------------------
  
  def get_volume(pos)
    case pos
    when 0 then $game_system.bgm_volume
    when 1 then $game_system.bgs_volume
    when 2 then $game_system.me_volume
    when 3 then $game_system.se_volume
    end
  end

  def index=(pos)
    @cursor.y = LABELS_OFFSET_Y + pos * 56
  end

  def dash_index=(pos)
    @dash_cursor.x = @dash_x + 64 * pos
  end

  def full_index=(pos)
    @full_cursor.x = @dash_x + 64 * pos
  end

  def dispose
    @bars.each{|bar| bar.dispose_all }
    @back_bars.each{|bar| bar.dispose_all }
    @full_cursor.dispose_all
    @dash_cursor.dispose_all
    @cursor.dispose_all
    @levels.dispose_all
    @full_labels.dispose_all
    @dash_labels.dispose_all
    @labels.dispose_all
    @title.dispose_all
    @backdrop.dispose_all
    @viewports.each{|v| v.dispose }
  end
  attr_reader :total
end

class Scene
  def initialize(pos=0, scene_symbol=nil)
    $game_temp ||= Game_Temp.new
    @index = 0
    @external_index = pos
    @last_scene = scene_symbol
  end

  def main
    $game_temp.map_bgm = $game_system.playing_bgm
    @spritesetm = Spriteset_Map.new
    @bgm = $game_temp.map_bgm
    $game_system.bgm_play(@bgm)
    @spriteset = Spriteset.new
    @spriteset.dash_index = $game_system.auto_dash ? 0 : 1
    @spriteset.full_index = $game_system.fullscreen ? 0 : 1
    Graphics.transition
    while @index
      Graphics.update
      Input.update
      update
    end
    Graphics.freeze
    @spriteset.dispose
    @spritesetm.dispose
    $game_system.save_volume_levels
    $game_map.autoplay if [:map, :menu, nil].include?(@last_scene)
    $game_temp.map_bgm = @bgm = nil
  end

  def next_scene
    case @last_scene
    when :title
      $scene = Scene_Title.new(@external_index)
    when :menu
      $scene = Scene_Menu.new(@external_index)
    else
      $scene = Scene_Map.new
    end
  end

  def update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(6)
      #next_scene
      return @index = nil
    elsif Input.trigger?(Input::UP)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index - 1) % @spriteset.total
      @spriteset.index = @index
    elsif Input.trigger?(Input::DOWN)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index + 1) % @spriteset.total
      @spriteset.index = @index
    end
    case @index
    when 0
      update_bgm
    when 1
      update_bgs
    when 2
      update_me
    when 3
      update_se
    when 4
      update_dash
    when 5
      update_fullscreen
    end
  end

  def update_bgm
    if Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.bgm_decrease
      $game_system.bgm_play(@bgm)
      @spriteset.bar_update(0)
    elsif Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.bgm_increase
      $game_system.bgm_play(@bgm)
      @spriteset.bar_update(0)
    end
  end

  def update_bgs
    if Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.bgs_decrease
      @spriteset.bar_update(1)
    elsif Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.bgs_increase
      @spriteset.bar_update(1)
    end
  end

  def update_me
    if Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.me_decrease
      @spriteset.bar_update(2)
    elsif Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.me_increase
      @spriteset.bar_update(2)
    end
  end

  def update_se
    if Input.trigger?(Input::LEFT)
      $game_system.se_decrease
      $game_system.se_play($data_system.cursor_se)
      @spriteset.bar_update(3)
    elsif Input.trigger?(Input::RIGHT)
      $game_system.se_increase
      $game_system.se_play($data_system.cursor_se)
      @spriteset.bar_update(3)
    end
  end

  def update_dash
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.auto_dash = !$game_system.auto_dash
      @spriteset.dash_index = $game_system.auto_dash ? 0 : 1
    end
  end

  def update_fullscreen
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      $game_system.fullscreen = !$game_system.fullscreen
      @spriteset.full_index = $game_system.fullscreen ? 0 : 1
      KShlenam.toggle_fullscreen
    end
  end
end

end

class Sprite
  def set_xy(nx, ny)
    self.x = nx
    self.y = ny
  end

  def set_xyz(nx, ny, nz)
    self.x = nx
    self.y = ny
    self.z = nz
  end

  def clear_area(ax, ay, aw, ah)
    bitmap.fill_rect(ax, ay, aw, ah, Color.new(0, 0, 0, 0))
  end

  def draw_shadow1(sx, sy, w, h, text, align=0)
    bitmap.font.color.set(0, 0, 0)
    bitmap.draw_text(sx + 1, sy + 1, w, h, text, 1)
    bitmap.font.color.set(255, 255, 255)
    bitmap.draw_text(sx, sy, w, h, text, 1)
  end

  def dispose_all
    bitmap.dispose if bitmap
    dispose
  end
end

class Game_System
  alias :kyon_shlenam_gm_sys_init :initialize
  def initialize
    kyon_shlenam_gm_sys_init
    @bgm_volume = KShlenam.volume_levels[0]
    @bgs_volume = KShlenam.volume_levels[1]
    @me_volume  = KShlenam.volume_levels[2]
    @se_volume  = KShlenam.volume_levels[3]
    @auto_dash  = KShlenam::AUTO_DASH
    @fullscreen = KShlenam::FULLSCREEN
  end

  def save_volume_levels
    KShlenam.volume_levels = [@bgm_volume, @bgs_volume, @me_volume, @se_volume]
  end

  def bgm_play(bgm)
    @playing_bgm = bgm
    if bgm and !bgm.name.empty?
      Audio.bgm_play("Audio/BGM/" + bgm.name, @bgm_volume, bgm.pitch)
    else
      Audio.bgm_stop
    end
    Graphics.frame_reset
  end

  def bgs_play(bgs)
    @playing_bgs = bgs
    if bgs and !bgs.name.empty?
      Audio.bgs_play("Audio/BGS/" + bgs.name, @bgs_volume, bgs.pitch)
    else
      Audio.bgs_stop
    end
    Graphics.frame_reset
  end

  def me_play(me)
    if me != nil and me.name != ""
      Audio.me_play("Audio/ME/" + me.name, @me_volume, me.pitch)
    else
      Audio.me_stop
    end
    Graphics.frame_reset
  end

  def se_play(se)
    return unless se and se.name != ""
    Audio.se_play("Audio/SE/" + se.name, @se_volume, se.pitch)
  end

  def bgm_decrease
    @bgm_volume -= @bgm_volume > 0 ? 5 : 0
  end

  def bgs_decrease
    @bgs_volume -= @bgs_volume > 0 ? 5 : 0
  end

  def me_decrease
    @me_volume -= @me_volume > 0 ? 5 : 0
  end

  def se_decrease
    @se_volume -= @se_volume > 0 ? 5 : 0
  end

  def bgm_increase
    @bgm_volume += @bgm_volume < 100 ? 5 : 0
  end

  def bgs_increase
    @bgs_volume += @bgs_volume < 100 ? 5 : 0
  end

  def me_increase
    @me_volume += @me_volume < 100 ? 5 : 0
  end

  def se_increase
    @se_volume += @se_volume < 100 ? 5 : 0
  end
  attr_accessor :bgm_volume, :bgs_volume, :me_volume, :se_volume
  attr_accessor :auto_dash, :fullscreen
end

class Game_Map
  alias :kyon_shlenam_gm_map_init :initialize
  def initialize
    kyon_shlenam_gm_map_init
    @anti_dash_maps = KShlenam::NO_DASH_MAPS.dup
  end

  def add_anti_dash(mid)
    @anti_dash_maps << mid
    @anti_dash_maps = @anti_dash_maps.uniq.sort
  end

  def remove_anti_dash(mid)
    @anti_dash_maps.delete(mid)
  end

  def disable_dash?
    @anti_dash_maps.include?(@map_id)
  end

  def anti_dash?(mid)
    @anti_dash_maps.include?(mid)
  end
end

class Game_Player
  def dash?
    return false if @move_route_forcing
    return false if $game_map.disable_dash?
    return true  if $game_system.auto_dash
    return Input.press?(KShlenam::DASH_BUTTON)
  end

  def update_move
    distance = 2 ** @move_speed
    distance *= 1.5 if dash?
    if @y * 128 > @real_y
      @real_y = [@real_y + distance, @y * 128].min
    end
    if @x * 128 < @real_x
      @real_x = [@real_x - distance, @x * 128].max
    end
    if @x * 128 > @real_x
      @real_x = [@real_x + distance, @x * 128].min
    end
    if @y * 128 < @real_y
      @real_y = [@real_y - distance, @y * 128].max
    end
    if @walk_anime
      @anime_count += 1.5
    elsif @step_anime
      @anime_count += 1
    end
  end
end

class Scene_Load
  alias :kyon_shlenam_scn_ld_rsd :read_save_data
  def read_save_data(file)
    kyon_shlenam_scn_ld_rsd(file)
    KShlenam.toggle_fullscreen if $game_system.fullscreen
  end
end[/pre][/fold]

评分

参与人数 1赞 +1 收起 理由
春北 + 1

查看全部评分

梦石
0
星屑
199
在线时间
16 小时
注册时间
2023-9-27
回帖
3
发表于 2023-10-6 17:06:45 | 显示全部楼层
您好 我看到您的留言了
但是我在论坛没有权限回复短消息/留言 所以在帖子里回复您
或者您可以加我weixin:chemical2547
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部