设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: 流浪剑客
打印 上一主题 下一主题

[已经解决] 请问怎么样让复活技能对活着的人可以加血,对死人复活

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
138 小时
注册时间
2010-6-20
帖子
46
11
 楼主| 发表于 2012-11-4 00:04:20 | 只看该作者
我就用的工程自带的复活技能
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
138 小时
注册时间
2010-6-20
帖子
46
12
 楼主| 发表于 2012-11-4 00:10:02 | 只看该作者
工程也上传不了。。郁闷了。。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3439
在线时间
3054 小时
注册时间
2011-11-17
帖子
980
13
发表于 2012-11-4 00:10:44 | 只看该作者
测试了下 确实光这样还不够
Game_Battler 3里找到
  1.   #--------------------------------------------------------------------------
  2.   # ● 应用特技效果
  3.   #     user  : 特技的使用者 (battler)
  4.   #     skill : 特技
  5.   #--------------------------------------------------------------------------
  6.   def skill_effect(user, skill)
  7.     # 清除会心一击标志
  8.     self.critical = false
  9.     # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
  10.     # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
  11.     if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
  12.        ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
  13.       # 过程结束
  14.       return false
  15.     end
复制代码
将 or ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1) 删掉 就OK了 测试可行

评分

参与人数 2星屑 +132 梦石 +2 收起 理由
hcm + 2 认可答案
hys111111 + 132 感谢回答

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
138 小时
注册时间
2010-6-20
帖子
46
14
 楼主| 发表于 2012-11-4 00:25:18 | 只看该作者
可以了,谢谢你,你辛苦了。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
138 小时
注册时间
2010-6-20
帖子
46
15
 楼主| 发表于 2012-11-4 00:28:29 | 只看该作者
认可最佳答案在哪里的?忘了。。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
260
在线时间
1373 小时
注册时间
2005-10-16
帖子
5113

贵宾

16
发表于 2012-11-4 08:22:43 | 只看该作者
Scene_Battle 4
  1. class Scene_Battle
  2.   def set_target_battlers(scope)
  3.     # 行动方的战斗者是敌人的情况下
  4.     if @active_battler.is_a?(Game_Enemy)
  5.       # 效果范围分支
  6.       case scope
  7.       when 1  # 敌单体
  8.         index = @active_battler.current_action.target_index
  9.         @target_battlers.push($game_party.smooth_target_actor(index))
  10.       when 2  # 敌全体
  11.         for actor in $game_party.actors
  12.           if actor.exist?
  13.             @target_battlers.push(actor)
  14.           end
  15.         end
  16.       when 3  # 我方单体
  17.         index = @active_battler.current_action.target_index
  18.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  19.       when 4  # 我方全体
  20.         for enemy in $game_troop.enemies
  21.           if enemy.exist?
  22.             @target_battlers.push(enemy)
  23.           end
  24.         end
  25.       when 5  # 我方单体 (HP 0)
  26.         index = @active_battler.current_action.target_index
  27.         enemy = $game_troop.enemies[index]
  28.         if enemy != nil # --> 这里去掉了HP0的判断
  29.           @target_battlers.push(enemy)
  30.         end
  31.       when 6  # 我方全体 (HP 0)
  32.         for enemy in $game_troop.enemies
  33.           if enemy != nil # --> 这里去掉了HP0的判断
  34.             @target_battlers.push(enemy)
  35.           end
  36.         end
  37.       when 7  # 使用者
  38.         @target_battlers.push(@active_battler)
  39.       end
  40.     end
  41.     # 行动方的战斗者是角色的情况下
  42.     if @active_battler.is_a?(Game_Actor)
  43.       # 效果范围分支
  44.       case scope
  45.       when 1  # 敌单体
  46.         index = @active_battler.current_action.target_index
  47.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  48.       when 2  # 敌全体
  49.         for enemy in $game_troop.enemies
  50.           if enemy.exist?
  51.             @target_battlers.push(enemy)
  52.           end
  53.         end
  54.       when 3  # 我方单体
  55.         index = @active_battler.current_action.target_index
  56.         @target_battlers.push($game_party.smooth_target_actor(index))
  57.       when 4  # 我方全体
  58.         for actor in $game_party.actors
  59.           if actor.exist?
  60.             @target_battlers.push(actor)
  61.           end
  62.         end
  63.       when 5  # 我方单体 (HP 0)
  64.         index = @active_battler.current_action.target_index
  65.         actor = $game_party.actors[index]
  66.         if actor != nil # --> 这里去掉了HP0的判断
  67.           @target_battlers.push(actor)
  68.         end
  69.       when 6  # 我方全体 (HP 0)
  70.         for actor in $game_party.actors
  71.           if actor != nil # --> 这里去掉了HP0的判断
  72.             @target_battlers.push(actor)
  73.           end
  74.         end
  75.       when 7  # 使用者
  76.         @target_battlers.push(@active_battler)
  77.       end
  78.     end
  79.   end
  80. end
复制代码
Game_Battler 3
  1. class Game_Battler
  2.   def skill_effect(user, skill)
  3.     # 清除会心一击标志
  4.     self.critical = false
  5.     # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
  6.     # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
  7.     if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0)# or
  8.        #((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)  --> 去掉了对物品技能HP0范围和角色HP是否为0的吻合判断
  9.       # 过程结束
  10.       return false
  11.     end
  12.     # 清除有效标志
  13.     effective = false
  14.     # 公共事件 ID 是有效的情况下,设置为有效标志
  15.     effective |= skill.common_event_id > 0
  16.     # 第一命中判定
  17.     hit = skill.hit
  18.     if skill.atk_f > 0
  19.       hit *= user.hit / 100
  20.     end
  21.     hit_result = (rand(100) < hit)
  22.     # 不确定的特技的情况下设置为有效标志
  23.     effective |= hit < 100
  24.     # 命中的情况下
  25.     if hit_result == true
  26.       # 计算威力
  27.       power = skill.power + user.atk * skill.atk_f / 100
  28.       if power > 0
  29.         power -= self.pdef * skill.pdef_f / 200
  30.         power -= self.mdef * skill.mdef_f / 200
  31.         power = [power, 0].max
  32.       end
  33.       # 计算倍率
  34.       rate = 20
  35.       rate += (user.str * skill.str_f / 100)
  36.       rate += (user.dex * skill.dex_f / 100)
  37.       rate += (user.agi * skill.agi_f / 100)
  38.       rate += (user.int * skill.int_f / 100)
  39.       # 计算基本伤害
  40.       self.damage = power * rate / 20
  41.       # 属性修正
  42.       self.damage *= elements_correct(skill.element_set)
  43.       self.damage /= 100
  44.       # 伤害符号正确的情况下
  45.       if self.damage > 0
  46.         # 防御修正
  47.         if self.guarding?
  48.           self.damage /= 2
  49.         end
  50.       end
  51.       # 分散
  52.       if skill.variance > 0 and self.damage.abs > 0
  53.         amp = [self.damage.abs * skill.variance / 100, 1].max
  54.         self.damage += rand(amp+1) + rand(amp+1) - amp
  55.       end
  56.       # 第二命中判定
  57.       eva = 8 * self.agi / user.dex + self.eva
  58.       hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
  59.       hit = self.cant_evade? ? 100 : hit
  60.       hit_result = (rand(100) < hit)
  61.       # 不确定的特技的情况下设置为有效标志
  62.       effective |= hit < 100
  63.     end
  64.     # 命中的情况下
  65.     if hit_result == true
  66.       # 威力 0 以外的物理攻击的情况下
  67.       if skill.power != 0 and skill.atk_f > 0
  68.         # 状态冲击解除
  69.         remove_states_shock
  70.         # 设置有效标志
  71.         effective = true
  72.       end
  73.       # HP 的伤害减法运算
  74.       last_hp = self.hp
  75.       self.hp -= self.damage
  76.       effective |= self.hp != last_hp
  77.       # 状态变化
  78.       @state_changed = false
  79.       effective |= states_plus(skill.plus_state_set)
  80.       effective |= states_minus(skill.minus_state_set)
  81.       # 威力为 0 的场合
  82.       if skill.power == 0
  83.         # 伤害设置为空的字串
  84.         self.damage = ""
  85.         # 状态没有变化的情况下
  86.         unless @state_changed
  87.           # 伤害设置为 "Miss"
  88.           self.damage = "Miss"
  89.         end
  90.       end
  91.     # Miss 的情况下
  92.     else
  93.       # 伤害设置为 "Miss"
  94.       self.damage = "Miss"
  95.     end
  96.     # 不在战斗中的情况下
  97.     unless $game_temp.in_battle
  98.       # 伤害设置为 nil
  99.       self.damage = nil
  100.     end
  101.     # 过程结束
  102.     return effective
  103.   end
  104. end
复制代码
注意看 “-->”
我只个搬答案的
叔叔我已经当爹了~
婚后闪人了……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
138 小时
注册时间
2010-6-20
帖子
46
17
 楼主| 发表于 2012-11-4 16:11:47 | 只看该作者
怎么结贴啊,啊啊啊啊
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
260
在线时间
1373 小时
注册时间
2005-10-16
帖子
5113

贵宾

18
发表于 2012-11-4 17:20:06 | 只看该作者
现在服务器有一点问题,认可的事情你可以先放一放,等服务器康复后再说吧。
我只个搬答案的
叔叔我已经当爹了~
婚后闪人了……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
138 小时
注册时间
2010-6-20
帖子
46
19
 楼主| 发表于 2012-11-4 23:47:07 | 只看该作者
哦,知道了。。

点评

可以来认可了~  发表于 2012-11-6 11:35
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-29 06:56

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表