查看: 2146|回复: 2

[已经解决] 求一个能暂时让魔力值转变为力量值的状态脚本

[复制链接]
梦石
0
星屑
1076
在线时间
133 小时
注册时间
2015-1-11
回帖
10
发表于 2016-4-20 21:56:59 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
脚本盲 只会通过事件做到加状态后魔力转化为力量
求个状态消失后或战斗结束后两项属性恢复正常的脚本(=゚ω゚)=
求帮助

评分

参与人数 1星屑 +35 收起 理由
RyanBern + 35 手动认可奖励

查看全部评分

梦石
0
星屑
1788
在线时间
1313 小时
注册时间
2012-8-4
回帖
724
发表于 2016-4-20 23:30:53 | 显示全部楼层
本帖最后由 夜狠简单 于 2016-4-20 23:43 编辑

魔力转攻击力
  1. class Game_Battler
  2.   $stateszid=17 #设置标志魔力转攻击这个状态的ID
  3.   alias initialize1 initialize
  4.   def initialize
  5.    initialize1
  6.     @states1=[]
  7.   end
  8.   #--------------------------------------------------------------------------
  9.   # ● 获取魔力
  10.   #--------------------------------------------------------------------------
  11.   def int
  12.     n = [[base_int + @int_plus, 1].max, 999].min
  13.     for i in @states
  14.       n *= $data_states[i].int_rate / 100.0
  15.     end
  16.     n = [[Integer(n), 1].max, 999].min
  17.     n = 0  if @states1.include?($stateszid)==true
  18.        return n
  19.   end
  20.   #--------------------------------------------------------------------------
  21.   # ● 获取力量
  22.   #--------------------------------------------------------------------------
  23.   def str
  24.     n = [[base_str + @str_plus, 1].max, 999].min
  25.     n = [[base_str + @str_plus+base_int, 1].max, 999].min   if @states1.include?($stateszid)==true
  26.     for i in @states
  27.       n *= $data_states[i].str_rate / 100.0
  28.     end
  29.     n = [[Integer(n), 1].max, 999].min
  30.     return n
  31.   end
  32. #--------------------------------------------------------------------------
  33.   # ● 检查状态
  34.   #     state_id : 状态 ID
  35.   #--------------------------------------------------------------------------
  36.    def state?(state_id)
  37.     if state_id==$stateszid
  38.       str;int
  39.     @states1=[$stateszid]
  40.   else
  41.       @states1=[]
  42.     end
  43.     # 如果符合被附加的状态的条件就返回 ture
  44.     return @states.include?(state_id)
  45.   end
  46.   
  47.    #--------------------------------------------------------------------------
  48.   # ● 解除状态
  49.   #     state_id : 状态 ID
  50.   #     force    : 强制解除标志 (处理自动状态时使用)
  51.   #--------------------------------------------------------------------------
  52.   alias remove_state1 remove_state
  53.   def remove_state(state_id, force = false)
  54.    remove_state1(state_id, force = false)
  55.    @states1=[]  if state_id==$stateszid
  56.   end
  57. end
复制代码


moli.zip

201.19 KB, 下载次数: 74

点评

把力量都写成攻击力了0.0  发表于 2016-4-21 12:50

评分

参与人数 1星屑 +200 收起 理由
RyanBern + 200 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
1076
在线时间
133 小时
注册时间
2015-1-11
回帖
10
 楼主| 发表于 2016-4-21 09:13:35 | 显示全部楼层
夜狠简单 发表于 2016-4-20 23:30
[fold=魔力转攻击力]class Game_Battler
  $stateszid=17 #设置标志魔力转攻击这个状态的ID
  alias initia ...

解决了,谢谢:)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部