#==========================================================================
# Status Image Change
# by SandGolem
#==========================================================================
module SG
StateImageBattlers = {} #Dont change
StateImageCharacters = {} #Dont change
StateImageBattlers[3] = Hash.new('088-Monster02')
StateImageBattlers[3][8] = '089-Monster03'
StateImageCharacters[3] = Hash.new('088-Monster02')
StateImageCharacters[3][8] = '089-Monster03'
end
SG::StateImages = SG::StateImageBattlers.keys
#==============================================================================
# ? Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
if !@alias_sg_stateimages
alias sg_stateimages_add add_state
alias sg_stateimages_remove remove_state
@alias_sg_stateimages = true
end
#--------------------------------------------------------------------------
def add_state(state_id,force = false)
sg_stateimages_setrevert
sg_stateimages_add(state_id,force)
if SG::StateImages.include?(state_id)
if SG::StateImageBattlers[state_id][@actor_id] != ''
@battler_name = SG::StateImageBattlers[state_id][@actor_id]
@battler_hue = 0
end
if SG::StateImageCharacters[state_id][@actor_id] != ''
@character_name = SG::StateImageCharacters[state_id][@actor_id]
@character_hue = 0
end
$game_player.refresh
end
end
#--------------------------------------------------------------------------
def remove_state(state_id,force = false)
begin
sg_stateimages_remove(state_id,force)
rescue
end
sg_stateimages_revert
end
#--------------------------------------------------------------------------
def sg_stateimages_revert
for i in 0...SG::StateImages.size
return if state?(SG::StateImages[i])
end
return if @sg_staterevert_battler == nil
@battler_name = @sg_staterevert_battler
@battler_hue = @sg_staterevert_battlerhue
@character_name = @sg_staterevert_character
@character_hue = @sg_staterevert_characterhue
$game_player.refresh
end
#--------------------------------------------------------------------------
def sg_stateimages_setrevert
for i in 0...SG::StateImages.size
return if state?(SG::StateImages[i])
end
@sg_staterevert_battler = @battler_name
@sg_staterevert_battlerhue = @battler_hue
@sg_staterevert_character = @character_name
@sg_staterevert_characterhue = @character_hue
$game_player.refresh
end
end