| 赞 | 8  | 
 
| VIP | 20 | 
 
| 好人卡 | 126 | 
 
| 积分 | 117 | 
 
| 经验 | 33282 | 
 
| 最后登录 | 2025-11-1 | 
 
| 在线时间 | 1683 小时 | 
 
 
 
 
 
Lv4.逐梦者 
	- 梦石
 - 8 
 
        - 星屑
 - 3711 
 
        - 在线时间
 - 1683 小时
 
        - 注册时间
 - 2010-10-22
 
        - 帖子
 - 1067
 
 
   
 
 | 
	
 本帖最后由 kangxi0109 于 2012-4-4 23:05 编辑  
 
要脚本。另外,敌人攻击的时候我方是不能使用技能的,因为这是回合制的游戏,你说的是被动技能吧。 
修改Game_Battler 3:-   #--------------------------------------------------------------------------
 
 -   # ● 应用通常攻击效果
 
 -   #     attacker : 攻击者 (battler)
 
 -   #--------------------------------------------------------------------------
 
 -   def attack_effect(attacker)
 
 -     # 清除会心一击标志
 
 -     self.critical = false
 
 -     # 第一命中判定
 
 -     hit_result = (rand(100) < attacker.hit)
 
 -     # 命中的情况下
 
 -     if hit_result == true
 
 -       # 计算基本伤害
 
 -       atk = [attacker.atk - self.pdef / 2, 0].max
 
 -       self.damage = atk * (20 + attacker.str) / 20
 
 -       # 属性修正
 
 -       self.damage *= elements_correct(attacker.element_set)
 
 -       self.damage /= 100
 
 -       # 伤害符号正确的情况下
 
 -       if self.damage > 0
 
 -         # 会心一击修正
 
 -         if rand(100) < 4 * attacker.dex / self.agi
 
 -           self.damage *= 2
 
 -           self.critical = true
 
 -         end
 
 -         # 防御修正
 
 -         if self.guarding?
 
 -           self.damage /= 2
 
 -         end
 
 -       end
 
 -       # 分散
 
 -       if self.damage.abs > 0
 
 -         amp = [self.damage.abs * 15 / 100, 1].max
 
 -         self.damage += rand(amp+1) + rand(amp+1) - amp
 
 -       end
 
 -       # 第二命中判定
 
 -       eva = 8 * self.agi / attacker.dex + self.eva
 
 -       hit = self.damage < 0 ? 100 : 100 - eva
 
 -       hit = self.cant_evade? ? 100 : hit
 
 -       hit_result = (rand(100) < hit)
 
 -     end
 
 -     # 命中的情况下
 
 -     if hit_result == true
 
 -       # 状态冲击解除
 
 -       remove_states_shock
 
 -       # HP 的伤害计算
 
 -       #-------------------
 
 -       #==========================================================================
 
 -       #若果攻击方学会1号技能的场合,受到普通攻击带有反射效果。
 
 -       if attacker.is_a?(Game_Enemy)#攻击方为敌人的场合
 
 -         if self.skills.include?(1)
 
 -                 attacker.hp -= self.damage/2#敌人分担伤害值一半
 
 -                 self.damage = self.damage/2#角色伤害降低一半
 
 -       end
 
 -          end
 
 -       #==========================================================================
 
 -       self.hp -= self.damage
 
  复制代码 |   
 
 
 
 |