Auteur: Yukihiro matsumoto
#============================================
# ‘ Interpreter (ͺθ` 6)
#----------------------------------------------
# @CxgR}hπΐs·ιC^v^Ε·B±ΜNXΝ Game_System N
# Xβ Game_Event NXΜΰΕgp³κά·B
#============================================
class Interpreter
#------------------------------------------
# ogΜ
#------------------------------------------
def command_301
# ³ψΘg[vΕΘ―κΞ
if $data_troops[@parameters[0]] != nil
# ogftOπZbg
$game_temp.battle_abort = true
# ogΔΡo΅tOπZbg
$game_temp.battle_calling = true
$game_temp.battle_troop_id = @parameters[0]
$game_temp.battle_can_escape = @parameters[1]
$game_temp.battle_can_lose = @parameters[2]
# R[obNπέθ
current_indent = @list[@index].indent
$game_temp.battle_proc = Proc.new { |n| @branch[current_indent] = n }
end
# CfbNXπiίι
@index += 1
# IΉ
return false
end
#------------------------------------------
# Α½κ
#------------------------------------------
def command_601
# ogΚͺΏΜκ
if @branch[@list[@index].indent] == 0
# ͺςf[^πν
@branch.delete(@list[@index].indent)
# p±
return true
end
# πΙY΅Θ’κ : R}hXLbv
return command_skip
end
#------------------------------------------
# ¦°½κ
#------------------------------------------
def command_602
# ogΚͺ¦°Μκ
if @branch[@list[@index].indent] == 1
# ͺςf[^πν
@branch.delete(@list[@index].indent)
# p±
return true
end
# πΙY΅Θ’κ : R}hXLbv
return command_skip
end
#------------------------------------------
# ―½κ
#------------------------------------------
def command_603
# ogΚͺ―Μκ
if @branch[@list[@index].indent] == 2
# ͺςf[^πν
@branch.delete(@list[@index].indent)
# p±
return true
end
# πΙY΅Θ’κ : R}hXLbv
return command_skip
end
#------------------------------------------
# VbvΜ
#------------------------------------------
def command_302
# ogftOπZbg
$game_temp.battle_abort = true
# VbvΔΡo΅tOπZbg
$game_temp.shop_calling = true
# €iXgΙV΅’Ϊπέθ
$game_temp.shop_goods = [@parameters]
# [v
loop do
# CfbNXπiίι
@index += 1
# ΜCxgR}hͺVbv 2 sΪΘ~Μκ
if @list[@index].code == 605
# €iXgΙV΅’ΪπΗΑ
$game_temp.shop_goods.push(@list[@index].parameters)
# CxgR}hͺVbv 2 sΪΘ~ΕΝΘ’κ
else
# IΉ
return false
end
end
end
#------------------------------------------
# ΌOόΝΜ
#------------------------------------------
def command_303
# ³ψΘAN^[ΕΘ―κΞ
if $data_actors[@parameters[0]] != nil
# ogftOπZbg
$game_temp.battle_abort = true
# ΌOόΝΔΡo΅tOπZbg
$game_temp.name_calling = true
$game_temp.name_actor_id = @parameters[0]
$game_temp.name_max_char = @parameters[1]
end
# CfbNXπiίι
@index += 1
# IΉ
return false
end
#------------------------------------------
# HP ΜΈ
#------------------------------------------
def command_311
# μ·ιlπζΎ
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
# Ce[^Ε
iterate_actor(@parameters[0]) do |actor|
# HP ͺ 0 ΕΘ’κ
if actor.hp > 0
# HP πΟX (ν¬sͺΒ³κΔ’Θ―κΞ 1 Ι·ι)
if @parameters[4] == false and actor.hp + value <= 0
actor.hp = 1
else
actor.hp += value
end
end
end
# Q[I[o[»θ
$game_temp.gameover = $game_party.all_dead?
# p±
return true
end
#------------------------------------------
# SP ΜΈ
#------------------------------------------
def command_312
# μ·ιlπζΎ
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
# Ce[^Ε
iterate_actor(@parameters[0]) do |actor|
# AN^[Μ SP πΟX
actor.sp += value
end
# p±
return true
end
#------------------------------------------
# Xe[gΜΟX
#------------------------------------------
def command_313
# Ce[^Ε
iterate_actor(@parameters[0]) do |actor|
# Xe[gπΟX
if @parameters[1] == 0
actor.add_state(@parameters[2])
else
actor.remove_state(@parameters[2])
end
end
# p±
return true
end
#------------------------------------------
# Sρ
#------------------------------------------
def command_314
# Ce[^Ε
iterate_actor(@parameters[0]) do |actor|
# AN^[πSρ
actor.recover_all
end
# p±
return true
end
#------------------------------------------
# EXP ΜΈ
#------------------------------------------
def command_315
# μ·ιlπζΎ
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
# Ce[^Ε
iterate_actor(@parameters[0]) do |actor|
# AN^[Μ EXP πΟX
actor.exp += value
end
# p±
return true
end
#------------------------------------------
# xΜΈ
#------------------------------------------
def command_316
# μ·ιlπζΎ
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
# Ce[^Ε
iterate_actor(@parameters[0]) do |actor|
# AN^[ΜxπΟX
actor.level += value
end
# p±
return true
end
#------------------------------------------
# p[^ΜΈ
#------------------------------------------
def command_317
# μ·ιlπζΎ
value = operate_value(@parameters[2], @parameters[3], @parameters[4])
# AN^[πζΎ
actor = $game_actors[@parameters[0]]
# p[^πΟX
if actor != nil
case @parameters[1]
when 0 # MaxHP
actor.maxhp += value
when 1 # MaxSP
actor.maxsp += value
when 2 # rΝ
actor.str += value
when 3 # νp³
actor.dex += value
when 4 # f³
actor.agi += value
when 5 # Ν
actor.int += value
end
end
# p±
return true
end
#------------------------------------------
# XLΜΈ
#------------------------------------------
def command_318
# AN^[πζΎ
actor = $game_actors[@parameters[0]]
# XLπΈ
if actor != nil
if @parameters[1] == 0
actor.learn_skill(@parameters[2])
else
actor.forget_skill(@parameters[2])
end
end
# p±
return true
end
#------------------------------------------
# υΜΟX
#------------------------------------------
def command_319
# AN^[πζΎ
actor = $game_actors[@parameters[0]]
# υπΟX
if actor != nil
actor.equip(@parameters[1], @parameters[2])
end
# p±
return true
end
#------------------------------------------
# AN^[ΜΌOΟX
#------------------------------------------
def command_320
# AN^[πζΎ
actor = $game_actors[@parameters[0]]
# ΌOπΟX
if actor != nil
actor.name = @parameters[1]
end
# p±
return true
end
#------------------------------------------
# AN^[ΜNXΟX
#------------------------------------------
def command_321
# AN^[πζΎ
actor = $game_actors[@parameters[0]]
# NXπΟX
if actor != nil
actor.class_id = @parameters[1]
end
# p±
return true
end
#------------------------------------------
# AN^[ΜOtBbNΟX
#------------------------------------------
def command_322
# AN^[πζΎ
actor = $game_actors[@parameters[0]]
# OtBbNπΟX
if actor != nil
actor.set_graphic(@parameters[1], @parameters[2],
@parameters[3], @parameters[4])
end
# vC[πtbV
$game_player.refresh
# p±
return true
end
end |
|