设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1585|回复: 4
打印 上一主题 下一主题

[已经解决] 求一个横版战斗脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
52 小时
注册时间
2013-5-14
帖子
10
跳转到指定楼层
发表于 2013-5-14 21:47:52 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
求一个横版战斗脚本,战斗中角色拿着武器的,求范例。不要游戏。

Lv1.梦旅人

梦石
0
星屑
205
在线时间
3 小时
注册时间
2013-5-18
帖子
2
4
发表于 2013-5-24 11:58:57 | 只看该作者
[ 本帖最后由 沈七七 于 2013-5-24 12:00 编辑 ]\n\n
代码复制
  1. #==============================================================================
  2. # ■ VX-RGSS2 简易横版战斗系统[Ver.1.0.1]       by Claimh
  3. #------------------------------------------------------------------------------
  4. module Battle_Formation
  5. #------------------------------------------------------------------------------
  6.   FORM = {
  7.     #    [角色1x.y]  [角色2x.y]  [角色3x.y]  [角色4x.y]
  8.     0 => [[380,150], [400, 230], [460, 170], [480, 250]]
  9.   }
  10. #------------------------------------------------------------------------------
  11. end
  12.  
  13. #==============================================================================
  14. # ■ Game_System
  15. #==============================================================================
  16. class Game_System
  17.   attr_accessor :battle_formation                # Formation ID
  18.   #--------------------------------------------------------------------------
  19.   # ● 对象初始化
  20.   #--------------------------------------------------------------------------
  21.   alias init_game_system initialize
  22.   def initialize
  23.     init_game_system
  24.     @battle_formation = 0              # Initial formation
  25.   end
  26. end
  27.  
  28. #==============================================================================
  29. # ■ Game_Actor
  30. #==============================================================================
  31. class Game_Actor < Game_Battler
  32.   #--------------------------------------------------------------------------
  33.   # ● Are sprites used? [Redefinition]
  34.   #--------------------------------------------------------------------------
  35.   def use_sprite?
  36.     return true
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # ● Battle Screen Acquiring X Coordinate
  40.   #--------------------------------------------------------------------------
  41.   def screen_x
  42.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][0]
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● Battle Screen Acquiring Y Coordinate
  46.   #--------------------------------------------------------------------------
  47.   def screen_y
  48.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][1]
  49.   end
  50.   #--------------------------------------------------------------------------
  51.   # ● Battle Screen Acquiring Z Coordinate
  52.   #--------------------------------------------------------------------------
  53.   def screen_z
  54.     bitmap = Cache.character(self.character_name)
  55.     return screen_y + bitmap.height / 4
  56.   end
  57. end
  58.  
  59.  
  60.  
  61. #==============================================================================
  62. # ■ Game_Enemy
  63. #==============================================================================
  64. class Game_Enemy < Game_Battler
  65.   #--------------------------------------------------------------------------
  66.   # ● Battle Screen Acquiring Z Coordinate  [Redefinition]
  67.   #--------------------------------------------------------------------------
  68.   def screen_z
  69.     bitmap = Cache.battler(self.battler_name, self.battler_hue)
  70.     return screen_y + bitmap.height
  71.   end
  72. end
  73.  
  74. #==============================================================================
  75. # ■ VX-RGSS2 简易横版战斗系统[Ver.1.0.1]       by Claimh
  76. #------------------------------------------------------------------------------
  77. # ■ Scene_Battle
  78. #==============================================================================
  79. class Scene_Battle < Scene_Base
  80.   #--------------------------------------------------------------------------
  81.   # ●  Battle Start Process
  82.   #--------------------------------------------------------------------------
  83.   alias process_battle_start_sideview process_battle_start
  84.   def process_battle_start
  85.     for battler in ($game_party.members + $game_troop.members)
  86.       battler.move_mode = SideView::M_MODE_WAIT
  87.     end
  88.     process_battle_start_sideview
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # ● Victory Process
  92.   #--------------------------------------------------------------------------
  93.   alias process_victory_sideview process_victory
  94.   def process_victory
  95.     for actor in $game_party.members
  96.       actor.move_mode = SideView::M_MODE_WIN
  97.     end
  98.     process_victory_sideview
  99.   end
  100.   #--------------------------------------------------------------------------
  101.   # ● Wait Until Motion Control Is Finished
  102.   #--------------------------------------------------------------------------
  103.   def wait_for_motion
  104.     while @active_battler.motion_stop
  105.       update_basic
  106.     end
  107.   end
  108.   #--------------------------------------------------------------------------
  109.   # ● Execute Combat Operations: Attack [Redefinition]
  110.   #--------------------------------------------------------------------------
  111.   def execute_action_attack
  112.     text = sprintf(Vocab::DoAttack, @active_battler.name)
  113.     @message_window.add_instant_text(text)
  114.     targets = @active_battler.action.make_targets
  115.     #---Enemy attack sound reproduced.
  116.     if @active_battler.is_a?(Game_Enemy)
  117.       Sound.play_enemy_attack
  118.       wait(15, true)
  119.     end
  120.     #--- Proximity (Going)
  121.     SideView.set_target_point(@active_battler, targets[0])
  122.     @active_battler.move_mode = SideView::M_MODE_ATK1
  123.     @active_battler.motion_stop = true
  124.     wait_for_motion
  125.     #--- Attack
  126.     wait(5)
  127.     @active_battler.move_mode = SideView::M_MODE_ATK2
  128.     #---
  129.     display_attack_animation(targets)
  130.     wait(20)
  131.     for target in targets
  132.       target.attack_effect(@active_battler)
  133.       display_action_effects(target)
  134.     end
  135.     #--- Proximity (Return)
  136.     @active_battler.move_mode = SideView::M_MODE_ATK3
  137.     @active_battler.motion_stop = true
  138.     wait_for_motion
  139.     #---Wait
  140.     for target in targets
  141.       target.move_mode = SideView::M_MODE_WAIT
  142.     end
  143.     @active_battler.move_mode = SideView::M_MODE_WAIT
  144.     #---
  145.   end
  146.   #--------------------------------------------------------------------------
  147.   # ● Execute Combat Operations: Skill [Redefinition]
  148.   #--------------------------------------------------------------------------
  149.   def execute_action_skill
  150.     skill = @active_battler.action.skill
  151.     text = @active_battler.name + skill.message1
  152.     @message_window.add_instant_text(text)
  153.     unless skill.message2.empty?
  154.       wait(10)
  155.       @message_window.add_instant_text(skill.message2)
  156.     end
  157.     #--- Enemy attack sound reproduced.
  158.     if @active_battler.is_a?(Game_Enemy)
  159.       Sound.play_enemy_attack
  160.       wait(15, true)
  161.     end
  162.     #--- Long distance attack.
  163.     @active_battler.move_mode = SideView::M_MODE_MAGI
  164.     #---
  165.     targets = @active_battler.action.make_targets
  166.     display_animation(targets, skill.animation_id)
  167.     @active_battler.mp -= @active_battler.calc_mp_cost(skill)
  168.     $game_temp.common_event_id = skill.common_event_id
  169.     for target in targets
  170.       target.skill_effect(@active_battler, skill)
  171.       display_action_effects(target, skill)
  172.     end
  173.     #---Wait
  174.     for target in targets
  175.       target.move_mode = SideView::M_MODE_WAIT
  176.     end
  177.     @active_battler.move_mode = SideView::M_MODE_WAIT
  178.     #---
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # Execute Combat Operations: Item [Redefinition]
  182.   #--------------------------------------------------------------------------
  183.   def execute_action_item
  184.     item = @active_battler.action.item
  185.     text = sprintf(Vocab::UseItem, @active_battler.name, item.name)
  186.     @message_window.add_instant_text(text)
  187.     #--- Enemy attack sound reproduced.
  188.     if @active_battler.is_a?(Game_Enemy)
  189.       Sound.play_enemy_attack
  190.       wait(15, true)
  191.     end
  192.     #--- Long distance attack
  193.     @active_battler.move_mode = SideView::M_MODE_MAGI
  194.     #---
  195.     targets = @active_battler.action.make_targets
  196.     display_animation(targets, item.animation_id)
  197.     $game_party.consume_item(item)
  198.     $game_temp.common_event_id = item.common_event_id
  199.     for target in targets
  200.       target.item_effect(@active_battler, item)
  201.       display_action_effects(target, item)
  202.     end
  203.     #---Wait
  204.     for target in targets
  205.       target.move_mode = SideView::M_MODE_WAIT
  206.     end
  207.     @active_battler.move_mode = SideView::M_MODE_WAIT
  208.     #---
  209.   end
  210.   #--------------------------------------------------------------------------
  211.   # ● Attack Animation Display [Redefinition]
  212.   #     Targets : Object's Arrangement
  213.   #--------------------------------------------------------------------------
  214.   # 【Changed part】
  215.   #  Enemy sound effect is changed so it can be used in each phase of operation.
  216.   #  It changes so that the attack animation of an enemy can be displayed.
  217.   #--------------------------------------------------------------------------
  218.   def display_attack_animation(targets)
  219.     display_normal_animation(targets, @active_battler.atk_animation_id, false)
  220.     display_normal_animation(targets, @active_battler.atk_animation_id2, true)
  221.     wait_for_animation
  222.   end
  223.   #--------------------------------------------------------------------------
  224.   # ● HP Damage display [Redefinition]
  225.   #    Target : Candidate
  226.   #    object : Skill or item
  227.   #--------------------------------------------------------------------------
  228.   def display_hp_damage(target, obj = nil)
  229.     if target.hp_damage == 0                # No damage
  230.       return if obj != nil and obj.damage_to_mp
  231.       return if obj != nil and obj.base_damage == 0
  232.       fmt = target.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
  233.       text = sprintf(fmt, target.name)
  234.     elsif target.absorbed                   # Absorption
  235.       fmt = target.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
  236.       text = sprintf(fmt, target.name, Vocab::hp, target.hp_damage)
  237.     elsif target.hp_damage > 0              # Damage
  238.       if target.actor?
  239.         text = sprintf(Vocab::ActorDamage, target.name, target.hp_damage)
  240.         Sound.play_actor_damage
  241.         $game_troop.screen.start_shake(5, 5, 10)
  242.         target.blink = true # Only adds here
  243.       else
  244.         text = sprintf(Vocab::EnemyDamage, target.name, target.hp_damage)
  245.         Sound.play_enemy_damage
  246.         target.blink = true
  247.       end
  248.     else                                    # Recovery
  249.       fmt = target.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
  250.       text = sprintf(fmt, target.name, Vocab::hp, -target.hp_damage)
  251.       Sound.play_recovery
  252.     end
  253.     @message_window.add_instant_text(text)
  254.     wait(30)
  255.   end
  256. end
  257.  
  258. #==============================================================================
  259. # ■ VX-RGSS2 简易横版战斗系统[Ver.1.0.1]       by Claimh
  260. #==============================================================================
  261. module SideView
  262. #----------------------------------------------------------------------------
  263.   #-----[操作设定]-----
  264.   # 操作速度
  265.   MOTION_SPEED = 15
  266.  
  267.   #-----[动画设置]-----
  268.   # 通常敌人攻击动画设定。
  269.   E_ANIME = {
  270.     1 => [1, 0]
  271.   }
  272.  
  273. #----------------------------------------------------------------------------
  274. #----------------------------------------------------------------------------
  275.   # 行动控制方式
  276.   M_MODE_WAIT = 0     # Standby
  277.   M_MODE_MAGI = 1     # Attack
  278.   M_MODE_DAMG = 2     # Non-Damage Attack
  279.   M_MODE_WIN  = 3     # Victory
  280.   M_MODE_ATK1 = 4     # Direct Attack (Approaching)
  281.   M_MODE_ATK2 = 5     # Direct Attack (Attacking)
  282.   M_MODE_ATK3 = 6     # Direct Attack (Returning)
  283.  
  284.   module_function
  285.   #--------------------------------------------------------------------------
  286.   # ● Movement-Zone Calculation
  287.   #--------------------------------------------------------------------------
  288.   def set_target_point(attacker, target)
  289.     case target
  290.     when Game_Actor
  291.       bits = Cache.character(target.character_name)
  292.       attacker.target_x = target.screen_x + (bits.width / 8)
  293.       attacker.target_y = target.screen_y
  294.     when Game_Enemy
  295.       bits = Cache.battler(target.battler_name, target.battler_hue)
  296.       attacker.target_x = target.screen_x + (bits.width / 2)
  297.       attacker.target_y = target.screen_y
  298.     end
  299.   end
  300. end
  301.  
  302. class Game_Battler
  303.   attr_accessor   :move_mode       # Operation Mode
  304.   # 0:Standby   1:Attack   2: Un-useless   3:Victory
  305.   attr_accessor   :motion_stop     # Operation Stop Flag (Under Movement Flag)
  306.   attr_accessor   :target_x        # Move Position(x)
  307.   attr_accessor   :target_y        # Move Position(y)
  308.   #--------------------------------------------------------------------------
  309.   # ● Object Initialization
  310.   #--------------------------------------------------------------------------
  311.   alias initialize_sdva_corpse initialize
  312.   def initialize
  313.     initialize_sdva_corpse
  314.     @move_mode = 0
  315.     @motion_stop = false
  316.     @target_x = 0
  317.     @target_y = 0
  318.   end
  319. end
  320.  
  321. #==============================================================================
  322. # ■ Game_Enemy
  323. #==============================================================================
  324. class Game_Enemy < Game_Battler
  325.   #--------------------------------------------------------------------------
  326.   # ● Attack Animation ID Acquisition
  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.   # ● Attack Animation ID Acquisition  (2 Sword Style : 2 Weapons )
  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.  
  342.  
  343. #==============================================================================
  344. # ■ Sprite_Battler
  345. #==============================================================================
  346. class Sprite_Battler < Sprite_Base
  347.   #--------------------------------------------------------------------------
  348. # ● Object Initialization
  349. #     Viewport : View Port
  350. #     Battler  : Battler (Game_Battler)
  351.   #--------------------------------------------------------------------------
  352.   alias initialize_sideview initialize
  353.   def initialize(viewport, battler = nil)
  354.     initialize_sideview(viewport, battler)
  355.     init_direct_attack
  356.   end
  357.   #--------------------------------------------------------------------------
  358.   # ● Set Proximity Value For Attack
  359.   #--------------------------------------------------------------------------
  360.   def init_direct_attack
  361.     @direct_attack_cnt = 0
  362.     @direct_attack_phase = 0
  363.     @direct_move_cnt = 0
  364.     @battler_x_plus = 0
  365.     @battler_y_plus = 0
  366.     @moving_mode = 0
  367.     @pattern = 0
  368.     @direction = 0
  369.   end
  370.   #--------------------------------------------------------------------------
  371.   # ● Frame Renewal [Redefinition]
  372.   #--------------------------------------------------------------------------
  373.   def update
  374.     super
  375.     if @battler == nil
  376.       self.bitmap = nil
  377.     else
  378.       @use_sprite = @battler.use_sprite?
  379.       if @use_sprite
  380.         self.x = @battler.screen_x + @battler_x_plus
  381.         self.y = @battler.screen_y + @battler_y_plus
  382.         self.z = @battler.screen_z
  383.         update_battler_bitmap
  384.       end
  385.       setup_new_effect
  386.       update_effect
  387.     end
  388.   end
  389.   #--------------------------------------------------------------------------
  390.   # ● Bitmap Transfer Source Renewal
  391.   #--------------------------------------------------------------------------
  392.   alias update_battler_bitmap_sideview update_battler_bitmap
  393.   def update_battler_bitmap
  394.     case @battler
  395.     when Game_Actor
  396.       if @battler.character_name != @battler_name or @battler.character_index != @battler_hue
  397.         @battler_name = @battler.character_name
  398.         @battler_hue = @battler.character_index
  399.         draw_pre_character
  400.         draw_character
  401.         if (@battler.dead? or @battler.hidden)
  402.           self.opacity = 0
  403.         end
  404.       end
  405.     when Game_Enemy
  406.       if @battler.battler_name != @battler_name or
  407.          @battler.battler_hue != @battler_hue
  408.         @battler_name = @battler.battler_name
  409.         @battler_hue = @battler.battler_hue
  410.         draw_battler
  411.         if (@battler.dead? or @battler.hidden)
  412.           self.opacity = 0
  413.         end
  414.       end
  415.     end
  416.     motion_control
  417.   end
  418.   #--------------------------------------------------------------------------
  419.   # ● Battler Drawing
  420.   #--------------------------------------------------------------------------
  421.   def draw_battler
  422.     self.bitmap = Cache.battler(@battler_name, @battler_hue)
  423.     @width = bitmap.width
  424.     @height = bitmap.height
  425.     self.ox = @width / 2
  426.     self.oy = @height
  427.   end
  428.   #--------------------------------------------------------------------------
  429.   # ● Pre-Character Drawing [Common]
  430.   #--------------------------------------------------------------------------
  431.   def draw_pre_character
  432.     self.bitmap = Cache.character(@battler_name)
  433.     sign = @battler_name[/^[\!\$]./]
  434.     if sign != nil and sign.include?('$')
  435.       @width = bitmap.width / 3
  436.       @height = bitmap.height / 4
  437.     else
  438.       @width = bitmap.width / 12
  439.       @height = bitmap.height / 8
  440.     end
  441.     self.ox = @width / 2
  442.     self.oy = @height
  443.   end
  444.   #--------------------------------------------------------------------------
  445.   # ● Character Drawing [Common]
  446.   #--------------------------------------------------------------------------
  447.   def draw_character
  448.     index = @battler_hue
  449.     pattern = @pattern < 3 ? @pattern : 1
  450.     sx = (index % 4 * 3 + pattern) * @width
  451.     sy = (index / 4 * 4 + (@direction - 2) / 2) * @height
  452.     self.src_rect.set(sx, sy, @width, @height)
  453.   end
  454.   #--------------------------------------------------------------------------
  455.   # ● Motion Control
  456.   #--------------------------------------------------------------------------
  457.   def motion_control
  458.     # Memory Operation Mode
  459.     @moving_mode = @battler.move_mode
  460.     # Battler Drawing
  461.     case @battler
  462.     when Game_Actor # Actor
  463.       actor_motion_control
  464.     when Game_Enemy # Enemy
  465.       enemy_motion_control
  466.     end
  467.   end
  468.   #--------------------------------------------------------------------------
  469.   # ● Motion Control (Actor)
  470.   #--------------------------------------------------------------------------
  471.   def actor_motion_control
  472.     # Operation Change
  473.     case @moving_mode
  474.     when SideView::M_MODE_WAIT  # Standby
  475.       init_direct_attack
  476.       @battler_x_plus = 0
  477.       @direction = 4
  478.       @pattern = 1
  479.     when SideView::M_MODE_MAGI  # Attack
  480.       @battler_x_plus = -10
  481.       @direction = 4
  482.       @pattern = 3
  483.     when SideView::M_MODE_DAMG  # Non-Damage Attack
  484.       @battler_x_plus = 10
  485.       @direction = 4
  486.       @pattern = 3
  487.     when SideView::M_MODE_WIN  # Victory
  488.       @direction = 2
  489.       @pattern = 1
  490.     when SideView::M_MODE_ATK1  # Direct Attack (Approaching)
  491.       exe_moving_attack_start
  492.       @end_pos_x = @battler_x_plus
  493.     when SideView::M_MODE_ATK2  # Direct Attack (Attacking)
  494.       @battler_x_plus = @end_pos_x - 10
  495.     when SideView::M_MODE_ATK3  # Direct Attack (Returning)
  496.       exe_moving_attack_end
  497.     else
  498.       p "error:Sprite_Battler>> @moving_mode"
  499.     end
  500.     draw_character
  501.   end
  502.   #--------------------------------------------------------------------------
  503.   # ● Motion Control (Enemy)
  504.   #--------------------------------------------------------------------------
  505.   def enemy_motion_control
  506.     # Operation Change
  507.     case @moving_mode
  508.     when SideView::M_MODE_WAIT  # Standby
  509.       init_direct_attack
  510.     when SideView::M_MODE_MAGI  # Attack
  511.       @battler_x_plus = 10
  512.     when SideView::M_MODE_DAMG  # Non-Damage Attack
  513.       @battler_x_plus = -10
  514.       @shake_flg = true
  515.     when SideView::M_MODE_ATK1  # Direct Attack (Approaching)
  516.       exe_moving_attack_start
  517.       @end_pos_x = @battler_x_plus
  518.     when SideView::M_MODE_ATK2  # Direct Attack (Attacking)
  519.       @battler_x_plus = @end_pos_x + 10
  520.     when SideView::M_MODE_ATK3  # Direct Attack (Returning)
  521.       exe_moving_attack_end
  522.     else
  523.       p "error:Sprite_Battler>> @moving_mode", @moving_mode
  524.     end
  525.   end
  526.   #--------------------------------------------------------------------------
  527.   # ● Proximity Attack Execution Method
  528.   #--------------------------------------------------------------------------
  529.   def exe_moving_attack_start
  530.     return unless @battler.motion_stop
  531.     case @direct_attack_phase
  532.     when 0  # Start Operation Preparation
  533.       diratk_start
  534.     when 1  # Move Operation (Going)
  535.       diratk_move
  536.     when 2  # After-Movement Wait
  537.       diratk_wait
  538.     end
  539.   end
  540.   def exe_moving_attack_end
  541.     case @direct_attack_phase
  542.     when 0  # Attack Operation
  543.       diratk_attack
  544.     when 1  # Move Operation (Return)
  545.       diratk_back
  546.     when 2  # Operation End
  547.       diratk_end
  548.     end
  549.   end
  550.   #--------------------------------------------------------------------------
  551.   # ● Proximity Attack Execution [Start Operation Preparation]
  552.   #--------------------------------------------------------------------------
  553.   def diratk_start
  554.     # Pose Change
  555.     @pattern = 1
  556.     # The number of frames needed is the distance between current position and
  557.     # target position.
  558.     pos_x = @battler.target_x - self.x
  559.     pos_y = @battler.target_y - self.y
  560.     # Caculation for ammount of frames needed.
  561.     @direct_move_cnt = @direct_attack_cnt = (pos_x.abs / SideView::MOTION_SPEED).round
  562.     # NEXT Phase
  563.     @direct_attack_phase += 1
  564.   end
  565.   #--------------------------------------------------------------------------
  566.   # ● Proximity Attack Execution [Move Operation (Going)]
  567.   #--------------------------------------------------------------------------
  568.   def diratk_move
  569.     case @battler
  570.     when Game_Actor
  571.       x_plus = @width
  572.       y_plus = -@height / 4
  573.     when Game_Enemy
  574.       x_plus = -@width - 10
  575.       y_plus = @height / 4
  576.     end
  577.     # The next movement location is figured out by the distance between
  578.     # current position and target position.
  579.     pos_x = @battler.target_x - self.x + x_plus
  580.     pos_y = @battler.target_y - self.y + y_plus
  581.     @battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
  582.     @battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
  583.     # End count
  584.     @direct_attack_cnt -= 1
  585.     # Last movement (Insurance: Last correction)
  586.     if @direct_attack_cnt <= 0
  587.       @battler_x_plus = @battler.target_x - @battler.screen_x + x_plus
  588.       @battler_y_plus = @battler.target_y - @battler.screen_y + y_plus
  589.       # NEXTフェーズ
  590.       @direct_attack_cnt = 5
  591.       @direct_attack_phase += 1
  592.     end
  593.   end
  594.   #--------------------------------------------------------------------------
  595.   # ● Proximity Attack Execution [Attack Operation Return]
  596.   #--------------------------------------------------------------------------
  597.   def diratk_wait
  598.     # End Count
  599.     @direct_attack_cnt -= 1
  600.     # Last Movement
  601.     if @direct_attack_cnt <= 0
  602.       # Pose Change
  603.       @pattern = 3
  604.       # END Phase
  605.       @direct_attack_phase = 0
  606.       @battler.motion_stop = false
  607.     end
  608.   end
  609.   #--------------------------------------------------------------------------
  610.   # ● Proximity Attack Execution [Attack Operation Return]
  611.   #--------------------------------------------------------------------------
  612.   def diratk_attack
  613.     # Pose Change
  614.     @pattern = 1
  615.     # End Wait Count
  616.     @direct_attack_cnt = @direct_move_cnt
  617.     # NEXT Phase
  618.     @direct_attack_phase += 1
  619.   end
  620.   #--------------------------------------------------------------------------
  621.   # ● Proximity Attack Execution [Move Operation (Return)]
  622.   #--------------------------------------------------------------------------
  623.   def diratk_back
  624.     # The next movement location is figured out by the distance between
  625.     # current position and target position.
  626.     pos_x = @battler.screen_x - self.x
  627.     pos_y = @battler.screen_y - self.y
  628.     @battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
  629.     @battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
  630.     # End Count
  631.     @direct_attack_cnt -= 1
  632.     # Last Movement
  633.     if @direct_attack_cnt == 0
  634.       @battler_x_plus = 0
  635.       @battler_y_plus = 0
  636.       # NEXT Phase
  637.       @direct_attack_phase += 1
  638.     end
  639.   end
  640.   #--------------------------------------------------------------------------
  641.   # ● Proximity attack execution [Operation End]
  642.   #--------------------------------------------------------------------------
  643.   def diratk_end
  644.     init_direct_attack
  645.     @battler.motion_stop = false
  646.     # END Phase
  647.     @direct_attack_phase = 0
  648.   end
  649. end

评分

参与人数 1星屑 +50 收起 理由
怪蜀黍 + 50 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
52 小时
注册时间
2013-5-14
帖子
10
3
 楼主| 发表于 2013-5-15 18:21:41 | 只看该作者
都是可以使用的?
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (版主)

梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
帖子
11485

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

2
发表于 2013-5-15 13:25:53 | 只看该作者

点评

SSD就不要养着了……  发表于 2013-5-15 19:00

评分

参与人数 1星屑 +50 收起 理由
怪蜀黍 + 50 认可答案

查看全部评分

大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
16 小时
注册时间
2013-5-8
帖子
18
1
发表于 2013-5-15 11:50:37 | 只看该作者
同求                      !!!!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-15 14:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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