赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 0 |
经验 | 17344 |
最后登录 | 2017-9-16 |
在线时间 | 114 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 114 小时
- 注册时间
- 2008-10-29
- 帖子
- 515

|
商店价格调整
- class Game_Interpreter
- def command_物品定价(id, percent)
- $data_items[id].quotation_percent = percent
- end
- def command_武器定价(id, percent)
- $data_weapons[id].quotation_percent = percent
- end
- def command_防具定价(id, percent)
- $data_armors[id].quotation_percent = percent
- end
- end
- module RPG
- class Item
- attr_accessor :quotation_percent
- def price
- @quotation_percent = 100 if @quotation_percent.nil?
- return @price * @quotation_percent / 100
- end
- end
-
- class Weapon
- attr_accessor :quotation_percent
- def price
- @quotation_percent = 100 if @quotation_percent.nil?
- return @price * @quotation_percent / 100
- end
- end
- class Armor
- attr_accessor :quotation_percent
- def price
- @quotation_percent = 100 if @quotation_percent.nil?
- return @price * @quotation_percent / 100
- end
- end
- end
复制代码 |
|