Project1

标题: 關於解除狀態的問題~!! [打印本页]

作者: 鲔鱼吐司    时间: 2009-5-17 20:19
提示: 作者被禁止或删除 内容自动屏蔽
作者: 失去的记忆    时间: 2009-5-17 20:34
默认工程中脚本Scene_Battle 4中的一段改为:
    # 添加角色到 @action_battlers 序列
    for actor in $game_party.actors
     if actor.id == 1
       if rand(10) <5
       @action_battler.states.delete(3)  
     end
     end

      @action_battlers.push(actor)
    end
上面红色的为修改后的! 试试看去!

P:高手帮看看我写的对不? 脚本不是太懂。。。。{/gg}{/gg}
作者: 紫苏    时间: 2009-5-17 20:44
在 Scene_Battle 4 的 update_phase4_step6 中修改,這是在對象方和行動方動畫都結束后會掉用的一個方法,所以在這個里面添加紅色的部分:
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 6 : 刷新)
  #--------------------------------------------------------------------------
  def update_phase4_step6
    # 清除强制行动对像的战斗者
    $game_temp.forcing_battler = nil
    # 公共事件 ID 有效的情况下
    if @common_event_id > 0
      # 设置事件
      common_event = $data_common_events[@common_event_id]
      $game_system.battle_interpreter.setup(common_event.list, 0)
    end
    if @active_battler.class == Game_Actor &&
      @active_battler.id == 1 && @active_battler.state?(3) && rand >= 0.5
      @active_battler.remove_state(3)
    end

    # 移至步骤 1
    @phase4_step = 1
  end


如果在樓上那里改的話,在角色命令選擇完畢之后所有人的狀態會一起被決定消失或不消失(50%機率) [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: 鲔鱼吐司    时间: 2009-5-17 21:24
提示: 作者被禁止或删除 内容自动屏蔽
作者: 紫苏    时间: 2009-5-17 21:53
以下引用鲔鱼吐司于2009-5-17 13:24:52的发言:

紫大大~ 如果是25%機率

就把這一句改成這樣嗎?

rand <= 0.25

差不多了{/qiang},準確地應該是 rand < 0.25 或者 rand >= 0.75 ~
作者: 鲔鱼吐司    时间: 2009-5-17 21:54
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1