本帖最后由 RaidenInfinity 于 2016-10-16 22:15 编辑
class Game_Actor < Game_Battler alias :xparam_add_initialize :initialize def initialize(actor_id) xparam_add_initialize(actor_id) xparam_extra_clear end def xparam(xparam_id) features_sum(FEATURE_XPARAM, xparam_id) + @xparam_extra[xparam_id] end def xparam_plus(xparam_id, value) @xparam_extra[xparam_id] += value end def xparam_add(type,value) #百分比 比如1%是0.01 case(type) when :hit; xparam_plus(0,value) #HIT 命中率 when :eva; xparam_plus(1,value) #EVAsion 回避率 when :cri; xparam_plus(2,value) #CRItical 暴击率 when :cev; xparam_plus(3,value) #Critical EVasion 暴击回避率 when :mev; xparam_plus(4,value) #Magic EVasion 魔法回避率 when :mrf; xparam_plus(5,value) #Magic ReFlect 魔法反弹率 when :cnt; xparam_plus(6,value) #CouNTerattack 物理反击率 when :hrg; xparam_plus(7,value) #Hp ReGen 生命恢复率 when :mrg; xparam_plus(8,value) #Mp ReGen 魔法恢复率 when :trg; xparam_plus(9,value) #Tp ReGen 特技值恢复率 end end def xparam_extra_clear @xparam_extra = [0,0,0,0,0,0,0,0,0,0] end end
class Game_Actor < Game_Battler
alias :xparam_add_initialize :initialize
def initialize(actor_id)
xparam_add_initialize(actor_id)
xparam_extra_clear
end
def xparam(xparam_id)
features_sum(FEATURE_XPARAM, xparam_id) + @xparam_extra[xparam_id]
end
def xparam_plus(xparam_id, value)
@xparam_extra[xparam_id] += value
end
def xparam_add(type,value) #百分比 比如1%是0.01
case(type)
when :hit; xparam_plus(0,value) #HIT 命中率
when :eva; xparam_plus(1,value) #EVAsion 回避率
when :cri; xparam_plus(2,value) #CRItical 暴击率
when :cev; xparam_plus(3,value) #Critical EVasion 暴击回避率
when :mev; xparam_plus(4,value) #Magic EVasion 魔法回避率
when :mrf; xparam_plus(5,value) #Magic ReFlect 魔法反弹率
when :cnt; xparam_plus(6,value) #CouNTerattack 物理反击率
when :hrg; xparam_plus(7,value) #Hp ReGen 生命恢复率
when :mrg; xparam_plus(8,value) #Mp ReGen 魔法恢复率
when :trg; xparam_plus(9,value) #Tp ReGen 特技值恢复率
end
end
def xparam_extra_clear
@xparam_extra = [0,0,0,0,0,0,0,0,0,0]
end
end
插入此插件脚本,然后记得要开启新的游戏。 如果想要继续现有的存档(不建议),请用触发一个事件脚本指令然后存档:
- $data_actors.count.times{|i|
- next if i == 0
- $game_actors[i].xparam_extra_clear
- }
复制代码
要增加或减少特殊属性,就要使用事件脚本指令:
- $game_actors[人物ID].xparam_add(特殊属性代号,百分比的数值)
复制代码
或者
- $game_actors[人物ID].xparam_plus(特殊属性ID,百分比的数值)
复制代码
例子:
增加3号角色的回避率5%
- $game_actors[3].xparam_add(:eva,0.05)
复制代码 |