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

Project1

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

RPG Maker VX1.01如何改成横版?

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-12-26
帖子
7
跳转到指定楼层
1
发表于 2008-12-27 20:36:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-12-26
帖子
7
2
 楼主| 发表于 2008-12-27 20:45:06 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
0
在线时间
0 小时
注册时间
2008-12-27
帖子
3
3
发表于 2008-12-27 21:37:36 | 只看该作者
VX1.01和1.02只是稳定性有差异而已。
VX要做横板战斗必须用外挂脚本。
版主对此帖的评论:『理由看置頂帖』,积分『-1000000』。这些被扣积分的一半会用于对本帖正确答案的悬赏。
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

6r最强害虫!

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-11-9
帖子
950
4
发表于 2008-12-27 22:54:40 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
0
在线时间
0 小时
注册时间
2008-12-27
帖子
3
5
发表于 2008-12-28 00:16:57 | 只看该作者
以下引用疯鸡瘫圣老贱于2008-12-27 14:54:40的发言:

在横板战斗范例目录下找到Game.ini
把Library=RGSS202E.dll 改成Library=RGSS20XE.dll 这个X自己改动
在VX目录下的文件夹查看类似的文件

针对ShinYoyo汉化的VX1.01应该是RGSS200J.dll才对。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
239
在线时间
2399 小时
注册时间
2008-4-11
帖子
12326

贵宾第6届短篇游戏比赛季军

6
发表于 2008-12-28 02:41:25 | 只看该作者
{/cy}{/cy}有范例,下载了自己看看
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
112 小时
注册时间
2008-12-9
帖子
166
7
发表于 2008-12-28 06:11:23 | 只看该作者
有范例 我就是看范例的!
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-12-26
帖子
7
8
 楼主| 发表于 2008-12-28 20:25:54 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

6r最强害虫!

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-11-9
帖子
950
9
发表于 2008-12-30 02:17:29 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-1-28
帖子
232
10
发表于 2009-1-1 20:19:30 | 只看该作者
你要的是这个,不需要任何外部图片,只要COPY就OK的脚本!
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================
  4. #==============================================================================
  5. # ■ VX-RGSS2-6 サイドビュー戦闘[Formation] [Ver.1.0.1]       by Claimh
  6. #------------------------------------------------------------------------------
  7. # English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
  8. #------------------------------------------------------------------------------
  9. #  Actor location [Formation]
  10. #  The same amount of damage will be given regardless of formation setup.
  11. #==============================================================================

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

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

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



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

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

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

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

  277. module SideView
  278. #----------------------------------------------------------------------------
  279.   #-----[Operation Setup]-----
  280.   # Operation Speed
  281.   MOTION_SPEED = 20

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

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

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

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

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



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

系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
版主对此帖的评论:『扣回误操作的悬赏分』,积分『-500000』。这些被扣积分的一半会用于对本帖正确答案的悬赏。
站内搜索 http://rpg.blue/forumSearch.asp
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-15 12:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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