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

Project1

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

关于横版战斗.问题......

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2008-2-9
帖子
50
跳转到指定楼层
1
发表于 2008-2-12 18:07:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
  1. #==============================================================================
  2. # ■ VX-RGSS2-6 サイドビュー戦闘[Formation] [Ver.1.0.1]       by Claimh
  3. #------------------------------------------------------------------------------
  4. # English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
  5. #------------------------------------------------------------------------------
  6. #  Actor location [Formation]
  7. #  The same amount of damage will be given regardless of formation setup.
  8. #==============================================================================

  9. module Battle_Formation
  10. #------------------------------------------------------------------------------
  11.   # [Formation Setup]
  12.   #   $game_system.battle_formation = Formation ID
  13.   #   It’s possible to change the formation (Even an event script is possible).
  14.   FORM = {
  15.     # Formation ID => [[Member 1 x、y], [Member2 x, y],
  16.     #            [Member 3 x, y], [Member 4 x, y]]
  17.     0 => [[380,150], [400, 230], [460, 170], [480, 250]]
  18.   }
  19. #------------------------------------------------------------------------------
  20. end

  21. #==============================================================================
  22. # ■ Game_System
  23. #==============================================================================
  24. class Game_System
  25.   attr_accessor :battle_formation                # Formation ID
  26.   #--------------------------------------------------------------------------
  27.   # ● オブジェクト初期化
  28.   #--------------------------------------------------------------------------
  29.   alias init_game_system initialize
  30.   def initialize
  31.     init_game_system
  32.     @battle_formation = 0              # Initial formation
  33.   end
  34. end

  35. #==============================================================================
  36. # ■ Game_Actor
  37. #==============================================================================
  38. class Game_Actor < Game_Battler
  39.   #--------------------------------------------------------------------------
  40.   # ● Are sprites used? [Redefinition]
  41.   #--------------------------------------------------------------------------
  42.   def use_sprite?
  43.     return true
  44.   end
  45.   #--------------------------------------------------------------------------
  46.   # ● Battle Screen Acquiring X Coordinate
  47.   #--------------------------------------------------------------------------
  48.   def screen_x
  49.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][0]
  50.   end
  51.   #--------------------------------------------------------------------------
  52.   # ● Battle Screen Acquiring Y Coordinate
  53.   #--------------------------------------------------------------------------
  54.   def screen_y
  55.     return Battle_Formation::FORM[$game_system.battle_formation][self.index][1]
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● Battle Screen Acquiring Z Coordinate
  59.   #--------------------------------------------------------------------------
  60.   def screen_z
  61.     bitmap = Cache.character(self.character_name)
  62.     # Height + Y Coordinates
  63.     return screen_y + bitmap.height / 4
  64.   end
  65. end



  66. #==============================================================================
  67. # ■ Game_Enemy
  68. #==============================================================================
  69. class Game_Enemy < Game_Battler
  70.   #--------------------------------------------------------------------------
  71.   # ● Battle Screen Acquiring Z Coordinate  [Redefinition]
  72.   #--------------------------------------------------------------------------
  73.   def screen_z
  74.     bitmap = Cache.battler(self.battler_name, self.battler_hue)
  75.     # Height + Y Coordinates
  76.     return screen_y + bitmap.height
  77.   end
  78. end

  79. #==============================================================================
  80. # ■ VX-RGSS2-6 サイドビュー戦闘[MotionCtrl] [Ver.1.0.1]     by Claimh
  81. #------------------------------------------------------------------------------
  82. # English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
  83. #------------------------------------------------------------------------------
  84. #  This script carries out the movement controls of the actors.
  85. #==============================================================================

  86. #==============================================================================
  87. # ■ Scene_Battle
  88. #==============================================================================
  89. class Scene_Battle < Scene_Base
  90.   #--------------------------------------------------------------------------
  91.   # ●  Battle Start Process
  92.   #--------------------------------------------------------------------------
  93.   alias process_battle_start_sideview process_battle_start
  94.   def process_battle_start
  95.     for battler in $game_party.members + $game_troop.members
  96.       battler.move_mode = SideView::M_MODE_WAIT
  97.     end
  98.     process_battle_start_sideview
  99.   end
  100.   #--------------------------------------------------------------------------
  101.   # ● Victory Process
  102.   #--------------------------------------------------------------------------
  103.   alias process_victory_sideview process_victory
  104.   def process_victory
  105.     for actor in $game_party.members
  106.       actor.move_mode = SideView::M_MODE_WIN
  107.     end
  108.     process_victory_sideview
  109.   end
  110.   #--------------------------------------------------------------------------
  111.   # ● Wait Until Motion Control Is Finished
  112.   #--------------------------------------------------------------------------
  113.   def wait_for_motion
  114.     while @active_battler.motion_stop
  115.       update_basic
  116.     end
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● Execute Combat Operations: Attack [Redefinition]
  120.   #--------------------------------------------------------------------------
  121.   def execute_action_attack
  122.     text = sprintf(Vocab::DoAttack, @active_battler.name)
  123.     @message_window.add_instant_text(text)
  124.     targets = @active_battler.action.make_targets
  125.     #---Enemy attack sound reproduced.
  126.     if @active_battler.is_a?(Game_Enemy)
  127.       Sound.play_enemy_attack
  128.       wait(15, true)
  129.     end
  130.     #--- Proximity (Going)
  131.     SideView.set_target_point(@active_battler, targets[0])
  132.     @active_battler.move_mode = SideView::M_MODE_ATK1
  133.     @active_battler.motion_stop = true
  134.     wait_for_motion
  135.     #--- Attack
  136.     wait(5)
  137.     @active_battler.move_mode = SideView::M_MODE_ATK2
  138.     #---
  139.     display_attack_animation(targets)
  140.     wait(20)
  141.     for target in targets
  142.       target.attack_effect(@active_battler)
  143.       display_action_effects(target)
  144.     end
  145.     #--- Proximity (Return)
  146.     @active_battler.move_mode = SideView::M_MODE_ATK3
  147.     @active_battler.motion_stop = true
  148.     wait_for_motion
  149.     #---Wait
  150.     for target in targets
  151.       target.move_mode = SideView::M_MODE_WAIT
  152.     end
  153.     @active_battler.move_mode = SideView::M_MODE_WAIT
  154.     #---
  155.   end
  156.   #--------------------------------------------------------------------------
  157.   # ● Execute Combat Operations: Skill [Redefinition]
  158.   #--------------------------------------------------------------------------
  159.   def execute_action_skill
  160.     skill = @active_battler.action.skill
  161.     text = @active_battler.name + skill.message1
  162.     @message_window.add_instant_text(text)
  163.     unless skill.message2.empty?
  164.       wait(10)
  165.       @message_window.add_instant_text(skill.message2)
  166.     end
  167.     #--- Enemy attack sound reproduced.
  168.     if @active_battler.is_a?(Game_Enemy)
  169.       Sound.play_enemy_attack
  170.       wait(15, true)
  171.     end
  172.     #--- Long distance attack.
  173.     @active_battler.move_mode = SideView::M_MODE_MAGI
  174.     #---
  175.     targets = @active_battler.action.make_targets
  176.     display_animation(targets, skill.animation_id)
  177.     @active_battler.mp -= @active_battler.calc_mp_cost(skill)
  178.     $game_temp.common_event_id = skill.common_event_id
  179.     for target in targets
  180.       target.skill_effect(@active_battler, skill)
  181.       display_action_effects(target, skill)
  182.     end
  183.     #---Wait
  184.     for target in targets
  185.       target.move_mode = SideView::M_MODE_WAIT
  186.     end
  187.     @active_battler.move_mode = SideView::M_MODE_WAIT
  188.     #---
  189.   end
  190.   #--------------------------------------------------------------------------
  191.   # Execute Combat Operations: Item [Redefinition]
  192.   #--------------------------------------------------------------------------
  193.   def execute_action_item
  194.     item = @active_battler.action.item
  195.     text = sprintf(Vocab::UseItem, @active_battler.name, item.name)
  196.     @message_window.add_instant_text(text)
  197.     #--- Enemy attack sound reproduced.
  198.     if @active_battler.is_a?(Game_Enemy)
  199.       Sound.play_enemy_attack
  200.       wait(15, true)
  201.     end
  202.     #--- Long distance attack
  203.     @active_battler.move_mode = SideView::M_MODE_MAGI
  204.     #---
  205.     targets = @active_battler.action.make_targets
  206.     display_animation(targets, item.animation_id)
  207.     $game_party.consume_item(item)
  208.     $game_temp.common_event_id = item.common_event_id
  209.     for target in targets
  210.       target.item_effect(@active_battler, item)
  211.       display_action_effects(target, item)
  212.     end
  213.     #---Wait
  214.     for target in targets
  215.       target.move_mode = SideView::M_MODE_WAIT
  216.     end
  217.     @active_battler.move_mode = SideView::M_MODE_WAIT
  218.     #---
  219.   end
  220.   #--------------------------------------------------------------------------
  221.   # ● Attack Animation Display [Redefinition]
  222.   #     Targets : Object's Arrangement
  223.   #--------------------------------------------------------------------------
  224.   # 【Changed part】
  225.   #  Enemy sound effect is changed so it can be used in each phase of operation.
  226.   #  It changes so that the attack animation of an enemy can be displayed.
  227.   #--------------------------------------------------------------------------
  228.   def display_attack_animation(targets)
  229.     display_normal_animation(targets, @active_battler.atk_animation_id, false)
  230.     display_normal_animation(targets, @active_battler.atk_animation_id2, true)
  231.     wait_for_animation
  232.   end
  233.   #--------------------------------------------------------------------------
  234.   # ● HP Damage display [Redefinition]
  235.   #    Target : Candidate
  236.   #    object : Skill or item
  237.   #--------------------------------------------------------------------------
  238.   def display_hp_damage(target, obj = nil)
  239.     if target.hp_damage == 0                # No damage
  240.       return if obj != nil and obj.damage_to_mp
  241.       return if obj != nil and obj.base_damage == 0
  242.       fmt = target.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
  243.       text = sprintf(fmt, target.name)
  244.     elsif target.absorbed                   # Absorption
  245.       fmt = target.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
  246.       text = sprintf(fmt, target.name, Vocab::hp, target.hp_damage)
  247.     elsif target.hp_damage > 0              # Damage
  248.       if target.actor?
  249.         text = sprintf(Vocab::ActorDamage, target.name, target.hp_damage)
  250.         Sound.play_actor_damage
  251.         $game_troop.screen.start_shake(5, 5, 10)
  252.         target.blink = true # Only adds here
  253.       else
  254.         text = sprintf(Vocab::EnemyDamage, target.name, target.hp_damage)
  255.         Sound.play_enemy_damage
  256.         target.blink = true
  257.       end
  258.     else                                    # Recovery
  259.       fmt = target.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
  260.       text = sprintf(fmt, target.name, Vocab::hp, -target.hp_damage)
  261.       Sound.play_recovery
  262.     end
  263.     @message_window.add_instant_text(text)
  264.     wait(30)
  265.   end
  266. end

  267. #==============================================================================
  268. # ■ VX-RGSS2-6 サイドビュー戦闘[MotionExe] [Ver.1.0.1]     by Claimh
  269. #------------------------------------------------------------------------------
  270. # English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
  271. #------------------------------------------------------------------------------
  272. #  This script executes movement controls of the actors.
  273. #==============================================================================

  274. module SideView
  275. #----------------------------------------------------------------------------
  276.   #-----[Operation Setup]-----
  277.   # Operation Speed
  278.   MOTION_SPEED = 20

  279.   #-----[アニメーション設定]-----
  280.   # Usual enemy attack animation setup.
  281.   E_ANIME = {
  282.    # EnemyID => [Usually atttack and additional attack animations.]
  283.     1 => [1, 0]
  284.   }

  285. #----------------------------------------------------------------------------
  286. #----------------------------------------------------------------------------
  287.   # Motion Control Mode
  288.   M_MODE_WAIT = 0     # Standby
  289.   M_MODE_MAGI = 1     # Attack
  290.   M_MODE_DAMG = 2     # Non-Damage Attack
  291.   M_MODE_WIN  = 3     # Victory
  292.   M_MODE_ATK1 = 4     # Direct Attack (Approaching)
  293.   M_MODE_ATK2 = 5     # Direct Attack (Attacking)
  294.   M_MODE_ATK3 = 6     # Direct Attack (Returning)

  295.   module_function
  296.   #--------------------------------------------------------------------------
  297.   # ● Movement-Zone Calculation
  298.   #--------------------------------------------------------------------------
  299.   def set_target_point(attacker, target)
  300.     case target
  301.     when Game_Actor
  302.       bits = Cache.character(target.character_name)
  303.       attacker.target_x = target.screen_x + (bits.width / 8)
  304.       attacker.target_y = target.screen_y
  305.     when Game_Enemy
  306.       bits = Cache.battler(target.battler_name, target.battler_hue)
  307.       attacker.target_x = target.screen_x + (bits.width / 2)
  308.       attacker.target_y = target.screen_y
  309.     end
  310.   end
  311. end

  312. class Game_Battler
  313.   attr_accessor   :move_mode       # Operation Mode
  314.   # 0:Standby   1:Attack   2: Un-useless   3:Victory
  315.   attr_accessor   :motion_stop     # Operation Stop Flag (Under Movement Flag)
  316.   attr_accessor   :target_x        # Move Position(x)
  317.   attr_accessor   :target_y        # Move Position(y)
  318.   #--------------------------------------------------------------------------
  319.   # ● Object Initialization
  320.   #--------------------------------------------------------------------------
  321.   alias initialize_sdva_corpse initialize
  322.   def initialize
  323.     initialize_sdva_corpse
  324.     @move_mode = 0
  325.     @motion_stop = false
  326.     @target_x = 0
  327.     @target_y = 0
  328.   end
  329. end

  330. #==============================================================================
  331. # ■ Game_Enemy
  332. #==============================================================================
  333. class Game_Enemy < Game_Battler
  334.   #--------------------------------------------------------------------------
  335.   # ● Attack Animation ID Acquisition
  336.   #--------------------------------------------------------------------------
  337.   def atk_animation_id
  338.     return 0 if SideView::E_ANIME[@enemy_id].nil?
  339.     return SideView::E_ANIME[@enemy_id][0]
  340.   end
  341.   #--------------------------------------------------------------------------
  342.   # ● Attack Animation ID Acquisition  (2 Sword Style : 2 Weapons )
  343.   #--------------------------------------------------------------------------
  344.   def atk_animation_id2
  345.     return 0 if SideView::E_ANIME[@enemy_id].nil?
  346.     return SideView::E_ANIME[@enemy_id][1]
  347.   end
  348. end



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



   这里想请问一下.... ...........这个脚本可不可以改成...像FC和GBA的最终幻想那样的战斗
(就是..论到那个主角攻击的时候....主角向前走一步...不去靠近怪物 只是从队列里出来.一步 . ......等放完技能再退回去....) ... ..不知道可以这样不...........
     
    抱歉打扰了....
Pokemon lover

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2008-2-9
帖子
50
2
 楼主| 发表于 2008-2-12 23:32:50 | 只看该作者
类似这样的战斗方式: ....攻击时..向前走一步
Pokemon lover
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

Mars-火星机械

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2713
3
发表于 2008-2-12 23:33:45 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3299
在线时间
3619 小时
注册时间
2006-9-6
帖子
37400

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

4
发表于 2008-2-12 23:34:09 | 只看该作者
想起了行走图战斗……

就是走出一步用魔法的……(魔法哦,不是技能,直接攻击的技能要飞过去攻击……|||)
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2008-2-9
帖子
50
5
 楼主| 发表于 2008-2-12 23:39:06 | 只看该作者
...哎 ... ...我菜鸟一个...看不明白脚本. ....
  
     不知道可部可以改成像FF那样的..战斗方式.. ..(攻击时向前走一步..   因为觉得这个脚本的攻击方式有点点死板).. ...{/gg}
Pokemon lover
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

Mars-火星机械

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2713
6
发表于 2008-2-12 23:40:13 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2008-2-9
帖子
50
7
 楼主| 发表于 2008-2-12 23:47:25 | 只看该作者
那个坐标因该在哪里呢...   我找了好久...也试了好几个....
     人物一到物理攻击的时候就飞上去.跟怪怪扒在一起....
     - -#...
Pokemon lover
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

Mars-火星机械

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-12-15
帖子
2713
8
发表于 2008-2-12 23:48:31 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2008-2-9
帖子
50
9
 楼主| 发表于 2008-2-13 00:00:57 | 只看该作者
. ..    ...  机器人大哥说的 ...X,Y坐标是哪个.......  ...
.  ... 指导 指导...{/gg}.. .   ..
....我修改这个的成功几率   跟"洗衣服时表忘在衣服包包里..等洗完以后再把表拿出来看,表还能显示正确时间"的几率一样大..... ..- -#.
Pokemon lover
回复 支持 反对

使用道具 举报

Lv1.梦旅人

很傻很天真

梦石
0
星屑
55
在线时间
3 小时
注册时间
2007-3-13
帖子
3667
10
发表于 2008-2-13 00:37:30 | 只看该作者
以下引用飞起一键盘于2008-2-12 16:00:57的发言:

. ..    ...  机器人大哥说的 ...X,Y坐标是哪个.......  ...
.  ... 指导 指导..... .   ..
....我修改这个的成功几率   跟"洗衣服时表忘在衣服包包里..等洗完以后再把表拿出来看,表还能显示正确时间"的几率一样大..... ..- -#.



汗.....

你拿一个XP的横版战斗..最好是复刻2003那个  来研究一下
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-12-22 21:09

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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