class Game_Temp
attr_accessor :black_flug # ☆暗転用
alias initialize_black_bant initialize
def initialize
initialize_black_bant
@black_flug = false
end
end
class Spriteset_Battle
alias update_black_bant update
def update
update_black_bant
#if @battleback_sprite.tone.red != -TONE_MARGINAL
if $game_temp.black_flug && @battleback_sprite.tone.red != -TONE_MARGINAL
@battleback_sprite.tone.red -= BLACK_R
@battleback_sprite.tone.green -= BLACK_G
@battleback_sprite.tone.blue -= BLACK_B
#elsif @battleback_sprite.tone.red != 0
elsif !$game_temp.black_flug && @battleback_sprite.tone.red != 0
@battleback_sprite.tone.red += BLACK_R
@battleback_sprite.tone.green += BLACK_G
@battleback_sprite.tone.blue += BLACK_B
end
end
end
#==============================================================================
# ■ Game_Battler (分割定義 3)
#------------------------------------------------------------------------------
# バトラーを扱うクラスです。このクラスは Game_Actor クラスと Game_Enemy クラ
# スのスーパークラスとして使用されます。
#==============================================================================
#=begin
class Game_Battler
alias attack_effect_black_bant attack_effect
def attack_effect(attacker)
if attacker.element_set.include?($data_system.elements.index(BLACK_ELEMENT))
$game_temp.black_flug = true
end
attack_effect_black_bant(attacker)
end
alias skill_effect_black_bant skill_effect
def skill_effect(user, skill)
if skill.element_set.include?($data_system.elements.index(BLACK_ELEMENT))
$game_temp.black_flug = true
end
skill_effect_black_bant(user, skill)
end
alias item_effect_black_bant item_effect
def item_effect(item, user = $game_party.actors[0])
if item.element_set.include?($data_system.elements.index(BLACK_ELEMENT))
$game_temp.black_flug = true
end
item_effect_black_bant(item, user)
end
end
class Scene_Battle
alias update_phase4_step6_black_bant update_phase4_step6
def update_phase4_step6(battler)
if $game_temp.black_flug
$game_temp.black_flug = false
end
update_phase4_step6_black_bant(battler)
end
end
#==============================================================================
# ■ Scene_Battle (分割定義 1)
#------------------------------------------------------------------------------
# バトル画面の処理を行うクラスです。
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
alias main_black_bant main
def main
# 戦闘前に暗転フラグをオフにしておく
$game_temp.black_flug = false
main_black_bant
# 戦闘終了時に暗転フラグをオフにしておく
$game_temp.black_flug = false
end
end
#=end