| 赞 | 664 |
| VIP | |
| 好人卡 | |
| 积分 | 345 |
| 经验 | |
| 最后登录 | 2024-7-10 |
| 在线时间 | 5096 小时 |
- 梦石
- 0
- 星屑
- 34467
- 在线时间
- 5096 小时
- 注册时间
- 2012-11-19
- 回帖
- 4715

|
发表于 2013-5-12 00:59:31
|
显示全部楼层
额~,有点不一样哈,一共5个难度,变量值 0,1,2,3,4 分别对应 150%,125%,100%,75%,50%。
[pre lang="ruby" line="1"]#=============================================================================
# 设置难度的变量 ID
HARDNESS_VAR = 1
#============================================================================
class Game_Battler
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
for i in @states
n *= $data_states.maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 999999].min
i = (4 - $game_variables[HARDNESS_VAR]) * 25
return n / 2 + n * i / 100
end
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, 9999].min
for i in @states
n *= $data_states.maxsp_rate / 100.0
end
n = [[Integer(n), 0].max, 9999].min
i = (4 - $game_variables[HARDNESS_VAR]) * 25
return n / 2 + n * i / 100
end
end
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min
for i in @states
n *= $data_states.maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 9999].min
i = (4 - $game_variables[HARDNESS_VAR]) * 25
return n / 2 + n * i / 100
end
end[/pre] |
评分
-
查看全部评分
|