本帖最后由 欧买歌 于 2015-7-22 14:57 编辑
搜来的,不造行不行,没测试
class Game_Party #-------------------------------------------------------------------------- # ● 加入同伴 # actor_id : 角色 ID #-------------------------------------------------------------------------- def add_actor(actor_id) # 获取角色 actor = $game_actors[actor_id] # 添加角色 @actors.push(@actors.include?(actor) ? actor.dup : actor) # 还原主角 $game_player.refresh end end class Interpreter def c_hp(index, val) $game_party.actors[index].hp += val if $game_party.actors[index] end def c_sp(index, val) $game_party.actors[index].sp += val if $game_party.actors[index] end def c_str(index, val) $game_party.actors[index].str += val if $game_party.actors[index] end def c_dex(index, val) $game_party.actors[index].dex += val if $game_party.actors[index] end def c_agi(index, val) $game_party.actors[index].agi += val if $game_party.actors[index] end def c_int(index, val) $game_party.actors[index].int += val if $game_party.actors[index] end end
class Game_Party
#--------------------------------------------------------------------------
# ● 加入同伴
# actor_id : 角色 ID
#--------------------------------------------------------------------------
def add_actor(actor_id)
# 获取角色
actor = $game_actors[actor_id]
# 添加角色
@actors.push(@actors.include?(actor) ? actor.dup : actor)
# 还原主角
$game_player.refresh
end
end
class Interpreter
def c_hp(index, val)
$game_party.actors[index].hp += val if $game_party.actors[index]
end
def c_sp(index, val)
$game_party.actors[index].sp += val if $game_party.actors[index]
end
def c_str(index, val)
$game_party.actors[index].str += val if $game_party.actors[index]
end
def c_dex(index, val)
$game_party.actors[index].dex += val if $game_party.actors[index]
end
def c_agi(index, val)
$game_party.actors[index].agi += val if $game_party.actors[index]
end
def c_int(index, val)
$game_party.actors[index].int += val if $game_party.actors[index]
end
end
|