07-17-2009, 05:44 PM
Okay.
Use this version of Summons:
and when you have two common events containing a summon, just differentiate them by adding a third parameter, like this:
$game_party.summon(2,["Kerya"],374)
$game_actors[10].
super_arts_points=200;
$game_party.summon(2,["Kerya"],712)
You just need to put two different integer non negative numbers.
This will appear in version 2.14.
Use this version of Summons:
Content Hidden
Code:
#==============================================================================
# ** Summons (Add-on for the Custom Battle System (CTB) by Charlie Lee)
#
# Version: 0.7
# Author: Charlie Lee
#==============================================================================
#==============================================================================
# ? *** CONFIGURATION *** ? #
#==============================================================================
# This is used for the identification of summon skills and has nothing to do
# with the command name in the actor command window
SUMMON_NAME="Summon"
RETIRE_NAME="Retire"
AUTO_ADD_ACTORS = true
# Items usability
TYPE_1_CAN_USE_ITEMS = false
TYPE_2_CAN_USE_ITEMS = false
USE_ITEMS_ON_TYPE_1 = false
USE_ITEMS_ON_TYPE_2 = false
# Experience acquisition
REMOVED_ACTORS_EXP_MULTIPLIER = 0.8
TRANSFORMED_ACTORS_EXP_MULTIPLIER = 0.8 # Applies to actors not in their
# original form at the end of the battle. The transformed form gets full exp
INVOKED_AEON_EXP_MULTIPLIER = 0.8
NOT_INVOKED_AEON_EXP_MULTIPLIER = 0.2
INVOKED_TRANSFORMATION_EXP_MULTIPLIER = 0.8
NOT_INVOKED_TRANSFORMATION_EXP_MULTIPLIER = 0.2
# Use this if you want dead aeons to be unavailable for N battles
# For multiple invocations it only applies if all the aeons have been killed
# For aoens summoned with multiple summons it only applies to the summon that
# was active when they were killed
BATTLES_BEFORE_AEONS_RETURN = 2
# Aeons recover HP_RECOVER percent of HPs
# at the end of every battle
HP_RECOVER = 10
# Aeons recover SP_RECOVER percent of SPs
# at the end of every battle
SP_RECOVER = 10
# Transformations recover HP_RECOVER percent of HPs
# at the end of every battle
HP_RECOVER3 = 10
# Transformations recover SP_RECOVER percent of SPs
# at the end of every battle
SP_RECOVER3 = 10
REMOVE_DEAD_SUMMONS = true
AEONS_LEARNINGS={
1 => [17,5],
2 => [17,15],
3 => [17,30],
54 => [14,5]
} # {skill_id => [item, quantity]}
TRANSFORMED_ACTOR_ANIMATION_ID=22
SUMMONED_ACTORS_ANIMATION_ID=20
RETURNING_PARTY_ANIMATION_ID=2
#==============================================================================
# ? SUMMON
# type: 1) do not remove party actors, 2) remove party actors,
# 3) remove the summoned (aka transformations)
#==============================================================================
class Summon
attr_reader :actors_ids
attr_reader :actors_names
attr_reader :type
attr_reader :skill_id
attr_accessor :available
attr_reader :key
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
def initialize(type,id,names,key)
@available=0
@type=type
@skill_id=id
@key=key
@actors_names=[]
@actors_ids=[]
for name in names
for i in 0...999
actor = $game_actors[i]
if actor != nil and actor.name == name
@actors_ids.push(actor.id)
$game_party.aeons_ids.push(actor.id) unless type==3
$game_party.transformations_ids.push(actor.id) if type==3
@actors_names.push(name)
end
end
end
# output
end
#--------------------------------------------------------------------------
# * Output
#--------------------------------------------------------------------------
def output
print("Summon skill id: "+@skill_id.to_s+"\ntype: "+type.to_s)
print("Actors:")
for actor_name in @actors_names
print(actor_name)
end
end
end
#==============================================================================
# ? GAME_PARTY
#==============================================================================
class Game_Party
attr_accessor :aeons # array of Aeons in the game party
attr_accessor :transformations # array of Transformations in the game party
attr_accessor :removed_actors
attr_accessor :aeons_ids # array of all the aeons' ids
attr_accessor :transformations_ids # array of all the transformations' ids
attr_accessor :game_summons # array of all the Summons
attr_accessor :transformed_actors
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
alias summon_initialize initialize
def initialize
summon_initialize
@aeons=[]
@transformations=[]
@removed_actors=[]
@aeons_ids=[]
@transformations_ids=[]
@game_summons=[]
@transformed_actors=[]
end
#--------------------------------------------------------------------------
# * Fill Summons Database
#--------------------------------------------------------------------------
def fill_summons_database
$game_temp.filling_summons_database=true
print("filling_summons_database")
for skill in $data_skills
@filling_summons_database_skill_id=skill.id
if skill!=nil and skill.element_set.include?($game_temp.summon_element_id)
print("summon: "+skill.name+" id"+skill.id.to_s)
id=skill.common_event_id
command=""
for line in $data_common_events[id].list
command=command+line.parameters[0].to_s
end
# print(command)
eval(command)
end
end
$game_temp.filling_summons_database=false
end
#--------------------------------------------------------------------------
# * Summon
#--------------------------------------------------------------------------
def summon(type,actors_names,key=-1)
if $game_temp.filling_summons_database==true
# create the summon
skill_id=@filling_summons_database_skill_id
@game_summons[skill_id]=Summon.new(type,skill_id,actors_names,key)
if $game_temp.auto_add_aeons_list.include?(skill_id)
if type==1 or type==2
for actor_id in $game_party.game_summons[skill_id].actors_ids
if not $game_party.aeons.include?($game_actors[actor_id])
$game_party.aeons.push($game_actors[actor_id])
end
end
else
for actor_id in $game_party.game_summons[skill_id].actors_ids
if not $game_party.transformations.include?($game_actors[actor_id])
$game_party.transformations.push($game_actors[actor_id])
end
end
end
end
else
for summon in @game_summons
if summon != nil
if summon.type == type and summon.actors_names==actors_names and
(summon.key==-1 or summon.key==key)
$scene.summon(summon)
end
end
end
end
end
#--------------------------------------------------------------------------
# * Add Summoned
#--------------------------------------------------------------------------
def add_summoned(actor_id, position=-1)
# Get actor
actor = $game_actors[actor_id]
if not @actors.include?(actor)
# Add actor
if position>=0
@actors.insert(position,actor)
else
@actors.push(actor)
end
actor.battle_data_reset
actor.randomize_next_action_time
end
$game_player.refresh
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
end
#--------------------------------------------------------------------------
# * Remove Party
#--------------------------------------------------------------------------
def remove_party()
to_be_removed=[]
@removed_actors=[]
for actor in @actors
to_be_removed.push(actor)
end
for actor in to_be_removed
# Remove actor
@actors.delete(actor)
# Add actor to the removed actors array
@removed_actors.push(actor)
end
$game_temp.party_removed = true
$game_player.refresh
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
end
#--------------------------------------------------------------------------
# * Return Party
#--------------------------------------------------------------------------
def return_party
# p "return party"
# print("removed actors size: "+ @removed_actors.size.to_s)
for actor in @removed_actors
# Add actor
@actors.push(actor)
actor.battle_data_reset(false) # Do not reset the last commands
actor.randomize_next_action_time
end
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
size=@removed_actors.size
@removed_actors.clear
$game_temp.party_removed = false
$game_player.refresh
# return the # of actors
return size
end
#--------------------------------------------------------------------------
# * Return Transformed Actor
#--------------------------------------------------------------------------
def return_transformed_actor(id)
for a in @transformed_actors
if a.id == id
actor=a
end
end
# Add actor
@actors.push(actor)
actor.battle_data_reset
actor.randomize_next_action_time
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
end
#--------------------------------------------------------------------------
# * Return Transformed Backup Actor
#--------------------------------------------------------------------------
def return_transformed_backup_actor(id)
for a in @transformed_actors
if a.id == id
actor=a
end
end
# Add actor
@backup_actors.push(actor)
actor.battle_data_reset
actor.randomize_next_action_time
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
end
def update_size
@party_size=$game_party.actors.size
end
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
alias summon_add_actor add_actor
def add_actor(actor_id)
# Original call
summon_add_actor(actor_id)
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
end
#--------------------------------------------------------------------------
# * Remove Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
alias summon_remove_actor remove_actor
def remove_actor(actor_id)
# Original call
summon_remove_actor(actor_id)
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
end
def summons_hp_recover
for actor in $game_party.aeons
actor.hp = Integer([actor.maxhp,actor.hp+actor.maxhp*HP_RECOVER/100].min)
end
for actor in $game_party.transformations
actor.hp = Integer([actor.maxhp,actor.hp+actor.maxhp*HP_RECOVER3/100].min)
end
end
def summons_sp_recover
for actor in $game_party.aeons
actor.sp = Integer([actor.maxsp,actor.sp+actor.maxsp*SP_RECOVER/100].min)
end
for actor in $game_party.transformations
actor.sp = Integer([actor.maxsp,actor.sp+actor.maxsp*SP_RECOVER3/100].min)
end
end
#--------------------------------------------------------------------------
# * Remove Transformed
#--------------------------------------------------------------------------
def remove_transformed(id)
for a in @actors
if a.id==id
actor=a
# Save position
temp=@actors.index(a)
end
end
# Remove actor
@actors.delete(actor)
# Add actor to the removed actors array
@transformed_actors.push(actor)
$game_player.refresh
# THIS LINE IS FOR COMPATIBILITY WITH MINKOFF/DERVVULFMAN ANIMATION SYSTEM
update_size
return temp
end
#--------------------------------------------------------------------------
# * Refresh Party Members
#--------------------------------------------------------------------------
alias summon_refresh refresh
def refresh
# Original call
summon_refresh
# Actor objects split from $game_actors right after loading game data
# Avoid this problem by resetting the actors each time data is loaded.
new_actors = []
for i in 0...@aeons.size
if $data_actors[@aeons[i].id] != nil
new_actors.push($game_actors[@aeons[i].id])
end
end
@aeons = new_actors
new_actors = []
for i in 0...@backup_actors.size
if $data_actors[@backup_actors[i].id] != nil
new_actors.push($game_actors[@backup_actors[i].id])
end
end
@backup_actors = new_actors
new_actors = []
for i in 0...@transformations.size
if $data_actors[@transformations[i].id] != nil
new_actors.push($game_actors[@transformations[i].id])
end
end
@transformations = new_actors
end
end
#==============================================================================
# ? SPRITESET BATTLE
#==============================================================================
class Spriteset_Battle
def add_sprites(n=1)
added_sprites=[]
for i in 1..n
actor_sprite=Sprite_Battler.new(@viewport1)
@actor_sprites.push(actor_sprite)
added_sprites.push(actor_sprite)
# print("add_sprite")
end
return added_sprites
end
def add_sprite_in_pos(pos)
actor_sprite=Sprite_Battler.new(@viewport1)
actor_sprite.appear
@actor_sprites.insert(pos, actor_sprite)
return actor_sprite
# print("add_sprite")
end
def remove_sprites(n=1)
for i in 1..n
# print("remove sprite")
sprite=@actor_sprites.pop
sprite.battler=nil
sprite.dispose
end
end
def remove_sprite_in_pos(pos)
sprite=@actor_sprites.delete_at(pos)
sprite.battler=nil
sprite.dispose
end
alias summon_update update
def update
@actor_sprites.each_index do |index| @actor_sprites[index].battler =
$game_party.actors[index] end
summon_update
end
end
#==============================================================================
# ? SCENE BATTLE
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Initialize invoked_during_last_battle flag
#--------------------------------------------------------------------------
alias summon_start_phase1 start_phase1
def start_phase1
for aeon in $game_party.aeons
aeon.invoked_during_last_battle = false
end
for transformation in $game_party.transformations
transformation.invoked_during_last_battle = false
end
summon_start_phase1
end
#--------------------------------------------------------------------------
# * Summon
#--------------------------------------------------------------------------
def summon(s)
# print("Scene Battle")
s.output
# If the summon adds characters to the party
if s.type==1
if $game_party.actors.size + s.actors_ids.size > 8
$game_temp.too_many_actors = true
return
end
# Add the actors
for actor_id in s.actors_ids
$game_party.add_summoned(actor_id)
# Set the invoked flag
$game_actors[actor_id].invoked_during_last_battle = true
added_sprites=[]
added_sprites=@spriteset.add_sprites
for sprite in added_sprites; sprite.animation($data_animations[SUMMONED_ACTORS_ANIMATION_ID],true) unless SUMMONED_ACTORS_ANIMATION_ID==nil; end
end
for actor_id in s.actors_ids
$game_actors[actor_id].summon_id=s.skill_id
# print($game_actors[actor_id].summon_id.to_s)
end
return
elsif s.type==2
# Remove the sprites
@spriteset.remove_sprites($game_party.actors.size)
$game_party.remove_party
# Add the actors
for actor_id in s.actors_ids
$game_party.add_summoned(actor_id)
# Set the invoked flag
$game_actors[actor_id].invoked_during_last_battle = true
added_sprites=[]
added_sprites=@spriteset.add_sprites
for sprite in added_sprites; sprite.animation($data_animations[SUMMONED_ACTORS_ANIMATION_ID],true) unless SUMMONED_ACTORS_ANIMATION_ID==nil; end
end
for actor_id in s.actors_ids
$game_actors[actor_id].summon_id=s.skill_id
# print($game_actors[actor_id].summon_id.to_s)
end
return
elsif s.type==3
# Remove the sprite
party_position=$game_party.remove_transformed(@active_battler.id)
@spriteset.remove_sprite_in_pos(party_position)
# Add the actors
for actor_id in s.actors_ids
$game_party.add_summoned(actor_id, party_position)
sprite=@spriteset.add_sprite_in_pos(party_position)
sprite.animation($data_animations[TRANSFORMED_ACTOR_ANIMATION_ID],true) unless TRANSFORMED_ACTOR_ANIMATION_ID==nil
end
for actor_id in s.actors_ids
$game_actors[actor_id].summon_id=s.skill_id
# Save the original form id
$game_actors[actor_id].original_form_id=@active_battler.id
# Save the transformed form id
@active_battler.transformed_form_id=actor_id
# print($game_actors[actor_id].summon_id.to_s)
end
return
end
end
#--------------------------------------------------------------------------
# * Return Party # This method deals with the sprites
#--------------------------------------------------------------------------
def return_party
# p "return party"
n_of_returned_members=$game_party.return_party
for i in 1..n_of_returned_members
added_sprites=[]
added_sprites=@spriteset.add_sprites
for sprite in added_sprites; sprite.animation($data_animations[RETURNING_PARTY_ANIMATION_ID],true) unless RETURNING_PARTY_ANIMATION_ID==nil; end
# p "Adding sprite"
end
end
#--------------------------------------------------------------------------
# * Battle_End
#--------------------------------------------------------------------------
alias summon_battle_end battle_end
def battle_end(n)
# HP recover for aeons
$game_party.summons_hp_recover
# SP recover for aeons
$game_party.summons_sp_recover
for s in $game_party.game_summons
if s != nil
s.available=[s.available-1,0].max
end
end
# Remove all the summoned actors
to_be_removed=[]
for actor in $game_party.actors
if $game_party.aeons_ids.include?(actor.id)
to_be_removed.push(actor)
# print("removed ", actor.name)
end
end
for actor in to_be_removed
$game_party.actors.delete(actor)
end
# Let the party return, no need to add any sprites, so we call the
# class Game_Party method
$game_party.return_party
# Remove all the summoned actors from the returned party
to_be_removed=[]
for actor in $game_party.actors
if $game_party.aeons_ids.include?(actor.id)
to_be_removed.push(actor)
# print("removed ", actor.name)
end
end
for actor in to_be_removed
$game_party.actors.delete(actor)
end
# Remove all the transformed actors from the party
to_be_removed=[]
for actor in $game_party.actors
if $game_party.transformations_ids.include?(actor.id)
to_be_removed.push(actor)
# print("removed ", actor.name)
end
end
for actor in to_be_removed
$game_party.actors.delete(actor)
$game_party.return_transformed_actor(actor.original_form_id)
end
# Remove all the transformed actors from the backup party
to_be_removed=[]
for actor in $game_party.backup_actors
if $game_party.transformations_ids.include?(actor.id)
to_be_removed.push(actor)
# print("removed ", actor.name)
end
end
for actor in to_be_removed
$game_party.backup_actors.delete(actor)
$game_party.return_transformed_backup_actor(actor.original_form_id)
end
$game_player.refresh
# Original call
summon_battle_end(n)
end
#--------------------------------------------------------------------------
# * Retire # This method does not deal with sprites
#--------------------------------------------------------------------------
def retire(summon_id)
# Remove all the actors summoned with the retiring battler's summon
#p summon_id.to_s
#p $game_party.game_summons[summon_id].type.to_s
to_be_removed_ids = $game_party.game_summons[summon_id].actors_ids
for actor_id in to_be_removed_ids
$game_party.remove_actor(actor_id)
end
@spriteset.remove_sprites(to_be_removed_ids.size)
# Make the party return if the summon was type 2
if $game_party.game_summons[summon_id].type == 2
return_party
end
$game_party.update_size # can be removed?
end
#--------------------------------------------------------------------------
# * Determine Battle Win/Loss Results
#--------------------------------------------------------------------------
alias summon_judge judge
def judge
# If all dead determinant is true, or number of members in party is 0
if $game_party.all_dead? or $game_party.actors.size == 0
# If the party has been removed
if $game_party.removed_actors.size > 0
to_be_removed=[]
# Remove all the summoned actors
for actor in $game_party.actors
if $game_party.aeons_ids.include?(actor.id)
to_be_removed.push(actor)
end
end
for actor in to_be_removed
# print("remove"+actor.name)
$game_party.actors.delete(actor)
$game_party.game_summons[actor.summon_id].available = BATTLES_BEFORE_AEONS_RETURN + 1
end
$game_party.update_size # can be removed?
@spriteset.remove_sprites(to_be_removed.size)
@spriteset.update
# Party return
return_party
$game_party.update_size # can be removed?
@spriteset.update
# It isn't over yet!
return false
end
end
# Remove dead summon
if REMOVE_DEAD_SUMMONS
initial_actors=$game_party.actors
for actor in initial_actors
# initial actors may not be in the party anymore after some retirements
if $game_party.actors.include?(actor)
# if actor is summoned
if $game_party.aeons_ids.include?(actor.id)
remove = true
to_be_tested_ids = $game_party.game_summons[actor.summon_id].actors_ids
for actor_id in to_be_tested_ids
remove = false unless $game_actors[actor_id].dead?
end
end
if remove
retire(actor.summon_id)
@spriteset.update
$game_party.game_summons[actor.summon_id].available = BATTLES_BEFORE_AEONS_RETURN + 1
end
end
end
end
# original call
return summon_judge
end
#--------------------------------------------------------------------------
# * Start After Battle Phase
#--------------------------------------------------------------------------
alias summon_start_phase5 start_phase5
def start_phase5
exp = 0
# Loop
for enemy in $game_troop.enemies
# If enemy is not hidden
unless enemy.hidden
# Add EXP and amount of gold obtained
exp += enemy.exp
end
end
# Actors removed for summon (can be aeons or transformations)
for actor in $game_party.removed_actors
actor.old_exp=actor.exp
actor.exp += (actor.state?($expx2_state_id)?2:1) * Integer(exp * REMOVED_ACTORS_EXP_MULTIPLIER)
end
# Original form of transformed actors
for actor in $game_party.transformed_actors
actor.old_exp=actor.exp
# if removed
if $game_party.removed_actors.include?($game_actors[actor.transformed_form_id])
# print(actor.name + " transformed and removed")
actor.exp += (actor.state?($expx2_state_id)?2:1) * Integer(exp * TRANSFORMED_ACTORS_EXP_MULTIPLIER * REMOVED_ACTORS_EXP_MULTIPLIER)
# if switched
elsif $game_party.backup_actors.include?($game_actors[actor.transformed_form_id])
# print(actor.name + " transformed and switched")
actor.exp += (actor.state?($expx2_state_id)?2:1) * Integer(exp * TRANSFORMED_ACTORS_EXP_MULTIPLIER * SWITCHED_ACTORS_EXP_MULTIPLIER)
else
# print(actor.name + " transformed")
actor.exp += (actor.state?($expx2_state_id)?2:1) * Integer(exp * TRANSFORMED_ACTORS_EXP_MULTIPLIER)
end
end
# Aeons not in the party
for aeon in $game_party.aeons-$game_party.actors
aeon.old_exp=aeon.exp
# p aeon.name
aeon.exp += Integer(exp *
((aeon.invoked_during_last_battle)?(INVOKED_AEON_EXP_MULTIPLIER):(NOT_INVOKED_AEON_EXP_MULTIPLIER)))
end
# Transformations not in the party or the backup party or the removed actors
for transformation in ((($game_party.transformations-$game_party.actors)-$game_party.backup_actors)-$game_party.removed_actors)
transformation.old_exp=transformation.exp
# p transformation.name
transformation.exp += Integer(exp *
((transformation.invoked_during_last_battle)?(INVOKED_TRANSFORMATION_EXP_MULTIPLIER):(NOT_INVOKED_TRANSFORMATION_EXP_MULTIPLIER)))
end
# Call the original script
summon_start_phase5
end
end
#==============================================================================
# ? GAME TEMP
#==============================================================================
class Game_Temp
attr_accessor :too_many_actors
attr_accessor :summon_element_id
attr_accessor :filling_summons_database
attr_accessor :party_removed
attr_accessor :actors_transformed
attr_accessor :auto_add_aeons_list
alias initialize_summons initialize
def initialize
# Perform the original call
initialize_summons
@too_many_actors = false
@summon_element_id = $data_system.elements.index(SUMMON_NAME)
@party_removed = false
@actors_transformed = false
@auto_add_aeons_list = []
end
end
#==============================================================================
# ? GAME BATTLER
#==============================================================================
class Game_Battler
attr_accessor :summon_id
#--------------------------------------------------------------------------
# * Retire
#--------------------------------------------------------------------------
def retire
$scene.retire(@summon_id)
end
end
#==============================================================================
# ? SCENE TITLE
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
alias summon_command_new_game command_new_game
def command_new_game
summon_command_new_game
$game_party.fill_summons_database
end
end
#==============================================================================
# ? GAME ACTOR
#==============================================================================
class Game_Actor < Game_Battler
attr_accessor :invoked_during_last_battle
#--------------------------------------------------------------------------
# * Determine if Skill can be Used
# skill_id : skill ID
#--------------------------------------------------------------------------
alias summon_skill_can_use? skill_can_use?
def skill_can_use?(skill_id)
# If skill is a summon
if $data_skills[skill_id].element_set.include?($game_temp.summon_element_id)
if $game_party.game_summons[skill_id].available > 0
return false
end
# return false if the party has been removed
if $game_party.game_summons[skill_id].type == 2 and
$game_temp.party_removed
return false
end
# return false if some of the actors is already in the party
for actor_id in $game_party.game_summons[skill_id].actors_ids
if $game_party.actors.include?($game_actors[actor_id])
return false
end
end
# return false if some of the actors is already in the backup party
for actor_id in $game_party.game_summons[skill_id].actors_ids
if $game_party.backup_actors.include?($game_actors[actor_id])
return false
end
end
# return false if all the actors are dead
all_dead=true
for actor_id in $game_party.game_summons[skill_id].actors_ids
if not $game_actors[actor_id].dead?
all_dead = false
end
end
return false if all_dead
end
# Perform the original call
return summon_skill_can_use?(skill_id)
end
def summon_skill_can_learn?(skill_id)
return false if AEONS_LEARNINGS[skill_id] == nil
return false if skill_learn?(skill_id)
item_needed=AEONS_LEARNINGS[skill_id][0]
quantity_needed=AEONS_LEARNINGS[skill_id][1]
if $game_party.item_number(item_needed) < quantity_needed
return false
else
return true
end
end
alias summon_learn_skill learn_skill
def learn_skill(skill_id)
summon_learn_skill(skill_id)
return unless AUTO_ADD_ACTORS
if $data_skills[skill_id].element_set.include?($game_temp.summon_element_id)
if skill_learn?(skill_id)
if $game_party.game_summons!=[]
if $game_party.game_summons[skill_id].type != 3
for actor_id in $game_party.game_summons[skill_id].actors_ids
if not $game_party.aeons.include?($game_actors[actor_id])
$game_party.aeons.push($game_actors[actor_id])
end
end
else
for actor_id in $game_party.game_summons[skill_id].actors_ids
if not $game_party.transformations.include?($game_actors[actor_id])
$game_party.transformations.push($game_actors[actor_id])
end
end
end
else
$game_temp.auto_add_aeons_list.push(skill_id) unless $game_temp.auto_add_aeons_list.include?(skill_id)
end
end
end
end
end
#==============================================================================
# ? SCENE BATTLE
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Determine if the Item command is available for summons
#--------------------------------------------------------------------------
alias summons_phase3_setup_command_window2 phase3_setup_command_window2
def phase3_setup_command_window2
if @active_battler.summon_id != nil
t=$game_party.game_summons[@active_battler.summon_id].type
if t==1
@individual_battle_commands.delete($data_system.words.item) unless TYPE_1_CAN_USE_ITEMS
elsif t==2
@individual_battle_commands.delete($data_system.words.item) unless TYPE_2_CAN_USE_ITEMS
end
end
# original call
summons_phase3_setup_command_window2
end
#--------------------------------------------------------------------------
# * Determine if the item can be used on summons
#--------------------------------------------------------------------------
alias summons_update_phase3_actor_select2 update_phase3_actor_select2
def update_phase3_actor_select2
# If item window is showing
if @item_window != nil
# If C button was pressed
if Input.trigger?(Input::C)
if $game_party.actors[@actor_arrow.index].summon_id != nil
t=$game_party.game_summons[$game_party.actors[@actor_arrow.index].summon_id].type
if t==1
if not USE_ITEMS_ON_TYPE_1
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
elsif t==2
if not USE_ITEMS_ON_TYPE_2
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
end
end
end
end
# Original call
summons_update_phase3_actor_select2
end
#--------------------------------------------------------------------------
# * Determine if auto-phoenix can revive summons
#--------------------------------------------------------------------------
alias summon_make_phoenix_users_and_targets2 make_phoenix_users_and_targets2
def make_phoenix_users_and_targets2
for actor in $game_party.actors
if actor.summon_id != nil
t = $game_party.game_summons[actor.summon_id].type
if t==1
if not USE_ITEMS_ON_TYPE_1
@phoenix_targets.delete(actor)
end
elsif t==2
if not USE_ITEMS_ON_TYPE_2
@phoenix_targets.delete(actor)
end
end
end
end
# original call
summon_make_phoenix_users_and_targets2
end
end
#==============================================================================
# ? GAME BATTLER
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# * Determine if the item can be used on summons
#--------------------------------------------------------------------------
alias summons_item_effect item_effect
def item_effect(item)
if self.summon_id != nil
t = $game_party.game_summons[self.summon_id].type
if t==1
if not USE_ITEMS_ON_TYPE_1
return false
end
elsif t==2
if not USE_ITEMS_ON_TYPE_2
return false
end
end
end
# original call
return summons_item_effect(item)
end
end
#==============================================================================
# ? SCENE SUMMONS
#==============================================================================
class Scene_Summons
def initialize(menu_index = 0)
@actors=$game_party.aeons
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make aeons window
s=[]
for aeon in @actors
s.push(aeon.name)
end
# No Aeons yet
if s.size == 0
@empty = true
s.push("empty")
@empty_window = Window_Command.new(120,s)
@empty_window.x = 260
@empty_window.y = 208
@empty_window.active = true
else
@empty = false
@aeons_window = Window_CommandSliding.new(160, s)
@aeons_window.set_y(64)
@aeons_window.index = @menu_index
@aeons_window.active=true
# Make status window
@status_window = Window_SummonStatus.new(@actors[0])
# Make abilities window
@abilities_window = Window_AbilitiesSliding.new(640+32,64,380,416-96,
@actors[@menu_index])
@abilities_window.index = 0
@abilities_window.active = false
# Make help window
@help_window = Window_Help.new
@help_window.set_text("Select Actor")
# Associate help window
@abilities_window.help_window = @help_window
# Make ItemNeeded Window
@item_needed_window = Window_ItemNeeded.new
# Make Confirm Window
@confirm_window=Window_Confirm.new
@confirm_window.active = false
@confirm_window.visible = false
end
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
if @empty
@empty_window.dispose
return
end
@aeons_window.dispose
@status_window.dispose
@abilities_window.dispose
@help_window.dispose
@item_needed_window.dispose
@confirm_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# No Aeons yet
if @empty == true
update_empty
return
end
# Update windows
@aeons_window.update
@status_window.update
@abilities_window.update
@item_needed_window.update
@confirm_window.update
# If aeons window is active: call update_aeons
if @aeons_window.active
update_aeons
return
end
# If abilities window is active: call update_abilities
if @abilities_window.active
update_abilities
return
end
# If confirm_window is active
if @confirm_window.active
update_confirm
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when aeons window is active)
#--------------------------------------------------------------------------
def update_aeons
old_menu_index=@menu_index
@menu_index=@aeons_window.index
@status_window.actor=@actors[@menu_index]
# If UP or DOWN button was pressed
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or old_menu_index!=@menu_index
@status_window.refresh
@abilities_window.index = 0
return
end
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Menu.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Play decision SE
$game_system.se_play($data_system.decision_se)
@aeons_window.active = false
@abilities_window.actor = @actors[@menu_index]
@abilities_window.refresh
@abilities_window.active = true
@aeons_window.target_x = -160
@status_window.target_x = 0
@abilities_window.target_x = 260
@abilities_window.update_help
@item_needed_window.target_x = 260
@item_needed_window.skill = @abilities_window.skill
@item_needed_window.refresh
return
end
end
def update_abilities
# If C button was pressed
if Input.trigger?(Input::C)
if @actors[@menu_index].summon_skill_can_learn?(
@abilities_window.skill.id)
# Play decision SE
$game_system.se_play($data_system.decision_se)
@confirm_window.visible = true
@confirm_window.active = true
@abilities_window.active = false
return
else
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
return
end
end
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
@aeons_window.active = true
@abilities_window.active = false
@aeons_window.target_x = 0
@status_window.target_x = 160
@abilities_window.target_x = 640 +32
@item_needed_window.target_x = 640 +32
@help_window.set_text("Select Aeon")
return
end
# If UP or DOWN button was pressed
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@abilities_window.update_help
@item_needed_window.skill = @abilities_window.skill
@item_needed_window.refresh
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when confirm window is active)
#--------------------------------------------------------------------------
def update_confirm
if Input.trigger?(Input::C)
if @confirm_window.index==0
# Play decision SE
$game_system.se_play($data_system.decision_se)
@confirm_window.active=false
@confirm_window.visible=false
@abilities_window.active = true
@actors[@menu_index].learn_skill(@abilities_window.skill.id)
$game_party.lose_item(AEONS_LEARNINGS[@abilities_window.skill.id][0],
AEONS_LEARNINGS[@abilities_window.skill.id][1])
@item_needed_window.refresh
@abilities_window.refresh
return
else
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
@confirm_window.active=false
@confirm_window.visible=false
@abilities_window.active = true
return
end
end
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
@confirm_window.active=false
@confirm_window.visible=false
@abilities_window.active = true
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when empty window is active)
#--------------------------------------------------------------------------
def update_empty
if Input.trigger?(Input::C)
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to map screen
$scene = Scene_Menu.new
return
end
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Menu.new
return
end
end
end
#==============================================================================
# ? Window_SummonStatus
#==============================================================================
class Window_SummonStatus < Window_Base
#--------------------------------------------------------------------------
attr_accessor :actor
attr_accessor :target_x
attr_accessor :target_y
def initialize(actor)
super(160, 64, 260, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 14
self.back_opacity = 255
self.opacity = 255
@actor = actor
@target_x=self.x
@target_y=self.y
refresh
end
def set_x(val)
self.x=val
@target_x=val
end
def set_y(val)
self.y=val
@target_y=val
end
def update
super
self.x+=0.3*(@target_x-self.x)
self.y+=0.3*(@target_y-self.y)
end
def refresh
self.contents.clear
x = 16
y = 0
actor = @actor
self.contents.font.size = 24
self.contents.font.bold = true
draw_actor_name_bordered(actor, x, y, self.contents.font.size)
x = 0
y += self.contents.font.size + 2
self.contents.font.bold = false
draw_actor_face(actor, x, y, 80)
x = 84
self.contents.font.size=20
draw_actor_class_2(actor, x, y, 200)
y += 22
@level_string_size = 32
@level_value_size = 84
@exp_string_size = 32
self.contents.font.bold = true
draw_actor_level_2(actor, x, y)
y += 22
self.contents.font.size=16
draw_actor_exp_only(actor, x, y)
y += 18
draw_actor_next_exp(actor, x, y)
x=0
y+=18
y+=8
@hp_sp_size=32
@hp_sp_n1_size=64
@hp_sp_n2_size=64
draw_actor_hp_4(actor, x, y)
y+=18
draw_actor_sp_4(actor, x, y)
y+=18
self.contents.font.size=14
para_name_space=32
para_value_space=72
add_space=44
bar_space=40
overlap_bar=70
bar1=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*0,bar_space,12,self.contents)
bar1.refresh(actor.str,999)
bar2=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*1,bar_space,12,self.contents)
bar2.refresh(actor.int,999)
bar3=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*2,bar_space,12,self.contents)
bar3.refresh(actor.dex,999)
bar4=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*3,bar_space,12,self.contents)
bar4.refresh(actor.agi,999)
self.contents.font.color=system_color
self.contents.draw_text(x,y+12*0,para_name_space,12,"Str")
self.contents.draw_text(x,y+12*1,para_name_space,12,"Mind")
self.contents.draw_text(x,y+12*2,para_name_space,12,"Hit")
self.contents.draw_text(x,y+12*3,para_name_space,12,"Spd")
self.contents.font.color=normal_color
self.contents.draw_text_bordered(x+para_name_space,y+12*0,para_value_space,12,actor.str.to_s,2)
self.contents.draw_text_bordered(x+para_name_space,y+12*1,para_value_space,12,actor.int.to_s,2)
self.contents.draw_text_bordered(x+para_name_space,y+12*2,para_value_space,12,actor.dex.to_s,2)
self.contents.draw_text_bordered(x+para_name_space,y+12*3,para_value_space,12,actor.agi.to_s,2)
x+=para_name_space+para_value_space+bar_space-overlap_bar+add_space
bar1=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*0,bar_space,12,self.contents)
bar1.refresh(actor.atk,999)
bar2=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*1,bar_space,12,self.contents)
bar2.refresh(actor.pdef,999)
bar3=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*2,bar_space,12,self.contents)
bar3.refresh(actor.mdef,999)
bar4=Bar.new(x+para_name_space+para_value_space-overlap_bar,y+12*3,bar_space,12,self.contents)
bar4.refresh(actor.eva,999)
self.contents.font.color=system_color
self.contents.draw_text(x,y+12*0,para_name_space,12,"Att")
self.contents.draw_text(x,y+12*1,para_name_space,12,"PDef")
self.contents.draw_text(x,y+12*2,para_name_space,12,"MDef")
self.contents.draw_text(x,y+12*3,para_name_space,12,"Eva")
self.contents.font.color=normal_color
self.contents.draw_text_bordered(x+para_name_space,y+12*0,para_value_space,12,actor.atk.to_s,2)
self.contents.draw_text_bordered(x+para_name_space,y+12*1,para_value_space,12,actor.pdef.to_s,2)
self.contents.draw_text_bordered(x+para_name_space,y+12*2,para_value_space,12,actor.mdef.to_s,2)
self.contents.draw_text_bordered(x+para_name_space,y+12*3,para_value_space,12,actor.eva.to_s,2)
x=0
y+=60
self.contents.font.color = system_color
self.contents.font.size=14
self.contents.draw_text(4, y, 48, 32, $data_system.words.weapon)
self.contents.draw_text(4, y+32, 48, 32, $data_system.words.armor1)
self.contents.draw_text(4, y+64, 48, 32, $data_system.words.armor2)
self.contents.draw_text(4, y+96, 48, 32, $data_system.words.armor3)
self.contents.draw_text(5, y+128, 48, 32, $data_system.words.armor4)
self.contents.font.color = normal_color
self.contents.font.bold=false
self.contents.font.size=20
x += 54
draw_item_name($data_weapons[@actor.weapon_id], x, y)
y+=32
draw_item_name($data_armors[@actor.armor1_id], x, y)
y+=32
draw_item_name($data_armors[@actor.armor2_id], x , y)
y+=32
draw_item_name($data_armors[@actor.armor3_id], x, y)
y+=32
draw_item_name($data_armors[@actor.armor4_id], x , y)
return
end
end
#==============================================================================
# ? Window_CommandSliding
#==============================================================================
class Window_CommandSliding < Window_Command
attr_accessor :target_x
attr_accessor :target_y
def initialize(width, commands)
super(width, commands)
@target_x=self.x
@target_y=self.y
end
def set_x(val)
self.x=val
@target_x=val
end
def set_y(val)
self.y=val
@target_y=val
end
def update
super
self.x+=0.3*(@target_x-self.x)
self.y+=0.3*(@target_y-self.y)
end
end
#==============================================================================
# ? Window_AbilitiesSliding
#==============================================================================
class Window_AbilitiesSliding < Window_Selectable_Plus
attr_accessor :target_x
attr_accessor :target_y
attr_accessor :actor
def initialize(x, y, width, height, actor)
super(x, y, width, height, 22)
@actor = actor
@target_x=self.x
@target_y=self.y
refresh
end
#--------------------------------------------------------------------------
# * Set coordinates
#--------------------------------------------------------------------------
def set_x(val)
self.x=val
@target_x=val
end
def set_y(val)
self.y=val
@target_y=val
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
# Not needed as WindowSelectablePlus already supports sliding
#def update
# super
# self.x+=0.3*(@target_x-self.x)
# self.y+=0.3*(@target_y-self.y)
#end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
keys=AEONS_LEARNINGS.keys
for key in 0...keys.length
skill = $data_skills[keys[key]]
if skill != nil and not @data.include?(skill)
@data.push(skill)
end
end
@data.sort! {|a,b|
a.sp_cost - b.sp_cost }
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# * Acquiring Skill
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.summon_skill_can_learn?(skill.id)
self.contents.font.color = crisis_color
elsif @actor.skills.include?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
# initialize values according to window_selectable_plus class
cursor_width = self.width / @column_max - 32
x = 4 + index % @column_max * (cursor_width + 32)
y = index / @column_max * @row_height
rect = Rect.new(x, y, cursor_width-4, @row_height)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == disabled_color ? 128 : 255
temp2=Rect.new(x, y, @row_height, @row_height)
temp1=Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.stretch_blt(temp2,bitmap,temp1,opacity)
self.contents.font.size=@row_height-2
x = x + @row_height + 4
self.contents.draw_text(x, y, cursor_width - @row_height - 4 - 4 - 48 - 4, @row_height, skill.name, 0)
x = x + cursor_width - @row_height - 4 - 4 - 48 - 4
self.contents.draw_text(x, y, 48, @row_height, skill.sp_cost.to_s, 2)
end
#--------------------------------------------------------------------------
# * Help Text Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
# ? Window_ItemNeeded
#==============================================================================
class Window_ItemNeeded < Window_Base
attr_accessor :target_x
attr_accessor :target_y
attr_accessor :skill
def initialize
super(640+32, 480-96, 640-260, 96)
@skill = nil
@target_x=self.x
@target_y=self.y
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(width - 32, height - 32)
bitmap = RPG::Cache.picture("item_needed_bg")
src_rect = Rect.new(0, 0, 32, 32)
dest_rect = Rect.new(8,32,32,32)
self.contents.stretch_blt(dest_rect,bitmap,src_rect)
dest_rect = Rect.new(120,32,32,32)
self.contents.stretch_blt(dest_rect,bitmap,src_rect)
bitmap = RPG::Cache.picture("item_needed_arrow")
dest_rect = Rect.new(48,32,64,32)
self.contents.stretch_blt(dest_rect,bitmap,src_rect)
if @skill != nil
if AEONS_LEARNINGS[@skill.id] != nil
x = 8
y = 0
item = $data_items[AEONS_LEARNINGS[@skill.id][0]]
self.contents.draw_text(x, y, 32, 32,
(AEONS_LEARNINGS[@skill.id][1]).to_s+"x", 1)
# draw item
x = 40
rect = Rect.new(x, y, 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.font.bold = true
y = 32
x = 4
self.contents.font.color = ($game_party.item_number(item.id)-AEONS_LEARNINGS[@skill.id][1]>0) ? normal_color : disabled_color
self.contents.draw_text(x, y, 32, 32,
($game_party.item_number(item.id)).to_s, 1)
x = 120
self.contents.draw_text(x, y, 32, 32,
[($game_party.item_number(item.id)-AEONS_LEARNINGS[@skill.id][1]),0].max.to_s, 1)
end
end
end
#--------------------------------------------------------------------------
# * Set coordinates
#--------------------------------------------------------------------------
def set_x(val)
self.x=val
@target_x=val
end
def set_y(val)
self.y=val
@target_y=val
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
super
self.x+=0.3*(@target_x-self.x)
self.y+=0.3*(@target_y-self.y)
end
end
#==============================================================================
# ? Window_Confirm
#==============================================================================
class Window_Confirm < Window_Selectable
attr_accessor :answer
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize()
super(100, 200, 440, 96+32)
@column_max = 2
@item_max = 2
@choiches= ["Continue","Cancel"]
self.z=999
self.back_opacity=255
self.opacity=255
refresh
self.active = true
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.draw_text(0, 0, 408, 32, "Are you sure?", 1)
self.contents.draw_text(0, 32, 408, 32, "", 1)
self.contents.draw_text(16, 64, 172, 32, @choiches[0], 1)
self.contents.draw_text(16+172+32, 64, 172, 32, @choiches[1], 1)
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
# If cursor position is less than 0
if @index < 0
self.cursor_rect.empty
return
end
# Get current row
row = @index / @column_max
# If current row is before top row
if row < self.top_row
# Scroll so that current row becomes top row
self.top_row = row
end
# If current row is more to back than back row
if row > self.top_row + (self.page_row_max - 1)
# Scroll so that current row becomes back row
self.top_row = row - (self.page_row_max - 1)
end
# Calculate cursor width
cursor_width = 180
# Calculate cursor coordinates
x = @index==0 ? 16 : 16+172+32
y = 64
# Update cursor rectangle
self.cursor_rect.set(x, y, cursor_width, 32)
end
end
class Scene_Battle
alias summon_main main
def main
@summon_help_window=Window_Summon_Help.new(0,64,332+32,200)
@summon_help_window.visible=false
@summon_id=-1
summon_main
@summon_help_window.dispose
end
alias summon_update_phase3_skill_select update_phase3_skill_select
def update_phase3_skill_select
summon_update_phase3_skill_select
if @skill_window==nil or @skill_window.visible==false
@summon_help_window.visible=false
@summon_id=-1
return
end
if @skill_window.skill.element_set.include?($game_temp.summon_element_id)
if @skill_window.skill.id != @summon_id
@summon_id = @skill_window.skill.id
@summon_help_window.set_summon(@summon_id)
end
else
@summon_help_window.visible=false
@summon_id=-1
end
end
end
class Window_Summon_Help < Window_Base
def set_summon(id)
@summon_id=id
@actors_ids=$game_party.game_summons[id].actors_ids
self.visible=true
refresh
end
def refresh
self.height=32+32*@actors_ids.size
if self.contents!=nil
self.contents.dispose
end
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.size=18
x=0
y=0
for id in @actors_ids
x=0
aeon = $game_actors[id]
draw_actor_face_small(aeon,x,y,32)
x=36
self.contents.draw_text(x,y,60,32,aeon.name)
# Level
@level_string_size = 60
@level_value_size = 30
self.contents.font.bold = true
self.contents.font.size = 12
fontsize=self.contents.font.size
self.contents.font.color=Color.new(255,166,27)
self.contents.draw_text_bordered_2(x, y+20, @level_string_size, fontsize,
"Lv.", 0)
self.contents.font.size = 32
fontsize=self.contents.font.size
self.contents.draw_text_bordered_2(x + @level_string_size, y+6,
@level_value_size, fontsize, aeon.level.to_s, 0)
self.contents.font.size = 18
self.contents.font.color=Color.new(255,255,255)
self.contents.font.bold = false
x=68
barhp=Bar.new(x+64,y,96,8,self.contents)
barhp.bar="bar_hp"
barhp.bar_background="bar_hp_bg"
barhp.refresh(aeon.hp,aeon.maxhp)
# 64+24+72
self.contents.draw_text(x+64,y,24,32,"HP:")
self.contents.draw_text(x+64+24,y,72,32,aeon.hp.to_s+"/"+
aeon.maxhp.to_s)
barsp=Bar.new(x+164,y,96,8,self.contents)
barsp.bar="bar_sp"
barsp.bar_background="bar_hp_bg"
barsp.refresh(aeon.sp,aeon.maxsp)
self.contents.draw_text(x+164,y,24,32,"SP:")
self.contents.draw_text(x+164+24,y,72,32,aeon.sp.to_s+"/"+
aeon.maxsp.to_s)
y+=32
end
end
end
class Game_Actor
attr_accessor :original_form_id
attr_accessor :transformed_form_id
end
$data_skills.each_index do |index| $retire_skill_id=index if ($data_skills[index]!=nil and $data_skills[index].name==RETIRE_NAME) end
#==============================================================================
# ? SCENE TRANSFORMATIONS
#==============================================================================
class Scene_Transformations < Scene_Summons
def initialize(menu_index = 0)
@actors=$game_party.transformations
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Frame Update (when aeons window is active)
#--------------------------------------------------------------------------
def update_aeons
old_menu_index=@menu_index
@menu_index=@aeons_window.index
@status_window.actor=@actors[@menu_index]
# If UP or DOWN button was pressed
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or old_menu_index!=@menu_index
@status_window.refresh
@abilities_window.index = 0
return
end
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Menu.new
return
end
end
end
$game_party.summon(2,["Kerya"],374)
$game_actors[10].
super_arts_points=200;
$game_party.summon(2,["Kerya"],712)
You just need to put two different integer non negative numbers.
This will appear in version 2.14.