赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 0 |
经验 | 648 |
最后登录 | 2012-1-26 |
在线时间 | 46 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 49
- 在线时间
- 46 小时
- 注册时间
- 2011-10-7
- 帖子
- 95
|
本帖最后由 我不是字母君 于 2011-10-9 21:16 编辑
- DISABLE_ATTACK=[1]#无法攻击的战斗者
- #DISABLE_ITEM=[]#无法使用物品的战斗者#已经作废
- DISABLE_SKILL=[]#无法使用技能的战斗者
- DISABLE_GUARD=[1]#无法防御的战斗者
- ACTOR_SKILLWORD=["剑法","枪法","斧法","袭杀","箭法","火統","白魔法","黑魔法"]
- class Window_BattleCommand < Window_Selectable
- def initialize(actor=$game_party.actors[0])
- super(240, 240 , 160, 160)
- @actor=actor
- @item_max = 0
- @commands = []
- refresh
- self.index = 0
- end
- def refresh
- if !DISABLE_ATTACK.include?(@actor.id)
- @commands.push "攻击"
- end
- if !DISABLE_SKILL.include?(@actor.id)
- for i in [email protected]
- skill = ACTOR_SKILLWORD[@actor.id-1]
- if skill==nil
- skill="特技"
- end
- if skill != nil and [email protected]?(skill)
- desc = ""
- desc += skill
- @commands.push(desc)
- end
-
- end
- end
- if !DISABLE_GUARD.include?(@actor.id)
- @commands.push "防御"
- end
- if @actor.id==1
- @commands.push "物品"
- end
- @item_max = @commands.size
- height = @item_max * 32 + 32
- if height > 320
- height = 320
- end
- self.y =320 - height
- self.height= height
- self.contents = Bitmap.new(width - 32, @item_max * 32)
- self.contents.clear
- for i in 0...@item_max
- draw_item(i, normal_color)
- end
- end
- def command
- return @commands[self.index]
- end
- def draw_item(index, color)
- self.contents.font.color = color
- rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
- self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
- self.contents.draw_text(rect, @commands[index])
- end
- def disable_item(index)
- draw_item(index, disabled_color)
- end
- end
- class Scene_Battle
- def main
- # 初始化战斗用的各种暂时数据
- $game_temp.in_battle = true
- $game_temp.battle_turn = 0
- $game_temp.battle_event_flags.clear
- $game_temp.battle_abort = false
- $game_temp.battle_main_phase = false
- $game_temp.battleback_name = $game_map.battleback_name
- $game_temp.forcing_battler = nil
- # 初始化战斗用事件解释器
- $game_system.battle_interpreter.setup(nil, 0)
- # 准备队伍
- @troop_id = $game_temp.battle_troop_id
- $game_troop.setup(@troop_id)
- # 生成角色命令窗口
- s1 = $data_system.words.attack
- s2 = $data_system.words.skill
- s3 = $data_system.words.guard
- s4 = $data_system.words.item
- @actor_command_window = Window_BattleCommand.new###只改这行……
- @actor_command_window.y = 160
- @actor_command_window.back_opacity = 160
- @actor_command_window.active = false
- @actor_command_window.visible = false
- # 生成其它窗口
- @party_command_window = Window_PartyCommand.new
- @help_window = Window_Help.new
- @help_window.back_opacity = 160
- @help_window.visible = false
- @status_window = Window_BattleStatus.new
- @message_window = Window_Message.new
- # 生成活动块
- @spriteset = Spriteset_Battle.new
- # 初始化等待计数
- @wait_count = 0
- # 执行过渡
- if $data_system.battle_transition == ""
- Graphics.transition(20)
- else
- Graphics.transition(40, "Graphics/Transitions/" +
- $data_system.battle_transition)
- end
- # 开始自由战斗回合
- start_phase1
- # 主循环
- loop do
- # 刷新游戏画面
- Graphics.update
- # 刷新输入信息
- Input.update
- # 刷新画面
- update
- # 如果画面切换的话就中断循环
- if $scene != self
- break
- end
- end
- # 刷新地图
- $game_map.refresh
- # 准备过渡
- Graphics.freeze
- # 释放窗口
- @actor_command_window.dispose
- @party_command_window.dispose
- @help_window.dispose
- @status_window.dispose
- @message_window.dispose
- if @skill_window != nil
- @skill_window.dispose
- end
- if @item_window != nil
- @item_window.dispose
- end
- if @result_window != nil
- @result_window.dispose
- end
- # 释放活动块
- @spriteset.dispose
- # 标题画面切换中的情况
- if $scene.is_a?(Scene_Title)
- # 淡入淡出画面
- Graphics.transition
- Graphics.freeze
- end
- # 战斗测试或者游戏结束以外的画面切换中的情况
- if $BTEST and not $scene.is_a?(Scene_Gameover)
- $scene = nil
- end
- end
- def phase3_setup_command_window
- # 同伴指令窗口无效化
- @party_command_window.active = false
- @party_command_window.visible = false
- @actor_command_window.dispose
- @actor_command_window=Window_BattleCommand.new(@active_battler)
- @actor_command_window.active = true
- @actor_command_window.visible = true
- # 设置角色指令窗口的位置
- @actor_command_window.x = @actor_index * 160
- # 设置索引为 0
- @actor_command_window.index = 0
- end
- def update_phase3_basic_command
- # 按下 B 键的情况下
- if Input.trigger?(Input::B)
- # 演奏取消 SE
- $game_system.se_play($data_system.cancel_se)
- # 转向前一个角色的指令输入
- phase3_prior_actor
- return
- end
- # 按下 C 键的情况下
- if Input.trigger?(Input::C)
- # 角色指令窗口光标位置分之
- if @actor_command_window.command == "攻击"
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 设置行动
- @active_battler.current_action.kind = 0
- @active_battler.current_action.basic = 0
- # 开始选择敌人
- start_enemy_select
- elsif @actor_command_window.command == "防御"
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 设置行动
- @active_battler.current_action.kind = 0
- @active_battler.current_action.basic = 1
- # 转向下一位角色的指令输入
- phase3_next_actor
- elsif @actor_command_window.command == "逃跑"
- # 不能逃跑的情况下
- if $game_temp.battle_can_escape == false
- # 演奏冻结 SE
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 逃走处理
- update_phase2_escape
- elsif @actor_command_window.command == "物品"
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 设置行动
- @active_battler.current_action.kind = 2
- # 开始选择物品
- start_item_select
- else
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 设置行动
- @active_battler.current_action.kind = 1
- # 开始选择特技
- start_skill_select
- end
- return
- end
- end
- def start_skill_select
- # 生成特技窗口
- @skill_window=Window_Skill.new(@active_battler)
- # 关联帮助窗口
- @skill_window.help_window = @help_window
- # 无效化角色指令窗口
- @actor_command_window.active = false
- @actor_command_window.visible = false
- end
- end
复制代码 新·改版这个可真的是精品了。如果有去战斗逃跑条的脚本,尽量把此脚本放在普通脚本后面,系统脚本的前面。
某前辈写的冲突爆版本:http://www.66rpg.com/htm/news792.htm���
���
���
4号特罗西,就对应["剑法","枪法","斧法","袭杀","箭法","火統","白魔法","黑魔法"]中的第四个,袭杀���
修改了。可以让除了阿尔同学的所有人不能使用物品���这是新版效果���
如果要用原版实现此效果,必须修改DISABLE_ITEM设置为所有除1号角色外的角色ID,灰常麻烦 |
|