赞 | 0 |
VIP | 23 |
好人卡 | 30 |
积分 | 0 |
经验 | 85978 |
最后登录 | 2017-6-19 |
在线时间 | 1165 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 38
- 在线时间
- 1165 小时
- 注册时间
- 2012-3-16
- 帖子
- 5336
|
新插入脚本或替换【扩张掉落物品】最后的【Game_Troop】脚本。- #==============================================================================
- # ■ Game_Troop
- #==============================================================================
- class Game_Troop < Game_Unit
- alias make_drop_items_KGC_ExtraDropItem make_drop_items
- LETTER_TABLE = [ 'A','B','C','D','E','F','G','H','I','J',
- 'K','L','M','N','O','P','Q','R','S','T',
- 'U','V','W','X','Y','Z']
-
- def make_drop_items
- drop_items = make_drop_items_KGC_ExtraDropItem
- for enemy in dead_members
- for di in enemy.extra_drop_items
- next if di.kind == 0
- if di.drop_prob > 0
- # 概率指定
- next if di.drop_prob < rand(100)
- else
- # 分母指定
- next if rand(di.denominator) != 0
- end
- if di.kind == 1
- drop_items.push($base_items[di.item_id])
- elsif di.kind == 2
- drop_items.push($base_weapons[di.weapon_id])
- elsif di.kind == 3
- drop_items.push($base_armors[di.armor_id])
- end
- end
- end
- return drop_items
- end
- #--------------------------------------------------------------------------
- # ● 生成掉落物品队列
- #--------------------------------------------------------------------------
- def make_drop_items
- drop_items = []
- for enemy in dead_members
- for di in [enemy.drop_item1, enemy.drop_item2]
- next if di.kind == 0
- next if rand(di.denominator) != 0
- if di.kind == 1
- drop_items.push($data_items[di.item_id])
- elsif di.kind == 2
- item = reini_chance($base_weapons[di.weapon_id], $game_party.equip_chance)
- drop_items.push(item)
- elsif di.kind == 3
- item = reini_chance($base_armors[di.armor_id], $game_party.equip_chance)
- drop_items.push(item)
- end
- end
- end
- return drop_items
- end
- #--------------------------------------------------------------------------
- # ● 处理极品爆率
- #--------------------------------------------------------------------------
- def reini_chance(item, chance)
- @item = item
- [url=home.php?mod=space&uid=115736]@Chance[/url] = [chance/100.0, Game_Equip::Equip_Chance[1]/100.0].min
- [url=home.php?mod=space&uid=322055]@gifts[/url] = []
- loop do
- if rand(0) < @chance and @gifts.size < Game_Equip::GiftMax
- @gifts << Game_Gift.new
- @chance /= 2
- else
- return Game_Equip.reini(@item, @gifts)
- end
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|