상점

상점아템 가격변동(중뷁?)

by 캉쿤 posted Sep 14, 2011
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

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

사용법은 저도 잘 몰라요^^

 

 

 

 

 

# ▼▲▼ XRXS36. 숍·변동시장 ▼▲▼
# by 앵아 재흙

#==============================================================================
# ■ Interpreter
#==============================================================================

class Interpreter
  #--------------------------------------------------------------------------
  # ◇ 아이템의 시세를 설정
  #--------------------------------------------------------------------------
  def command_item_quote(id, percent)
    $data_items[id].quotation_percent = percent
  end
  #--------------------------------------------------------------------------
  # ◇ 무기 의 시세를 설정
  #--------------------------------------------------------------------------
  def command_weapon_quote(id, percent)
    $data_weapons[id].quotation_percent = percent
  end
  #--------------------------------------------------------------------------
  # ◇ 방어구의 시세를 설정
  #--------------------------------------------------------------------------
  def command_armor_quote(id, percent)
    $data_armors[id].quotation_percent = percent
  end
end

module RPG
#==============================================================================
# ■ RPG::Item
#==============================================================================
class Item
  attr_accessor :quotation_percent
  #--------------------------------------------------------------------------
  # ● 가격
  #--------------------------------------------------------------------------
  def price
    # 초기화
    @quotation_percent = 100 if @quotation_percent.nil?
    # 값을 돌려준다
    return @price * @quotation_percent / 100
  end
end
#==============================================================================
# ■ RPG::Weapon
#==============================================================================
class Weapon
  attr_accessor :quotation_percent
  #--------------------------------------------------------------------------
  # ● 가격
  #--------------------------------------------------------------------------
  def price
    # 초기화
    @quotation_percent = 100 if @quotation_percent.nil?
    # 값을 돌려준다
    return @price * @quotation_percent / 100
  end
end
#==============================================================================
# ■ RPG::Armor
#==============================================================================
class Armor
  attr_accessor :quotation_percent
  #--------------------------------------------------------------------------
  # ● 가격
  #--------------------------------------------------------------------------
  def price
    # 초기화
    @quotation_percent = 100 if @quotation_percent.nil?
    # 값을 돌려준다
    return @price * @quotation_percent / 100
  end
end

end