#==========================================================================
class Game_Party
#--------------------------------------------------------------------------
PARTY_SIZE = [B][COLOR=Red][SIZE=4]8[/SIZE][/COLOR][/B]
#--------------------------------------------------------------------------
def add_actor(actor_id)
# Get actor
actor = $game_actors[actor_id]
# If the party has less than 4 members and this actor is not in the party
if (@actors.size < PARTY_SIZE or PARTY_SIZE == 0) and not @actors.include?(actor)
# Add actor
@actors.push(actor)
# Refresh player
$game_player.refresh
end
end
#--------------------------------------------------------------------------
end
#==========================================================================
class Window_MenuStatus
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
@cursor_height = (self.height - 32) / 4
@item_max = $game_party.actors.size
self.contents = Bitmap.new(width - 32, @item_max * @cursor_height)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
def draw_actor(i)
x = 64
y = i * @cursor_height
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
draw_actor(i)
end
end
#--------------------------------------------------------------------------
def update_cursor_rect
super
end
#--------------------------------------------------------------------------
end
#==========================================================================
class Window_Target
#--------------------------------------------------------------------------
def initialize
super(0, 0, 336, 480)
@cursor_height = (self.height - 32) / 4
@item_max = $game_party.actors.size
self.contents = Bitmap.new(width - 32, @item_max * @cursor_height)
self.z += 10
refresh
end
#--------------------------------------------------------------------------
def draw_actor(i)
x = 4
y = i * @cursor_height
actor = $game_party.actors[i]
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x + 8, y + 32)
draw_actor_state(actor, x + 8, y + 64)
draw_actor_hp(actor, x + 152, y + 32)
draw_actor_sp(actor, x + 152, y + 64)
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
draw_actor(i)
end
end
#--------------------------------------------------------------------------
def update_cursor_rect
# Cursor position -1 = all choices, -2 or lower = independent choice
# (meaning the user's own choice)
if @index <= -2
self.cursor_rect.set(0, (@index + 10) * @cursor_height, self.width - 32, @cursor_height)
elsif @index == -1
self.cursor_rect.set(-16, -16, self.width, self.height)
else
super
end
end
#--------------------------------------------------------------------------
end
#==========================================================================