#--------------------------------------------------------------------------
# ● 玄:获取上回合动作
#--------------------------------------------------------------------------
def last_action
return @last_action
end
#--------------------------------------------------------------------------
# ● 获取 MaxHP
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
for i in @states
if $data_states.hold_turn == 9999 #内功、身法、特技
if self.is_a?(Game_Actor)
y = self.skill.level
n *= (y*($data_states.maxhp_rate - 100.0)/10)+1
else # 敌人
n *= $data_states.maxhp_rate / 100.0 #敌人
end
else
n *= $data_states.maxhp_rate / 100.0
end #内功、身法、特技
case i
when 905
@str_ot = 999999
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end
#--------------------------------------------------------------------------
# ● 获取 MaxSP
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 1].max, 999999].min
for i in @states
if $data_states.hold_turn == 9999 #内功、身法、特技
if self.is_a?(Game_Actor)
y = self.skill.level
n *= (y*($data_states.maxsp_rate - 100.0)/10)+1
else # 敌人
n *= $data_states.maxsp_rate / 100.0 #敌人
end
else
n *= $data_states.maxsp_rate / 100.0
end #内功、身法、特技
case i
when 905
@str_ot = 999999
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end 作者: chaorenzhiwang 时间: 2016-1-28 15:30
注意 被动技能的ID必须等于状态ID 否则会出错
=end
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● 定义实例变量
#--------------------------------------------------------------------------
attr_reader :name # 名称
attr_reader :character_name # 角色 文件名
attr_reader :character_hue # 角色 色相
attr_reader :class_id # 职业 ID
attr_reader :weapon_id # 武器 ID
attr_reader :armor1_id # 盾 ID
attr_reader :armor2_id # 头防具 ID
attr_reader :armor3_id # 身体体防具 ID
attr_reader :armor4_id # 装饰品 ID
attr_reader :level # 等级
attr_reader :exp # EXP
attr_reader :skills # 特技
attr_accessor :skill_s # 特技快捷键
attr_accessor :item_s # 物品快捷键
#--------------------------------------------------------------------------
# ● 初始化对像
# actor_id : 角色 ID
#--------------------------------------------------------------------------
def initialize(actor_id)
super()
setup(actor_id)
end
#--------------------------------------------------------------------------
# ● 设置
# actor_id : 角色 ID
#--------------------------------------------------------------------------
def setup(actor_id)
actor = $data_actors[actor_id]
@actor_id = actor_id
@NAME = actor.name
@character_name = actor.character_name
@character_hue = actor.character_hue
@battler_name = actor.battler_name
@battler_hue = actor.battler_hue
@class_id = actor.class_id
@weapon_id = actor.weapon_id
@armor1_id = actor.armor1_id
@armor2_id = actor.armor2_id
@armor3_id = actor.armor3_id
@armor4_id = actor.armor4_id
@level = actor.initial_level
@exp_list = Array.new(101)
make_exp_list
@exp = @exp_list[@level]
@skills = []
@hp = maxhp
@sp = maxsp
@states = []
@states_turn = {}
@maxhp_plus =
@maxsp_plus =
@str_plus = 999
@dex_plus = 999
@agi_plus = 999
@int_plus = 999
@skill_s = []
#=======破限参数设定======
@str_ot = 99999
@dex_ot = 99999
@agi_ot = 99999
@int_ot = 99999
#=========================
for i in 0..9
@skill_s = ""
end
@item_s = []
for i in 0..9
@item_s = ""
end
# 学会特技
for i in 1..@level
for j in $data_classes[@class_id].learnings
if j.level == i
learn_skill(j.skill_id)
end
end
end
# 刷新自动状态
update_auto_state(nil, $data_armors[@armor1_id])
update_auto_state(nil, $data_armors[@armor2_id])
update_auto_state(nil, $data_armors[@armor3_id])
update_auto_state(nil, $data_armors[@armor4_id])
end
#--------------------------------------------------------------------------
# ● 获取 MaxHP
#--------------------------------------------------------------------------
def maxhp
if self.id == 1
n = [[base_maxhp+cx_plus(1)+ @maxhp_plus, 1].max, 999999].max
else
n = [[base_maxhp+@maxhp_plus, 1].max, 999999].min
end
for i in @states #BUFF用 增加值=mdef_rate-100/技能LV
if skill_learn?(i) and $data_states.hold_turn == 9999
y = self.skill.level
n *= (y*($data_states.maxhp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states.maxhp_rate/100.0
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end
#--------------------------------------------------------------------------
# ● 获取 MaxSP
#--------------------------------------------------------------------------
def maxsp
if self.id == 1
n = [[base_maxsp+cx_plus(2)+ @maxsp_plus, 1].max, 999999].max
else
n = [[base_maxsp + @maxsp_plus, 1].max, 999999].min
end
for i in @states #BUFF用 增加值=mdef_rate-100/技能LV
if skill_learn?(i) and $data_states.hold_turn == 9999
y = self.skill.level
n *= (y*($data_states.maxsp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states.maxsp_rate/100.0
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end作者: 1185805173 时间: 2016-2-6 13:35
不懂,不过这个生命上限是干啥的作者: hxk2627 时间: 2016-7-25 17:47
看着好像设置限制了啊。作者: Rivendell 时间: 2016-9-3 20:17
发错版区了吧?