#============================================================================== # ** Mea's Multi-STRIKE! #------------------------------------------------------------------------------ # by DerVVulfman # version 1.1 # 01-22-2007 # Full SDK 2.3 Compatible (Does not need or require SDK 2.3) #------------------------------------------------------------------------------ # # INTRODUCTION: # This system allows you to create attacks that perform multiple hits, whether # it be a regular weapon attack, skill or item effect. Simple in design, it # only applies hits from that same weapon/skill/item on each properly defined # flash effect. # #------------------------------------------------------------------------------ # # INSTRUCTIONS: # This system is simple. It relies on the 'FLASH' that occurs in your RMXP # Battle Animation. Each 'FLASH' that occurs in a Battle Animation that mat- # ches the configuration settings (below) performs a damage pop. # # All you need to do for a skill, weapon, or item to have multiple effects is # to add extra 'flash' effects into the battle animation your attack uses. # # MIND YOU... that there will always be a damage pop 'after' the battle ani- # mation as normal. That can't be helped. # #------------------------------------------------------------------------------ # # CREDITS & THANKS: # Eh... kinda got inspired by Cogwheel who made one of the first Multiple hit # systems, and Trickster for his work on his own system. I cannot say that # this system is as sophisticated, but it is SDK 2.3 compatible and yet can # work with most default-based battlesystems. # #============================================================================== #วิธีตั้งค่า # ตั้งอนิเมชัน Hit ค่าอิ่ม 254 ระยะ 2 เฟรม # # --- C O N F I G U R A T I O N --- # # aka Battle Animation Flash Settings # MS_CONDITION = 1 # Flash condition (0=None, 1=Hit, 2=Miss) MS_DURATION = 2 # Flash duration setting MS_ALPHA = 254 # Flash strength setting (0-255) #============================================================================== # ** Sprite_Battler #------------------------------------------------------------------------------ # This sprite is used to display the battler.It observes the Game_Character # class and automatically changes sprite conditions. #============================================================================== class Sprite_Battler < RPG::Sprite #-------------------------------------------------------------------------- # * Multiple Strikes? #-------------------------------------------------------------------------- def multistrike? if @multistrike @multistrike = false return true end return false end #-------------------------------------------------------------------------- # * Animation Timing #-------------------------------------------------------------------------- def animation_process_timing(timing, hit) # Obtain flash values ms_cond = timing.condition ms_color = timing.flash_color ms_dur = timing.flash_duration # If conditions match settings if ms_dur == MS_DURATION && ms_color.alpha == MS_ALPHA && ms_cond == MS_CONDITION # Multi-strike is confirmed @multistrike = true @ms_color = ms_color end super end end #============================================================================== # ** Spriteset_Battle #------------------------------------------------------------------------------ # This class brings together battle screen sprites. It's used within # the Scene_Battle class. #============================================================================== class Spriteset_Battle #-------------------------------------------------------------------------- # * Get Total Number of Sprites #-------------------------------------------------------------------------- def sprites return @enemy_sprites + @actor_sprites end end #============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- alias update_multistrike update def update # Obtain current battler (couldn't use battler) attacker = @active_battler # If displaying damage pop for valid target(s) if @phase4_step == 5 && attacker != nil && @target_battlers != [] @spriteset.sprites.each { |target| # Skip, unless multi-striking valid targets unless target.multistrike? && @target_battlers.include?(target.battler) next end # Pop damage target.damage(target.battler.damage, target.battler.critical) # Branch according to each action case attacker.current_action.kind when 0 # basic if attacker.current_action.basic == 0 target.battler.attack_effect(attacker) end when 1 # skill skill = $data_skills[attacker.current_action.skill_id] target.battler.skill_effect(attacker, skill) when 2 # item item = $data_items[attacker.current_action.item_id] target.battler.item_effect(item) end } end # Perform the original call update_multistrike end end