38 lines
No EOL
1.7 KiB
Ruby
38 lines
No EOL
1.7 KiB
Ruby
#==============================================================================
|
||
# ■ Game_Actor
|
||
#------------------------------------------------------------------------------
|
||
# アクターを扱うクラスです。このクラスは Game_Actors クラス($game_actors)
|
||
# の内部で使用され、Game_Party クラス($game_party)からも参照されます。
|
||
#==============================================================================
|
||
|
||
class Game_Actor < Game_Battler
|
||
#--------------------------------------------------------------------------
|
||
# ○
|
||
#--------------------------------------------------------------------------
|
||
def level_set(level)
|
||
return if @level >= level
|
||
level = [[level, max_level].min, 1].max
|
||
change_exp(exp_for_level(level), false)
|
||
end
|
||
end
|
||
|
||
|
||
#==============================================================================
|
||
# ■ Game_Interpreter
|
||
#------------------------------------------------------------------------------
|
||
# イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、
|
||
# Game_Troop クラス、Game_Event クラスの内部で使用されます。
|
||
#==============================================================================
|
||
|
||
class Game_Interpreter
|
||
#--------------------------------------------------------------------------
|
||
# ○ 仲間キャラのレベル調整。flagがtrueの場合は指定レベルと主人公レベルの高い方に合わせる
|
||
#--------------------------------------------------------------------------
|
||
def leveling(actor_id, level, flag = false)
|
||
if flag
|
||
$game_actors[actor_id].level_set([level, $game_actors[1].level].max)
|
||
else
|
||
$game_actors[actor_id].level_set(level)
|
||
end
|
||
end
|
||
end |