def spell_004(self, child): # spell 4 for j in range(2): for i in range(8): doll = enemy.Enemy(self.parent, 'bluesprite') doll.master = self doll.sprite_type = SPRITE_ENEMY_SPECIAL doll.constant_distance = 150 doll.current_distance = 0 doll.item_list = [] doll.position = self.position doll.movement = 0 doll.initial_angle = 360 / 8 * i doll.shut_angle = 0 doll.health = 1 doll.invulnerable = True doll.rotating = True doll.shut_angle = 360 / 8 * i doll.special_mode = False doll.phase_list = [self.spell_004_dollmotion] if j == 0: doll.direction = 1 doll.barrage = ['diamond', '3'] else: doll.direction = -1 doll.barrage = ['diamond', '4'] self.doll_group.add(doll) self.parent.effect_group.add(doll)
def spell_002_doll(self, child, start_position): for i in range(18): x = random.randint(0, STAGE_WIDTH_HEIGHT[0]) y = random.randint(0, int(STAGE_WIDTH_HEIGHT[1] / 3)) new = enemy.Enemy(self.parent, 'bluesprite') new.position = start_position new.destination = vector.objVector(x, y) new.velocity = (vector.objVector(x, y) - start_position) new.velocity.norm = 500 * MEASURE_UNIT new.health = 5 new.fired = False new.phase_list = [self.spell_002_dollmotion] i1 = item.Item(self.parent, 'point') new.item_list = [i1] self.parent.enemy_group.add(new)
def summon_special2(self, start, end, *args): new = enemy.Enemy(self, 'bluesprite') back_effect = bossback.BossBack002(new) back_effect.scale = 0.5 new.effect_group.add(back_effect) self.effect_group.add(back_effect) new.position = start new.start = start new.end = end new.speed = 250*MEASURE_UNIT new.fire_pattern = [*args] new.phase_list = [self.motion_004] new.health = 60 i1 = item.Item(self, 'life') new.item_list.append(i1) self.enemy_group.add(new)
def spell_001(self, child): # spell 1 doll_cnt = 10 self.invulnerable = True for i in range(doll_cnt): doll = enemy.Enemy(self.parent, 'bluesprite') doll.master = self doll.sprite_type = SPRITE_ENEMY_SPECIAL doll.constant_distance = 100 doll.item_list = [] doll.position = self.position doll.movement = 0 doll.initial_angle = 360 / doll_cnt * i doll.health = 150 doll.rotating = True doll.phase_list = [self.spell_001_dollmotion] self.doll_group.add(doll) self.parent.enemy_group.add(doll)
def summon_a_list(self, bias=0): for i in range(8): new = enemy.Enemy(self, 'bluesprite') new.bounds = 0, -30, STAGE_WIDTH_HEIGHT[0], STAGE_WIDTH_HEIGHT[1] new.position.x = 72*i + bias new.position.y = random.randrange(-20, 0) new.velocity = vector.objVector(0, 200*MEASURE_UNIT) new.acceleration = vector.objVector(0, -2.5*MEASURE_UNIT) new.fire_pattern = [self.fire_003_05] new.phase_list = [self.motion_001_01] new.health = 2 if random.randint(0, 3) == 3: i1 = item.Item(self, 'point') new.item_list = [i1] else: new.item_list = [] self.enemy_group.add(new)
def summon_vertical(position): # summon laser beam if STAGE_WIDTH_HEIGHT[1] - position.y <= 100: return position x = random.randint(0, 50) - 25 y = random.randint(0, 50) - 25 doll = enemy.Enemy(self.parent, 'bluesprite') doll.sprite_type = SPRITE_ENEMY_SPECIAL doll.item_list = [] doll.position.x = position.x + x doll.position.y = position.y + y + abs(delta_d) doll.health = 50 doll.phase_list = [self.spell_002_dollmotion] doll.fire_pattern = [self.spell_002_dollfire_02] self.doll_group.add(doll) self.parent.enemy_group.add(doll) return summon_vertical(doll.position.copy())
def generate_mob(position): if position <= STAGE_WIDTH_HEIGHT[0]: new = enemy.Enemy(self, 'bluesprite') new.bounds = -50, -1000, STAGE_WIDTH_HEIGHT[0] + 50, STAGE_WIDTH_HEIGHT[1] + 50 new.position.x = position new.position.y = 0 new.velocity = vector.objVector(0, 200*MEASURE_UNIT) new.acceleration = vector.objVector(0, -2.5*MEASURE_UNIT) new.fire_pattern = [self.fire_003_01] new.phase_list = [self.motion_001_01] new.health = 2 i1 = item.Item(self, 'power') new.item_list = [i1] self.enemy_group.add(new) return generate_mob(position + 80) else: return ''
def spell_003(self, child): # spell 3 doll_cnt = 10 for i in range(doll_cnt): doll = enemy.Enemy(self.parent, 'yellowsprite') doll.master = self doll.sprite_type = SPRITE_ENEMY_SPECIAL doll.constant_distance = 100 doll.item_list = [] doll.position = self.position doll.movement = 0 doll.initial_angle = 360 / doll_cnt * i doll.shut_angle = 0 doll.health = 200 doll.rotating = True doll.phase_list = [self.spell_003_dollmotion] doll.types = [['diamond', '3'], ['diamond', '7'], ['diamond', '2'], ['diamond', '9']] doll.type_pointer = 0 self.doll_group.add(doll) self.parent.enemy_group.add(doll)
def summon_horizontal(position): if STAGE_WIDTH_HEIGHT[0] - position.x <= 100 and direction == 1: return position if position.x <= 100 and direction == -1: return position x = random.randint(0, 50) - 25 y = random.randint(0, 50) - 25 doll = enemy.Enemy(self.parent, 'bluesprite') doll.sprite_type = SPRITE_ENEMY_SPECIAL doll.item_list = [] doll.position = vector.objVector(position.x + x + delta_d, position.y + y) doll.health = 50 doll.phase_list = [self.spell_002_dollmotion] doll.fire_pattern = [self.spell_002_dollfire_01] self.doll_group.add(doll) self.parent.enemy_group.add(doll) return summon_horizontal(doll.position.copy())
def phase_003(self): """Third phase of the stage velocity: the variable used to control object movement acceleration: object acceleration """ if 10*FRAME_PER_SECOND > self.timer and self.timer % (0.5*FRAME_PER_SECOND) == 0: for i in range(3): new = enemy.Enemy(self, 'bluesprite') new.bounds = -50, -50, STAGE_WIDTH_HEIGHT[0] + 50, STAGE_WIDTH_HEIGHT[1] + 50 new.position.x = random.randrange(50, STAGE_WIDTH_HEIGHT[0]-50) new.position.y = random.randrange(-20, 0) new.velocity = vector.objVector(0, 200*MEASURE_UNIT) new.acceleration = vector.objVector(0, -2.5*MEASURE_UNIT) new.fire_pattern = [self.fire_003_02] new.phase_list = [self.motion_001_02] new.health = 3 if random.randint(0, 3) == 3: i1 = item.Item(self, 'power') new.item_list = [i1] else: new.item_list = [] self.enemy_group.add(new) for i in range(2): new = enemy.Enemy(self, 'yellowsprite') new.bounds = -5, -30, STAGE_WIDTH_HEIGHT[0] + 5, STAGE_WIDTH_HEIGHT[1] + 5 new.position.x = random.randrange(50, STAGE_WIDTH_HEIGHT[0]-50) new.position.y = random.randrange(-20, 0) new.velocity = vector.objVector(0, 200*MEASURE_UNIT) new.acceleration = vector.objVector(0, -2.5*MEASURE_UNIT) new.fire_pattern = [self.fire_003_03, self.fire_003_04] new.phase_list = [self.motion_001_03] new.health = 5 if random.randint(0, 3) == 3: i1 = item.Item(self, 'largepower') new.item_list = [i1] else: new.item_list = [] self.enemy_group.add(new) elif self.timer >= 10*FRAME_PER_SECOND and self.timer%(0.5*FRAME_PER_SECOND) == 0: for i in range(6): new = enemy.Enemy(self, 'bluesprite') new.bounds = -50, -30, STAGE_WIDTH_HEIGHT[0] + 50, STAGE_WIDTH_HEIGHT[1] + 50 new.position.x = random.randrange(50, STAGE_WIDTH_HEIGHT[0]-50) new.position.y = random.randrange(-20, 0) new.velocity = vector.objVector(0, 200*MEASURE_UNIT) new.acceleration = vector.objVector(0, -2.5*MEASURE_UNIT) new.fire_pattern = [self.fire_003_05] new.phase_list = [self.motion_001_01] new.health = 2 if random.randint(0, 3) == 3: i1 = item.Item(self, 'point') new.item_list = [i1] else: new.item_list = [] self.enemy_group.add(new) if self.timer == 18*FRAME_PER_SECOND: self.next_phase()
[6, 6, 6]) check.crit_rate -= 0.0165 * i check.crit_dmg -= 0.033 * i check.recharge += 0.0583 * i sim = cls({check, *args}, Monster, 200) sim.turn_on_sim() return [sim.damage / sim.encounter_duration, i] dmg = [0, 0] for i in range(unit_obj.artifact.initial_subs): if check_recharge(unit_obj, i)[0] > dmg[0]: dmg = check_recharge(unit_obj, i) return dmg Monster = enemy.Enemy("Hilichurls", 90) def main(): from characters.Diluc import DilucF2P, DilucArtifact from characters.Xingqiu import XingqiuF2P, XingqiuArtifact from characters.Venti import VentiF2P from characters.Mona import MonaF2P from characters.Klee import KleeF2P from characters.Ningguang import NingguangF2P from characters.Albedo import AlbedoF2P, AlbedoArtifact from characters.Fischl import FischlF2P from characters.Bennett import BennettF2P from characters.Chongyun import ChongyunF2P from characters.Kaeya import KaeyaF2P from characters.Keqing import KeqingF2P