import sys; sys.path.insert(0, '../../b5tools'); from rec import upsert; from snd import snd SPIRAL = [[1, 0, 0, 1], [0, 1, -1, 0], [-1, 0, 0, -1], [0, -1, 1, 0]] def whip(name, beams): # A tendril lashed out to the wall (the_scourge_chain), drawn as a short beam. return {"animation": name, "rolled": False, "laser": {"width": 20, "from": "Shoot", "beams": [{"direction": b} for b in beams], "tint": [0.5, 0.3, 0.3, 40, 0, 0]}, "sounds": [snd(0x4d, "Sound")], "cooldown": 20} attacks = [ whip("TrapDown", [[0, 1]]), whip("SliceBoth", [[-1, 0], [1, 0]]), {**whip("SliceRight", [[1, 0]]), "directional_poses": ["SliceLeft", "SliceRight", "SliceRight", "SliceRight"]}, # BroccoliAttack (state 4): a homing cluster that bursts where it ends into shots. {"animation": "BroccoliAttack", "rolled": False, "release": "Shoot", "shots": [{"shot": "aimed", "speed": 7, "scale": 2.5, "homing": {}, "landing": [{"effect": "enemy_shots", "count": 10, "speed": 8}]}], "sounds": [snd(0x13e, "Shoot")], "cooldown": 20}, # Hover (state 5): four inward-turning spiral streams. {"animation": "HoverStart", "rolled": False, "next": 5}, {"animation": "HoverLoop", "rolled": False, "loop": {"at": "Back", "to": "Start", "count": 6}, "shots": [{"shot": "spiral", "on": "Fire", "speed": 7, "spread": 0.2, "fan": SPIRAL}], "next": 6}, {"animation": "HoverEnd", "rolled": False, "cooldown": 20}, ] upsert({"key": "the_scourge", "name": "The Scourge", "flash_id": 90900000, "hp": 950, "mass": 75, "radius": 20, "contact_damage": 1, "gibs": {"large": True}, "grid_collision": False, "behavior": {"kind": "scripted", "move": "drift", "speed": 0.8, "retention": 0.85, "flying": True, "idle_pose": "Idle", "spawn_clip": {"animation": "Appear"}, "attacks": attacks, # A weighted pick (each 10 against idling's 1; the tendrils only with Isaac below him). "choice": {"one_in": 30, "options": [0, 1, 2, 3, 4], "weights": [{"weight": 10}] * 5}}, "death": {"animation": "Death"}, "death_burst": {"boss_sounds": ["rocket_blast_death_1.mp3"]}, "art": "gfx/bosses/the_scourge/the_scourge.anm2"})