import sys; sys.path.insert(0, '../../b5tools'); from rec import upsert; from snd import snd upsert({"key": "clutch_orbital", "name": "Clutch Orbital", "flash_id": 92100100, "hp": 200, "mass": 60, "radius": 12, "contact_damage": 1, "gibs": {"count": 0}, "grid_collision": False, "boss_bar": {"eligibility": "never"}, "death_link": {"target_type": "clutch", "animation": "Appear0", "all": True}, "behavior": {"kind": "scripted", "move": "orbit", "flying": True, "speed": 0.6, "retention": 0.7, "idle_pose": "Idle0", "spawn_clip": {"animation": "Appear0"}, "orbit": {"radius": 60, "spin": 0.06, "ring": 8, "center": "group", "target_type": "clutch"}}, "death_burst": {"sounds": ["rebirth/v2/bone_death_5a.mp3", "rebirth/v2/bone_death_5b.mp3"]}, "art": "gfx/monsters/clutch_orbital/clutch_orbital.anm2"}) phase2 = [ # A rush to a spot near Isaac (state 9), then rings of six at 9, six times, each turned half a gap (state 10). {"animation": "MoveStart2", "period": 1, "one_in": 40, "release": "Shoot", "leap": 15, "lunge_from": "Shoot", "retention": 0.9, "next": 1}, {"animation": "AttackStart", "rolled": False, "next": 2}, {"animation": "Attack", "rolled": False, "release": "Shoot", "loop": {"at": "Back", "to": "Start", "count": 5}, "shots": [{"shot": "ring", "count": 6, "speed": 9}], "sounds": [snd(700, "Shoot")], "cooldown": 30}, ] upsert({"key": "clutch", "name": "Clutch", "flash_id": 92100000, "hp": 500, "mass": 30, "radius": 30, "contact_damage": 1, "gibs": {"large": True}, "grid_collision": False, "behavior": {"kind": "scripted", "move": "drift", "speed": 0.6, "retention": 0.8, "flying": True, "idle_pose": "Idle", # Shielded while a Clickety Clack walks (Rebirth: possessing one, the rest shielded). "partner": {"type": "clickety_clack", "shield": True}, "attacks": [ # With every Clack fallen, stunned then raising their bones (states 7, 8). {"animation": "Stun", "period": 1, "one_in": 10, "when": [{"type_count": {"type": 889, "below": 1}}], "next": 1}, {"animation": "StunLoop", "rolled": False, "loop": {"at": "Back", "to": "Start", "count": 30}, "next": 2}, {"animation": "StunEnd", "rolled": False, "release": "Shoot", "revive": {"type": "clickety_clack_pile", "child_type": "clickety_clack"}, "sounds": [snd([0x10b, 0x139], "Shoot")], "cooldown": 60}], # At a quarter (state 16): bone orbitals ring him, and he rushes and fires rings. "phases": [{"when": [{"hp_share_below": 0.25}], "attack": 0, "patch": {"partner": None, "idle_pose": "Idle2", "attacks": [{"animation": "Transition", "rolled": False, "release": "Shoot", "spawn": ["clutch_orbital"], "count": 8, "spawn_offset": 60, "sounds": [snd(0x1a2, "Shoot")], "next": -1}] + [ dict(a, next=a["next"] + 1) if "next" in a else a for a in phase2]}}]}, "death": {"animation": "Death"}, "death_burst": {"boss_sounds": ["rocket_blast_death_1.mp3"]}, "art": "gfx/bosses/clutch/clutch.anm2"})