查看: 2478|回复: 1

[已经解决] 角色进入某状态时无法防御

[复制链接]
梦石
0
星屑
462
在线时间
871 小时
注册时间
2014-5-5
回帖
914
发表于 2016-4-15 19:49:31 | 显示全部楼层 |阅读模式

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

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

×
想做一个状态===  无防御  ====
当角色附加该状态时,物防/魔防都是0,且无法防御
我改了防御修正的脚本,请问如何修改让该角色无法防御?


  1.       # 防御修正
  2.       if self.guarding?
  3.           self.damage /= 2
  4.         end
  5.        if self.state?(342)
  6.         self.damage *= 2
  7.       end
复制代码

点评

状态设置双防都是0%  发表于 2016-4-15 21:27
这样改防御真的是0吗  发表于 2016-4-15 20:59

评分

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

查看全部评分

梦石
0
星屑
1788
在线时间
1313 小时
注册时间
2012-8-4
回帖
724
发表于 2016-4-15 20:50:16 | 显示全部楼层
仿这样
  1. def update_phase3_basic_command
  2.     # 按下 B 键的情况下
  3.     if Input.trigger?(Input::B)
  4.       # 演奏取消 SE
  5.       $game_system.se_play($data_system.cancel_se)
  6.       # 转向前一个角色的指令输入
  7.       phase3_prior_actor
  8.       return
  9.     end
  10.     # 按下 C 键的情况下
  11.     if Input.trigger?(Input::C)
  12.       # 角色指令窗口光标位置分之
  13.       case @actor_command_window.index
  14.       when 0  # 攻击
  15.         # 演奏确定 SE
  16.         $game_system.se_play($data_system.decision_se)
  17.         # 设置行动
  18.         @active_battler.current_action.kind = 0
  19.         @active_battler.current_action.basic = 0
  20.         # 开始选择敌人
  21.         start_enemy_select
  22.       when 1  # 特技
  23.         # 演奏确定 SE
  24.         $game_system.se_play($data_system.decision_se)
  25.         # 设置行动
  26.         @active_battler.current_action.kind = 1
  27.         # 开始选择特技
  28.         start_skill_select
  29.       when 2  # 防御
  30.         if $game_party.actors[@actor_index].states.include?(342)==true
  31.            $game_system.se_play($data_system.buzzer_se)
  32.         else
  33.         # 演奏确定 SE
  34.         $game_system.se_play($data_system.decision_se)
  35.         # 设置行动
  36.         @active_battler.current_action.kind = 0
  37.         @active_battler.current_action.basic = 1
  38.         # 转向下一位角色的指令输入
  39.         phase3_next_actor
  40.         end
  41.       when 3  # 物品
  42.         # 演奏确定 SE
  43.         $game_system.se_play($data_system.decision_se)
  44.         # 设置行动
  45.         @active_battler.current_action.kind = 2
  46.         # 开始选择物品
  47.         start_item_select
  48.       end
  49.       return
  50.     end
  51.   end
复制代码

评分

参与人数 2星屑 +60 梦石 +1 收起 理由
RyanBern + 1 认可答案
邪月长啸 + 60 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部