import sys; sys.path.insert(0, '../../b5tools'); from rec import upsert; from snd import snd FIRE = {"anm2": "gfx/projectiles/fire/fire.anm2", "animation": "Flickering"} PURPLE = [0.6, 0.3, 1, 60, 0, 90] JET = {"effect": "bolts", "directions": {"count": 1}, "bolt": {"art": {"anm2": "gfx/effects/fire_jet/fire_jet.anm2", "animation": "Idle", "scale": 1, "offset_y": 0}, "period": 3, "radius": 14, "enemy_damage": 0, "player_damage": 0.5, "friendly": False}} WAVES = {"effect": "bolts", "directions": "cardinal", "bolt": {**JET["bolt"], "wave": {"spacing": 30, "period": 3, "shrink": 0.03, "least": 0.2}}} GHOST = {"death_burst": {"sounds": ["death_burst_small_0.mp3", "death_burst_small_1.mp3", "death_burst_small_2.mp3"]}, "death": {"anm2": "gfx/effects/blood_explosion/blood_explosion.anm2", "animation": "Poof", "height": -20}, "gibs": {"count": 0}} upsert({"key": "exorcist", "name": "Exorcist", "flash_id": 83200000, "hp": 25, "mass": 10, "radius": 13, "contact_damage": 1, **GHOST, "behavior": {"kind": "scripted", "move": "path", "speed": 0.5, "retention": 1, "idle_pose": "WalkVert", "facing": {"poses": ["WalkHori", "WalkHori", "WalkVert", "WalkVert"]}, "attacks": [ # Revive: a fallen enemy's spirit raised as a Lil' Haunt, one at a time. {"animation": "Revive", "period": 1, "one_in": 60, "release": "Revive", "spawn": ["lil_haunt_260_10"], "spawn_cap": {"below": 1}, "spawn_offset": 20, "sounds": [snd(0x131, "Revive")], "cooldown": 60}]}, "art": "gfx/monsters/exorcist/exorcist.anm2"}) upsert({"key": "fanatic", "name": "Fanatic", "flash_id": 83200100, "hp": 35, "mass": 5, "radius": 13, "contact_damage": 1, **GHOST, "behavior": {"kind": "scripted", "move": "still", "retention": 0.8, "idle_pose": "SummonLoop1", "spawn_clip": {"animation": "Summon1"}, # Its ritual done (The Heretic risen), it stands and hunts Isaac. "phases": [{"when": [{"after_tick": 150}], "attack": 0, "patch": {"move": "path", "speed": 0.5, "retention": 1, "idle_pose": "WalkVert", "facing": {"poses": ["WalkHori", "WalkHori", "WalkVert", "WalkVert"]}, "attacks": [{"animation": "Transition", "rolled": False}, # Two purple shots at Isaac turning round each other. {"animation": "Attack", "period": 1, "one_in": 60, "range": 250, "release": "Shoot", "shots": [{"shot": "aimed", "speed": 6, "orbit": "clockwise", "tint": PURPLE}, {"shot": "aimed", "speed": 6, "orbit": "counterclockwise", "tint": PURPLE}], "sounds": [snd(0x13f, "Shoot")], "cooldown": 40}]}}]}, "art": "gfx/monsters/fanatic/fanatic.anm2"}) attacks = [ # 0-1 Summoning (state 6): five Fanatics kneel round him; he stays unseen and untouchable while they live. {"animation": "Summoning", "rolled": False, "release": "Shoot", "spawn": ["fanatic"], "count": 5, "spawn_at": [[0, -80], [76, -25], [47, 65], [-47, 65], [-76, -25]], "sounds": [snd(0x131, "Shoot")], "untouchable": {"from": "Start", "to": "Sound"}}, # 1-3 Point (state 7): five lobs at Isaac (six below half), each bursting into fire where it lands. {"animation": "PointDown", "rolled": False, "release": "Shoot", "directional_poses": ["PointLeft", "PointDown", "PointDown", "PointRight"], "shots": [{"shot": "aimed", "speed": 7, "fall_velocity": -14, "fall_acceleration": 0.7, "look": FIRE, "landing": [WAVES]}], "sounds": [snd(0x131, "Shoot")], "repeat": {"limit": 4}, "cooldown": 60}, # 2-3 Attack1, then the dive (states 14, 15): a ring of fire, then up and down onto Isaac in a fire burst. {"animation": "Attack1", "rolled": False, "release": "Shoot", "shots": [{"shot": "ring", "count": 10, "speed": 8, "look": FIRE}], "sounds": [snd(0x132, "Shoot")], "next": 3}, {"animation": "Divebomb", "rolled": False, "release": "Sound", "pounce": True, "untouchable": {"from": "Shoot", "to": "Sound"}, "shots": [{"shot": "ring", "count": 12, "speed": 9, "look": FIRE}], "effects": [WAVES], "sounds": [snd([0x30, 0x1e3], "Shoot"), snd(0x1eb, "Sound")], "cooldown": 60}, ] upsert({"key": "the_heretic", "name": "The Heretic", "flash_id": 90500000, "hp": 789, "mass": 50, "radius": 26, "contact_damage": 1, "gibs": {"large": True}, "grid_collision": False, "behavior": {"kind": "scripted", "move": "drift", "speed": 0.6, "retention": 0.8, "flying": True, "idle_pose": "IdleInvis", "untouchable": True, "spawn_clip": {"animation": "Summoning", "attack": 0}, "attacks": attacks[:1], # His Fanatics fallen (state 5): he shows himself and fights, every 60 idle ticks (30 below half) # a weighted pick of his lobs and his dive. "phases": [{"when": [{"type_count": {"type": 832, "below": 1}, "idle": True, "after_tick": 130}], "patch": {"idle_pose": "Idle", "untouchable": None, "spawn_clip": {"animation": "InvisEnd"}, "attacks": attacks, "choice": {"one_in": 1, "options": [1, 2]}}}]}, "death": {"animation": "Death"}, "death_burst": {"boss_sounds": ["rocket_blast_death_1.mp3"]}, "art": "gfx/bosses/the_heretic/the_heretic.anm2"})