Advertisement
roninator2

VXAce SP1

Dec 9th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 6.93 KB | None | 0 0
  1. #==============================================================================
  2. # ■ VXAce_SP1
  3. #------------------------------------------------------------------------------
  4. # Fixed a bug in the preset script. User-defined script material
  5. # As a general rule, place it below this section.
  6. #==============================================================================
  7.  
  8. #------------------------------------------------------------------------------
  9. # [Fixes]
  10. #------------------------------------------------------------------------------
  11. # ● Add and remove the same state at the same time using the
  12. #   event command [Change state].
  13. #   Fixed a bug where the second and subsequent additions would fail when
  14. # ● The currently displayed animation is mapped using the
  15. #   event command [Display animation].
  16. #   Fixed a bug that did not synchronize with the screen scroll.
  17. # ● Fixed an issue where automatic battle actions were not selected correctly.
  18. # ● Because the equipment that can no longer be equipped is removed,
  19. #   another equipment cannot be equipped.
  20. #   Fixed an issue where the equipment would multiply when
  21. # ● Fixed an issue where an extra load was required after executing
  22. #   the event command [Erase Picture]. Fixed
  23. # ● With the movement route option [Skip if unable to move] checked.
  24. #   When you touch an event with a trigger [Contacted by player],
  25. #   the event is running.
  26. #   Fixed a bug where a startup reservation was made even if the
  27. # ● Fixed an issue where state effectiveness was not reflected for
  28. #   magic reflected skills.
  29. # ● Fixed a bug where even if bold or italic was enabled in the default font
  30. #   settings, it would return to the disabled state when switching the
  31. #   status screen.
  32. #------------------------------------------------------------------------------
  33. class Game_Battler
  34.   attr_accessor :magic_reflection
  35.   #--------------------------------------------------------------------------
  36.   # ● Judgment of hostility
  37.   #--------------------------------------------------------------------------
  38.   alias vxace_sp1_opposite? opposite?
  39.   def opposite?(battler)
  40.     vxace_sp1_opposite?(battler) || battler.magic_reflection
  41.   end
  42. end
  43. #------------------------------------------------------------------------------
  44. class Game_Actor
  45.   #--------------------------------------------------------------------------
  46.   # ● Remove equipment that cannot be equipped
  47.   #     item_gain : Return the removed equipment to the party
  48.   #--------------------------------------------------------------------------
  49.   alias vxace_sp1_release_unequippable_items release_unequippable_items
  50.   def release_unequippable_items(item_gain = true)
  51.     loop do
  52.       last_equips = equips.dup
  53.       vxace_sp1_release_unequippable_items(item_gain)
  54.       return if equips == last_equips
  55.     end
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● Create combat actions for automatic battles
  59.   #--------------------------------------------------------------------------
  60.   def make_auto_battle_actions
  61.     @actions.size.times do |i|
  62.       @actions[i] = make_action_list.max_by {|action| action.value }
  63.     end
  64.   end
  65. end
  66. #------------------------------------------------------------------------------
  67. class Game_Player
  68.   #--------------------------------------------------------------------------
  69.   # ● Triggering a map event
  70.   #     triggers : Array of triggers
  71.   #     normal   : Priority [same as normal character] or something else?
  72.   #--------------------------------------------------------------------------
  73.   alias vxace_sp1_start_map_event start_map_event
  74.   def start_map_event(x, y, triggers, normal)
  75.     return if $game_map.interpreter.running?
  76.     vxace_sp1_start_map_event(x, y, triggers, normal)
  77.   end
  78. end
  79. #------------------------------------------------------------------------------
  80. class Game_Picture
  81.   #--------------------------------------------------------------------------
  82.   # ● Erase picture
  83.   #--------------------------------------------------------------------------
  84.   alias vxace_sp1_erase erase
  85.   def erase
  86.     vxace_sp1_erase
  87.     @origin = 0
  88.   end
  89. end
  90. #------------------------------------------------------------------------------
  91. class Game_Interpreter
  92.   #--------------------------------------------------------------------------
  93.   # ● Change state
  94.   #--------------------------------------------------------------------------
  95.   alias vxace_sp1_command_313 command_313
  96.   def command_313
  97.     vxace_sp1_command_313
  98.     $game_party.clear_results
  99.   end
  100. end
  101. #------------------------------------------------------------------------------
  102. class Sprite_Character
  103.   #--------------------------------------------------------------------------
  104.   # ● Update location
  105.   #--------------------------------------------------------------------------
  106.   alias vxace_sp1_update_position update_position
  107.   def update_position
  108.     move_animation(@character.screen_x - x, @character.screen_y - y)
  109.     vxace_sp1_update_position
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● moving animation
  113.   #--------------------------------------------------------------------------
  114.   def move_animation(dx, dy)
  115.     if @animation && @animation.position != 3
  116.       @ani_ox += dx
  117.       @ani_oy += dy
  118.       @ani_sprites.each do |sprite|
  119.         sprite.x += dx
  120.         sprite.y += dy
  121.       end
  122.     end
  123.   end
  124. end
  125. #------------------------------------------------------------------------------
  126. class Sprite_Picture
  127.   #--------------------------------------------------------------------------
  128.   # ● Update source bitmap
  129.   #--------------------------------------------------------------------------
  130.   alias vxace_sp1_update_bitmap update_bitmap
  131.   def update_bitmap
  132.     if @picture.name.empty?
  133.       self.bitmap = nil
  134.     else
  135.       vxace_sp1_update_bitmap
  136.     end
  137.   end
  138. end
  139. #------------------------------------------------------------------------------
  140. class Window_Base
  141.   #--------------------------------------------------------------------------
  142.   # ● Resetting font settings
  143.   #--------------------------------------------------------------------------
  144.   alias vxace_sp1_reset_font_settings reset_font_settings
  145.   def reset_font_settings
  146.     vxace_sp1_reset_font_settings
  147.     contents.font.bold = Font.default_bold
  148.     contents.font.italic = Font.default_italic
  149.   end
  150. end
  151. #------------------------------------------------------------------------------
  152. class Scene_Battle
  153.   #--------------------------------------------------------------------------
  154.   # ● Activation of magic reflex
  155.   #--------------------------------------------------------------------------
  156.   alias vxace_sp1_invoke_magic_reflection invoke_magic_reflection
  157.   def invoke_magic_reflection(target, item)
  158.     @subject.magic_reflection = true
  159.     vxace_sp1_invoke_magic_reflection(target, item)
  160.     @subject.magic_reflection = false
  161.   end
  162. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement