Advertisement
Archeia

Yanfly Engine: Area of Effect Add-On by SoulPour77

Mar 30th, 2014
600
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.43 KB | None | 0 0
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine: Area of Effect Add-On by SoulPour77
  4. # -- Last Updated: 2014.03.27
  5. # -- Level: Easy, Normal
  6. # -- Requires: Yanfly Engine Ace - Area of Effect v1.02
  7. #
  8. # Use the notetag <target_animation> so it will display only one animation
  9. # along with the tag <one animation>.
  10. #
  11. #==============================================================================
  12.  
  13. class RPG::BaseItem
  14.  
  15.   def only_target_ani?
  16.     if @only_target_ani.nil?
  17.       @only_target_ani = (self.note =~ /<target_animation>/i ? true : false)
  18.     end
  19.     @only_target_ani
  20.   end
  21.  
  22. end
  23.  
  24.  
  25. class Scene_Battle < Scene_Base
  26.  
  27.   alias :show_norm_anim_one_trg :show_normal_animation
  28.   def show_normal_animation(targets, animation_id, mirror = false)
  29.     if @subject.current_action.item.only_target_ani?
  30.       show_only_target_animation(animation_id, mirror)
  31.     else
  32.       show_norm_anim_one_trg(targets, animation_id, mirror)
  33.     end
  34.   end
  35.  
  36.   def show_only_target_animation(animation_id, mirror = false)
  37.     if @subject.current_action.item.for_opponent?
  38.       target = @subject.opponents_unit.smooth_target(@subject.current_action.target_index)
  39.     else
  40.       target = @subject.friends_unit.smooth_target(@subject.current_action.target_index)
  41.     end
  42.     target.animation_id = animation_id
  43.     target.animation_mirror = mirror
  44.     abs_wait_short
  45.   end
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement