查看: 2100|回复: 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 编辑

魔力转攻击力[pre lang="ruby"]class Game_Battler
  $stateszid=17 #设置标志魔力转攻击这个状态的ID
  alias initialize1 initialize
  def initialize
   initialize1
    @states1=[]
  end
  #--------------------------------------------------------------------------
  # ● 获取魔力
  #--------------------------------------------------------------------------
  def int
    n = [[base_int + @int_plus, 1].max, 999].min
    for i in @states
      n *= $data_states.int_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    n = 0  if @states1.include?($stateszid)==true
       return n
  end
  #--------------------------------------------------------------------------
  # ● 获取力量
  #--------------------------------------------------------------------------
  def str
    n = [[base_str + @str_plus, 1].max, 999].min
    n = [[base_str + @str_plus+base_int, 1].max, 999].min   if @states1.include?($stateszid)==true
    for i in @states
      n *= $data_states.str_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    return n
  end
#--------------------------------------------------------------------------
  # ● 检查状态
  #     state_id : 状态 ID
  #--------------------------------------------------------------------------
   def state?(state_id)
    if state_id==$stateszid
      str;int
    @states1=[$stateszid]
  else
      @states1=[]
    end
    # 如果符合被附加的状态的条件就返回 ture
    return @states.include?(state_id)
  end
  
   #--------------------------------------------------------------------------
  # ● 解除状态
  #     state_id : 状态 ID
  #     force    : 强制解除标志 (处理自动状态时使用)
  #--------------------------------------------------------------------------
  alias remove_state1 remove_state
  def remove_state(state_id, force = false)
   remove_state1(state_id, force = false)
   @states1=[]  if state_id==$stateszid
  end
end[/pre]


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.

在本版发帖返回顶部