def register_zombie_fast_enemy(): x = 6 y = 4 indices_by_dir = { Direction.DOWN: [(x, y), (x + 1, y), (x + 2, y)], Direction.LEFT: [(x, y + 1), (x + 1, y + 1), (x + 2, y + 1)], Direction.RIGHT: [(x, y + 2), (x + 1, y + 2), (x + 2, y + 2)], Direction.UP: [(x, y + 3), (x + 1, y + 3), (x + 2, y + 3)] } register_basic_enemy( npc_type=NpcType.ZOMBIE_FAST, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_ZOMBIE_FAST, size=(30, 30), max_health=20, health_regen=0, speed=0.11, exp_reward=15, enemy_loot_table=LootTableId.LEVEL_4, death_sound_id=SoundId.DEATH_ZOMBIE), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-9, -18))
def register_human_summoner_enemy(): x = 0 indices_by_dir = { Direction.DOWN: [(x, 0), (x + 1, 0), (x + 2, 0), (x + 1, 0)], Direction.LEFT: [(x, 1), (x + 1, 1), (x + 2, 1), (x + 1, 1)], Direction.RIGHT: [(x, 2), (x + 1, 2), (x + 2, 2), (x + 1, 2)], Direction.UP: [(x, 3), (x + 1, 3), (x + 2, 3), (x + 1, 3)] } register_basic_enemy( npc_type=NpcType.HUMAN_SUMMONER, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_HUMAN_SUMMONER, size=(32, 32), max_health=60, health_regen=2, speed=0.08, exp_reward=52, enemy_loot_table=LootTableId.LEVEL_6, death_sound_id=SoundId.DEATH_ICE_WITCH), # TODO mind_constructor=NpcMind, spritesheet_path="resources/graphics/manga_characters_spritesheet.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-8, -16))
def register_fire_demon_enemy(): x = 0 y = 4 indices_by_dir = { Direction.DOWN: [(x, y), (x + 1, y), (x + 2, y)], Direction.LEFT: [(x, y + 1), (x + 1, y + 1), (x + 2, y + 1)], Direction.RIGHT: [(x, y + 2), (x + 1, y + 2), (x + 2, y + 2)], Direction.UP: [(x, y + 3), (x + 1, y + 3), (x + 2, y + 3)] } register_basic_enemy( npc_type=NpcType.FIRE_DEMON, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_FIRE_DEMON, size=(32, 32), max_health=50, health_regen=0, speed=0.09, exp_reward=42, enemy_loot_table=LootTableId.LEVEL_5, death_sound_id=SoundId.DEATH_HUMAN), # TODO mind_constructor=NpcMind, spritesheet_path="resources/graphics/monsters_spritesheet.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-8, -16))
def register_goblin_spearman_enemy(): x = 9 y = 0 indices_by_dir = { Direction.DOWN: [(x + i, y + 0) for i in range(3)], Direction.LEFT: [(x + i, y + 1) for i in range(3)], Direction.RIGHT: [(x + i, y + 2) for i in range(3)], Direction.UP: [(x + i, y + 3) for i in range(3)] } register_basic_enemy( npc_type=NpcType.GOBLIN_SPEARMAN, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_GOBLIN_SPEARMAN, size=(24, 24), max_health=21, health_regen=0, speed=0.08, exp_reward=14, enemy_loot_table=LootTableId.LEVEL_3, death_sound_id=SoundId.DEATH_GOBLIN), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet_2.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-12, -24))
def register_warrior_enemy(): x = 6 indices_by_dir = { Direction.DOWN: [(x, 0), (x + 1, 0), (x + 2, 0), (x + 1, 0)], Direction.LEFT: [(x, 1), (x + 1, 1), (x + 2, 1), (x + 1, 1)], Direction.RIGHT: [(x, 2), (x + 1, 2), (x + 2, 2), (x + 1, 2)], Direction.UP: [(x, 3), (x + 1, 3), (x + 2, 3), (x + 1, 3)] } register_basic_enemy( npc_type=NpcType.WARRIOR, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_WARRIOR, size=(32, 32), max_health=32, health_regen=0, speed=0.12, exp_reward=25, enemy_loot_table=LootTableId.LEVEL_5, death_sound_id=SoundId.DEATH_HUMAN), mind_constructor=NpcMind, spritesheet_path="resources/graphics/human_spritesheet.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-8, -16))
def register_zombie_enemy(): indices_by_dir = { Direction.DOWN: [(0, 0), (1, 0), (2, 0)], Direction.LEFT: [(0, 1), (1, 1), (2, 1)], Direction.RIGHT: [(0, 2), (1, 2), (2, 2)], Direction.UP: [(0, 3), (1, 3), (2, 3)] } register_basic_enemy( npc_type=NpcType.ZOMBIE, npc_data=NpcData.enemy( sprite=Sprite.ENEMY_ZOMBIE, size=(30, 30), max_health=15, health_regen=0, speed=0.03, exp_reward=10, enemy_loot_table=LootTableId.LEVEL_3, death_sound_id=SoundId.DEATH_ZOMBIE), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet_2.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-9, -18) )
def register_skeleton_mage_enemy(): x = 3 indices_by_dir = { Direction.DOWN: [(x, 0), (x + 1, 0), (x + 2, 0), (x + 1, 0)], Direction.LEFT: [(x, 1), (x + 1, 1), (x + 2, 1), (x + 1, 1)], Direction.RIGHT: [(x, 2), (x + 1, 2), (x + 2, 2), (x + 1, 2)], Direction.UP: [(x, 3), (x + 1, 3), (x + 2, 3), (x + 1, 3)] } register_basic_enemy( npc_type=NpcType.SKELETON_MAGE, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_SKELETON_MAGE, size=(32, 32), max_health=50, health_regen=0, speed=0.05, exp_reward=25, enemy_loot_table=LootTableId.LEVEL_4, death_sound_id=SoundId.DEATH_SKELETON_MAGE), mind_constructor=NpcMind, spritesheet_path="resources/graphics/monsters_spritesheet.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-8, -16)) register_projectile_controller(PROJECTILE_TYPE, ProjectileController)
def register_necromancer_enemy(): indices_by_dir = { Direction.DOWN: [(x, 0) for x in range(9, 12)], Direction.LEFT: [(x, 1) for x in range(9, 12)], Direction.RIGHT: [(x, 2) for x in range(9, 12)], Direction.UP: [(x, 3) for x in range(9, 12)] } register_basic_enemy( npc_type=NpcType.NECROMANCER, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_NECROMANCER, size=(36, 36), max_health=60, health_regen=0, speed=0.02, exp_reward=29, enemy_loot_table=LootTableId.LEVEL_5, death_sound_id=SoundId.DEATH_NECRO), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet_3.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 64), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-6, -28)) register_projectile_controller(PROJECTILE_TYPE, ProjectileController)
def register_warrior_king_enemy(): x = 9 indices_by_dir = { Direction.DOWN: [(x, 4), (x + 1, 4), (x + 2, 4)], Direction.LEFT: [(x, 5), (x + 1, 5), (x + 2, 5)], Direction.RIGHT: [(x, 6), (x + 1, 6), (x + 2, 6)], Direction.UP: [(x, 7), (x + 1, 7), (x + 2, 7)] } register_basic_enemy( npc_type=NpcType.WARRIOR_KING, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_WARRIOR_KING, size=(32, 32), max_health=240, health_regen=0, speed=0.13, exp_reward=90, enemy_loot_table=LootTableId.BOSS_WARRIOR_KING, death_sound_id=SoundId.DEATH_BOSS, is_boss=True), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet_3.png", original_sprite_size=(32, 32), scaled_sprite_size=(54, 60), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-11, -23), )
def register_skeleton_boss_enemy(): x = 6 y = 0 indices_by_dir = { Direction.DOWN: [(x + i, y + 0) for i in range(3)], Direction.LEFT: [(x + i, y + 1) for i in range(3)], Direction.RIGHT: [(x + i, y + 2) for i in range(3)], Direction.UP: [(x + i, y + 3) for i in range(3)] } register_basic_enemy( npc_type=NpcType.SKELETON_BOSS, npc_data=NpcData.enemy( sprite=Sprite.ENEMY_SKELETON_BOSS, size=(32, 32), max_health=120, health_regen=3, speed=0.07, exp_reward=60, enemy_loot_table=LootTableId.BOSS_SKELETON, death_sound_id=SoundId.DEATH_BOSS, is_boss=True), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet.png", original_sprite_size=(32, 32), scaled_sprite_size=(52, 56), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-10, -24) ) register_projectile_controller(PROJECTILE_TYPE, ProjectileController) register_buff_effect(BUFF_STUNNED, StunnedFromFiring)
def register_goblin_warrior_enemy(): x = 3 y = 4 indices_by_dir = { Direction.DOWN: [(x + i, y + 0) for i in range(3)], Direction.LEFT: [(x + i, y + 1) for i in range(3)], Direction.RIGHT: [(x + i, y + 2) for i in range(3)], Direction.UP: [(x + i, y + 3) for i in range(3)] } register_basic_enemy( npc_type=NpcType.GOBLIN_WARRIOR, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_GOBLIN_WARRIOR, size=(32, 32), max_health=110, health_regen=0, speed=0.09, exp_reward=50, enemy_loot_table=LootTableId.BOSS_GOBLIN, death_sound_id=SoundId.DEATH_BOSS, is_boss=True), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet_2.png", original_sprite_size=(32, 32), scaled_sprite_size=(52, 52), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-10, -20))
def register_goblin_warlock_enemy(): enemy_indices_by_dir = { Direction.DOWN: [(0, 4), (1, 4), (2, 4)], Direction.LEFT: [(0, 5), (1, 5), (2, 5)], Direction.RIGHT: [(0, 6), (1, 6), (2, 6)], Direction.UP: [(0, 7), (1, 7), (2, 7)] } register_basic_enemy( npc_type=NpcType.GOBLIN_WARLOCK, npc_data=NpcData.enemy( sprite=Sprite.ENEMY_GOBLIN_WARLOCK, size=(24, 24), max_health=21, health_regen=0, speed=0.032, exp_reward=14, enemy_loot_table=LootTableId.LEVEL_4, death_sound_id=SoundId.DEATH_GOBLIN), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet_2.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=enemy_indices_by_dir, sprite_position_relative_to_entity=(-12, -24) ) register_projectile_controller(PROJECTILE_TYPE, ProjectileController) projectile_sprite_sheet = SpriteSheet("resources/graphics/goblin_fireball_entity.png") projectile_original_sprite_size = (132, 156) projectile_scaled_sprite_size = (20, 20) projectile_indices_by_dir = { Direction.DOWN: [(0, 0), (1, 0), (2, 0), (3, 0)] } projectile_sprite = Sprite.PROJECTILE_ENEMY_GOBLIN_WARLOCK register_entity_sprite_map(projectile_sprite, projectile_sprite_sheet, projectile_original_sprite_size, projectile_scaled_sprite_size, projectile_indices_by_dir, (0, 0)) register_buff_effect(BUFF_TYPE, Burnt) register_buff_text(BUFF_TYPE, "Burnt")
def register_rat_2_enemy(): indices_by_dir = { Direction.DOWN: [(0, 0), (1, 0), (2, 0)], Direction.LEFT: [(0, 1), (1, 1), (2, 1)], Direction.RIGHT: [(0, 2), (1, 2), (2, 2)], Direction.UP: [(0, 3), (1, 3), (2, 3)] } register_basic_enemy(npc_type=NpcType.RAT_2, npc_data=NpcData.enemy( sprite=Sprite.ENEMY_RAT_2, size=(40, 40), max_health=11, health_regen=0, speed=0.08, exp_reward=8, enemy_loot_table=LootTableId.LEVEL_2, death_sound_id=SoundId.DEATH_RAT), mind_constructor=NpcMind, spritesheet_path="resources/graphics/gray_rat.png", original_sprite_size=(32, 32), scaled_sprite_size=(50, 50), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-5, -5))
def register_mummy_enemy(): indices_by_dir = { Direction.DOWN: [(6, 4), (7, 4), (8, 4)], Direction.LEFT: [(6, 5), (7, 5), (8, 5)], Direction.RIGHT: [(6, 6), (7, 6), (8, 6)], Direction.UP: [(6, 7), (7, 7), (8, 7)] } register_basic_enemy( npc_type=NpcType.MUMMY, npc_data=NpcData.enemy(sprite=Sprite.ENEMY_MUMMY, size=(30, 30), max_health=20, health_regen=2, speed=0.06, exp_reward=15, enemy_loot_table=LootTableId.LEVEL_4, death_sound_id=SoundId.DEATH_ZOMBIE), mind_constructor=NpcMind, spritesheet_path="resources/graphics/enemy_sprite_sheet_2.png", original_sprite_size=(32, 32), scaled_sprite_size=(48, 48), spritesheet_indices=indices_by_dir, sprite_position_relative_to_entity=(-9, -18))