def cast_path_of_the_seven_strikes(self, caster, target_list, text_sprite): multi_strike = 7 alive_enemy = get_alive_targets(target_list) if len(alive_enemy) > 0 and self.multi_attacks_left == 7: damage_text.cast(self, "Path Of The 7 Strikes", text_sprite, 0, -30) return self.resolve_multi_attack(caster, target_list, multi_strike, text_sprite)
def cast_whirlwind(self, caster, target_list, text_sprite): alive_enemy = get_alive_targets(target_list) if len(alive_enemy) > 0: damage_text.cast(caster, "Whirlwind", text_sprite, 0, -30) input_damage_list = [] input_type_list = [] for _ in target_list: output_damage = round(caster.attack_power * 1.5) input_damage, input_type = self.spell_attack_resolution(caster, output_damage, self.hit_resolution()) input_damage_list.append(input_damage) input_type_list.append(input_type) self.resolve_aoe_attack(caster, target_list, input_damage_list, input_type_list, text_sprite)
def resolve_multi_attack(self, caster, target_list, multi_strike, text_sprite): alive_enemy = get_alive_targets(target_list) # TODO: pass de proper wait time instead of 90 if self.multi_attacks_left >= 0: if constants.globals.action_cooldown >= 90: if len(alive_enemy) > 0: target = alive_enemy[randint(0, len(alive_enemy) - 1)] caster.use_animation('Attack') caster.cast_attack(self, target, text_sprite, True) self.multi_attacks_left -= 1 constants.globals.action_cooldown = 65 else: self.multi_attacks_left = 7 caster.ultimate_status = False # Action Delay: Next Enemy Action will be delayed after the ultimate cast constants.globals.action_cooldown = -40
def cast_lightning(self, caster, target_list, text_sprite): alive_enemy = get_alive_targets(target_list) if len(alive_enemy) > 0: # Display Header Cast damage_text.cast(caster, "Lightning Bolt!", text_sprite, 0, -30) input_damage_list = [] input_type_list = [] for _ in target_list: # Basic Spell Attributes: minimum, maximum, multiplier base_damage = randint(1, 55) output_damage = base_damage input_damage, input_type = self.spell_attack_resolution( caster, output_damage, self.hit_resolution()) input_damage_list.append(input_damage) input_type_list.append(input_type) self.resolve_aoe_attack(caster, target_list, input_damage_list, input_type_list, text_sprite)
def cast_earth_shock(self, caster, target_list, text_sprite): constants.globals.action_cooldown = -30 alive_enemy = get_alive_targets(target_list) if len(alive_enemy) > 0: # Display Header Cast damage_text.cast(caster, "Earth Shock!", text_sprite, 0, -30) input_damage_list = [] input_type_list = [] for _ in target_list: # Basic Spell Attributes: minimum, maximum, multiplier base_damage = randint(1, 6) output_damage = round(caster.magic_power * 1.5) + base_damage input_damage, input_type = self.spell_attack_resolution( caster, output_damage, self.hit_resolution()) input_damage_list.append(input_damage) input_type_list.append(input_type) self.resolve_aoe_attack(caster, target_list, input_damage_list, input_type_list, text_sprite)