求大家帮忙看看生命上限脚本,改后,或直接最大,要么又变回去
rpgmaker吧
全部回复
仅看楼主
level 1
#--------------------------------------------------------------------------
# ● 初始化对像
# 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[i] = ""
end
@item_s = []
for i in 0..9
@item_s[i] = ""
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
2016年01月28日 04点01分 1
level 1
#--------------------------------------------------------------------------
# ● 获取 MaxHP
#--------------------------------------------------------------------------
def maxhp
if self.id == 1
n = [[base_maxhp+cx_plus(1)+ @maxhp_plus, 1].max, n].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[i].hold_turn == 9999
y = self.skill[i].level
n *= (y*($data_states[i].maxhp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states[i].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, n].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[i].hold_turn == 9999
y = self.skill[i].level
n *= (y*($data_states[i].maxsp_rate - 100.0)/1000.0)+1
# y /= 10
#n *= (y+100.0)/ 100.0
else #debuff
n *= $data_states[i].maxsp_rate/100.0
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end
2016年01月28日 04点01分 2
Game Actor
2016年01月28日 04点01分
n是错误的,一开始是19999,后来让我改成了999999,最后我又改成了N不行,看来必须是一个数字
2016年01月28日 04点01分
level 1
一开始生命上限和MP上限都是19999,怎么改都不行,一旦战斗或者学习新的武功增加属性后,就又变回去;
后来我尝试 n = [[base_maxhp+cx_plus(1)+ @maxhp_plus, 1].max, 999999].min 改成了 n = [[base_maxhp+cx_plus(1)+ @maxhp_plus, 1].max, 999999].max
这回到是成功了,但是一出场生命就是最大值,不用学习技能增加属性,求大神门帮帮忙,最后别让敌人强化了
2016年01月28日 04点01分 3
level 1
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
@battler_name = ""
@battler_hue = 0
@hp = 0
@sp = 0
@states = []
@states_turn = {}
@maxhp_plus =
@maxsp_plus =
@str_plus =
@dex_plus =
@agi_plus =
@int_plus =
#=======破限参数设定======
@str_ot = 9999
@dex_ot = 9999
@agi_ot = 9999
@int_ot = 9999
#=========================
@hidden = false
@immortal = false
@damage_pop = false
@damage = nil
@critical = false
@animation_id = 0
@animation_hit = false
@white_flash = false
@blink = false
@current_action = Game_BattleAction.new
@last_action = Game_BattleAction.new #玄:重复融合
@skill_s = []
for i in 0..9
@skill_s[i] = ""
end
@item_s = []
for i in 0..9
@item_s[i] = ""
end
end
#--------------------------------------------------------------------------
# ● 获取 MaxHP
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
for i in @states
if $data_states[i].hold_turn == 9999 #内功、身法、特技
if self.is_a?(Game_Actor)
y = self.skill[i].level
n *= (y*($data_states[i].maxhp_rate - 100.0)/10)+1
else # 敌人
n *= $data_states[i].maxhp_rate / 100.0 #敌人
end
else
n *= $data_states[i].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[i].hold_turn == 9999 #内功、身法、特技
if self.is_a?(Game_Actor)
y = self.skill[i].level
n *= (y*($data_states[i].maxsp_rate - 100.0)/10)+1
else # 敌人
n *= $data_states[i].maxsp_rate / 100.0 #敌人
end
else
n *= $data_states[i].maxsp_rate / 100.0
end #内功、身法、特技
case i
when 905
@str_ot = 999999
end
end
n = [[Integer(n), 1].max, 999999].min
return n
end
2016年01月28日 04点01分 4
Game Battler1
2016年01月28日 04点01分
level 13
[汗]
2016年01月28日 04点01分 5
[乖]
2016年01月28日 07点01分
1