#
def add
if $game_actors[actor_id] != nil
actor = $game_actors[actor_id]
#如果角色不在队伍中和不在备用角色队伍中的情况下
#向备用角色中添加角色
if @actors2.push(actor) and not @actors2.include?(actor)
$game_player.refresh
end
end
end
#以上是我添加的
def add_actor(actor_id,type=1)#type为1是向队伍中添加,为2则相反。
case type
when 1
if $game_actors[actor_id] != nil
actor = $game_actors[actor_id]
#如果队伍没有满和队伍中没有此角色
if @actors.size < 4 and not @actors.include?(actor) and not @actors2.include?(actor)
@actors.push(actor)
$game_player.refresh
end
end
when 2
if $game_actors[actor_id] != nil
actor = $game_actors[actor_id]
#如果角色不在队伍中和不在备用角色队伍中的情况下
#向备用角色中添加角色
if @actors2.push(actor) and not @actors2.include?(actor)
$game_player.refresh
end
end
end
end
def huanren(index,type=1)#type为1是从备用角色向队伍中移动,为2则相反。
actor = $game_actors[index]
case type
when 1
if @actors.size < 4 and @actors2.include?(actor) and not @chaochao2.include?(index) and not @actors.include?(actor)
@actors.push(actor)
@actors2.delete(actor)
$game_system.se_play($data_system.decision_se)
$game_player.refresh
end
when 2
if @actors.include?(actor) and not @chaochao.include?(index) and not @actors2.include?(actor)
@actors2.push(actor)
@actors.delete(actor)
$game_system.se_play($data_system.decision_se)
$game_player.refresh
end
end
end
#type1,1是操作队伍中的角色能否向备用队伍移动,2则相反。
#type2,1是添加不能移动的,2是删除不能移动的。
def yidong(actor_id,type1,type2=1)
case type2
when 1
case type1
when 1
@chaochao.push(actor_id)
when 2
@chaochao2.push(actor_id)
end
when 2
case type1
when 1
@chaochao.delete(actor_id)
when 2
@chaochao2.delete(actor_id)
end
end
end