#============================================================================== # ○ドロップアイテム表示改造 Ver1.02 # for RGSS2 # 西瓜 / Space not far # http://muspell.raindrop.jp/ # ドロップアイテムが重複している場合、表示文章をまとめます。 #============================================================================== # ■更新履歴 # Ver1.02 # ・消し忘れていた余計な命令を削除。 # Ver1.01 # ・実際のアイテム入手数が表示と食い違っているバグを修正。 #============================================================================== module SNF ObtainItem_PLURAL = "%sを%sつ手に入れた!" # 一つ目の%sにはアイテム名が、二つ目の%sには入手個数が代入されます。 end class Scene_Battle < Scene_Base # 再定義 #-------------------------------------------------------------------------- # ● 獲得したドロップアイテムの表示 #-------------------------------------------------------------------------- def display_drop_items drop_items = $game_troop.make_drop_items for item in drop_items next if item == nil count = 0 for i in 0..drop_items.size if item == drop_items[i] count += 1 drop_items[i] = nil end end $game_party.gain_item(item, count) if count == 1 text = sprintf(Vocab::ObtainItem, item.name) else text = sprintf(SNF::ObtainItem_PLURAL, item.name, count) end $game_message.texts.push(text) end wait_for_message end end