2010.04.24 21:23

KGC 장비확장

조회 수 2421 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ◆ ?備?張 - KGC_EquipExtension ◆ VX ◆
#_/    ◇ Last update : 2008/03/02 ◇
#_/----------------------------------------------------------------------------
#_/  ?備?連の機能を?張します。
#_/============================================================================
#_/ 【メニュ?】≪?張?備?面≫ より下に導入してください。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

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

module KGC
module EquipExtension
  # ◆ ?張?備種別
  #  先頭から順に 4, 5, 6, ... が割り?てられる。
  EXTRA_EQUIP_KIND = ["신발","망토","칭호"]

  # ◆ ?備箇所リスト
  #  武器の後に、ここで指定した順番で?ぶ。
  #  ※ ?備箇所が最低一つないと、二刀流がバグる可能性があります。
  #   ** ?備種別一? **
  #  0..盾  1..頭  2..身?  3..?飾品  4~..↑で定義
  EQUIP_TYPE = [0, 1, 2, 4, 3, 3, 5, 6]

  # ◆ EP (Equip Point) 制を使用する
  USE_EP_SYSTEM = false
  # ◆ EP の名前
  VOCAB_EP   = "EP"
  # ◆ EP の名前 (略)
  VOCAB_EP_A = "E"
  # ◆ ステ?タス?面に EP を表示する
  SHOW_STATUS_EP = true

  # ◆ 消費 EP ?定値
  #  消費 EP が指定されていない?備品で使用。
  DEFAULT_EP_COST   = 1
  # ◆ 消費 EP 0 は表示しない
  HIDE_ZERO_EP_COST = true

  # ◆ EP 上限
  EP_MAX = 20
  # ◆ EP 下限
  EP_MIN = 5
  # ◆ 最大 EP 算出式
  #   level..アクタ?のレベル
  #  自動的に整??換されるので、結果が小?になってもOK。
  EP_CALC_EXP = "level * 0.3 + 4"

  # ◆ 消費 EP 値の色 (アイテム名の末尾に付く?値)
  #  ?値  : \C[n] と同じ色。
  #  Color : 指定した色。 ( Color.new(128, 255, 255) など )
  EP_COST_COLOR        = 23
  # ◆ EP ゲ?ジの開始色
  EP_GAUGE_START_COLOR = 28
  # ◆ EP ゲ?ジの終了色
  EP_GAUGE_END_COLOR   = 29
end
end

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

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

module KGC::EquipExtension
  # EP 制を使用しない場合の設定
  unless USE_EP_SYSTEM
    SHOW_STATUS_EP = false
    HIDE_ZERO_EP_COST = true
  end

  # 正規表現
  module Regexp
    # ベ?スアイテム
    module BaseItem
      # 消費 EP
      EP_COST = /<EP\s*(\d+)>/i
      # ?備タイプ
      EQUIP_TYPE = /<(?:EQUIP_TYPE|?備タイプ)\s*(\d+(?:\s*,\s*\d+)*)>/
    end

    # 防具
    module Armor
      # ?備種別
      EQUIP_KIND = /<(?:EQUIP_KIND|?備種別)\s*(.+)>/i
    end
  end
end

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

#==============================================================================
# □ KGC::Commands
#==============================================================================

module KGC::Commands
  module_function
  #--------------------------------------------------------------------------
  # ○ アクタ?の?備を修復
  #--------------------------------------------------------------------------
  def restore_equip
    (1...$data_actors.size).each { |i|
      actor = $game_actors[i]
      actor.restore_equip
    }
  end
  #--------------------------------------------------------------------------
  # ○ アクタ?の?備タイプを設定
  #     actor_id   : アクタ? ID
  #     equip_type : ?備タイプ
  #--------------------------------------------------------------------------
  def set_actor_equip_type(actor_id, equip_type = nil)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.equip_type = equip_type
  end
  #--------------------------------------------------------------------------
  # ○ アクタ?の?備を?更
  #     actor_id   : アクタ? ID
  #     index      : ?備部位 (0~)
  #     item_id    : 武器 or 防具 ID (0 で解除)
  #--------------------------------------------------------------------------
  def change_actor_equipment(actor_id, index, item_id)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_equip_by_id(index, item_id)
  end
end

class Game_Interpreter
  include KGC::Commands
end

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

#==============================================================================
# ■ Vocab
#==============================================================================

module Vocab
  # EP
  def self.ep
    return KGC::EquipExtension::VOCAB_EP
  end

  # EP (略)
  def self.ep_a
    return KGC::EquipExtension::VOCAB_EP_A
  end

  # ?張防具欄
  def self.extra_armor(index)
    return KGC::EquipExtension::EXTRA_EQUIP_KIND[index]
  end
end

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

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ ?備?張のキャッシュを作成
  #--------------------------------------------------------------------------
  def create_equip_extension_cache
    @__ep_cost = KGC::EquipExtension::DEFAULT_EP_COST
    @__equip_type = []

    self.note.split(/[\r\n]+/).each { |line|
      case line
      when KGC::EquipExtension::Regexp::BaseItem::EP_COST
        # 消費 EP
        @__ep_cost = $1.to_i
      when KGC::EquipExtension::Regexp::BaseItem::EQUIP_TYPE
        # ?備タイプ
        @__equip_type = []
        $1.scan(/\d+/) { |num|
          @__equip_type << num.to_i
        }
      end
    }

    # EP 制を使用しない場合は消費 EP = 0
    @__ep_cost = 0 unless KGC::EquipExtension::USE_EP_SYSTEM
  end
  #--------------------------------------------------------------------------
  # ○ 消費 EP
  #--------------------------------------------------------------------------
  def ep_cost
    create_equip_extension_cache if @__ep_cost == nil
    return @__ep_cost
  end
  #--------------------------------------------------------------------------
  # ○ ?備タイプ
  #--------------------------------------------------------------------------
  def equip_type
    create_equip_extension_cache if @__equip_type == nil
    return @__equip_type
  end
end

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

#==============================================================================
# ■ RPG::Armor
#==============================================================================

class RPG::Armor < RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ ?備?張のキャッシュを作成
  #--------------------------------------------------------------------------
  def create_equip_extension_cache
    super
    @__kind = -1

    self.note.split(/[\r\n]+/).each { |line|
      if line =~ KGC::EquipExtension::Regexp::Armor::EQUIP_KIND
        # ?備種別
        e_index = KGC::EquipExtension::EXTRA_EQUIP_KIND.index($1)
        next if e_index == nil
        @__kind = e_index + 4
      end
    }
  end

unless $@
  #--------------------------------------------------------------------------
  # ○ 種別
  #--------------------------------------------------------------------------
  alias kind_KGC_EquipExtension kind
  def kind
    create_equip_extension_cache if @__kind == nil
    return (@__kind == -1 ? kind_KGC_EquipExtension : @__kind)
  end
end

end

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

#==============================================================================
# ■ Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● 公開インスタンス??
  #--------------------------------------------------------------------------
  attr_writer   :equip_type               # ?備タイプ
  #--------------------------------------------------------------------------
  # ● セットアップ
  #     actor_id : アクタ? ID
  #--------------------------------------------------------------------------
  alias setup_KGC_EquipExtension setup
  def setup(actor_id)
    actor = $data_actors[actor_id]
    @extra_armor_id = []

    setup_KGC_EquipExtension(actor_id)

    restore_equip
  end
  #--------------------------------------------------------------------------
  # ○ MaxEP 取得
  #--------------------------------------------------------------------------
  def maxep
    n = Integer(eval(KGC::EquipExtension::EP_CALC_EXP))
    return [[n, ep_limit].min, KGC::EquipExtension::EP_MIN].max
  end
  #--------------------------------------------------------------------------
  # ○ EP 取得
  #--------------------------------------------------------------------------
  def ep
    n = 0
    equips.compact.each { |item| n += item.ep_cost }
    return [maxep - n, 0].max
  end
  #--------------------------------------------------------------------------
  # ○ EP 上限取得
  #--------------------------------------------------------------------------
  def ep_limit
    return KGC::EquipExtension::EP_MAX
  end
  #--------------------------------------------------------------------------
  # ○ 防具欄の取得
  #--------------------------------------------------------------------------
  def equip_type
    if @equip_type.is_a?(Array)
      return @equip_type
    else
      return KGC::EquipExtension::EQUIP_TYPE
    end
  end
  #--------------------------------------------------------------------------
  # ○ 防具欄の?
  #--------------------------------------------------------------------------
  def armor_number
    return equip_type.size
  end
  #--------------------------------------------------------------------------
  # ○ ?張防具欄の?
  #--------------------------------------------------------------------------
  def extra_armor_number
    return [armor_number - 4, 0].max
  end
  #--------------------------------------------------------------------------
  # ○ 防具 ID リストの取得
  #--------------------------------------------------------------------------
  def extra_armor_id
    @extra_armor_id = [] if @extra_armor_id == nil
    return @extra_armor_id
  end
  #--------------------------------------------------------------------------
  # ● 防具オブジェクトの配列取得
  #--------------------------------------------------------------------------
  alias armors_KGC_EquipExtension armors
  def armors
    result = armors_KGC_EquipExtension

    # 5番目以降の防具を追加
    extra_armor_number.times { |i|
      armor_id = extra_armor_id[i]
      result << (armor_id == nil ? nil : $data_armors[armor_id])
    }
    return result
  end
  #--------------------------------------------------------------------------
  # ● ?備の?更 (オブジェクトで指定)
  #     equip_type : ?備部位
  #     item       : 武器 or 防具 (nil なら?備解除)
  #     test       : テストフラグ (??テスト、または?備?面での一時?備)
  #--------------------------------------------------------------------------
  alias change_equip_KGC_EquipExtension change_equip
  def change_equip(equip_type, item, test = false)
    change_equip_KGC_EquipExtension(equip_type, item, test)

    # ?張防具欄がある場合のみ
    if extra_armor_number > 0
      item_id = item == nil ? 0 : item.id
      case equip_type
      when 5..armor_number  # ?張防具欄
        @extra_armor_id = [] if @extra_armor_id == nil
        @extra_armor_id[equip_type - 5] = item_id
      end
    end

    restore_battle_skill if $imported["SkillCPSystem"]
    restore_passive_rev  if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ● ?備の破棄
  #     item : 破棄する武器 or 防具
  #    武器/防具の?減で「?備品も含める」のとき使用する。
  #--------------------------------------------------------------------------
  alias discard_equip_KGC_EquipExtension discard_equip
  def discard_equip(item)
    last_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]

    discard_equip_KGC_EquipExtension(item)

    curr_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
    return unless item.is_a?(RPG::Armor)  # 防具でない
    return if last_armors != curr_armors  # ?に破棄された

    # ?張防具欄を?索
    extra_armor_number.times { |i|
      if extra_armor_id[i] == item.id
        @extra_armor_id[i] = 0
        break
      end
    }

    restore_battle_skill if $imported["SkillCPSystem"]
    restore_passive_rev  if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ● 職業 ID の?更
  #     class_id : 新しい職業 ID
  #--------------------------------------------------------------------------
  alias class_id_equal_KGC_EquipExtension class_id=
  def class_id=(class_id)
    class_id_equal_KGC_EquipExtension(class_id)

    return if extra_armor_number == 0  # ?張防具欄がない

    # ?備できない?張防具を外す
    for i in 5..armor_number
      change_equip(i, nil) unless equippable?(equips[i])
    end
  end
  #--------------------------------------------------------------------------
  # ○ EP ?件クリア判定
  #     equip_type : ?備部位
  #     item       : 武器 or 防具
  #--------------------------------------------------------------------------
  def ep_condition_clear?(equip_type, item)
    return true if item == nil  # nil は解除なので OK

    curr_item = equips[equip_type]
    offset = (curr_item != nil ? curr_item.ep_cost : 0)
    return false if self.ep < (item.ep_cost - offset)   # EP 不足

    return true
  end
  #--------------------------------------------------------------------------
  # ○ ?備を修復
  #--------------------------------------------------------------------------
  def restore_equip
    return if @__last_equip_type == equip_type

    # 以前の?備品?パラメ?タを退避
    last_equips = equips
    last_hp = self.hp
    last_mp = self.mp
    if $imported["SkillCPSystem"]
      last_battle_skill_ids = battle_skill_ids.clone
    end

    # 全?備解除
    last_equips.each_index { |i| change_equip(i, nil) }

    # ?備品?パラメ?タを復元
    last_equips.compact.each { |item| equip_legal_slot(item) }
    self.hp = last_hp
    self.mp = last_mp
    if $imported["SkillCPSystem"]
      last_battle_skill_ids.each_with_index { |s, i| set_battle_skill(i, s) }
    end
    @__last_equip_type = equip_type.clone
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # ○ ?備品を正しい箇所にセット
  #     item : 武器 or 防具
  #--------------------------------------------------------------------------
  def equip_legal_slot(item)
    if item.is_a?(RPG::Weapon)
      if @weapon_id == 0
        # 武器 1
        change_equip(0, item)
      elsif two_swords_style && @armor1_id == 0
        # 武器 2 (二刀流の場合)
        change_equip(1, item)
      end
    elsif item.is_a?(RPG::Armor)
      if !two_swords_style && item.kind == equip_type[0] && @armor1_id == 0
        # 先頭の防具 (二刀流でない場合)
        change_equip(1, item)
      else
        # ?備箇所リストを作成
        list = [-1, @armor2_id, @armor3_id, @armor4_id]
        list += extra_armor_id
        # 正しい、かつ空いている箇所にセット
        equip_type.each_with_index { |kind, i|
          if kind == item.kind && list[i] == 0
            change_equip(i + 1, item)
            break
          end
        }
      end
    end
  end
end

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

#==============================================================================
# ■ Window_Base
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ○ EP の文字色を取得
  #     actor : アクタ?
  #--------------------------------------------------------------------------
  def ep_color(actor)
    return knockout_color if actor.maxep > 0 && actor.ep == 0
    return normal_color
  end
  #--------------------------------------------------------------------------
  # ○ EP ゲ?ジの色 1 の取得
  #--------------------------------------------------------------------------
  def ep_gauge_color1
    color = KGC::EquipExtension::EP_GAUGE_START_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ○ EP ゲ?ジの色 2 の取得
  #--------------------------------------------------------------------------
  def ep_gauge_color2
    color = KGC::EquipExtension::EP_GAUGE_END_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ○ EP の描?
  #     actor : アクタ?
  #     x     : 描?先 X 座標
  #     y     : 描?先 Y 座標
  #     width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_ep(actor, x, y, width = 120)
    draw_actor_ep_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Vocab::ep_a)
    self.contents.font.color = ep_color(actor)
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.ep, 2)
    else
      self.contents.draw_text(xr - 90, y, 40, WLH, actor.ep, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2)
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxep, 2)
    end
    self.contents.font.color = normal_color
  end
  #--------------------------------------------------------------------------
  # ○ EP ゲ?ジの描?
  #     actor : アクタ?
  #     x     : 描?先 X 座標
  #     y     : 描?先 Y 座標
  #     width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_ep_gauge(actor, x, y, width = 120)
    gw = width * actor.ep / [actor.maxep, 1].max
    gc1 = ep_gauge_color1
    gc2 = ep_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # ○ 消費 EP の描?
  #     item    : 武器 or 防具
  #     rect    : 描?する領域
  #     enabled : 許可?態
  #--------------------------------------------------------------------------
  def draw_equipment_ep_cost(item, rect, enabled = true)
    return if item == nil
    # 消費 EP 0 を表示しない場合
    return if KGC::EquipExtension::HIDE_ZERO_EP_COST && item.ep_cost == 0

    color = KGC::EquipExtension::EP_COST_COLOR
    self.contents.font.color = (color.is_a?(Integer) ?
      text_color(color) : color)
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, item.ep_cost, 2)
  end
end

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

#==============================================================================
# ■ Window_Equip
#==============================================================================

class Window_Equip < Window_Selectable
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @data = @actor.equips.clone
    @item_max = [@data.size, @actor.armor_number + 1].min
    create_contents

    # ?備箇所を描?
    self.contents.font.color = system_color
    if @actor.two_swords_style
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon1)
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab::weapon2)
    else
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon)
      name = armor_slot_name(@actor.equip_type[0])
      self.contents.draw_text(4, WLH * 1, 92, WLH, name)
    end
    for i in 1...@actor.armor_number
      name = armor_slot_name(@actor.equip_type[i])
      self.contents.draw_text(4, WLH * (i + 1), 92, WLH, name)
    end

    # ?備品を描?
    rect = Rect.new(92, 0, self.width - 128, WLH)
    @item_max.times { |i|
      rect.y = WLH * i
      draw_item_name(@data[i], rect.x, rect.y)
      draw_equipment_ep_cost(@data[i], rect)
    }
  end
  #--------------------------------------------------------------------------
  # ○ 防具欄の名?を取得
  #     kind : 種別
  #--------------------------------------------------------------------------
  def armor_slot_name(kind)
    case kind
    when 0..3
      return eval("Vocab.armor#{kind + 1}")
    else
      return Vocab.extra_armor(kind - 4)
    end
  end

unless $imported["ExtendedEquipScene"]
  #--------------------------------------------------------------------------
  # ● カ?ソルを 1 ペ?ジ後ろに移動
  #--------------------------------------------------------------------------
  def cursor_pagedown
    return if Input.repeat?(Input::R)
    super
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルを 1 ペ?ジ前に移動
  #--------------------------------------------------------------------------
  def cursor_pageup
    return if Input.repeat?(Input::L)
    super
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active

    if Input.repeat?(Input::RIGHT)
      cursor_pagedown
    elsif Input.repeat?(Input::LEFT)
      cursor_pageup
    end
  end
end

end

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

#==============================================================================
# ■ Window_EquipItem
#==============================================================================

class Window_EquipItem < Window_Item
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    @item_enabled = []
    super
    @data.each { |item| @item_enabled << enable?(item) }
  end
  #--------------------------------------------------------------------------
  # ● アイテムをリストに含めるかどうか
  #     item : アイテム
  #--------------------------------------------------------------------------
  def include?(item)
    return true if item == nil
    if @equip_type == 0
      return false unless item.is_a?(RPG::Weapon)
    else
      return false unless item.is_a?(RPG::Armor)
      return false unless item.kind == @equip_type - 1
    end
    return @actor.equippable?(item)
  end
  #--------------------------------------------------------------------------
  # ● アイテムを許可?態で表示するかどうか
  #     item : アイテム
  #--------------------------------------------------------------------------
  def enable?(item)
    return false unless @actor.equippable?(item)                      # ?備不可
    return false unless @actor.ep_condition_clear?(@equip_type, item)  # EP 不足

    return true
  end
  #--------------------------------------------------------------------------
  # ● 項目の描?
  #     index : 項目番?
  #--------------------------------------------------------------------------
  def draw_item(index)
    super(index)   
    rect = item_rect(index)
    item = @data[index]

    # 個?表示分の幅を削る
    cw = self.contents.text_size(sprintf(":%2d", 0)).width
    rect.width -= cw + 4
    draw_equipment_ep_cost(item, rect, enable?(item))
  end
  #--------------------------------------------------------------------------
  # ○ 簡易リフレッシュ
  #     equip_type : ?備部位
  #--------------------------------------------------------------------------
  def simple_refresh(equip_type)
    # 一時的に?備部位を?更
    last_equip_type = @equip_type
    @equip_type = equip_type

    @data.each_with_index { |item, i|
      # 許可?態が?化した項目のみ再描?
      if enable?(item) != @item_enabled[i]
        draw_item(i)
        @item_enabled[i] = enable?(item)
      end
    }
    # ?備部位を?す
    @equip_type = last_equip_type
  end
end

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

#==============================================================================
# ■ Window_EquipStatus
#==============================================================================

class Window_EquipStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  alias refresh_KGC_EquipExtension refresh
  def refresh
    refresh_KGC_EquipExtension

    draw_actor_ep(@actor, 120, 0, 56) if KGC::EquipExtension::USE_EP_SYSTEM
  end
end

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

#==============================================================================
# ■ Window_Status
#==============================================================================

class Window_Status < Window_Base

if KGC::EquipExtension::SHOW_STATUS_EP
  #--------------------------------------------------------------------------
  # ● 基本情報の描?
  #     x : 描?先 X 座標
  #     y : 描?先 Y 座標
  #--------------------------------------------------------------------------
  alias draw_basic_info_KGC_EquipExtension draw_basic_info
  def draw_basic_info(x, y)
    draw_basic_info_KGC_EquipExtension(x, y)

    draw_actor_ep(@actor, x + 160, y + WLH * 4)
  end
end

  #--------------------------------------------------------------------------
  # ● ?備品の描?
  #     x : 描?先 X 座標
  #     y : 描?先 Y 座標
  #--------------------------------------------------------------------------
  def draw_equipments(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, Vocab::equip)

    item_number = [@actor.equips.size, @actor.armor_number + 1].min
    item_number.times { |i|
      draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1))
    }
  end
end

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

#==============================================================================
# ■ Window_ShopStatus
#==============================================================================

class Window_ShopStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● アクタ?の現?備と能力値?化の描?
  #     actor : アクタ?
  #     x     : 描?先 X 座標
  #     y     : 描?先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_parameter_change(actor, x, y)
    return if @item.is_a?(RPG::Item)
    enabled = actor.equippable?(@item)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(x, y, 200, WLH, actor.name)
    if @item.is_a?(RPG::Weapon)
      item1 = weaker_weapon(actor)
    elsif actor.two_swords_style and @item.kind == 0
      item1 = nil
    else
      index = actor.equip_type.index(@item.kind)
      item1 = (index != nil ? actor.equips[1 + index] : nil)
    end
    if enabled
      if @item.is_a?(RPG::Weapon)
        atk1 = item1 == nil ? 0 : item1.atk
        atk2 = @item == nil ? 0 : @item.atk
        change = atk2 - atk1
      else
        def1 = item1 == nil ? 0 : item1.def
        def2 = @item == nil ? 0 : @item.def
        change = def2 - def1
      end
      self.contents.draw_text(x, y, 200, WLH, sprintf("%+d", change), 2)
    end
    draw_item_name(item1, x, y + WLH, enabled)
  end
end

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

#==============================================================================
# ■ Scene_Equip
#==============================================================================

class Scene_Equip < Scene_Base
  #--------------------------------------------------------------------------
  # ● 定?
  #--------------------------------------------------------------------------
  EQUIP_TYPE_MAX = KGC::EquipExtension::EXTRA_EQUIP_KIND.size + 5
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor_index : アクタ?インデックス
  #     equip_index : ?備インデックス
  #--------------------------------------------------------------------------
  alias initialize_KGC_EquipExtension initialize
  def initialize(actor_index = 0, equip_index = 0)
    initialize_KGC_EquipExtension(actor_index, equip_index)

    unit = ($imported["LargeParty"] ?
      $game_party.all_members : $game_party.members)
    actor = unit[actor_index]
    @equip_index = [@equip_index, actor.armor_number].min
  end
  #--------------------------------------------------------------------------
  # ● アイテムウィンドウの作成
  #--------------------------------------------------------------------------
  alias create_item_windows_KGC_EquipExtension create_item_windows
  def create_item_windows
    create_item_windows_KGC_EquipExtension

    kind = equip_kind(@equip_index)
    EQUIP_TYPE_MAX.times { |i|
      @item_windows[i].visible = (kind == i)
    }
  end
  #--------------------------------------------------------------------------
  # ● アイテムウィンドウの更新
  #--------------------------------------------------------------------------
  def update_item_windows
    kind = equip_kind(@equip_window.index)
    for i in 0...EQUIP_TYPE_MAX
      @item_windows[i].visible = (kind == i)
      @item_windows[i].update
    end
    @item_window = @item_windows[kind]
    @item_window.simple_refresh(@equip_window.index)
  end
  #--------------------------------------------------------------------------
  # ○ ?備欄の種別を取得
  #     index : ?備欄インデックス
  #--------------------------------------------------------------------------
  def equip_kind(index)
    if index == 0
      return 0
    else
      return @actor.equip_type[index - 1] + 1
    end
  end

unless $imported["ExtendedEquipScene"]
  #--------------------------------------------------------------------------
  # ● ステ?タスウィンドウの更新
  #--------------------------------------------------------------------------
  def update_status_window
    if @equip_window.active
      @status_window.set_new_parameters(nil, nil, nil, nil)
    elsif @item_window.active
      temp_actor = Marshal.load(Marshal.dump(@actor))
      temp_actor.change_equip(@equip_window.index, @item_window.item, true)
      new_atk = temp_actor.atk
      new_def = temp_actor.def
      new_spi = temp_actor.spi
      new_agi = temp_actor.agi
      @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
    end
    @status_window.update
  end
end

  #--------------------------------------------------------------------------
  # ● アイテム選?の更新
  #--------------------------------------------------------------------------
  alias update_item_selection_KGC_EquipExtension update_item_selection
  def update_item_selection
    if Input.trigger?(Input::C)
      # ?備不可能な場合
      index = @equip_window.index
      item = @item_window.item
      unless item == nil ||
          (@actor.equippable?(item) && @actor.ep_condition_clear?(index, item))
        Sound.play_buzzer
        return
      end
    end

    update_item_selection_KGC_EquipExtension
  end
end

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

#==============================================================================
# ■ Scene_File
#==============================================================================

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # ● セ?ブデ?タの?み?み
  #     file : ?み?み用ファイルオブジェクト (オ?プン?み)
  #--------------------------------------------------------------------------
  alias read_save_data_KGC_EquipExtension read_save_data
  def read_save_data(file)
    read_save_data_KGC_EquipExtension(file)

    KGC::Commands.restore_equip
    Graphics.frame_reset
  end
end

현재 추가된것:장신구 하나더, 망토 신발 칭호.


  1. 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다

    Date2010.01.09 Category공지사항 Byruby Views22078 Votes0
    read more
  2. 스크립트 게시판 관리자' ruby ' 입니다

    Date2010.01.09 Category공지사항 Byruby Views20725 Votes0
    read more
  3. 일본 스크립트/소스 공유 포럼

    Date2010.01.05 Category공지사항 By니오티 Views22249 Votes0
    read more
  4. ZTBS

    Date2010.06.05 Category전투관련 By강현문 Views3533 Votes0
    Read More
  5. 3d 스크립트 (적용시 바로 실행가능&암호걸림)

    Date2010.06.04 Category기타 Bykjs Views4065 Votes0
    Read More
  6. 원경(파노라마) 바꾸기

    Date2010.05.28 By허걱 Views2391 Votes1
    Read More
  7. Window_NameEdit by Heircoss

    Date2010.05.01 By허걱 Views2357 Votes1
    Read More
  8. 3D 스크립트닷!!!!

    Date2010.04.30 Category시각적 효과 ByXP 팬 Views3322 Votes0
    Read More
  9. 턴제 전투방식 스크립트!!!!!!!

    Date2010.04.30 Category전투관련 ByXP 팬 Views3329 Votes0
    Read More
  10. 장비 레벨 설정 시스템

    Date2010.04.24 By허걱 Views2829 Votes1
    Read More
  11. KGC 장비확장

    Date2010.04.24 By비극ㆍ Views2421 Votes0
    Read More
  12. 자동 이동 시스템

    Date2010.04.21 By허걱 Views2700 Votes1
    Read More
  13. 화폐단위 구분해 주는 스크립트

    Date2010.04.13 By허걱 Views3436 Votes1
    Read More
  14. 간단한 액션알피지용 스크립트 Ver.1.01 (게임오버 추가)

    Date2010.04.11 Category전투관련 By펜릴 Views8730 Votes0
    Read More
  15. Vampyr - Verus Tempus Proelium

    Date2010.03.27 By허걱 Views3249 Votes1
    Read More
  16. 조합한글 입력 시스템

    Date2010.03.24 By허걱 Views3392 Votes1
    Read More
  17. Ultimate System Version 1.1.4 by AcidBird

    Date2010.03.10 By허걱 Views3580 Votes1
    Read More
  18. 액알몬스터

    Date2010.03.07 Category장르변경 ByXP 팬 Views2904 Votes1
    Read More
  19. [XP,VX 사용 가능] 다른 이벤트 셀프스위치 조작

    Date2010.03.05 Category제한변경 By허걱 Views2169 Votes0
    Read More
  20. 최단경로 찾아가기

    Date2010.03.05 Category이동관련 By허걱 Views2107 Votes0
    Read More
  21. 클리어 횟수 기록

    Date2010.03.05 Category기능추가 By허걱 Views2117 Votes0
    Read More
  22. Staff Roll

    Date2010.03.04 Category기타 By허걱 Views7486 Votes0
    Read More
  23. 무기나 방어구를 살때 액터의 상세한 스테이터스 표시하기

    Date2010.02.10 Category상점관련 Bywindshy Views1907 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7

Copyright ⓒ Nioting All Rights Reserved. (since 1999)    개인정보
        

Fatal error: Cannot access property sessionController::$lifetime in /web/old/xe/modules/session/session.controller.php on line 45