def spawn_creatures(self, pcs, mobs): i = 0 for pc, gt in pcs: if pc.health > 0: pc.set_in_combat(self, GameTile(*gt), i) i += 2 i = 1 mob_zone = [ gt for gt in GameTile.all_tiles(self.MAP_RADIUS) if gt.y < -3.25 ] for mobdef in mobs: gt = random.choice(mob_zone) mob_zone.remove(gt) c = Creature(mobdef) c.set_in_combat(self, gt, i) i += 2
def apply_ability(self, creature, target): super().apply_ability(creature, target) from creatures import Creature c = Creature(self.defkey) c.set_in_combat(creature.combat, target, creature.next_action + 100) c.is_pc = creature.is_pc