module Saba module Prediction # どのステートブースターを使うか # :KURE : 併用化ベーススクリプトを使用します。 # :AP : ステート/強化/弱体付与拡張を使用します。 # nil : 特に使用しない。 STATE_BOOSTER = :AP # 表示/非表示ボタン # デフォルトだとShiftキーが:A, Aキーは:Xです。 SHOW_HIDE_BUTTON = :X # 決定/キャンセル後の表示状態 # true/false : true/false(非表示/表示)に戻す # nil : 変更なし(非表示の場合は非表示の、表示の場合は表示のまま) CONTINUE_HIDE_PREDICTION = nil end end class Window_BattleEnemy alias fai_saba_prediction_hide hide def hide fai_saba_prediction_hide if !Saba::Prediction::CONTINUE_HIDE_PREDICTION.nil? @hide_prediction = Saba::Prediction::CONTINUE_HIDE_PREDICTION end end alias fai_saba_prediction_update update def update fai_saba_prediction_update return if !active if Input.trigger?(Saba::Prediction::SHOW_HIDE_BUTTON) Input.update; Sound.play_cursor @hide_prediction ^= true refresh end end #-------------------------------------------------------------------------- # ● 指定のインデックスの敵情報描画 #-------------------------------------------------------------------------- alias fai_saba_prediction_draw_enemy_info draw_enemy_info def draw_enemy_info(index) return if @hide_prediction fai_saba_prediction_draw_enemy_info(index) end #-------------------------------------------------------------------------- # ● ステートの追加率の描画 #-------------------------------------------------------------------------- def draw_add_state(battler, effect, y) name = effect_name(effect) return unless name if effect.code == 31 || effect.code == 32 state_hit = 100 if effect.code == 32 state_hit = (state_hit * battler.debuff_rate(effect.data_id)).to_i end else state = $data_states[effect.data_id] state_hit = effect.value1 state_hit *= battler.state_rate(state.id) state_hit = 0 if battler.state_resist?(state.id) state_hit = (state_hit * 100).to_i end change_color(text_color(Saba::Prediction::STATE_HIT_COLOR_ID)) draw_text(battler.screen_x-68, y, 100, 40, name, 1) if @hit >= 100 && state_hit >= 100 change_color(text_color(Saba::Prediction::HITTING_TARGET_COLOR_ID)) end draw_text(battler.screen_x-58, y, 100, 40, state_hit.to_s + "%", 2) return true end end if Saba::Prediction::STATE_BOOSTER == :AP class Window_BattleEnemy #-------------------------------------------------------------------------- # ● 指定のインデックスの敵情報描画 #-------------------------------------------------------------------------- alias fai_saba_prediction_ap_draw_enemy_info draw_enemy_info def draw_enemy_info(index) $game_troop.exist_members[index].st_rate_make(@actor, @item) fai_saba_prediction_ap_draw_enemy_info(index) $game_troop.exist_members[index].st_rate_clear end end elsif Saba::Prediction::STATE_BOOSTER == :KURE class Window_BattleEnemy #-------------------------------------------------------------------------- # ● ステートの追加率の描画 #-------------------------------------------------------------------------- def draw_add_state(battler, effect, y) name = effect_name(effect) return unless name if effect.code == 31 || effect.code == 32 state_hit = 100 if effect.code == 32 state_hit = (state_hit * battler.debuff_rate(effect.data_id)).to_i end else state = $data_states[effect.data_id] state_hit = effect.value1 state_hit *= battler.state_rate(state.id) if KURE::BaseScript::C_STATE_BOOSTER == 1 state_hit *= battler.state_per_booster(@actor, @item, state.id) state_hit += battler.state_val_booster(@actor, @item, state.id) end state_hit = 0 if battler.state_resist?(state.id) state_hit = (state_hit * 100).to_i end change_color(text_color(Saba::Prediction::STATE_HIT_COLOR_ID)) draw_text(battler.screen_x-68, y, 100, 40, name, 1) if @hit >= 100 && state_hit >= 100 change_color(text_color(Saba::Prediction::HITTING_TARGET_COLOR_ID)) end draw_text(battler.screen_x-58, y, 100, 40, state_hit.to_s + "%", 2) return true end end end