#===============================================================
==========
======
#
# Spirits System
# Last Date Updated: 13th August 2009
# Version: 1
#
# This script supplies game makers with a new way of developing their
# characters. Each hero can equip spirits, which bring in several effects:
# - stat bonuses
# - new weapons
# - new skills
# - opcional features, like pharmacology
# As a hero earns experience, so does its spirits. They count as a
# normal party member. Spirits also have classes, they level up, learn
# new skills, have stat growths.
#
# To add a spirit to the party reserve, simply use the command
# 'Change Party Member...' which can also be used to remove spirits.
#
# To explain how everything works, I'll use an example: Star (ID: 10)
# Start gives stats bonues acording to the charts on the actor tabs and
# its level (which starts at 1).
# Star's a Fire Spirit, so it adds to its hero the skills it learns:
# Fire at level 1, Fire II at level 2...
# When Star is set to a hero, it can use the 'Legendary Falme Sword'
# because it's ticked in Stars' class.
# the hero also inherits Stars' options: Super Guard
#
#===============================================================================
# Updates:
# ----------------------------------------------------------------------------
# o 2009.08.13 - Started script.
#===============================================================================
#===============================================================================
#
# Configuration
#
#===============================================================================
# The IDs of the actors who are meant to be spirits:
SPIRITS = [9,10,11,12,13,14]
# The max amount of Spirits that a party member can have.
# 0: no limit
Max_spirits = 2
module Vocab
# Appears above the siprits' skills in the spirits' status screen.
Spirit_Skills = "Spirit Magics"
# Appears above the siprits' traits in the spirits' status screen.
Specials = "Spirit Traits"
# Special traits:
Two_Swords_Style = "Dual Wield"
Fix_Equipment = "Fixed Equipment"
Auto_Battle = "Berserk"
Super_Guard = "Improved Guard"
Pharmacology = "Pharmacology"
Critical_Bonus = "High Critical"
end
#===============================================================================
#
# End of Configuration
#
#===============================================================================
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :spirits # spirits
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
alias spirit_setup setup
def setup(actor_id)
@spirits = []
spirit_setup(actor_id)
end
#--------------------------------------------------------------------------
# * Add Spirit
# spirit_id : actor ID
#--------------------------------------------------------------------------
def add_spirit(spirit_id)
@spirits.push($game_actors[spirit_id]) if SPIRITS.include?(spirit_id)
@spirits.sort!
end
#--------------------------------------------------------------------------
# * Remove Spirit
# spirit_i : spirit index
#--------------------------------------------------------------------------
def remove_spirit(spirit_id)
@spirits.delete($game_actors[spirit_id])
end
#--------------------------------------------------------------------------
# * Get Skill Object Array
#--------------------------------------------------------------------------
alias spirit_skills skills
def skills
result = []
spirit_skills.each { |skill| result.push(skill.id)}
for spirit in @spirits
for i in spirit.spirit_skills
result.push(i.id)
end
end
result.sort!.uniq!
skills = []
result.each { |id| skills.push($data_skills[id])}
return skills
end
#--------------------------------------------------------------------------
# * Get Basic Maximum HP
#--------------------------------------------------------------------------
alias spirit_base_maxhp base_maxhp
def base_maxhp
result = spirit_base_maxhp
for spirit in @spirits
result += spirit.base_maxhp
end
return result
end
#--------------------------------------------------------------------------
# * Get basic Maximum MP
#--------------------------------------------------------------------------
alias spirit_base_maxmp base_maxmp
def base_maxmp
result = spirit_base_maxmp
for spirit in @spirits
result += spirit.base_maxmp
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Attack
#--------------------------------------------------------------------------
alias spirit_base_atk base_atk
def base_atk
result = spirit_base_atk
for spirit in @spirits
result += spirit.base_atk
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Defense
#--------------------------------------------------------------------------
alias spirit_base_def base_def
def base_def
result = spirit_base_def
for spirit in @spirits
result += spirit.base_def
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Spirit
#--------------------------------------------------------------------------
alias spirit_base_spi base_spi
def base_spi
result = spirit_base_spi
for spirit in @spirits
result += spirit.base_spi
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Agility
#--------------------------------------------------------------------------
alias spirit_base_agi base_agi
def base_agi
result = spirit_base_agi
for spirit in @spirits
result += spirit.base_agi
end
return result
end
#--------------------------------------------------------------------------
# * Get [Dual Wield] Option
#--------------------------------------------------------------------------
alias spirits_two_swords_style two_swords_style
def two_swords_style
return spirits_two_swords_style if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.two_swords_style
end
result = spirits_two_swords_style unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Fixed Equipment] Option
#--------------------------------------------------------------------------
alias spirits_fix_equipment fix_equipment
def fix_equipment
return spirits_fix_equipment if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.fix_equipment
end
result = spirits_fix_equipment unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Automatic Battle] Option
#--------------------------------------------------------------------------
alias spirits_auto_battle auto_battle
def auto_battle
return spirits_auto_battle if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.auto_battle
end
result = spirits_auto_battle unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Super Guard] Option
#--------------------------------------------------------------------------
alias spirits_super_guard auto_battle
def super_guard
return spirits_super_guard if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.super_guard
end
result = spirits_super_guard unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Pharmacology] Option
#--------------------------------------------------------------------------
alias spirits_pharmacology pharmacology
def pharmacology
for spirit in @spirits
result = true if spirit.pharmacology
end
result = spirits_pharmacology unless result
return result
end
#--------------------------------------------------------------------------
# * Get Critical Ratio
#--------------------------------------------------------------------------
alias spirit_cri cri
def cri
n = spirit_cri
for spirit in @spirits
n += 4 if spirit.critical_bonus
end
return n
end
#--------------------------------------------------------------------------
# * Has Critical Hit Bonus
#--------------------------------------------------------------------------
def critical_bonus
return $data_actors[@actor_id].critical_bonus
end
#--------------------------------------------------------------------------
# * Determine if Equippable
# item : item
#--------------------------------------------------------------------------
alias spirits_equippable? equippable?
def equippable?(item)
result = spirits_equippable?(item)
for spirit in @spirits
result = true if spirit.spirits_equippable?(item)
end
return result
end
#--------------------------------------------------------------------------
# * Change Experience
# exp : New experience
# show : Level up display flag
#--------------------------------------------------------------------------
alias spirits_change_exp change_exp
def change_exp(exp, show)
spirits_change_exp(exp, show)
for spirit in @spirits
spirit.change_exp(exp, false)
end
end
#--------------------------------------------------------------------------
# * Determine Usable Skills
# skill : skill
#--------------------------------------------------------------------------
alias spirits_skill_can_use? skill_can_use?
def skill_can_use?(skill)
return super
return true if skills.include?(skill)
return spirits_skill_can_use?(skill)
end
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. The instance of this class is referenced by $game_party.
#==============================================================================
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_writer :spirits # spirits
#--------------------------------------------------------------------------
# * Initial Party Setup
#--------------------------------------------------------------------------
alias spirits_setup_starting_members setup_starting_members
def setup_starting_members
spirits_setup_starting_members
@spirits = []
for i in $data_system.party_members
if SPIRITS.include?(i)
@spirits.push(i)
@actors.delete(i)
end
end
end
#--------------------------------------------------------------------------
# * Get Spirits
#--------------------------------------------------------------------------
def spirits
result = []
for i in @spirits
result.push($game_actors[i])
end
return result
end
#--------------------------------------------------------------------------
# * Add an Actor / Spirit
# actor_id : actor ID
#--------------------------------------------------------------------------
alias spirits_add_actor add_actor
def add_actor(actor_id)
if SPIRITS.include?(actor_id)
@spirits.push(actor_id)
@spirits.sort!
else
spirits_add_actor(actor_id)
end
end
#--------------------------------------------------------------------------
# * Remove Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
alias spirits_remove_actor remove_actor
def remove_actor(actor_id)
if SPIRITS.include?(actor_id)
@spirits.delete(actor_id)
else
spirits_remove_actor(actor_id)
end
end
end
#==============================================================================
# ** Scene_Spirits
#------------------------------------------------------------------------------
# This class performs the spirits screen processing.
#==============================================================================
class Scene_Spirits < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor_index : actor index
#--------------------------------------------------------------------------
def initialize(actor_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@actor = $game_party.members[@actor_index]
@status_window = Window_Short_Status.new(@actor)
@spirits_window = Window_Actor_Spirits.new(@actor)
@party_spirits = Window_Party_Spirits.new
@spirit_info = Window_Spirit_Info.new
@spirit_info.hide
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@status_window.dispose
@spirits_window.dispose
@party_spirits.dispose
@spirit_info.dispose
end
#--------------------------------------------------------------------------
# * Return to Original Screen
#--------------------------------------------------------------------------
def return_scene
$scene = Scene_Menu.new(3)
end
#--------------------------------------------------------------------------
# * Switch to Next Actor Screen
#--------------------------------------------------------------------------
def next_actor
@actor_index += 1
@actor_index %= $game_party.members.size
$scene = Scene_Spirits.new(@actor_index)
end
#--------------------------------------------------------------------------
# * Switch to Previous Actor Screen
#--------------------------------------------------------------------------
def prev_actor
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
$scene = Scene_Spirits.new(@actor_index)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
update_menu_background
@spirit_info.update
@spirits_window.update
@status_window.update
@party_spirits.update
if @spirit_info.active
show_spirit_info
elsif @spirits_window.active
main_update
elsif @party_spirits.active
party_update
end
super
end
#--------------------------------------------------------------------------
# * Main Frame Update
#--------------------------------------------------------------------------
def main_update
if Input.trigger?(Input::A)
Sound.play_cursor
@spirit_info.show(true)
@spirit_info.spirit = @spirits_window.spirit
elsif Input.trigger?(Input::

Sound.play_cancel
return_scene
elsif Input.trigger?(Input::C)
Sound.play_cursor
@spirits_window.active = false
@party_spirits.active = true
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
end
end
#--------------------------------------------------------------------------
# * Show Spirit Info
#--------------------------------------------------------------------------
def show_spirit_info
if Input.trigger?(Input::A) or Input.trigger?(Input::

or Input.trigger?(Input::C)
Sound.play_cursor
@spirit_info.hide
end
end
#--------------------------------------------------------------------------
# * party Update
#--------------------------------------------------------------------------
def party_update
if Input.trigger?(Input::A)
Sound.play_cursor
@spirit_info.show(true)
@spirit_info.spirit = @party_spirits.spirit
elsif Input.trigger?(Input::

Sound.play_cancel
@spirits_window.active = true
@party_spirits.active = false
elsif Input.trigger?(Input::C)
Sound.play_decision
@spirits_window.active = true
@party_spirits.active = false
perform_trade
end
end
#--------------------------------------------------------------------------
# * Trade Spirits
#--------------------------------------------------------------------------
def perform_trade
if @spirits_window.spirit.nil?
@actor.add_spirit(@party_spirits.spirit.id)
$game_party.remove_actor(@party_spirits.spirit.id)
elsif @party_spirits.spirit.nil?
$game_party.add_actor(@spirits_window.spirit.id)
@actor.remove_spirit(@spirits_window.spirit.id)
else
@actor.add_spirit(@party_spirits.spirit.id)
$game_party.remove_actor(@party_spirits.spirit.id)
$game_party.add_actor(@spirits_window.spirit.id)
@actor.remove_spirit(@spirits_window.spirit.id)
end
@party_spirits.refresh
@spirits_window.refresh
@status_window.refresh
end
end
#==============================================================================
# ** Window_Short_Status
#------------------------------------------------------------------------------
# This window displays short status specs on the status screen.
#==============================================================================
class Window_Short_Status < Window_Status
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
super(actor)
self.height = 80
create_contents
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 36, 0)
draw_actor_class(@actor, 36, 24)
draw_actor_graphic(@actor, 16, 40)
draw_actor_hp(@actor, 130, 0)
draw_actor_mp(@actor, 130, WLH)
draw_parameters_compact(280, 0)
end
#--------------------------------------------------------------------------
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_parameters_compact(x, y)
draw_actor_parameter_short(@actor, x, y, 0)
draw_actor_parameter_short(@actor, x + 120, y, 1)
draw_actor_parameter_short(@actor, x, y + WLH, 2)
draw_actor_parameter_short(@actor, x + 120, y + WLH, 3)
end
#--------------------------------------------------------------------------
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_actor_parameter_short(actor, x, y, type)
case type
when 0
parameter_name = Vocab::atk
parameter_value = actor.atk
when 1
parameter_name = Vocab::def
parameter_value = actor.def
when 2
parameter_name = Vocab::spi
parameter_value = actor.spi
when 3
parameter_name = Vocab::agi
parameter_value = actor.agi
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 60, WLH, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 60, y, 36, WLH, parameter_value, 2)
end
end
#==============================================================================
# ** Window_Spirit_Info
#------------------------------------------------------------------------------
# This window displays full status of spirits on the status screen.
#==============================================================================
class Window_Spirit_Info < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor = nil)
super(0, 0, 544, 416)
@actor = actor
self.back_opacity = 255
end
#--------------------------------------------------------------------------
# * Define Spirit
#--------------------------------------------------------------------------
def spirit=(actor)
@actor = actor
refresh unless @actor.nil?
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 128, 0)
draw_actor_face(@actor, 8, 32)
draw_basic_info(128, 32)
draw_parameters(32, 160)
draw_exp_info(288, 32)
draw_skill_list(240, 152) unless @actor.skills.nil?
draw_specials(4, 280)
end
#--------------------------------------------------------------------------
# * Draw Basic Information
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + WLH * 0)
draw_actor_state(@actor, x, y + WLH * 1)
draw_actor_hp(@actor, x, y + WLH * 2)
draw_actor_mp(@actor, x, y + WLH * 3)
end
#--------------------------------------------------------------------------
# * Draw Parameters
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_parameters(x, y)
draw_actor_parameter(@actor, x, y + WLH * 0, 0)
draw_actor_parameter(@actor, x, y + WLH * 1, 1)
draw_actor_parameter(@actor, x, y + WLH * 2, 2)
draw_actor_parameter(@actor, x, y + WLH * 3, 3)
end
#--------------------------------------------------------------------------
# * Draw Experience Information
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 2)
self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 2)
end
#--------------------------------------------------------------------------
# * Draw Equipment
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_skill_list(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y - WLH, 300, WLH, Vocab::Spirit_Skills, 1)
self.contents.font.color = normal_color
i = 0
for skill in @actor.skills
draw_item_name(skill, x + 16, y + WLH * (i / 2))
i += 1
x -= 130 if i % 2 == 0
x += 130 if i % 2 != 0
end
end
#--------------------------------------------------------------------------
# * Draw Special Traits
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_specials(x, y)
specials = []
specials.push(Vocab::Two_Swords_Style) if @actor.two_swords_style
specials.push(Vocab::Fix_Equipment) if @actor.fix_equipment
specials.push(Vocab::Auto_Battle) if @actor.auto_battle
specials.push(Vocab::Super_Guard) if $data_actors[@actor.id].super_guard
specials.push(Vocab::Pharmacology) if @actor.pharmacology
specials.push(Vocab::Critical_Bonus) if @actor.critical_bonus
unless specials.empty?
self.contents.font.color = system_color
self.contents.draw_text(x, y - WLH, 210, WLH, Vocab::Specials, 1)
self.contents.font.color = normal_color
specials.each{ |trait|
self.contents.draw_text(x, y, 200, WLH, trait)
y += WLH}
end
end
end
#==============================================================================
# ** Window_Party_Spirits
#------------------------------------------------------------------------------
# This window displays the faces of the spirits the party has.
#==============================================================================
class Window_Party_Spirits < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize
super(0, 284, 544, 132)
refresh
self.active = false
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
@item_max = $game_party.spirits.size + 1
@column_max = @item_max
create_contents
x = 2
for spirit in $game_party.spirits
draw_actor_face(spirit, x, 2)
x += 130
end
sq = Rect.new(x, 2, 100, 100)
draw_empty_spirit(sq)
end
#--------------------------------------------------------------------------
# * Spirit
#--------------------------------------------------------------------------
def spirit
if 0 <= @index and @index < @item_max - 1
return $game_party.spirits[@index]
else
return nil
end
end
#--------------------------------------------------------------------------
# * Create Window Contents
#--------------------------------------------------------------------------
def create_contents
self.contents.dispose
self.contents = Bitmap.new([@item_max * 130 + 10, width-32].max, 96)
end
#--------------------------------------------------------------------------
# * Get Row Count
#--------------------------------------------------------------------------
def row_max
return 1
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # If the cursor position is less than 0
self.cursor_rect.empty # Empty cursor
else # If the cursor position is 0 or more
rect = item_rect(@index) # Get rectangle of selected item
self.ox = @index / 4 * 130 * 4# Match rectangle to scroll position
self.cursor_rect = rect # Refresh cursor rectangle
end
end
#--------------------------------------------------------------------------
# * Get rectangle for displaying items
# index : item number
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(index % 4 * 130, 0, 100, 98)
return rect
end
#--------------------------------------------------------------------------
# ? Draw Empty Spirit
# rect : space
#--------------------------------------------------------------------------
def draw_empty_spirit(rect)
self.contents.draw_text(rect, "EMPTY", 1)
end
end
#==============================================================================
# ** Window_Actor_Spirits
#------------------------------------------------------------------------------
# This window displays the faces of the spirits each actor has.
#==============================================================================
class Window_Actor_Spirits < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
@actor = actor
@column_max = 4
super(0, 80, 544, 204)
create_contents
refresh
self.index = 0
self.active = true
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
@item_max = @actor.spirits.size + 1
@item_max -= 1 if spirit_maxed?
create_contents
x = 2
y = 1
for spirit in @actor.spirits
draw_actor_face(spirit, x, y)
x += 130
if x > 500
x = 2
y += 108
end
end
sq = Rect.new(x, y, 100, 100)
draw_empty_spirit(sq) if !spirit_maxed?
end
#--------------------------------------------------------------------------
# * Spirit
#--------------------------------------------------------------------------
def spirit
if 0 <= @index and @index < @item_max - 1
return @actor.spirits[@index]
else
return nil
end
end
#--------------------------------------------------------------------------
# * Create Window Contents
#--------------------------------------------------------------------------
def create_contents
self.contents.dispose
lines = 1 + @item_max / 4
self.contents = Bitmap.new(width - 32, [height - 32, lines * 108].max)
end
#--------------------------------------------------------------------------
# * Get rectangle for displaying items
# index : item number
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 100, 98)
rect.x = index % 4 * 130
rect.y += 72 if index >= 4
return rect
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if cursor_movable?
last_index = @index
if Input.repeat?(Input::DOWN)
@index += 3
@index %= @item_max
end
if Input.repeat?(Input::UP)
@index += - 3 + @item_max
@index %= @item_max
end
if Input.repeat?(Input::RIGHT)
@index += 1
@index %= @item_max
end
if Input.repeat?(Input::LEFT)
@index += - 1 + @item_max
@index %= @item_max
end
if @index != last_index
Sound.play_cursor
end
end
update_cursor
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # If the cursor position is less than 0
self.cursor_rect.empty # Empty cursor
else # If the cursor position is 0 or more
rect = item_rect(@index) # Get rectangle of selected item
# Match rectangle to scroll position
if @index >= 4
self.oy = 36
self.oy += 108 * (@index / 4 - 1)
else
self.oy = 0
end
self.cursor_rect = rect # Refresh cursor rectangle
end
end
#--------------------------------------------------------------------------
# ? Return if an actor is already filled up with spirits
#--------------------------------------------------------------------------
def spirit_maxed?
return false if Max_spirits.nil? or Max_spirits == 0
return true if !Max_spirits.nil? and @actor.spirits.size == Max_spirits
return false
end
#--------------------------------------------------------------------------
# ? Draw Empty Spirit
# rect : space
#--------------------------------------------------------------------------
def draw_empty_spirit(rect)
self.contents.draw_text(rect, "EMPTY", 1)
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a superclass of all windows in the game.
#==============================================================================
class Window_Base < Window
def hide
self.visible = false
self.active = false
end
def show(activate = true)
self.visible = true
self.active = activate
end
end # End: class Window_Base < Window