# ¡å¡ã¡å XRXS_BP19. ÀçÁî ¾Ç´Ü Ç¥½Ã£«È÷Æ® º¸³Ê½º ¡å¡ã¡å built 032500 # by ¾Þ¾Æ ÀçÈë #============================================================================== # ¡à Ä¿½ºÅ͸¶ÀÌÁî Æ÷ÀÎÆ® #============================================================================== class XRXS_BP19 # # ÀçÁî ¾Ç´Ü Áö¼Ó ½Ã°£[´ÜÀ§:F](40F °¡ 1ÃÊ) # COMBOHIT_DURATION = 100 end class Game_Battler # # ÀçÁî ¾Ç´Ü È÷Æ®¿¡ ÀÇÇÑ µ¥¹ÌÁö º¸Á¤·Â/È÷Æ®¼ö[´ÜÀ§:%] # DAMAGE_INCREASE_PER_HIT = 5 end class Window_ComboHit < Window_Base # # ÆùÆ® # COMBOHIT_FONTNAME = "Georgia" COMBOHIT_FONTCOLOR = Color.new(255,255,255,255) end #============================================================================== # ¡à Window_ComboHit #------------------------------------------------------------------------------ # ÀüÅõÁß¿¡ ÀçÁî ¾Ç´Ü¼ö¸¦ Ç¥½ÃÇÏ´Â Åõ¸íÇÑ À©µµ¿ìÀÔ´Ï´Ù. #============================================================================== class Window_ComboHit < Window_Base #-------------------------------------------------------------------------- # ¡Û ¿ÀºêÁ§Æ® ÃʱâÈ­ #-------------------------------------------------------------------------- def initialize super(512, 64, 128, 80) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 self.visible = false @active = false @show_duration = 0 @sliding_duration = 0 self.contents.clear end #-------------------------------------------------------------------------- # ¡Û Ŭ¸®¾î #-------------------------------------------------------------------------- def clear self.contents.clear self.visible = false end #-------------------------------------------------------------------------- # ¡Û ¸®ÇÁ·¹½¬ #-------------------------------------------------------------------------- def refresh(hit_combo, duration) # °¡½ÃÈ­ self.contents_opacity = 255 self.visible = true # ¼³Á¤ @show_duration = duration @sliding_duration = 0 # ¹¦»ç(¿¬ Àâ±â »ç¾ç) self.contents.clear self.contents.font.name = COMBOHIT_FONTNAME self.contents.font.bold = true text = hit_combo.to_s + " " self.contents.font.size = 36 self.contents.font.color.set( 0, 0, 0, 192) self.contents.draw_text(-1, -1, 64, 44, text, 2) self.contents.draw_text(-1, 1, 64, 44, text, 2) self.contents.draw_text( 1, -1, 64, 44, text, 2) self.contents.draw_text( 1, 1, 64, 44, text, 2) self.contents.font.color = COMBOHIT_FONTCOLOR self.contents.draw_text( 0, 0, 64, 44, text, 2) text ="HITS" self.contents.font.size = 22 self.contents.font.color.set( 0, 0, 0, 192) self.contents.draw_text(63, 13, 32, 32, text, 0) self.contents.draw_text(65, 13, 32, 32, text, 0) self.contents.draw_text(63, 15, 32, 32, text, 0) self.contents.draw_text(65, 15, 32, 32, text, 0) self.contents.font.color = COMBOHIT_FONTCOLOR self.contents.draw_text(64, 14, 32, 32, text, 0) end #-------------------------------------------------------------------------- # ¡Û ÇÁ·¹ÀÓ °»½Å #-------------------------------------------------------------------------- def update if @sliding_duration > 0 @sliding_duration -= 1 self.contents_opacity -= 32 self.x += 1 if @sliding_duration == 0 self.visible = false end elsif @show_duration > 0 @show_duration -= 1 if @show_duration == 0 @sliding_duration = 8 end end end end #============================================================================== # ¡á Game_Battler #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # ¡Ü °ø°³ ÀνºÅϽº º¯¼ö #-------------------------------------------------------------------------- def combohit @combohit = 0 if @combohit.nil? return @combohit end def combohit_duration @combohit_duration = 0 if @combohit_duration.nil? return @combohit_duration end #-------------------------------------------------------------------------- # ¡Û ÀçÁî ¾Ç´Ü È÷Æ®¸¦ °»½Å #-------------------------------------------------------------------------- def combohit_update @combohit_duration = 0 if @combohit_duration.nil? if @combohit_duration > 0 @combohit_duration -= 1 if @combohit_duration == 0 @combohit = 0 end end end #-------------------------------------------------------------------------- # ¡Û ÀçÁî ¾Ç´Ü È÷Æ®¸¦ Ä«¿îÆ® #-------------------------------------------------------------------------- def combohit_count @combohit = 0 if @combohit.nil? @combohit += 1 if @motion.nil? @combohit_duration = XRXS_BP19::COMBOHIT_DURATION else # Á»FMBS»ç¾ç @combohit_duration = @motion.knock_back_duration end end #-------------------------------------------------------------------------- # ¡Û ÀçÁî ¾Ç´Ü È÷Æ®¸¦ Ŭ¸®¾î #-------------------------------------------------------------------------- def combohit_clear @combohit = nil @combohit_duration = nil end #-------------------------------------------------------------------------- # ¡Ü Åë»ó °ø°ÝÀÇ È¿°ú Àû¿ë #-------------------------------------------------------------------------- alias xrxs_bp19_attack_effect attack_effect def attack_effect(attacker) # ±Íȯ½ÃÅ°´Â bool = xrxs_bp19_attack_effect(attacker) # °ø°Ý ¼º°ø½Ã( Çൿ À¯È¿ £¦ Miss°¡ ¾Æ´Ñ ) if bool and self.damage != "Miss" # È÷Æ® º¸Á¤ if self.damage.is_a?(Numeric) add_damage = self.damage * ([self.combohit * DAMAGE_INCREASE_PER_HIT,-100].max)/100 self.hp -= add_damage self.damage += add_damage end # ÀçÁî ¾Ç´Ü È÷Æ®+1 self.combohit_count end return bool end #-------------------------------------------------------------------------- # ¡Ü ½ºÅ³ÀÇ È¿°ú Àû¿ë #-------------------------------------------------------------------------- alias xrxs_bp19_skill_effect skill_effect def skill_effect(user, skill) # È÷Æ® º¸Á¤( µ¥¹ÌÁö ½ºÅ³¸¸ ) if skill.power >= 1 skill = skill.dup skill.power = skill.power * (100 + [self.combohit * DAMAGE_INCREASE_PER_HIT,-100].max)/100 end # ±Íȯ½ÃÅ°´Â bool = xrxs_bp19_skill_effect(user, skill) # °ø°Ý ¼º°ø½Ã( µ¥¹ÌÁö ½ºÅ³ £¦ Çൿ À¯È¿ £¦ Miss°¡ ¾Æ´Ñ ) if skill.power >= 1 and bool and self.damage != "Miss" # ÀçÁî ¾Ç´Ü È÷Æ®+1 self.combohit_count end return bool end #-------------------------------------------------------------------------- # ¡Ü ¾ÆÀÌÅÛÀÇ È¿°ú Àû¿ë #-------------------------------------------------------------------------- alias xrxs_bp19_item_effect item_effect def item_effect(item) # µ¥¹ÌÁö ¾ÆÀÌÅÛÀÌ ¾Æ´Ñ °æ¿ì unless (item.recover_hp < 0 or item.recover_hp_rate < 0) # ±Íȯ½ÃÅ°´Â return xrxs_bp19_item_effect(item) end # º¹Á¦ item = item.dup # È÷Æ® º¸Á¤ rate = (100 + [self.combohit * DAMAGE_INCREASE_PER_HIT,-100].max) item.recover_hp = skill.recover_hp * rate / 100 item.recover_hp_rate = skill.recover_hp_rate * rate / 100 # ±Íȯ½ÃÅ°´Â bool = xrxs_bp19_item_effect(item) # °ø°Ý ¼º°ø½Ã( Çൿ À¯È¿ £¦ Miss°¡ ¾Æ´Ñ ) if (bool and self.damage != "Miss") # ÀçÁî ¾Ç´Ü È÷Æ®+1 self.combohit_count end return bool end end #============================================================================== # ¡á Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ¡Ü ¸ÞÀΠó¸® #-------------------------------------------------------------------------- alias xrxs_bp19_main main def main # ±Íȯ½ÃÅ°´Â xrxs_bp19_main # À©µµ¿ì¸¦ Çعæ @combohit_window.dispose end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å #-------------------------------------------------------------------------- alias xrxs_bp19_update update def update # ÇÁ·¹ÀÓ °»½Å @combohit_window.update for actor in $game_party.actors actor.combohit_update end for enemy in $game_troop.enemies enemy.combohit_update end # ±Íȯ½ÃÅ°´Â xrxs_bp19_update end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹¹ÙÆ®¸£ÆäÁî °³½Ã #-------------------------------------------------------------------------- alias xrxs_bp19_start_phase1 start_phase1 def start_phase1 # ±Íȯ½ÃÅ°´Â xrxs_bp19_start_phase1 # ÀçÁî ¾Ç´Ü È÷Æ® À©µµ¿ì¸¦ ÀÛ¼º @combohit_window = Window_ComboHit.new end #-------------------------------------------------------------------------- # ¡Ü ÇÁ·¹ÀÓ °»½Å (¸ÞÀÎ ±¹¸é ½ºÅÜ 5 : µ¥¹ÌÁö Ç¥½Ã) #-------------------------------------------------------------------------- alias xrxs_bp19_update_phase4_step5 update_phase4_step5 def update_phase4_step5 # ±Íȯ½ÃÅ°´Â xrxs_bp19_update_phase4_step5 # ÀçÁî ¾Ç´Ü¼öÀÇ °¡Àå ³ôÀº Ÿ°ÙÀ» ã´Â max = 0 hit_target = nil for target in @target_battlers if target.combohit > max max = target.combohit hit_target = target end end if max >= 2 and !hit_target.nil? @combohit_window.x = hit_target.is_a?(Game_Enemy) ? 512 : 0 @combohit_window.refresh(max, hit_target.combohit_duration) end end end