| 赞 | 8  | 
 
| VIP | 20 | 
 
| 好人卡 | 126 | 
 
| 积分 | 117 | 
 
| 经验 | 33282 | 
 
| 最后登录 | 2025-11-1 | 
 
| 在线时间 | 1683 小时 | 
 
 
 
 
 
Lv4.逐梦者 
	- 梦石
 - 8 
 
        - 星屑
 - 3711 
 
        - 在线时间
 - 1683 小时
 
        - 注册时间
 - 2010-10-22
 
        - 帖子
 - 1067
 
 
   
 
 | 
	
1.Game_Battler 3(战斗中的持续恢复)-   #--------------------------------------------------------------------------
 
 -   # ● 应用连续伤害效果
 
 -   #--------------------------------------------------------------------------
 
 -   def slip_damage_effect
 
 - #=====================
 
 -     if self.state?(1)#当目标状态为1号时
 
 -     self.damage -= self.maxhp / 10#持续恢复10%
 
 -     else
 
 -     # 设置伤害
 
 -     self.damage = self.maxhp / 10#持续失血10%
 
 -    end
 
 - #=====================
 
 -     # 分散
 
 -     if self.damage.abs > 0
 
 -       amp = [self.damage.abs * 15 / 100, 1].max
 
 -       self.damage += rand(amp+1) + rand(amp+1) - amp
 
 -     end
 
 -     # HP 的伤害减法运算
 
 -     self.hp -= self.damage
 
 -     # 过程结束
 
 -     return true
 
 -   end
 
  复制代码 2.Game_Party(地图中的持续恢复)-   #--------------------------------------------------------------------------
 
 -   # ● 检查连续伤害 (地图用)
 
 -   #--------------------------------------------------------------------------
 
 -   def check_map_slip_damage
 
 -     for actor in @actors
 
 - #==========================
 
 -      if actor.state?(1) #状态为1号时
 
 -      actor.hp += [actor.maxhp / 100, 1].max#持续恢复1%
 
 -       elsif actor.hp > 0 and actor.slip_damage?
 
 -         actor.hp -= [actor.maxhp / 100, 1].max#持续失血1%
 
 - #==========================
 
 -         if actor.hp == 0
 
 -           $game_system.se_play($data_system.actor_collapse_se)
 
 -         end
 
 -         $game_screen.start_flash(Color.new(255,0,0,128), 4)
 
 -         $game_temp.gameover = $game_party.all_dead?
 
 -       end
 
 -     end
 
 -   end
 
  复制代码 3.这两段脚本可以不同时用,这样就会形成一种战斗时加血(失血),非战斗时失血(加血)的状态,可灵活使用。 |   
 
 
 
 |