幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1706|回复: 9

[原创]半自动战斗……1。8更新1.01版,修正了两个BUG

[复制链接]

32

主题

1176

帖子

10216万

积分

⑥精研

大家都爱好少年

积分
102162186
发表于 2007-12-14 22:08:42 | 显示全部楼层 |阅读模式
点此看截图
  1. #====================================================
  2. # 制作:夜无边
  3. # 版本:1。01
  4. # 冲突可能:未知,战斗类的脚本都可能。有问题请联系本人:
  5. # QQ:315339915,E-mail:[email]s065741@mailserv.cuhk.edu.hk[/email]
  6. # MSN: [email]lvqing1988@hotmail.com[/email]
  7. # 说明:把本脚本插入MAIN之前,平时战斗按C就可以呼出菜单。
  8. # 附注:本脚本附带了一个画血条的draw_meter,是从别人的脚本里截取出来的= =
  9. # 但我自己也忘记了具体是哪个脚本……于是向该作者表示感谢……(OJZ)
  10. # 关于蓄力速度的计算方法,默认是速度(agi)和一个固定值的反比。
  11. # 如有更好的方法请告诉我……
  12. #====================================================
  13. module LVQING
  14.   ATTACK=0 #在无法使用特技或道具时是否使用0普通攻击/1防御/2什么也不做
  15.   
  16.   SPEED=1 #蓄劲速度比例,1为平时,小于1为慢,大于1为快
  17.   
  18.   # 回合的计算方式,0为按人数计算,每人行动完毕算一回合,1为按时间算,
  19.   # 固定循环了某一祯数为一回合,循环数在下边TIME设定。
  20.   # 主要是为了方便设置战斗事件和考虑不能行动的状态。
  21.   TURN=1
  22.   TIME=100
  23.   
  24.   #这个最好不要改,是设定一次攻击之后,隔多少祯才能再按出菜单来。
  25.   # 为0的话会有问题的……不然自己试试就明白了= =bb
  26.   INPUT=20
  27. end
  28. #====================================================
  29. class Game_Battler
  30.   attr_accessor :ct
  31.   attr_accessor :maxct
  32.   def initialize
  33.     @battler_name = ""
  34.     @battler_hue = 0
  35.     @hp = 0
  36.     @sp = 0
  37.     @states = []
  38.     @states_turn = {}
  39.     @maxhp_plus = 0
  40.     @maxsp_plus = 0
  41.     @str_plus = 0
  42.     @dex_plus = 0
  43.     @agi_plus = 0
  44.     @int_plus = 0
  45.     @hidden = false
  46.     @immortal = false
  47.     @damage_pop = false
  48.     @damage = nil
  49.     @critical = false
  50.     @animation_id = 0
  51.     @animation_hit = false
  52.     @white_flash = false
  53.     @blink = false
  54.     @current_action = Game_BattleAction.new
  55.     @ct=0
  56.     @maxct=0
  57.   end
  58.   #--------------------------------------------------------------------------
  59.   # ● 获取 MaxCT
  60.   #--------------------------------------------------------------------------
  61.   def maxct
  62.     n=10000
  63.     return n
  64.   end
  65.   #--------------------------------------------------------------------------
  66. end
  67. class Window_Base < Window
  68.   #--------------------------------------------------------------------------
  69.   # ○ ゲージを描画
  70.   #--------------------------------------------------------------------------
  71.   def draw_meter(now, max, x, y, width, height, start_color, end_color=start_color )
  72.     color=Color.new(128, 128, 128, 128)
  73.     color1 = Color.new(192, 192, 192, 255)
  74.     self.contents.fill_rect(x, y, width, height, color1)
  75.     self.contents.fill_rect(x+1,y+1, width-1*2, height-1*2, color)
  76.     now = now > max ? max : now
  77.     percentage = max != 0 ? (width-2) * now / max.to_f : 0
  78.     if start_color == end_color
  79.       self.contents.fill_rect(x+1, y+1, percentage, height-2, start_color)
  80.     else
  81.       for i in 1..percentage
  82.         r = start_color.red + (end_color.red - start_color.red) / percentage * i
  83.         g = start_color.green + (end_color.green - start_color.green) / percentage * i
  84.         b = start_color.blue + (end_color.blue - start_color.blue) / percentage * i
  85.         a = start_color.alpha + (end_color.alpha - start_color.alpha) / percentage * i
  86.         self.contents.fill_rect(x+i, y+1, 1, height-2, Color.new(r, g, b, a))
  87.       end
  88.     end
  89.   end
  90. end
  91. #==============================================================================
  92. # ■ Scene_Battle (分割定义 1)
  93. #------------------------------------------------------------------------------
  94. #  处理战斗画面的类。
  95. #==============================================================================
  96. class Scene_Battle
  97.   #--------------------------------------------------------------------------
  98.   # ● 主处理
  99.   #--------------------------------------------------------------------------
  100.   def main
  101.     @jjudge=LVQING::INPUT
  102.     @st=0
  103.     # 初始化战斗用的各种暂时数据
  104.     $game_temp.in_battle = true
  105.     $game_temp.battle_turn = 0
  106.     $game_temp.battle_event_flags.clear
  107.     $game_temp.battle_abort = false
  108.     $game_temp.battle_main_phase = false
  109.     $game_temp.battleback_name = $game_map.battleback_name
  110.     $game_temp.forcing_battler = nil
  111.     #-----------------------------------
  112.     # 初始化战斗用事件解释器
  113.     $game_system.battle_interpreter.setup(nil, 0)
  114.     # 准备队伍
  115.     @active_actor
  116.     @action_battlers=[]
  117.     @troop_id = $game_temp.battle_troop_id
  118.     $game_troop.setup(@troop_id)
  119.     # 生成角色命令窗口
  120.     s1 = $data_system.words.attack
  121.     s2 = $data_system.words.skill
  122.     s3 = $data_system.words.guard
  123.     s4 = $data_system.words.item
  124.     @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4,"逃跑"])
  125.     @actor_command_window.y = 128
  126.     @actor_command_window.active = false
  127.     @actor_command_window.visible = false
  128.     # 生成其它窗口
  129.     @help_window = Window_Help.new
  130.     @help_window.back_opacity = 160
  131.     @help_window.visible = false
  132.     @status_window = Window_BattleStatus.new
  133.     @message_window = Window_Message.new
  134.       for battler in $game_party.actors
  135.         battler.ct=rand(100)
  136.       end
  137.       for battler in $game_troop.enemies
  138.         battler.ct=rand(100)
  139.       end
  140.     # 生成活动块
  141.     @spriteset = Spriteset_Battle.new
  142.     # 初始化等待计数
  143.     @wait_count = 0
  144.     # 执行过渡
  145.     if $data_system.battle_transition == ""
  146.       Graphics.transition(20)
  147.     else
  148.       Graphics.transition(40, "Graphics/Transitions/" +
  149.         $data_system.battle_transition)
  150.     end
  151.     # 开始自由战斗回合
  152.     start_phase1
  153.     # 主循环
  154.     loop do
  155.       # 刷新游戏画面
  156.       Graphics.update
  157.       # 刷新输入信息
  158.       Input.update
  159.       # 刷新画面
  160.       update
  161.       # 如果画面切换的话就中断循环
  162.       if $scene != self
  163.         break
  164.       end
  165.     end
  166.     # 刷新地图
  167.     $game_map.refresh
  168.     # 准备过渡
  169.     Graphics.freeze
  170.     @actor_command_window.dispose
  171.     @help_window.dispose
  172.     @status_window.dispose
  173.     @message_window.dispose
  174.     if @skill_window != nil
  175.       @skill_window.dispose
  176.     end
  177.     if @item_window != nil
  178.       @item_window.dispose
  179.     end
  180.     if @result_window != nil
  181.       @result_window.dispose
  182.     end
  183.     # 释放活动块
  184.     @spriteset.dispose
  185.     # 标题画面切换中的情况
  186.     if $scene.is_a?(Scene_Title)
  187.       # 淡入淡出画面
  188.       Graphics.transition
  189.       Graphics.freeze
  190.     end
  191.     # 战斗测试或者游戏结束以外的画面切换中的情况
  192.     if $BTEST and not $scene.is_a?(Scene_Gameover)
  193.       $scene = nil
  194.     end
  195.   end
  196.   #--------------------------------------------------------------------------
  197.   # ● 刷新画面
  198.   #--------------------------------------------------------------------------
  199.   def update
  200.     # 执行战斗事件中的情况下
  201.     if $game_system.battle_interpreter.running?
  202.       # 刷新解释器
  203.       $game_system.battle_interpreter.update
  204.       # 强制行动的战斗者不存在的情况下
  205.       if $game_temp.forcing_battler == nil
  206.         # 执行战斗事件结束的情况下
  207.         unless $game_system.battle_interpreter.running?
  208.           # 继续战斗的情况下、再执行战斗事件的设置
  209.           unless judge
  210.             setup_battle_event
  211.           end
  212.         end
  213.         # 如果不是结束战斗回合的情况下
  214.         if @phase != 5
  215.           # 刷新状态窗口
  216.           @status_window.refresh
  217.         end
  218.       end
  219.     end
  220.     # 系统 (计时器)、刷新画面
  221.     $game_system.update
  222.     $game_screen.update
  223.     # 计时器为 0 的情况下
  224.     if $game_system.timer_working and $game_system.timer == 0
  225.       # 中断战斗
  226.       $game_temp.battle_abort = true
  227.     end
  228.     # 刷新窗口
  229.     @help_window.update
  230.     #@party_command_window.update
  231.     @actor_command_window.update
  232.     @status_window.update
  233.     @message_window.update
  234.     # 刷新活动块
  235.     @spriteset.update
  236.     # 处理过渡中的情况下
  237.     if $game_temp.transition_processing
  238.       # 清除处理过渡中标志
  239.       $game_temp.transition_processing = false
  240.       # 执行过渡
  241.       if $game_temp.transition_name == ""
  242.         Graphics.transition(20)
  243.       else
  244.         Graphics.transition(40, "Graphics/Transitions/" +
  245.           $game_temp.transition_name)
  246.       end
  247.     end
  248.     # 显示信息窗口中的情况下
  249.     if $game_temp.message_window_showing
  250.       return
  251.     end
  252.     # 显示效果中的情况下
  253.     if @spriteset.effect?
  254.       return
  255.     end
  256.     # 游戏结束的情况下
  257.     if $game_temp.gameover
  258.       # 切换到游戏结束画面
  259.       $scene = Scene_Gameover.new
  260.       return
  261.     end
  262.     # 返回标题画面的情况下
  263.     if $game_temp.to_title
  264.       # 切换到标题画面
  265.       $scene = Scene_Title.new
  266.       return
  267.     end
  268.     # 中断战斗的情况下
  269.     if $game_temp.battle_abort
  270.       # 还原为战斗前的 BGM
  271.       $game_system.bgm_play($game_temp.map_bgm)
  272.       # 战斗结束
  273.       battle_end(1)
  274.       return
  275.     end
  276.     # 等待中的情况下
  277.     if @wait_count > 0
  278.       # 减少等待计数
  279.       @wait_count -= 1
  280.       return
  281.     end
  282.     # 强制行动的角色存在、
  283.     # 并且战斗事件正在执行的情况下
  284.     if $game_temp.forcing_battler == nil and
  285.       $game_system.battle_interpreter.running?
  286.       return
  287.     end
  288.     update_ct
  289.     # 回合分支
  290.   end
  291.   #--------------------------------------------------------------------------
  292.   # ● 刷新CT
  293.   #--------------------------------------------------------------------------
  294.   def judge_ct
  295.     return @actor_command_window.visible == false && @phase !=3 && @phase != 5 && @phase != 4 && @item_window == nil && @skill_window == nil
  296.   end
  297.   def update_ct
  298.     case @phase
  299.         when 0
  300.           if @jjudge <20
  301.             @jjudge += 1
  302.           end
  303.         when 1  # 自由战斗回合
  304.           update_phase1
  305.         when 3  # 角色命令回合
  306.           update_phase3
  307.         when 4
  308.           update_phase4
  309.         when 5  # 战斗结束回合
  310.           update_phase5
  311.         end
  312.     if judge_ct
  313.       for i in 0...$game_party.actors.size
  314.       actor = $game_party.actors[i]
  315.         if actor.movable? && !actor.dead?
  316.           if actor.ct < 10000
  317.           actor.ct += actor.agi/LVQING::SPEED
  318.           else
  319.           @active_actor=actor
  320.           @action_battlers.push(@active_actor)
  321.           actor.ct=0
  322.               # 搜索全页的战斗事件
  323.             for index in 0...$data_troops[@troop_id].pages.size
  324.               # 获取事件页
  325.               page = $data_troops[@troop_id].pages[index]
  326.               # 本页的范围是 [回合] 的情况下
  327.               if page.span == 1
  328.                 # 设置已经执行标志
  329.                 $game_temp.battle_event_flags[index] = false
  330.               end
  331.             end
  332.           end
  333.           @status_window.refresh_ct(actor)
  334.         end
  335.       end
  336.       for i in 0...$game_troop.enemies.size
  337.         enemy = $game_troop.enemies[i]
  338.         if enemy.movable? && !enemy.dead?
  339.           if enemy.ct < 10000
  340.             enemy.ct += enemy.agi/LVQING::SPEED
  341.           else         
  342.             @active_actor=enemy
  343.             @action_battlers.push(@active_actor)
  344.             enemy.ct=0
  345.                 # 搜索全页的战斗事件
  346.             for index in 0...$data_troops[@troop_id].pages.size
  347.               # 获取事件页
  348.               page = $data_troops[@troop_id].pages[index]
  349.               # 本页的范围是 [回合] 的情况下
  350.               if page.span == 1
  351.                 # 设置已经执行标志
  352.                 $game_temp.battle_event_flags[index] = false
  353.               end
  354.             end
  355.           end
  356.         end
  357.       end
  358.           # 自然解除状态
  359.     #==========================================
  360.     if LVQING::TURN == 1
  361.     #@active_battler.remove_states_auto
  362.     if @st < LVQING::TIME
  363.       @st+=1
  364.     else
  365.       $game_temp.battle_turn += 1
  366.       for battler in $game_party.actors
  367.          battler.remove_states_auto
  368.       end
  369.       for battler in $game_troop.enemies
  370.          battler.remove_states_auto
  371.        end
  372.        @st=0
  373.      end
  374.     end
  375.     #==========================================
  376.       if @action_battlers != []
  377.         start_phase4
  378.       end
  379.       if Input.trigger?(Input::C) && judge_ct && (@jjudge == LVQING::INPUT)
  380.         start_phase3
  381.       end
  382.     end
  383.   end
  384. #======================scene_battle2===============================
  385.   def start_phase1
  386.     # 转移到回合 1
  387.     @phase = 1
  388.     # 清除全体同伴的行动
  389.     $game_party.clear_actions
  390.     # 设置战斗事件
  391.     setup_battle_event
  392.   end
  393.   def update_phase1
  394.     # 胜败判定
  395.     if judge
  396.       # 胜利或者失败的情况下 : 过程结束
  397.       return
  398.     end
  399.     # 开始同伴命令回合
  400.     start_phase3
  401.   end
  402.   def update_phase2_escape
  403.     # 计算敌人速度的平均值
  404.     enemies_agi = 0
  405.     enemies_number = 0
  406.     for enemy in $game_troop.enemies
  407.       if enemy.exist?
  408.         enemies_agi += enemy.agi
  409.         enemies_number += 1
  410.       end
  411.     end
  412.     if enemies_number > 0
  413.       enemies_agi /= enemies_number
  414.     end
  415.     # 计算角色速度的平均值
  416.     actors_agi = 0
  417.     actors_number = 0
  418.     for actor in $game_party.actors
  419.       if actor.exist?
  420.         actors_agi += actor.agi
  421.         actors_number += 1
  422.       end
  423.     end
  424.     if actors_number > 0
  425.       actors_agi /= actors_number
  426.     end
  427.     # 逃跑成功判定
  428.     success = rand(100) < 50 * actors_agi / enemies_agi
  429.     # 成功逃跑的情况下
  430.     if success
  431.       # 演奏逃跑 SE
  432.       $game_system.se_play($data_system.escape_se)
  433.       $game_system.bgm_play($game_temp.map_bgm)
  434.       # 战斗结束
  435.       battle_end(1)
  436.     # 逃跑失败的情况下
  437.       else
  438.       # 清除全体同伴的行动
  439.       # 开始主回合
  440.       @actor_command_window.visible=false
  441.       @actor_command_window.active=false
  442.     end
  443.   end
  444.   def phase3_setup_command_window
  445.     # 角色指令窗口无效化
  446.     @actor_command_window.active = true
  447.     @actor_command_window.visible = true
  448.     # 设置角色指令窗口的位置
  449.     @actor_command_window.x = @actor_index * 160
  450.     # 设置索引为 0
  451.     @actor_command_window.index = 0
  452.   end
  453.   def start_phase3
  454.     @phase = 3
  455.     @actor_index = -1
  456.     @active_battler = nil
  457.     phase3_next_actor
  458.   end
  459.   def phase3_next_actor
  460.     # 循环
  461.     begin
  462.       # 角色的明灭效果 OFF
  463.       if @active_battler != nil
  464.         @active_battler.blink = false
  465.       end
  466.       # 最后的角色的情况
  467.       if @actor_index == $game_party.actors.size-1
  468.         @jjudge=0
  469.         @actor_command_window.active = false
  470.         @actor_command_window.visible = false
  471.         @actor_index=-1
  472.         @phase = 0
  473.         return
  474.       end
  475.       # 推进角色索引
  476.       @actor_index += 1
  477.       @active_battler = $game_party.actors[@actor_index]
  478.       @active_battler.blink = true
  479.     # 如果角色是在无法接受指令的状态就再试
  480.     end until @active_battler.inputable?
  481.     # 设置角色的命令窗口
  482.     phase3_setup_command_window
  483.   end
  484.   def phase3_prior_actor
  485.     # 循环
  486.     begin
  487.       # 角色的明灭效果 OFF
  488.       if @active_battler != nil
  489.         @active_battler.blink = false
  490.       end
  491.       # 最初的角色的情况下
  492.       if @actor_index == 0
  493.           @actor_command_window.visible=false
  494.           @actor_command_window.active=false
  495.           @phase=0
  496.         return
  497.       end
  498.       # 返回角色索引
  499.       @actor_index -= 1
  500.       @active_battler = $game_party.actors[@actor_index]
  501.       @active_battler.blink = true
  502.     # 如果角色是在无法接受指令的状态就再试
  503.     end until @active_battler.inputable?
  504.     # 设置角色的命令窗口
  505.     phase3_setup_command_window
  506.   end
  507.   def phase3_setup_command_window
  508.     # 角色指令窗口无效化
  509.     @actor_command_window.active = true
  510.     @actor_command_window.visible = true
  511.     # 设置角色指令窗口的位置
  512.     @actor_command_window.x = 240
  513.     # 设置索引为 0
  514.     @actor_command_window.index = 0
  515.   end
  516. end
  517. class Scene_Battle
  518.   def start_phase4
  519.     # 转移到回合 4
  520.     @phase = 4
  521.     # 回合数计数
  522.     # 搜索全页的战斗事件
  523.     for index in 0...$data_troops[@troop_id].pages.size
  524.       # 获取事件页
  525.       page = $data_troops[@troop_id].pages[index]
  526.       # 本页的范围是 [回合] 的情况下
  527.       if page.span == 1
  528.         # 设置已经执行标志
  529.         $game_temp.battle_event_flags[index] = false
  530.       end
  531.     end
  532.     # 设置角色为非选择状态
  533.     @actor_index = -1
  534.     @active_battler = nil
  535.     @actor_command_window.active = false
  536.     @actor_command_window.visible = false
  537.     # 设置主回合标志
  538.     $game_temp.battle_main_phase = true
  539.     # 生成敌人行动
  540.     for enemy in $game_troop.enemies
  541.       enemy.make_action
  542.     end
  543.     #-----------------------------------------
  544.     # 生成行动顺序
  545.     # 移动到步骤 1
  546.     @phase4_step = 1
  547.     #----------------------------------------
  548.   end
  549.   def update_phase4_step1
  550.     # 隐藏帮助窗口
  551.     @help_window.visible = false
  552.     # 判定胜败
  553.     if judge
  554.       # 胜利或者失败的情况下 : 过程结束
  555.       return
  556.     end
  557.     # 强制行动的战斗者不存在的情况下
  558.     if $game_temp.forcing_battler == nil
  559.       # 设置战斗事件
  560.       setup_battle_event
  561.       # 执行战斗事件中的情况下
  562.       if $game_system.battle_interpreter.running?
  563.         return
  564.       end
  565.     end
  566.     # 强制行动的战斗者存在的情况下
  567.     if $game_temp.forcing_battler != nil
  568.       # 在头部添加后移动
  569.       @action_battlers.delete($game_temp.forcing_battler)
  570.       @action_battlers.unshift($game_temp.forcing_battler)
  571.     end
  572.     # 未行动的战斗者不存在的情况下 (全员已经行动)
  573.     if @action_battlers.size == 0
  574.       @phase=0
  575.       return
  576.     end
  577.     # 初始化动画 ID 和公共事件 ID
  578.     @animation1_id = 0
  579.     @animation2_id = 0
  580.     @common_event_id = 0
  581.     # 未行动的战斗者移动到序列的头部
  582.     @active_battler = @action_battlers.shift
  583.     # 如果已经在战斗之外的情况下
  584.     if @active_battler.index == nil
  585.       return
  586.     end
  587.     # 连续伤害
  588.     if @active_battler.hp > 0 and @active_battler.slip_damage?
  589.       @active_battler.slip_damage_effect
  590.       @active_battler.damage_pop = true
  591.     end
  592.     # 自然解除状态
  593.     #==========================================
  594.     if LVQING::TURN == 0
  595.     $game_temp.battle_turn += 1
  596.     #@active_battler.remove_states_auto
  597.     if @st < $game_party.actors.size+$game_troop.enemies.size
  598.       @st+=1
  599.     else
  600.       for battler in $game_party.actors
  601.          battler.remove_states_auto
  602.       end
  603.       for battler in $game_troop.enemies
  604.          battler.remove_states_auto
  605.        end
  606.        @st=0
  607.      end
  608.     end
  609.     #==========================================
  610.     # 刷新状态窗口
  611.     @status_window.refresh
  612.     # 移至步骤 2
  613.     @phase4_step = 2
  614.   end
  615.   def make_skill_action_result
  616.     # 获取特技
  617.     @skill = $data_skills[@active_battler.current_action.skill_id]
  618.     # 如果不是强制行动
  619.     unless @active_battler.current_action.forcing
  620.       # 因为 SP 耗尽而无法使用的情况下
  621.       unless @active_battler.skill_can_use?(@skill.id)
  622.         # 清除强制行动对像的战斗者
  623. #-------------------------------------------------
  624.     if LVQING::ATTACK==0
  625.         @active_battler.current_action.kind = 0
  626.         @active_battler.current_action.basic = 0
  627.         make_basic_action_result
  628.         return
  629.       end
  630.     if LVQING::ATTACK==1
  631.       @active_battler.current_action.kind = 0
  632.       @active_battler.current_action.basic =1
  633.       # 帮助窗口显示"防御"
  634.       @help_window.set_text($data_system.words.guard, 1)
  635.       @phase4_step=1
  636.       return
  637.     end
  638.     if LVQING::ATTACK==2
  639.       $game_temp.forcing_battler = nil
  640.         # 移至步骤 1
  641.       @phase4_step = 1
  642.       return
  643.     end
  644. #-------------------------------------------------   
  645.     end
  646.     end
  647.     # 消耗 SP
  648.     @active_battler.sp -= @skill.sp_cost
  649.     # 刷新状态窗口
  650.     @status_window.refresh
  651.     # 在帮助窗口显示特技名
  652.     @help_window.set_text(@skill.name, 1)
  653.     # 设置动画 ID
  654.     @animation1_id = @skill.animation1_id
  655.     @animation2_id = @skill.animation2_id
  656.     # 设置公共事件 ID
  657.     @common_event_id = @skill.common_event_id
  658.     # 设置对像侧战斗者
  659.     set_target_battlers(@skill.scope)
  660.     # 应用特技效果
  661.     for target in @target_battlers
  662.       target.skill_effect(@active_battler, @skill)
  663.     end
  664.   end
  665.   def make_item_action_result
  666.     # 获取物品
  667.     @item = $data_items[@active_battler.current_action.item_id]
  668.     # 因为物品耗尽而无法使用的情况下
  669.     unless $game_party.item_can_use?(@item.id)
  670. #-------------------------------------------------
  671.       if LVQING::ATTACK==0
  672.           @active_battler.current_action.kind = 0
  673.           @active_battler.current_action.basic = 0
  674.           make_basic_action_result
  675.           return
  676.         end
  677.       if LVQING::ATTACK==1
  678.         @active_battler.current_action.kind = 0
  679.         @active_battler.current_action.basic =1
  680.         # 帮助窗口显示"防御"
  681.         @help_window.set_text($data_system.words.guard, 1)
  682.         @phase4_step=1
  683.         return
  684.       end
  685.       if LVQING::ATTACK==2
  686.         $game_temp.forcing_battler = nil
  687.           # 移至步骤 1
  688.         @phase4_step = 1
  689.         return
  690.       end
  691. #-------------------------------------------------
  692.     end
  693.     if @item.consumable
  694.       $game_party.lose_item(@item.id, 1)
  695.     end
  696.     @help_window.set_text(@item.name, 1)
  697.     @animation1_id = @item.animation1_id
  698.     @animation2_id = @item.animation2_id
  699.     @common_event_id = @item.common_event_id
  700.     index = @active_battler.current_action.target_index
  701.     target = $game_party.smooth_target_actor(index)
  702.     set_target_battlers(@item.scope)
  703.     for target in @target_battlers
  704.       target.item_effect(@item)
  705.     end
  706.   end
  707. end
  708. #----------------------------------------------------
  709. class Window_BattleStatus < Window_Base
  710.   def refresh
  711.     self.contents.clear
  712.     @item_max = $game_party.actors.size
  713.     for i in 0...$game_party.actors.size
  714.       actor = $game_party.actors[i]
  715.       actor_x = i * 160 + 4
  716.       draw_actor_name(actor, actor_x, 0)
  717.       draw_actor_hp(actor, actor_x, 22, 120)
  718.       draw_actor_sp(actor, actor_x, 44, 120)
  719.       @ct_color1 = Color.new(255,160,255,255)
  720.       @ct_color2 = Color.new(145,100,255,255)
  721.       draw_meter(actor.ct, actor.maxct, actor_x, 102, 108, 12, @ct_color1, @ct_color2)
  722.       if @level_up_flags[i]
  723.         self.contents.font.color = normal_color
  724.         self.contents.draw_text(actor_x, 72, 120, 32, "LEVEL UP!")
  725.       else
  726.         draw_actor_state(actor, actor_x,72)
  727.       end
  728.       #--------------------------------
  729.     end
  730.   end
  731.   def refresh_ct(actor)
  732.     actor_x = actor.index * 160 + 4
  733.     draw_meter(actor.ct, actor.maxct, actor_x, 102, 108, 12,  @ct_color1, @ct_color2)
  734.   end
  735. end
复制代码
战,然后死!
回复

使用道具 举报

32

主题

1176

帖子

10216万

积分

⑥精研

大家都爱好少年

积分
102162186
 楼主| 发表于 2007-12-17 01:09:33 | 显示全部楼层
[s:5] 发现问题了,这个脚本在附加了不能行动的状态之后无法自动解除………………
等我有时间回来改……ZZZZZ
战,然后死!
回复 支持 反对

使用道具 举报

4

主题

31

帖子

363

积分

④见习

积分
363
QQ
发表于 2007-12-18 13:14:43 | 显示全部楼层
....赞~~~ [s:8]
...钱啊~~~~~~~~~ =  =|||
回复 支持 反对

使用道具 举报

10

主题

128

帖子

1410

积分

⑥精研

积分
1410
发表于 2007-12-19 13:23:46 | 显示全部楼层
对于我来说会编程的人是神……
郁闷中……
回复 支持 反对

使用道具 举报

32

主题

1176

帖子

10216万

积分

⑥精研

大家都爱好少年

积分
102162186
 楼主| 发表于 2007-12-19 13:29:04 | 显示全部楼层
[s:5] 大家都只是学会的………………
战,然后死!
回复 支持 反对

使用道具 举报

4

主题

7

帖子

79

积分

②入门

积分
79
发表于 2007-12-29 22:34:07 | 显示全部楼层
不好意思...怎么我用不了的...是在MAIN建一个项什么的吗?
新人=死人 菜鸟晕迷死翘翘
回复 支持 反对

使用道具 举报

88

主题

5419

帖子

214748万

积分

版主

S素世上最伟大最华丽

Rank: 7Rank: 7Rank: 7

积分
2147483647
QQ
发表于 2007-12-29 23:00:06 | 显示全部楼层
呵呵,加油~[s:1]

貌似发现许多
#    @xxx
回复 支持 反对

使用道具 举报

32

主题

1176

帖子

10216万

积分

⑥精研

大家都爱好少年

积分
102162186
 楼主| 发表于 2008-1-7 20:48:26 | 显示全部楼层
复制全部代码在MAIN前插入就可以了
不过这个版本有BUG
目前还没完全整理好……
有一次战斗测试的时候我莫名退出了……但到现在还没DEBUG出来……= =+因为那个错只出了一次……
P。S 嗯,因为不想完全删除原来的脚本……可以给其他人做个参考什么的= =[虽然也没啥技术含量……]
战,然后死!
回复 支持 反对

使用道具 举报

4

主题

7

帖子

79

积分

②入门

积分
79
发表于 2008-1-19 23:36:31 | 显示全部楼层
不是我找抽...但是...怎么没反应的...
新人=死人 菜鸟晕迷死翘翘
回复 支持 反对

使用道具 举报

32

主题

1176

帖子

10216万

积分

⑥精研

大家都爱好少年

积分
102162186
 楼主| 发表于 2008-1-19 23:40:59 | 显示全部楼层
[s:6] 不知道,可能是RP问题。。。
战,然后死!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2025-6-21 01:02 , Processed in 0.012584 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表