查看: 1897|回复: 6

问一下RTAB能不能做每回合回复MP

  [复制链接]
梦石
0
星屑
65
在线时间
5 小时
注册时间
2006-8-21
回帖
240
发表于 2008-2-10 09:28:34 | 显示全部楼层 |阅读模式

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

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

×
我想做成就只有法师一个人能够每回合恢复一点MP

就是说在每次AT满了后就恢复一定MP,其他职业则没这个效果

看了http://rpg.blue/web/htm/news307.htm
这个教程,貌似没什么关系




如果问题未解决,请继续提问
如果问题已解决,请结贴
若到末贴发贴时间后一周仍未结贴
管理员会自动为你过期帖子、结贴或强行认可答案(好人卡-1)


此贴于 2008-2-15 20:54:39 被版主凌冰提醒,请楼主看到后对本贴做出回应。
版务信息:本贴由楼主自主结贴~

酱油的

梦石
0
星屑
1840
在线时间
2161 小时
注册时间
2007-12-22
回帖
3216

贵宾

发表于 2008-2-10 13:30:15 | 显示全部楼层
是的,RTAB的加減血重新寫過了。需要用一點其他的方法。下面的腳本也許可以給你一點提示:
#==============================================================================
# ■ Scene_Battle (分割定义 4)
#------------------------------------------------------------------------------
#  处理战斗画面的类。
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh_phase(battler)
    battler.at %= @max
    if battler.movable?
      battler.atp = 100 * battler.at / @max
    end
    spell_reset(battler)
   
    # 連續傷害
    if battler.hp > 0 and battler.slip_damage?
      battler.slip_damage_effect
      battler.damage_pop["slip"] = true
    end
    # HP回復小
    if battler.state?(26) and battler.hp >0  #-恢复生命
      battler.hp_recover_effect_10
      battler.damage_pop["hp_plus"] = true
    end
    # SP回復小
    if battler.state?(27) and battler.hp >0  #-SP恢復
      battler.sp_recover_effect_11
      battler.damage_pop["sp_plus"] = true
    end
    # HP傷害小
    if battler.state?(28) and battler.hp >0  #-生命傷害
      battler.hp_recover_effect_14
      battler.damage_pop["hp_plus"] = true
    end
    # SP傷害小
    if battler.state?(29) and battler.hp >0  #-SP傷害
      battler.sp_recover_effect_15
      battler.damage_pop["sp_plus"] = true
    end
   
    # ステート自然解除
    battler.remove_states_auto
    # ステータスウィンドウをリフレッシュ
    status_refresh(battler, true)
    unless battler.movable?
      return
    end
    # ターン数カウント
    @turn_cnt += 1
  end
end
class Game_Battler
  # HP
  def hp_common
    # 分散
    if self.damage["hp_plus"].abs > 0
      amp = [self.damage["hp_plus"].abs * 15 / 100, 1].max
      self.damage["hp_plus"] += rand(amp+1) + rand(amp+1) - amp
    end
    # HP からダメージを減算
    self.hp -= self.damage["hp_plus"]
  end
  def hp_recover_effect_10
    # ダメージを設定
    self.damage["hp_plus"] = -self.maxhp / 10
    # 分散 and 減算
    hp_common
    # メソッド終了
    return true
  end
  def hp_recover_effect_14
    # ダメージを設定
    self.damage["hp_plus"] = self.maxhp / 15
    # 分散 and 減算
    hp_common
    # メソッド終了
    return true
  end
  
  # SP
  def sp_common
    # 分散
    if self.damage_sp["sp_plus"].abs > 0
      amp = [self.damage_sp["sp_plus"].abs * 15 / 100, 1].max
      self.damage_sp["sp_plus"] += rand(amp+1) + rand(amp+1) - amp
    end
    # HP からダメージを減算
    self.sp -= self.damage_sp["sp_plus"]
  end
  def sp_recover_effect_11
    # ダメージを設定
    self.damage_sp["sp_plus"] = -self.maxsp / 10
    # SP からダメージを減算
    sp_common
    # メソッド終了
    return true
  end
  def sp_recover_effect_15
    # ダメージを設定
    self.damage_sp["sp_plus"] = self.maxsp / 15
    # SP からダメージを減算
    sp_common
    # メソッド終了
    return true
  end
  
end
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复

使用道具 举报

梦石
0
星屑
65
在线时间
5 小时
注册时间
2006-8-21
回帖
240
 楼主| 发表于 2008-2-16 22:24:42 | 显示全部楼层
这个貌似是设置一个回复或者减少的状态,能不能用这个思路,比如法师职业ID是3

能不能在AT满的刷新过程中增加一个if,检查职业ID是否=3,如果是,则SP回复一定量
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-2-16
回帖
63
发表于 2008-2-16 23:26:51 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

梦石
0
星屑
65
在线时间
5 小时
注册时间
2006-8-21
回帖
240
 楼主| 发表于 2008-2-17 03:28:40 | 显示全部楼层
怎么弄?
回复

使用道具 举报

冰王子

梦石
0
星屑
50
在线时间
34 小时
注册时间
2008-1-27
回帖
1810
发表于 2008-2-17 06:29:47 | 显示全部楼层
一个很朴素的办法
搜索if battler.at >= @max
在
              unless @action_battlers.include?(battler) or
                  @command.include?(battler) or @escape == true
下面添加
                  if battler.class_id == 3
                    battler.sp += 100
                  end
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
不常在线,有事PM
回复

使用道具 举报

酱油的

梦石
0
星屑
1840
在线时间
2161 小时
注册时间
2007-12-22
回帖
3216

贵宾

发表于 2008-2-17 10:37:01 | 显示全部楼层
把.state?(27)換成.class_id == 3
==
不然就使用上面的那個吧,不過開始時候增加sp還是動作完了以後增加sp沒有多大差別吧?
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部