Project1

标题: vx怎么做超级横版,比如《幽兰镇魂曲》那样的 [打印本页]

作者: orzbai0593    时间: 2008-4-26 20:17
提示: 作者被禁止或删除 内容自动屏蔽
作者: 小幽的马甲    时间: 2008-4-26 21:03
那个还得用脚本吧...
作者: iamtenten    时间: 2008-4-26 21:06
提示: 作者被禁止或删除 内容自动屏蔽
作者: Fantasy幻想    时间: 2008-4-26 21:31
  1. #==============================================================================
  2. # ■ 行走图横版战斗[Ver.1.0.1]   
  3. #------------------------------------------------------------------------------
  4. # 脚本原出处 [http://www.rpgcrisis.net]
  5. #------------------------------------------------------------------------------
  6. #  原作者:未知(日本人)
  7. #  中文汉化:火鸡三毛老大
  8. #==============================================================================

  9. module Battle_Formation
  10. #------------------------------------------------------------------------------
  11.   FORM = {
  12. # 战斗位置 =>
  13.     #    [角色1x.y]  [角色2x.y]  [角色3x.y]  [角色4x.y]
  14.     0 => [[380,150], [400, 230], [460, 170], [480, 250]]
  15.   }
  16. #------------------------------------------------------------------------------
  17. end
  18. #==============================================================================
  19. # ■ Game_System
  20. #==============================================================================
  21. class Game_System
  22.   attr_accessor :battle_formation                # Formation ID
  23.   #--------------------------------------------------------------------------
  24.   # ● オブジェクト初期化
  25.   #--------------------------------------------------------------------------
  26.   alias init_game_system initialize
  27.   def initialize
  28.     init_game_system
  29.     @battle_formation = 0              # 初步形成
  30.   end
  31. end

  32. #==============================================================================
  33. # ■ Game_Actor
  34. #==============================================================================
  35. class Game_Actor < Game_Battler
  36.   #--------------------------------------------------------------------------
  37.   # ● 是Sprite的使用? [重新界定]
  38.   #--------------------------------------------------------------------------
  39.   def use_sprite?
  40.     return true
  41.   end
  42.   #--------------------------------------------------------------------------
  43.   # ● 战斗画面获取X坐标
  44.   #--------------------------------------------------------------------------
  45.   def screen_x
  46.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][0]
  47.   end
  48.   #--------------------------------------------------------------------------
  49.   # ● 战斗画面获取Y坐标
  50.   #--------------------------------------------------------------------------
  51.   def screen_y
  52.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][1]
  53.   end
  54.   #--------------------------------------------------------------------------
  55.   # ● 战斗画面获取z坐标
  56.   #--------------------------------------------------------------------------
  57.   def screen_z
  58.     bitmap = Cache.character(self.character_name)
  59.     # Height + Y Coordinates
  60.     return screen_y + bitmap.height / 4
  61.   end
  62. end



  63. #==============================================================================
  64. # ■ Game_Enemy
  65. #==============================================================================
  66. class Game_Enemy < Game_Battler
  67.   #--------------------------------------------------------------------------
  68.   # ● 战斗画面获取z坐标[重新界定]
  69.   #--------------------------------------------------------------------------
  70.   def screen_z
  71.     bitmap = Cache.battler(self.battler_name, self.battler_hue)
  72.     # Height + Y Coordinates
  73.     return screen_y + bitmap.height
  74.   end
  75. end
  76. #==============================================================================
  77. # ■ VX-RGSS2-6 サイドビュー战斗[Ver.1.0.1]
  78. #------------------------------------------------------------------------------
  79. # 战斗实况告知
  80. #==============================================================================

  81. #==============================================================================
  82. # ■ Scene_Battle
  83. #==============================================================================
  84. class Scene_Battle < Scene_Base
  85.   #--------------------------------------------------------------------------
  86.   # ●  战斗开始进程
  87.   #--------------------------------------------------------------------------
  88.   alias process_battle_start_sideview process_battle_start
  89.   def process_battle_start
  90.     for battler in $game_party.members + $game_troop.members
  91.       battler.move_mode = SideView::M_MODE_WAIT
  92.     end
  93.     process_battle_start_sideview
  94.   end
  95.   #--------------------------------------------------------------------------
  96.   # ● 胜利进程
  97.   #--------------------------------------------------------------------------
  98.   alias process_victory_sideview process_victory
  99.   def process_victory
  100.     for actor in $game_party.members
  101.       actor.move_mode = SideView::M_MODE_WIN
  102.     end
  103.     process_victory_sideview
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 等到活动控制完毕
  107.   #--------------------------------------------------------------------------
  108.   def wait_for_motion
  109.     while @active_battler.motion_stop
  110.       update_basic
  111.     end
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   # ● 执行作战:攻击[重新界定]
  115.   #--------------------------------------------------------------------------
  116.   def execute_action_attack
  117.     text = sprintf(Vocab::DoAttack, @active_battler.name)
  118.     @message_window.add_instant_text(text)
  119.     targets = @active_battler.action.make_targets
  120.     #---Enemy attack sound reproduced.
  121.     if @active_battler.is_a?(Game_Enemy)
  122.       Sound.play_enemy_attack
  123.       wait(15, true)
  124.     end
  125.     #--- Proximity (Going)
  126.     SideView.set_target_point(@active_battler, targets[0])
  127.     @active_battler.move_mode = SideView::M_MODE_ATK1
  128.     @active_battler.motion_stop = true
  129.     wait_for_motion
  130.     #--- Attack
  131.     wait(5)
  132.     @active_battler.move_mode = SideView::M_MODE_ATK2
  133.     #---
  134.     display_attack_animation(targets)
  135.     wait(20)
  136.     for target in targets
  137.       target.attack_effect(@active_battler)
  138.       display_action_effects(target)
  139.     end
  140.     #--- Proximity (Return)
  141.     @active_battler.move_mode = SideView::M_MODE_ATK3
  142.     @active_battler.motion_stop = true
  143.     wait_for_motion
  144.     #---Wait
  145.     for target in targets
  146.       target.move_mode = SideView::M_MODE_WAIT
  147.     end
  148.     @active_battler.move_mode = SideView::M_MODE_WAIT
  149.     #---
  150.   end
  151.   #--------------------------------------------------------------------------
  152.   # ● 执行作战:技能[重新界定]
  153.   #--------------------------------------------------------------------------
  154.   def execute_action_skill
  155.     skill = @active_battler.action.skill
  156.     text = @active_battler.name + skill.message1
  157.     @message_window.add_instant_text(text)
  158.     unless skill.message2.empty?
  159.       wait(10)
  160.       @message_window.add_instant_text(skill.message2)
  161.     end
  162.     #--- Enemy attack sound reproduced.
  163.     if @active_battler.is_a?(Game_Enemy)
  164.       Sound.play_enemy_attack
  165.       wait(15, true)
  166.     end
  167.     #--- Long distance attack.
  168.     @active_battler.move_mode = SideView::M_MODE_MAGI
  169.     #---
  170.     targets = @active_battler.action.make_targets
  171.     display_animation(targets, skill.animation_id)
  172.     @active_battler.mp -= @active_battler.calc_mp_cost(skill)
  173.     $game_temp.common_event_id = skill.common_event_id
  174.     for target in targets
  175.       target.skill_effect(@active_battler, skill)
  176.       display_action_effects(target, skill)
  177.     end
  178.     #---Wait
  179.     for target in targets
  180.       target.move_mode = SideView::M_MODE_WAIT
  181.     end
  182.     @active_battler.move_mode = SideView::M_MODE_WAIT
  183.     #---
  184.   end
  185.   #--------------------------------------------------------------------------
  186.   # 执行作战:物品???[重新界定]
  187.   #--------------------------------------------------------------------------
  188.   def execute_action_item
  189.     item = @active_battler.action.item
  190.     text = sprintf(Vocab::UseItem, @active_battler.name, item.name)
  191.     @message_window.add_instant_text(text)
  192.     #--- Enemy attack sound reproduced.
  193.     if @active_battler.is_a?(Game_Enemy)
  194.       Sound.play_enemy_attack
  195.       wait(15, true)
  196.     end
  197.     #--- Long distance attack
  198.     @active_battler.move_mode = SideView::M_MODE_MAGI
  199.     #---
  200.     targets = @active_battler.action.make_targets
  201.     display_animation(targets, item.animation_id)
  202.     $game_party.consume_item(item)
  203.     $game_temp.common_event_id = item.common_event_id
  204.     for target in targets
  205.       target.item_effect(@active_battler, item)
  206.       display_action_effects(target, item)
  207.     end
  208.     #---Wait
  209.     for target in targets
  210.       target.move_mode = SideView::M_MODE_WAIT
  211.     end
  212.     @active_battler.move_mode = SideView::M_MODE_WAIT
  213.     #---
  214.   end
  215.   #--------------------------------------------------------------------------
  216.   # ● 攻击动画展示[重新界定]
  217.   #     对象:对象的安排
  218.   #--------------------------------------------------------------------------
  219.   # 【改变一部分】
  220.   #  敌人的声音效果是改变了,所以可以用在每一个阶段的运作情况。
  221.   #  它改变了,所以这起攻击动画的一个敌人可以被显示出来。
  222.   #--------------------------------------------------------------------------
  223.   def display_attack_animation(targets)
  224.     display_normal_animation(targets, @active_battler.atk_animation_id, false)
  225.     display_normal_animation(targets, @active_battler.atk_animation_id2, true)
  226.     wait_for_animation
  227.   end
  228.   #--------------------------------------------------------------------------
  229.   # ● HP损害显示[重新界定]
  230.   #    对象:候选人
  231.   #    对象:技能,还是物品?
  232.   #--------------------------------------------------------------------------
  233.   def display_hp_damage(target, obj = nil)
  234.     if target.hp_damage == 0                # 任何破坏
  235.       return if obj != nil and obj.damage_to_mp
  236.       return if obj != nil and obj.base_damage == 0
  237.       fmt = target.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
  238.       text = sprintf(fmt, target.name)
  239.     elsif target.absorbed                   # 吸收
  240.       fmt = target.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
  241.       text = sprintf(fmt, target.name, Vocab::hp, target.hp_damage)
  242.     elsif target.hp_damage > 0              # 损坏
  243.       if target.actor?
  244.         text = sprintf(Vocab::ActorDamage, target.name, target.hp_damage)
  245.         Sound.play_actor_damage
  246.         $game_troop.screen.start_shake(5, 5, 10)
  247.         target.blink = true # Only adds here
  248.       else
  249.         text = sprintf(Vocab::EnemyDamage, target.name, target.hp_damage)
  250.         Sound.play_enemy_damage
  251.         target.blink = true
  252.       end
  253.     else                                    # 回收
  254.       fmt = target.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
  255.       text = sprintf(fmt, target.name, Vocab::hp, -target.hp_damage)
  256.       Sound.play_recovery
  257.     end
  258.     @message_window.add_instant_text(text)
  259.     wait(30)
  260.   end
  261. end
  262. #==============================================================================
  263. # ■ VX-RGSS2-6 サイドビュー战斗[Ver.1.0.1]
  264. #------------------------------------------------------------------------------

  265. module SideView
  266. #----------------------------------------------------------------------------
  267. #-----[运行格局]-----
  268.    #运行速度
  269.   MOTION_SPEED = 20

  270.   #-----[アニメーション設定]-----
  271.   # 通常敌人攻击动画设置
  272.   E_ANIME = {
  273.    # EnemyID => [Usually atttack and additional attack animations.]
  274.     1 => [1, 0]
  275.   }

  276. #----------------------------------------------------------------------------
  277. #----------------------------------------------------------------------------
  278.   # Motion Control Mode
  279.   M_MODE_WAIT = 0     # Standby
  280.   M_MODE_MAGI = 1     # Attack
  281.   M_MODE_DAMG = 2     # Non-Damage Attack
  282.   M_MODE_WIN  = 3     # Victory
  283.   M_MODE_ATK1 = 4     # Direct Attack (Approaching)
  284.   M_MODE_ATK2 = 5     # Direct Attack (Attacking)
  285.   M_MODE_ATK3 = 6     # Direct Attack (Returning)

  286.   module_function
  287.   #--------------------------------------------------------------------------
  288.   # ● 活动区域计算
  289.   #--------------------------------------------------------------------------
  290.   def set_target_point(attacker, target)
  291.     case target
  292.     when Game_Actor
  293.       bits = Cache.character(target.character_name)
  294.       attacker.target_x = target.screen_x + (bits.width / 8)
  295.       attacker.target_y = target.screen_y
  296.     when Game_Enemy
  297.       bits = Cache.battler(target.battler_name, target.battler_hue)
  298.       attacker.target_x = target.screen_x + (bits.width / 2)
  299.       attacker.target_y = target.screen_y
  300.     end
  301.   end
  302. end

  303. class Game_Battler
  304.   attr_accessor   :move_mode       # Operation Mode
  305.   # 0:Standby   1:Attack   2: Un-useless   3:Victory
  306.   attr_accessor   :motion_stop     # Operation Stop Flag (Under Movement Flag)
  307.   attr_accessor   :target_x        # Move Position(x)
  308.   attr_accessor   :target_y        # Move Position(y)
  309.   #--------------------------------------------------------------------------
  310.   # ● 对象初始化
  311.   #--------------------------------------------------------------------------
  312.   alias initialize_sdva_corpse initialize
  313.   def initialize
  314.     initialize_sdva_corpse
  315.     @move_mode = 0
  316.     @motion_stop = false
  317.     @target_x = 0
  318.     @target_y = 0
  319.   end
  320. end

  321. #==============================================================================
  322. # ■ Game_Enemy
  323. #==============================================================================
  324. class Game_Enemy < Game_Battler
  325.   #--------------------------------------------------------------------------
  326.   # ● 攻击动画ID采集
  327.   #--------------------------------------------------------------------------
  328.   def atk_animation_id
  329.     return 0 if SideView::E_ANIME[@enemy_id].nil?
  330.     return SideView::E_ANIME[@enemy_id][0]
  331.   end
  332.   #--------------------------------------------------------------------------
  333.   # ● 攻击动画ID采集( 2剑式: 2武器)
  334.   #--------------------------------------------------------------------------
  335.   def atk_animation_id2
  336.     return 0 if SideView::E_ANIME[@enemy_id].nil?
  337.     return SideView::E_ANIME[@enemy_id][1]
  338.   end
  339. end



  340. #==============================================================================
  341. # ■ Sprite_Battler
  342. #==============================================================================
  343. class Sprite_Battler < Sprite_Base
  344.   #--------------------------------------------------------------------------
  345. # ● Object Initialization
  346. #     Viewport : View Port
  347. #     Battler  : Battler (Game_Battler)
  348.   #--------------------------------------------------------------------------
  349.   alias initialize_sideview initialize
  350.   def initialize(viewport, battler = nil)
  351.     initialize_sideview(viewport, battler)
  352.     init_direct_attack
  353.   end
  354.   #--------------------------------------------------------------------------
  355.   # ● 一套价值接近攻击
  356.   #--------------------------------------------------------------------------
  357.   def init_direct_attack
  358.     @direct_attack_cnt = 0
  359.     @direct_attack_phase = 0
  360.     @direct_move_cnt = 0
  361.     @battler_x_plus = 0
  362.     @battler_y_plus = 0
  363.     @moving_mode = 0
  364.     @pattern = 0
  365.     @direction = 0
  366.   end
  367.   #--------------------------------------------------------------------------
  368.   # ● 帧重建[重新界定]
  369.   #--------------------------------------------------------------------------
  370.   def update
  371.     super
  372.     if @battler == nil
  373.       self.bitmap = nil
  374.     else
  375.       @use_sprite = @battler.use_sprite?
  376.       if @use_sprite
  377.         self.x = @battler.screen_x + @battler_x_plus
  378.         self.y = @battler.screen_y + @battler_y_plus
  379.         self.z = @battler.screen_z
  380.         update_battler_bitmap
  381.       end
  382.       setup_new_effect
  383.       update_effect
  384.     end
  385.   end
  386.   #--------------------------------------------------------------------------
  387.   # ● 点阵图转让源重建
  388.   #--------------------------------------------------------------------------
  389.   alias update_battler_bitmap_sideview update_battler_bitmap
  390.   def update_battler_bitmap
  391.     case @battler
  392.     when Game_Actor
  393.       if @battler.character_name != @battler_name or
  394.          @battler.character_index != @battler_hue
  395.         @battler_name = @battler.character_name
  396.         @battler_hue = @battler.character_index
  397.         draw_pre_character
  398.         draw_character
  399.         if (@battler.dead? or @battler.hidden)
  400.           self.opacity = 0
  401.         end
  402.       end
  403.     when Game_Enemy
  404.       if @battler.battler_name != @battler_name or
  405.          @battler.battler_hue != @battler_hue
  406.         @battler_name = @battler.battler_name
  407.         @battler_hue = @battler.battler_hue
  408.         draw_battler
  409.         if (@battler.dead? or @battler.hidden)
  410.           self.opacity = 0
  411.         end
  412.       end
  413.     end
  414.     motion_control
  415.   end
  416.   #--------------------------------------------------------------------------
  417.   # ● battler制图
  418.   #--------------------------------------------------------------------------
  419.   def draw_battler
  420.     self.bitmap = Cache.battler(@battler_name, @battler_hue)
  421.     @width = bitmap.width
  422.     @height = bitmap.height
  423.     self.ox = @width / 2
  424.     self.oy = @height
  425.   end
  426.   #--------------------------------------------------------------------------
  427.   # ● 预字制图[普通]
  428.   #--------------------------------------------------------------------------
  429.   def draw_pre_character
  430.     self.bitmap = Cache.character(@battler_name)
  431.     sign = @battler_name[/^[\!\$]./]
  432.     if sign != nil and sign.include?('$')
  433.       @width = bitmap.width / 3
  434.       @height = bitmap.height / 4
  435.     else
  436.       @width = bitmap.width / 12
  437.       @height = bitmap.height / 8
  438.     end
  439.     self.ox = @width / 2
  440.     self.oy = @height
  441.   end
  442.   #--------------------------------------------------------------------------
  443.   # ● 性格绘画[普通]
  444.   #--------------------------------------------------------------------------
  445.   def draw_character
  446.     index = @battler_hue
  447.     pattern = @pattern < 3 ? @pattern : 1
  448.     sx = (index % 4 * 3 + pattern) * @width
  449.     sy = (index / 4 * 4 + (@direction - 2) / 2) * @height
  450.     self.src_rect.set(sx, sy, @width, @height)
  451.   end
  452.   #--------------------------------------------------------------------------
  453.   # ● 活动控制
  454.   #--------------------------------------------------------------------------
  455.   def motion_control
  456.     # Memory Operation Mode
  457.     @moving_mode = @battler.move_mode
  458.     # Battler Drawing
  459.     case @battler
  460.     when Game_Actor # Actor
  461.       actor_motion_control
  462.     when Game_Enemy # Enemy
  463.       enemy_motion_control
  464.     end
  465.   end
  466.   #--------------------------------------------------------------------------
  467.   # ● 运动控制(角色)
  468.   #--------------------------------------------------------------------------
  469.   def actor_motion_control
  470.     # Operation Change
  471.     case @moving_mode
  472.     when SideView::M_MODE_WAIT  # Standby
  473.       init_direct_attack
  474.       @battler_x_plus = 0
  475.       @direction = 4
  476.       @pattern = 1
  477.     when SideView::M_MODE_MAGI  # Attack
  478.       @battler_x_plus = -10
  479.       @direction = 4
  480.       @pattern = 3
  481.     when SideView::M_MODE_DAMG  # Non-Damage Attack
  482.       @battler_x_plus = 10
  483.       @direction = 4
  484.       @pattern = 3
  485.     when SideView::M_MODE_WIN  # Victory
  486.       @direction = 2
  487.       @pattern = 1
  488.     when SideView::M_MODE_ATK1  # Direct Attack (Approaching)
  489.       exe_moving_attack_start
  490.       @end_pos_x = @battler_x_plus
  491.     when SideView::M_MODE_ATK2  # Direct Attack (Attacking)
  492.       @battler_x_plus = @end_pos_x - 10
  493.     when SideView::M_MODE_ATK3  # Direct Attack (Returning)
  494.       exe_moving_attack_end
  495.     else
  496.       p "error:Sprite_Battler>> @moving_mode"
  497.     end
  498.     draw_character
  499.   end
  500.   #--------------------------------------------------------------------------
  501.   # ● 运动控制(敌人)
  502.   #--------------------------------------------------------------------------
  503.   def enemy_motion_control
  504.     # Operation Change
  505.     case @moving_mode
  506.     when SideView::M_MODE_WAIT  # Standby
  507.       init_direct_attack
  508.     when SideView::M_MODE_MAGI  # Attack
  509.       @battler_x_plus = 10
  510.     when SideView::M_MODE_DAMG  # Non-Damage Attack
  511.       @battler_x_plus = -10
  512.       @shake_flg = true
  513.     when SideView::M_MODE_ATK1  # Direct Attack (Approaching)
  514.       exe_moving_attack_start
  515.       @end_pos_x = @battler_x_plus
  516.     when SideView::M_MODE_ATK2  # Direct Attack (Attacking)
  517.       @battler_x_plus = @end_pos_x + 10
  518.     when SideView::M_MODE_ATK3  # Direct Attack (Returning)
  519.       exe_moving_attack_end
  520.     else
  521.       p "error:Sprite_Battler>> @moving_mode", @moving_mode
  522.     end
  523.   end
  524.   #--------------------------------------------------------------------------
  525.   # ● 接近攻击执行方法
  526.   #--------------------------------------------------------------------------
  527.   def exe_moving_attack_start
  528.     return unless @battler.motion_stop
  529.     case @direct_attack_phase
  530.     when 0  # Start Operation Preparation
  531.       diratk_start
  532.     when 1  # Move Operation (Going)
  533.       diratk_move
  534.     when 2  # After-Movement Wait
  535.       diratk_wait
  536.     end
  537.   end
  538.   def exe_moving_attack_end
  539.     case @direct_attack_phase
  540.     when 0  # Attack Operation
  541.       diratk_attack
  542.     when 1  # Move Operation (Return)
  543.       diratk_back
  544.     when 2  # Operation End
  545.       diratk_end
  546.     end
  547.   end
  548.   #--------------------------------------------------------------------------
  549.   # ● 接近攻击执行[开始运作准备]
  550.   #--------------------------------------------------------------------------
  551.   def diratk_start
  552.     # Pose Change
  553.     @pattern = 1
  554.     # The number of frames needed is the distance between current position and
  555.     # target position.
  556.     pos_x = @battler.target_x - self.x
  557.     pos_y = @battler.target_y - self.y
  558.     # Caculation for ammount of frames needed.
  559.     @direct_move_cnt = @direct_attack_cnt = (pos_x.abs / SideView::MOTION_SPEED).round
  560.     # NEXT Phase
  561.     @direct_attack_phase += 1
  562.   end
  563.   #--------------------------------------------------------------------------
  564.   # ● 接近攻击执行[移到对象(去) ]
  565.   #--------------------------------------------------------------------------
  566.   def diratk_move
  567.     case @battler
  568.     when Game_Actor
  569.       x_plus = @width
  570.       y_plus = -@height / 4
  571.     when Game_Enemy
  572.       x_plus = -@width - 10
  573.       y_plus = @height / 4
  574.     end
  575.     # The next movement location is figured out by the distance between
  576.     # current position and target position.
  577.     pos_x = @battler.target_x - self.x + x_plus
  578.     pos_y = @battler.target_y - self.y + y_plus
  579.     @battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
  580.     @battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
  581.     # End count
  582.     @direct_attack_cnt -= 1
  583.     # Last movement (Insurance: Last correction)
  584.     if @direct_attack_cnt <= 0
  585.       @battler_x_plus = @battler.target_x - @battler.screen_x + x_plus
  586.       @battler_y_plus = @battler.target_y - @battler.screen_y + y_plus
  587.       # NEXTフェーズ
  588.       @direct_attack_cnt = 5
  589.       @direct_attack_phase += 1
  590.     end
  591.   end
  592.   #--------------------------------------------------------------------------
  593.   # ● 接近攻击执行[攻击行动回报]
  594.   #--------------------------------------------------------------------------
  595.   def diratk_wait
  596.     # End Count
  597.     @direct_attack_cnt -= 1
  598.     # Last Movement
  599.     if @direct_attack_cnt <= 0
  600.       # Pose Change
  601.       @pattern = 3
  602.       # END Phase
  603.       @direct_attack_phase = 0
  604.       @battler.motion_stop = false
  605.     end
  606.   end
  607.   #--------------------------------------------------------------------------
  608.   # ● 接近攻击执行[攻击行动回报]
  609.   #--------------------------------------------------------------------------
  610.   def diratk_attack
  611.     # Pose Change
  612.     @pattern = 1
  613.     # End Wait Count
  614.     @direct_attack_cnt = @direct_move_cnt
  615.     # NEXT Phase
  616.     @direct_attack_phase += 1
  617.   end
  618.   #--------------------------------------------------------------------------
  619.   # ● 接近攻击执行[移到运行(往返) ]
  620.   #--------------------------------------------------------------------------
  621.   def diratk_back
  622.     # The next movement location is figured out by the distance between
  623.     # current position and target position.
  624.     pos_x = @battler.screen_x - self.x
  625.     pos_y = @battler.screen_y - self.y
  626.     @battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
  627.     @battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
  628.     # End Count
  629.     @direct_attack_cnt -= 1
  630.     # Last Movement
  631.     if @direct_attack_cnt == 0
  632.       @battler_x_plus = 0
  633.       @battler_y_plus = 0
  634.       # NEXT Phase
  635.       @direct_attack_phase += 1
  636.     end
  637.   end
  638.   #--------------------------------------------------------------------------
  639.   # ● 接近攻击执行[运行完]
  640.   #--------------------------------------------------------------------------
  641.   def diratk_end
  642.     init_direct_attack
  643.     @battler.motion_stop = false
  644.     # END Phase
  645.     @direct_attack_phase = 0
  646.   end
  647. end
复制代码

这个也是横板战斗,不过没那么美化,凑合着用用。 [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ [LINE]1,#dddddd[/LINE]系统信息:本贴由本区版主认可,66RPG感谢您的热情解答~
作者: 雪流星    时间: 2008-4-26 21:40
请不要直接贴出脚本
放连结让新人熟悉6R的各版面
表让新人沦落宜伸手档
作者: iamtenten    时间: 2008-4-26 21:44
提示: 作者被禁止或删除 内容自动屏蔽
作者: Fantasy幻想    时间: 2008-4-26 22:45
以下引用snstar2006于2008-4-26 13:40:17的发言:

请不要直接贴出脚本
放连结让新人熟悉6R的各版面
表让新人沦落宜伸手档

...我也不知道这个的链接..所以就发了..





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1