sacred-ritual-academy/Scripts/_.15.rb
2025-03-18 19:45:34 -05:00

41 lines
1.6 KiB
Ruby
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#==============================================================================
# ■ RGSS3 強制敗北/勝利 Ver1.00 by 星潟
#------------------------------------------------------------------------------
# 特定の2つのスイッチにそれぞれ以下の機能を持たせます。
#
# 1.特定のスイッチがONになると、即座に敗北扱いとなります。
# 2.特定のスイッチがONになると、即座に勝利扱いとなります。敗北が優先されます
#
# この機能によって勝利状態となった際、EXP・お金・ドロップアイテムは
# 戦闘不能にした対象のもののみ計算されます。
#==============================================================================
module EX_BT_SW
#即座に敗北扱いとなるスイッチを指定します。
LOS_SW_ID = 541
#即座に勝利扱いとなるスイッチを指定します。
WIN_SW_ID = 542
end
class << BattleManager
#--------------------------------------------------------------------------
# ● 勝敗判定
#--------------------------------------------------------------------------
alias judge_win_loss_extra_jwl judge_win_loss
def judge_win_loss
if @phase
if $game_switches[EX_BT_SW::LOS_SW_ID]
$game_switches[EX_BT_SW::LOS_SW_ID] = false
return process_defeat
end
if $game_switches[EX_BT_SW::WIN_SW_ID]
$game_switches[EX_BT_SW::WIN_SW_ID] = false
return process_victory
end
end
judge_win_loss_extra_jwl
end
end