Can anyone convert this script from vxace to vx?
#==============================================================================
# ? ?????????????????
# @version 1.0 2012/03/25
# @author ???
#------------------------------------------------------------------------------
# ?When you write <???> in the memo field of weapons and armor,
# 33 you will not stick in the back row of the state
#==============================================================================
module Saba
module Sekaiju
# ??????
MAX_MEMBERS = 6
# State ID automatically to the character on the front row
FRONT_STATE_ID = 31
# State ID automatically to the character on the back row
BACK_STATE_ID = 32
# Automatically set on characters who are not equipped for long-range
BACK_STATE_ID2 = 33
#In the non-replacement of the party, the switch will be able to just sort
# Example, in a dungeon please
NOT_CHANGE_PARTY_SWITCH = 133
# set this to true to enable animations on actors
ENABLE_ACTOR_ANIME = true
MAX_CHAR_NAME = 6
SHOW_EMPTY_ACTOR_STATUS = true
WINDOW_SKIN = "NormalWindow"
WINDOW_TONE = Tone.new(0, 0, 0)
end
end
class Game_Interpreter
def set_front_member_size(n)
battle_members = $game_party.battle_members
$game_party.clear_formation
i = 0
for m in battle_members
if i < n
$game_party.add_front(m)
else
$game_party.add_back(m)
end
i += 1
end
end
end
class Game_Troop
def front_members
return alive_members
end
def back_members
return alive_members
end
def alive_fronts
return alive_members
end
def alive_backs
return alive_members
end
def column(i)
return alive_members[i]
end
end
class Game_Party
include Saba::Sekaiju
attr_accessor :front_members
attr_accessor :back_members
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias saba_sekaiju_initialize initialize
def initialize
saba_sekaiju_initialize
clear_formation
end
def battle_members
return @front_members.compact + @back_members.compact
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def max_battle_members
return @front_members.size + @back_members.size
end
def clear_formation
@front_members = []
@back_members = []
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
alias saba_sekaiju_add_actor add_actor
def add_actor(actor_id)
saba_sekaiju_add_actor(actor_id)
actor = $game_actors[actor_id]
return if battle_members.size == Saba::Sekaiju::MAX_MEMBERS
if @front_members.size < 3
@front_members.push(actor) unless @front_members.include?(actor)
elsif @back_members.size < 3
@back_members.push(actor) unless @back_members.include?(actor)
end
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
alias saba_sekaiju_setup_starting_members setup_starting_members
def setup_starting_members
saba_sekaiju_setup_starting_members
auto_arrange
end
def add_front(actor)
return if @front_members.include?(actor)
i = @front_members.index(nil)
if i && i >= 0
@front_members[i] = actor
else
@front_members.push(actor)
end
update_formation
end
def add_back(actor)
return if @back_members.include?(actor)
i = @back_members.index(nil)
if i && i >= 0
@back_members[i] = actor
else
@back_members.push(actor)
end
update_formation
end
def update_formation
actors = @actors.clone
@actors = []
@actors += @front_members.compact.collect {|a| a.id }
@actors += @back_members.compact.collect {|a| a.id }
actors.each do |a|
@actors.push(a) unless @actors.include?(a)
end
end
def auto_arrange
clear_formation
size = [members.size, MAX_MEMBERS].min
if size > 0
add_front(members[0])
end
if size > 1
add_front(members[1])
end
case size
when 0
when 1
when 2
when 3
add_back(members[2])
when 4
add_back(members[2])
add_back(members[3])
when 5
add_front(members[2])
add_back(members[3])
add_back(members[4])
else
add_front(members[2])
add_back(members[3])
add_back(members[4])
add_back(members[5])
end
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
def alive_fronts
front_members.compact.select {|member| member.alive? }
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
def alive_backs
back_members.compact.select {|member| member.alive? }
end
def front_members
if Saba::Sekaiju::SHOW_EMPTY_ACTOR_STATUS
while @front_members.size < 3
@front_members.push(nil)
end
end
return @front_members
end
def back_members
if Saba::Sekaiju::SHOW_EMPTY_ACTOR_STATUS
while @back_members.size < 3
@back_members.push(nil)
end
end
return @back_members
end
def column(i)
return battle_members.compact.select {|actor| actor.column_index == i % 30}
end
end
class Game_BattlerBase
#--------------------------------------------------------------------------
# ? ???????????????
#--------------------------------------------------------------------------
alias saba_sekaiju_usable? usable?
def usable?(item)
b = saba_sekaiju_usable?(item)
return false unless b
if item.target_front_one?
return false if front?
i = $game_party.battle_members.index(self) - 3
return false if $game_party.battle_members[i] == nil # ???????
elsif item.target_back_one?
return false if back?
i = $game_party.battle_members.index(self) + 3
return false if $game_party.battle_members[i] == nil # ???????
end
return true
end
end
class Game_Actor
attr_accessor :screen_x
attr_accessor :screen_y
attr_accessor :screen_z
def screen_x
@screen_x = 0 if @screen_x == nil
return @screen_x
end
def screen_y
@screen_y = 0 if @screen_y == nil
return @screen_y
end
def screen_z
@screen_z = 10 if @screen_z == nil
return @screen_z
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
alias saba_sekaiju_clear_states clear_states
def clear_states
saba_sekaiju_clear_states
@state_turns[Saba::Sekaiju::FRONT_STATE_ID] = -1
@state_turns[Saba::Sekaiju::BACK_STATE_ID] = -1
@state_turns[Saba::Sekaiju::BACK_STATE_ID2] = -1
end
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def front?
return $game_party.front_members.include?(self)
end
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def back?
return ! front?
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def column_index
if front?
return $game_party.front_members.index(self)
else
return $game_party.back_members.index(self)
end
end
#--------------------------------------------------------------------------
# ? ????????????????????
#--------------------------------------------------------------------------
def states
ret = @states.collect {|id| $data_states[id] }
if front?
ret.push($data_states[Saba::Sekaiju::FRONT_STATE_ID])
else
ret.push($data_states[Saba::Sekaiju::BACK_STATE_ID])
unless equip_back_attack?
ret.push($data_states[Saba::Sekaiju::BACK_STATE_ID2])
end
end
return ret
end
def use_sprite?
return Saba::Sekaiju::ENABLE_ACTOR_ANIME
end
#--------------------------------------------------------------------------
# ? ?????????????????
#--------------------------------------------------------------------------
def equip_back_attack?
@equips.each do |item|
next unless item.object
return true if item.object.can_back_attack?
end
return false
end
end
class Game_Enemy
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def front?
return true
end
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def back?
return false
end
end
class Scene_Menu
def create_status_window
@status_window = Window_BattleStatus.new
@status_window.visible = true
@status_window.x = 64
@status_window.y = Graphics.height-120
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def command_formation
SceneManager.call(Scene_ChangeFormation)
end
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
alias saba_sekaiju_create_gold_window create_gold_window
def create_gold_window
saba_sekaiju_create_gold_window
@gold_window.x = Graphics.width - @gold_window.width
@gold_window.y = 0
end
end
class Scene_ItemBase < Scene_MenuBase
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def create_actor_window
@actor_window = Window_BattleStatus.new
@actor_window.visible = true
@actor_window.x = 64
@actor_window.y = Graphics.height-120
@actor_window.set_handler(:ok, method(:on_actor_ok))
@actor_window.set_handler(:cancel, method(:on_actor_cancel))
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def show_sub_window(window)
window.activate
end
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
def hide_sub_window(window)
window.deactivate
activate_item_window
end
end
class Scene_Item
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def create_item_window
wy = @category_window.y + @category_window.height
wh = Graphics.height - wy - 120
@item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:on_item_cancel))
@category_window.item_window = @item_window
end
end
class Scene_Skill < Scene_ItemBase
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def create_item_window
wx = 0
wy = @status_window.y + @status_window.height
ww = Graphics.width
wh = Graphics.height - wy - 120
@item_window = Window_SkillList.new(wx, wy, ww, wh)
@item_window.actor = @actor
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.set_handler(:ok, method(:on_item_ok))
@item_window.set_handler(:cancel, method(:on_item_cancel))
@command_window.skill_window = @item_window
end
end
class Window_BattleActor < Window_BattleStatus
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def show
if @info_viewport
@ox = @info_viewport.ox
@info_viewport.ox = self.width + @ox
@info_viewport.rect.x = self.width
select(0)
end
super
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def hide
@info_viewport.rect.x = 0 if @info_viewport
@info_viewport.ox = @ox if @info_viewport
deactivate
super
end
end
class Window_BattleStatus
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias saba_sekaiju_initialize initialize
def initialize
@windows = []
saba_sekaiju_initialize
self.opacity = 0
self.openness = 255
self.visible = false
self.arrows_visible = false
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def visible_line_number
return 4
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def item_max
5
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def cursor_down(wrap = false)
cursor_up(wrap)
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def cursor_up(wrap = false)
return if @index / 10 == 3 # ???
return select(11) if @index == 10
return select(10) if @index == 11
if $game_party.front_members.size > @index
i = @index + $game_party.front_members.size
i = $game_party.battle_members.size - 1 if i >= $game_party.battle_members.size
unless Saba::Sekaiju::SHOW_EMPTY_ACTOR_STATUS
i = 2 if $game_party.back_members.size == 3 && $game_party.front_members.size == 1
else
i = @index if $game_party.battle_members[i] == nil
end
else
i = @index - $game_party.front_members.size
i = 0 if index < 0
i = $game_party.front_members.size - 1 if i >= $game_party.front_members.size
unless Saba::Sekaiju::SHOW_EMPTY_ACTOR_STATUS
i = 1 if $game_party.back_members.size == 1 && $game_party.front_members.size == 3
else
i = @index if $game_party.battle_members[i] == nil
end
end
select(i)
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def cursor_right(wrap = false)
return if @index / 10 == 2 # ???
if @index / 10 == 3 # ???
i = @index % 30
i += 1
while true
i = 0 if i >= 3
if $game_party.battle_members[i] == nil && $game_party.battle_members[i + 3] == nil
next
end
select(30 + i)
return
end
end
return if $game_party.battle_members.compact.size <= 1
while $game_party.battle_members[@index + 1] == nil
if $game_party.battle_members.size <= index + 1
@index = -1
else
@index += 1
end
end
select(@index + 1)
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def cursor_left(wrap = false)
return if @index / 10 == 2 # ???
if @index / 10 == 3 # ???
i = @index % 30
i -= 1
while true
i = 2 if i < 0
if $game_party.battle_members[i] == nil && $game_party.battle_members[i + 3] == nil
next
end
select(30 + i)
return
end
end
return if $game_party.battle_members.compact.size <= 1
while $game_party.battle_members[@index - 1] == nil
if @index <= 0
@index = $game_party.battle_members.size
else
@index -= 1
end
end
if @index <= 0
@index = $game_party.battle_members.size
end
select(@index - 1)
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def select(index)
@index = index
if @index == 10
@windows.each { |w| w.select(w.front) }
return
elsif @index == 11
@windows.each { |w| w.select(! w.front) }
return
elsif @index / 10 == 3
@windows.each { |w| w.select(w.index == @index % 30) }
return
end
if @cursor_all
@windows.each { |w| w.select(true) }
return
end
unselect
@windows[index].select(true)
call_handler(:change)
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def update_cursor
# ?????
end
def update
super
@windows.each { |w| w.update }
end
#--------------------------------------------------------------------------
# ? ???????
#--------------------------------------------------------------------------
def unselect
@windows.each { |w| w.select(false) }
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
if @last_fronts != $game_party.front_members.size || @last_backs != $game_party.back_members.size
create_windows
self.visible = true
update
else
@windows.each { |w| w.refresh}
end
end
def create_windows
@last_fronts = $game_party.front_members.size
@last_backs = $game_party.back_members.size
@windows.each { |w| w.dispose }
@windows.clear
$game_party.front_members.each_with_index do |actor, i|
start = start_x($game_party.front_members.size)
window = Window_BattleActorStatus.new(self.viewport, actor, true, i, start + i * 171, 0)
@windows.push(window)
end
$game_party.back_members.each_with_index do |actor, i|
start = start_x($game_party.back_members.size)
window = Window_BattleActorStatus.new(self.viewport, actor, false, i, start + i * 171, 60)
@windows.push(window)
end
if Saba::Sekaiju::SHOW_EMPTY_ACTOR_STATUS
m = $game_party.front_members.size
(3 - m).times do |i|
window = Window_BattleActorStatus.new(self.viewport, nil, true, i + m, (i+ m) * 171, 0)
@windows.push(window)
end
m = $game_party.back_members.size
(3 - m).times do |i|
window = Window_BattleActorStatus.new(self.viewport, nil, false, i + m, (i+ m) * 171, 60)
@windows.push(window)
end
end
@windows.each { |w|
w.parent_x = self.x
w.parent_y = self.y
w.visible = self.visible && open?
}
end
def start_x(member_count)
if Saba::Sekaiju::SHOW_EMPTY_ACTOR_STATUS
return 0
end
case member_count
when 1
return 171
when 2
return 85
else
return 0
end
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def draw_item(index)
end
def viewport=(arg)
super
@windows.each { |w| w.viewport = arg }
end
def y=(arg)
@windows.each { |w| w.parent_y = arg}
super
end
def x=(arg)
@windows.each { |w| w.parent_x = arg}
super
end
def visible=(arg)
@windows.each { |w| w.visible = arg}
super
end
def close
@windows.each { |w| w.visible = false}
super
end
def open
@windows.each { |w| w.visible = true}
super
end
def dispose
@windows.each { |w| w.dispose }
super
end
#--------------------------------------------------------------------------
# ? ????????
#--------------------------------------------------------------------------
def show
@windows.each { |w| w.visible = true}
return super
end
#--------------------------------------------------------------------------
# ? ???????????????
#--------------------------------------------------------------------------
def process_ok
unless $game_party.in_battle
if index < 10
$game_party.menu_actor = $game_party.members[index]
$game_party.target_actor = $game_party.members[index] unless @cursor_all
end
end
Input.update
Sound.play_ok
call_ok_handler
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def select_last
select($game_party.target_actor.index || 0)
end
#--------------------------------------------------------------------------
# ? ????????????????
#--------------------------------------------------------------------------
def select_for_item(item)
@cursor_fix = item.for_user?
if item.for_friend?
if item.target_front?
select(10)
@cursor_fix = true
return
elsif item.target_back?
select(11)
@cursor_fix = true
return
elsif item.target_line? || item.target_self_line?
select(10)
return
end
end
@cursor_all = item.for_all?
if @cursor_fix
select($game_party.menu_actor.index)
elsif @cursor_all
select(0)
else
select_last
end
end
def deactivate
super
unselect
end
end
class Window_BattleActorStatus < Window_Base
attr_reader :front
attr_reader :index
def initialize(viewport, actor, front, index, x, y)
w = index == 2 ? 170 : 171
super(x, y, w, 60)
@start_x = x
@start_y = y
@actor = actor
@front = front
@index = index
if @actor
@actor.screen_x = @start_x + 140
@actor.screen_y = @start_y + 410
end
self.back_opacity = 240
self.viewport = viewport
select(false)
refresh
end
def actor
return @actor
end
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
def standard_padding
return 0
end
def parent_x=(arg)
self.x = arg + @start_x
end
def parent_y=(arg)
self.y = arg + @start_y
end
def select(b)
if b
self.windowskin = Cache.system("ActiveWindow2")
else
self.windowskin = Cache.system(Saba::Sekaiju::WINDOW_SKIN)
end
end
def update_tone
self.tone = Saba::Sekaiju::WINDOW_TONE
end
def refresh
contents.clear
unless @actor
change_color(text_color(8))
draw_text(46, 10, 78, line_height, "EMPTY")
return
end
draw_actor_hp(actor, 10, 26, 69)
draw_actor_mp(actor, 87, 26, 69)
draw_actor_tp(actor, 10, 6, 69) if $data_system.opt_display_tp
draw_actor_name(@actor, 10, 4, 78)
draw_actor_icons(@actor, 90, 4, 80)
end
#--------------------------------------------------------------------------
# ? TP ???
#--------------------------------------------------------------------------
def draw_actor_tp(actor, x, y, width = 124)
draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
end
end
class Spriteset_Battle
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias saba_sekaiju_create_viewports create_viewports
def create_viewports
saba_sekaiju_create_viewports
@viewport_sekaiju = Viewport.new
@viewport_sekaiju.z = 200
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias saba_sekaiju_dispose_viewports dispose_viewports
def dispose_viewports
saba_sekaiju_dispose_viewports
@viewport_sekaiju.dispose
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias saba_sekaiju_update_viewports update_viewports
def update_viewports
saba_sekaiju_update_viewports
@viewport_sekaiju.tone.set($game_troop.screen.tone)
@viewport_sekaiju.ox = $game_troop.screen.shake
@viewport_sekaiju.update
end
def create_actors
@actor_sprites = Array.new(Saba::Sekaiju::MAX_MEMBERS) { Sprite_Battler.new(@viewport_sekaiju) }
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
alias saba_sekaiju_select_actor_selection select_actor_selection
def select_actor_selection
saba_sekaiju_select_actor_selection
item = @item ? @item : @skill
if item.for_friend?
if item.target_front?
@actor_window.select(10)
@actor_window.cursor_fix = true
elsif item.target_back?
@actor_window.select(11)
@actor_window.cursor_fix = true
elsif item.target_line?
@actor_window.select(10)
@actor_window.cursor_fix = false
elsif item.target_self_line?
if BattleManager.actor.front?
@actor_window.select(10)
else
@actor_window.select(11)
end
@actor_window.cursor_fix = true
elsif item.target_front_one?
@actor_window.cursor_fix = true
@actor_window.select($game_party.battle_members.index(BattleManager.actor)-3)
elsif item.target_back_one?
@actor_window.cursor_fix = true
@actor_window.select($game_party.battle_members.index(BattleManager.actor)+3)
elsif item.target_column?
@actor_window.select(30)
@actor_window.cursor_fix = false
elsif item.target_self_column?
i = $game_party.battle_members.index(BattleManager.actor) % 3
@actor_window.select(30 + i)
@actor_window.cursor_fix = true
end
end
end
end
class Scene_ItemBase
#--------------------------------------------------------------------------
# ? ??????????????????????
#--------------------------------------------------------------------------
alias saba_sekaiju_item_target_actors item_target_actors
def item_target_actors
saba_sekaiju_item_target_actors
if !item.for_friend?
[]
elsif item.for_all?
$game_party.members
else
if @actor_window.index == 10
$game_party.front_members
elsif @actor_window.index == 11
$game_party.back_members
elsif @actor_window.index / 10 == 3
$game_party.column(@actor_window.index % 30)
else
[$game_party.members[@actor_window.index]]
end
end
end
end
class Game_Unit
#--------------------------------------------------------------------------
# ? ???????????????
#--------------------------------------------------------------------------
def alive_members
members.compact.select {|member| member.alive? }
end
end
class Game_Action
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
alias saba_sekaiju_targets_for_opponents targets_for_opponents
def targets_for_opponents
if @target_index == 10 or item.target_front?
members = opponents_unit.alive_fronts
elsif @target_index == 11 or item.target_back?
members = opponents_unit.alive_backs
elsif item.target_line?
if rand(2) == 0
members = opponents_unit.alive_fronts
else
members = opponents_unit.alive_backs
end
elsif @target_index / 10 == 3
members = opponents_unit.column(@target_index)
elsif item.target_column? || item.target_self_column?
i = rand(3)
while opponents_unit.column(i).size == 0
i += 1
i = 0 if i >= 3
end
members = opponents_unit.column(i)
end
if members
if members.size == 0
members = opponents_unit.alive_members
end
if item.for_all?
return members
elsif item.for_random?
return Array.new(item.number_of_targets) {
members[rand(members.size)]
}
elsif item.for_one?
num = 1 + (attack? ? subject.atk_times_add.to_i : 0)
if @target_index < 0
return [members[rand(members.size)]] * num
else
return [opponents_unit.smooth_target(@target_index)] * num
end
end
end
saba_sekaiju_targets_for_opponents
end
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
alias saba_sekaiju_targets_for_friends targets_for_friends
def targets_for_friends
if @target_index == 10 or @target_index == 20 or item.target_front?
return friends_unit.front_members
elsif @target_index == 11 or @target_index == 21 or item.target_back?
return friends_unit.back_members
elsif @target_index / 10 == 3
return friends_unit.column(@target_index % 30)
end
saba_sekaiju_targets_for_friends
end
end
class Sprite_Base
#--------------------------------------------------------------------------
# ? ????????????
#--------------------------------------------------------------------------
def set_animation_origin
if @animation.position == 3
if viewport == nil
@ani_ox = Graphics.width / 2
@ani_oy = Graphics.height / 2
else
@ani_ox = viewport.rect.width / 2
@ani_oy = viewport.rect.height / 2
end
@ani_oy += 200 if @battler && @battler.actor?
else
@ani_ox = x - ox + width / 2
@ani_oy = y - oy + height / 2
if @animation.position == 0
@ani_oy -= height / 2
elsif @animation.position == 2
@ani_oy += height / 2
end
end
end
end
class RPG::BaseItem
def target_line?
if @target_line == nil
@target_line = false
if note.include?("<?>")
@target_line = true
end
end
return @target_line
end
def target_front?
if @target_front == nil
@target_front = false
if note.include?("<??>")
@target_front = true
end
end
return @target_front
end
def target_column?
if @target_column == nil
@target_column = false
if note.include?("<??>")
@target_column = true
end
end
return @target_column
end
def target_self_column?
if @target_self_column == nil
@target_self_column = false
if note.include?("<???>")
@target_self_column = true
end
end
return @target_self_column
end
def target_self_line?
if @target_self_line == nil
@target_self_line = false
if note.include?("<??>")
@target_self_line = true
end
end
return @target_self_line
end
def target_front_one?
if @target_front_one == nil
@target_front_one = false
if note.include?("<?>")
@target_front_one = true
end
end
return @target_front_one
end
def target_back?
if @target_back == nil
@target_back = false
if note.include?("<??>")
@target_back = true
end
end
return @target_back
end
def target_back_one?
if @target_back_one == nil
@target_back_one = false
if note.include?("<?>")
@target_back_one = true
end
end
return @target_back_one
end
def can_back_attack?
return note.include?("<???>")
end
end
class << DataManager
#--------------------------------------------------------------------------
# ? ?????????????
#--------------------------------------------------------------------------
alias saba_sekaiju_load_normal_database load_normal_database
def load_normal_database
saba_sekaiju_load_normal_database
if $data_states[Saba::Sekaiju::FRONT_STATE_ID] == nil || $data_states[Saba::Sekaiju::BACK_STATE_ID2] == nil
msgbox_p "Error!! ????????????????????????????31?33??????????"
end
end
end