| 赞 | 40  | 
 
| VIP | 559 | 
 
| 好人卡 | 234 | 
 
| 积分 | 47 | 
 
| 经验 | 251834 | 
 
| 最后登录 | 2025-10-7 | 
 
| 在线时间 | 5233 小时 | 
 
 
 
 
 
Lv3.寻梦者 (版主) 八宝粥的基叔 
	- 梦石
 - 0 
 
        - 星屑
 - 4687 
 
        - 在线时间
 - 5233 小时
 
        - 注册时间
 - 2009-4-29
 
        - 帖子
 - 14320
 
 
  
 
 | 
	
 本帖最后由 protosssonny 于 2013-6-22 22:03 编辑  
 
1、Game_Battler类下找到:-   #--------------------------------------------------------------------------
 
 -   # ● 可以使用技能的判定
 
 -   #     skill : 技能
 
 -   #--------------------------------------------------------------------------
 
 -   def skill_can_use?(skill)
 
 -     return false unless skill.is_a?(RPG::Skill)
 
 -     return false unless movable?
 
 -     return false if silent? and skill.spi_f > 0
 
 -     return false if calc_mp_cost(skill) > mp
 
 -     return false if skill.id == xx and @hp < yy # 请自己设定技能ID为xx且当HP小于yy不能使用
 
 -     if $game_temp.in_battle
 
 -       return skill.battle_ok?
 
 -     else
 
 -       return skill.menu_ok?
 
 -     end
 
 -   end
 
  复制代码 2、Scene_Battle类下找到:-   #--------------------------------------------------------------------------
 
 -   # ● 执行战斗行动:使用技能
 
 -   #--------------------------------------------------------------------------
 
 -   def execute_action_skill
 
 -     skill = @active_battler.action.skill
 
 -     text = @active_battler.name + skill.message1
 
 -     @message_window.add_instant_text(text)
 
 -     unless skill.message2.empty?
 
 -       wait(10)
 
 -       @message_window.add_instant_text(skill.message2)
 
 -     end
 
 -     targets = @active_battler.action.make_targets
 
 -     display_animation(targets, skill.animation_id)
 
 -     @active_battler.mp -= @active_battler.calc_mp_cost(skill)
 
 -     @active_battler.hp -= yy if skill.id == xx # 刚才xx、yy是多少这里就写多少
 
 -     $game_temp.common_event_id = skill.common_event_id
 
 -     for target in targets
 
 -       target.skill_effect(@active_battler, skill)
 
 -       display_action_effects(target, skill)
 
 -     end
 
 -   end
 
  复制代码 3、Scene_Skill类下找到:-   #--------------------------------------------------------------------------
 
 -   # ● 非同伴目标使用物品
 
 -   #--------------------------------------------------------------------------
 
 -   def use_skill_nontarget
 
 -     Sound.play_use_skill
 
 -     @actor.mp -= @actor.calc_mp_cost(@skill)
 
 -     @actor.hp -= yy if @skill.id == xx # 刚才xx、yy是多少这里就写多少
 
 -     @status_window.refresh
 
 -     @skill_window.refresh
 
 -     @target_window.refresh
 
 -     if $game_party.all_dead?
 
 -       $scene = Scene_Gameover.new
 
 -     elsif @skill.common_event_id > 0
 
 -       $game_temp.common_event_id = @skill.common_event_id
 
 -       $scene = Scene_Map.new
 
 -     end
 
 -   end
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |