赞 | 1 |
VIP | 255 |
好人卡 | 52 |
积分 | 1 |
经验 | 77416 |
最后登录 | 2016-1-18 |
在线时间 | 1269 小时 |
Lv1.梦旅人 薄凉看客
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1269 小时
- 注册时间
- 2010-6-20
- 帖子
- 1316
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
相关脚本。。我承认很简单- #==============================================================================
- # ■ Game_Actor
- #------------------------------------------------------------------------------
- # 被动技能
- # 设置:
- # 可能使用时必须为 【不能使用】
- # 除过回避,分散度和威力以外,其余参数都将提升角色的相关能力
- # 比如 你设置 速度 F 的值为 100 那么该被动技能就会给角色增加 100 的速度!
- # 特殊:
- # 消费SP => HP
- # 命中率 => MP(SP)
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● 获取 MaxHP
- #--------------------------------------------------------------------------
- def maxhp
- n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min
- for i in @states
- n *= $data_states[i].maxhp_rate / 100.0
- end
- n = [[Integer(n), 1].max, 9999].min
-
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].hit > 0
- n += $data_skills[i].hit
- end
- end
- n = [n, 9999].min
-
- return n
- end
- #--------------------------------------------------------------------------
- # ● 获取基本 MaxSP
- #--------------------------------------------------------------------------
- def base_maxsp
- n = $data_actors[@actor_id].parameters[1, @level]
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].sp_cost > 0
- n += $data_skills[i].sp_cost
- end
- end
- return n
- end
- #--------------------------------------------------------------------------
- # ● 获取基本力量
- #--------------------------------------------------------------------------
- def base_str
- n = $data_actors[@actor_id].parameters[2, @level]
- weapon = $data_weapons[@weapon_id]
- armor1 = $data_armors[@armor1_id]
- armor2 = $data_armors[@armor2_id]
- armor3 = $data_armors[@armor3_id]
- armor4 = $data_armors[@armor4_id]
- n += weapon != nil ? weapon.str_plus : 0
- n += armor1 != nil ? armor1.str_plus : 0
- n += armor2 != nil ? armor2.str_plus : 0
- n += armor3 != nil ? armor3.str_plus : 0
- n += armor4 != nil ? armor4.str_plus : 0
-
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].str_f > 0
- n += $data_skills[i].str_f
- end
- end
-
- return [[n, 1].max, 999].min
- end
- #--------------------------------------------------------------------------
- # ● 获取基本灵巧
- #--------------------------------------------------------------------------
- def base_dex
- n = $data_actors[@actor_id].parameters[3, @level]
- weapon = $data_weapons[@weapon_id]
- armor1 = $data_armors[@armor1_id]
- armor2 = $data_armors[@armor2_id]
- armor3 = $data_armors[@armor3_id]
- armor4 = $data_armors[@armor4_id]
- n += weapon != nil ? weapon.dex_plus : 0
- n += armor1 != nil ? armor1.dex_plus : 0
- n += armor2 != nil ? armor2.dex_plus : 0
- n += armor3 != nil ? armor3.dex_plus : 0
- n += armor4 != nil ? armor4.dex_plus : 0
-
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].dex_f > 0
- n += $data_skills[i].dex_f
- end
- end
-
- return [[n, 1].max, 999].min
- end
- #--------------------------------------------------------------------------
- # ● 获取基本速度
- #--------------------------------------------------------------------------
- def base_agi
- n = $data_actors[@actor_id].parameters[4, @level]
- weapon = $data_weapons[@weapon_id]
- armor1 = $data_armors[@armor1_id]
- armor2 = $data_armors[@armor2_id]
- armor3 = $data_armors[@armor3_id]
- armor4 = $data_armors[@armor4_id]
- n += weapon != nil ? weapon.agi_plus : 0
- n += armor1 != nil ? armor1.agi_plus : 0
- n += armor2 != nil ? armor2.agi_plus : 0
- n += armor3 != nil ? armor3.agi_plus : 0
- n += armor4 != nil ? armor4.agi_plus : 0
-
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].agi_f > 0
- n += $data_skills[i].agi_f
- end
- end
-
- return [[n, 1].max, 999].min
- end
- #--------------------------------------------------------------------------
- # ● 获取基本魔力
- #--------------------------------------------------------------------------
- def base_int
- n = $data_actors[@actor_id].parameters[5, @level]
- weapon = $data_weapons[@weapon_id]
- armor1 = $data_armors[@armor1_id]
- armor2 = $data_armors[@armor2_id]
- armor3 = $data_armors[@armor3_id]
- armor4 = $data_armors[@armor4_id]
- n += weapon != nil ? weapon.int_plus : 0
- n += armor1 != nil ? armor1.int_plus : 0
- n += armor2 != nil ? armor2.int_plus : 0
- n += armor3 != nil ? armor3.int_plus : 0
- n += armor4 != nil ? armor4.int_plus : 0
-
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].int_f > 0
- n += $data_skills[i].int_f
- end
- end
-
- return [[n, 1].max, 999].min
- end
- #--------------------------------------------------------------------------
- # ● 获取基本攻击力
- #--------------------------------------------------------------------------
- def base_atk
- weapon = $data_weapons[@weapon_id]
-
- n = weapon != nil ? weapon.atk : 0
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].atk_f > 0
- n += $data_skills[i].atk_f
- end
- end
-
- return n
- end
- #--------------------------------------------------------------------------
- # ● 获取基本物理防御
- #--------------------------------------------------------------------------
- def base_pdef
- weapon = $data_weapons[@weapon_id]
- armor1 = $data_armors[@armor1_id]
- armor2 = $data_armors[@armor2_id]
- armor3 = $data_armors[@armor3_id]
- armor4 = $data_armors[@armor4_id]
- pdef1 = weapon != nil ? weapon.pdef : 0
- pdef2 = armor1 != nil ? armor1.pdef : 0
- pdef3 = armor2 != nil ? armor2.pdef : 0
- pdef4 = armor3 != nil ? armor3.pdef : 0
- pdef5 = armor4 != nil ? armor4.pdef : 0
- n = pdef1 + pdef2 + pdef3 + pdef4 + pdef5
-
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].pdef_f > 0
- n += $data_skills[i].pdef_f
- end
- end
-
- return n
- end
- #--------------------------------------------------------------------------
- # ● 获取基本魔法防御
- #--------------------------------------------------------------------------
- def base_mdef
- weapon = $data_weapons[@weapon_id]
- armor1 = $data_armors[@armor1_id]
- armor2 = $data_armors[@armor2_id]
- armor3 = $data_armors[@armor3_id]
- armor4 = $data_armors[@armor4_id]
- mdef1 = weapon != nil ? weapon.mdef : 0
- mdef2 = armor1 != nil ? armor1.mdef : 0
- mdef3 = armor2 != nil ? armor2.mdef : 0
- mdef4 = armor3 != nil ? armor3.mdef : 0
- mdef5 = armor4 != nil ? armor4.mdef : 0
- n = mdef1 + mdef2 + mdef3 + mdef4 + mdef5
-
- @skills.each do |i|
- if $data_skills[i].occasion == 3 and
- $data_skills[i].mdef_f > 0
- n += $data_skills[i].mdef_f
- end
- end
-
- return n
- end
- end
复制代码
被动技能.rar
(228.16 KB, 下载次数: 227)
|
|