#============================================================================== # ■ RGSS3 指定値強化・弱体アイテム・スキル # XPスタイルバトル用追加スクリプト Ver1.00 by 星潟 #------------------------------------------------------------------------------ # ももまるLabs様(http://peachround.blog.fc2.com/)で配布されている # XPスタイルバトル用を使用される場合に能力一時変化アイテム・スキルを # 正常に表示・処理する為の追加スクリプトです。 # XPスタイルバトルを導入されていない場合は導入する必要はありません。 # (というか、導入されていない場合に導入するとエラーを吐きます) #============================================================================== class Window_BattleLog < Window_Selectable def display_changed_ppexn(target) type = 0 target.result.ppexn.each do |ppexn| if ppexn == nil elsif ppexn == "ddispel" display_ppexn2(target, type, Vocab::DDisPPEXN) elsif ppexn == "udispel" display_ppexn2(target, type, Vocab::UDisPPEXN) elsif ppexn == "dlimit" display_ppexn2(target, type, Vocab::DLIMIT) elsif ppexn == "ulimit" display_ppexn2(target, type, Vocab::ULIMIT) elsif ppexn == "nothing" display_ppexn2(target, type, Vocab::NoPPEXN) elsif ppexn > 0 display_ppexn1(target, type, ppexn, Vocab::BuffPPEXN) elsif ppexn < 0 display_ppexn1(target, type, -ppexn, Vocab::DebuffPPEXN) end type += 1 end end def display_ppexn1(target, type, ppexn, fmt) popup_data.popup_ppexn1(target, type, fmt == Vocab::DebuffPPEXN ? -ppexn : ppexn) add_text(sprintf(fmt, target.name, Vocab::param(type), ppexn)) wait end def display_ppexn2(target, type, fmt) if fmt == Vocab::DDisPPEXN or fmt == Vocab::UDisPPEXN type2 = 0 else type2 = 1 end popup_data.popup_ppexn2(target, type, type2) add_text(sprintf(fmt, target.name, Vocab::param(type))) wait end end class Popup_Data def popup_ppexn1(target, type, ppexn) return if ppexn == 0 refresh minus_flag = ppexn < 0 ? true : false data = minus_flag ? ppexn.to_s : "+" + ppexn.to_s @popup = Vocab::param(type) + data @battler = target @type = !minus_flag ? LNX11::POPUP_TYPE[:add_state] : LNX11::POPUP_TYPE[:add_badstate] @color = !minus_flag ? :add_state : :add_badstate makeup end def popup_ppexn2(target, type1, type2) return if type2 == 1 refresh @popup = Vocab::param(type1) + "初期化" @battler = target @type = LNX11::POPUP_TYPE[:rem_state] @color = :rem_state makeup end end