赞 | 24 |
VIP | 42 |
好人卡 | 1 |
积分 | 54 |
经验 | 35020 |
最后登录 | 2024-11-10 |
在线时间 | 1017 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 5374
- 在线时间
- 1017 小时
- 注册时间
- 2007-8-13
- 帖子
- 186
|
6楼
楼主 |
发表于 2013-1-29 18:34:09
|
只看该作者
找到了- # Mini_Vip_System by Sion
- # 66rpg.com 转载请注明出处
- # 说明:在角色备注里加入<vip> 则当vip附加战斗不能状态时Gameover
-
-
- module BattleManager
-
- def self.judge_win_loss #覆盖默认方法
- if @phase
- return process_vip_dead if $game_party.vip_dead?
- return process_abort if $game_party.members.empty?
- return process_defeat if $game_party.all_dead?
- return process_victory if $game_troop.all_dead?
- return process_abort if aborting?
- end
- return false
- end
-
- def self.process_vip_dead
- $game_message.add(sprintf("VIP挂了,任务失败……"))
- wait_for_message
- SceneManager.goto(Scene_Gameover)
- battle_end(2)
- return true
- end
-
- end
-
-
- class Scene_Base
-
- def check_gameover #覆盖默认方法
- SceneManager.goto(Scene_Gameover) if $game_party.all_dead?
- SceneManager.goto(Scene_Gameover) if $game_party.vip_dead?
- end
-
- end
-
-
- class Game_Party
-
- def vip_dead?
- $game_party.dead_members.each do |actor| actor.is_vip?
- return true if actor.is_vip?
- end
- return false
- end
-
- end
-
-
- class Game_Actor
-
- def is_vip?
- object = $data_actors[@actor_id]
- object.note.each_line do |line|
- return true if line.include?("<vip>")
- end
- return false
- end
-
- end
复制代码 |
|