赞 | 0 |
VIP | 0 |
好人卡 | 12 |
积分 | 1 |
经验 | 5827 |
最后登录 | 2020-5-5 |
在线时间 | 116 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 116 小时
- 注册时间
- 2008-5-12
- 帖子
- 264
|
- # 设定模块,设定五项能力值的最大值
- module Enhance_State
- CRITICAL_MAX = 100
- HIT_MAX = 100
- EVA_MAX = 100
- MAXHP_MAX = 9999
- MAXMP_MAX = 9999
- ODDS_MAX =30
- DEF_MAX =999
- AGI_MAX =999
- SPI_MAX =999
- ATK_MAX =999
- end
- # RPG::State模块,定义读取三种附加能力
- module RPG
- class State
- def cri_plus
- return read_note("cri_plus")
- end
-
- def hit_plus
- return read_note("hit_plus")
- end
-
- def eva_plus
- return read_note("eva_plus")
- end
-
- def maxhp_plus
- return read_note("maxhp_plus")
- end
-
- def maxmp_plus
- return read_note("maxmp_plus")
- end
-
- def odds_plus
- return read_note("odds_plus")
- end
-
- def def_plus
- return read_note("def_plus")
- end
-
- def atk_plus
- return read_note("atk_plus")
- end
-
- def spi_plus
- return read_note("spi_plus")
- end
-
- def agi_plus
- return read_note("agi_plus")
- end
-
- def ep_plus
- return read_note("ep_plus")
- end
- end
- end
- # 致命一击、命中率和闪躲率等的追加定义
- class Game_Actor
- include Enhance_State
- alias :enhance_cri :cri
- def cri
- n = enhance_cri
- states.each do |state|
- next if state.cri_plus == nil
- n += state.cri_plus
- end
- return [n , CRITICAL_MAX].min
- end
-
- alias :enhance_hit :hit
- def hit
- n = enhance_hit
- states.each do |state|
- next if state.hit_plus == nil
- n += state.hit_plus
- end
- return [n , HIT_MAX].min
- end
-
- alias :enhance_eva :eva
- def eva
- n = enhance_eva
- states.each do |state|
- next if state.eva_plus == nil
- n += state.eva_plus
- end
- return [n , EVA_MAX].min
- end
-
- alias :enhance_maxhp :maxhp
- def maxhp
- n = enhance_maxhp
- states.each do |state|
- next if state.maxhp_plus == nil
- n += state.maxhp_plus
- end
- return [n , MAXHP_MAX].min
- end
-
- alias :enhance_maxmp :maxmp
- def maxmp
- n = enhance_maxmp
- states.each do |state|
- next if state.maxmp_plus == nil
- n += state.maxmp_plus
- end
- return [n , MAXMP_MAX].min
- end
-
- alias :enhance_odds :odds
- def odds
- n = enhance_odds
- states.each do |state|
- next if state.odds_plus == nil
- n += state.odds_plus
- end
- return [n , ODDS_MAX].min
- end
-
- alias :enhance_def :def
- def def
- n = enhance_def
- states.each do |state|
- next if state.def_plus == nil
- n += state.def_plus
- end
- return [n , DEF_MAX].min
- end
-
- alias :enhance_atk :atk
- def atk
- n = enhance_atk
- states.each do |state|
- next if state.atk_plus == nil
- n += state.atk_plus
- end
- return [n , ATK_MAX].min
- end
-
- alias :enhance_spi :spi
- def spi
- n = enhance_spi
- states.each do |state|
- next if state.spi_plus == nil
- n += state.spi_plus
- end
- return [n , SPI_MAX].min
- end
-
- alias :enhance_agi :agi
- def agi
- n = enhance_agi
- states.each do |state|
- next if state.agi_plus == nil
- n += state.agi_plus
- end
- return [n , AGI_MAX].min
- end
- end
复制代码 强化状态脚本 脚本插入在MAIN之前
使用方法 是新建一个状态 在状态的背猪里写 eva_plus = 30 数值由你来设 |
|