import sys; sys.path.insert(0, '../../b4tools'); from rec import upsert WATER = ["rebirth/boss2_waterthrashing_reverb0.mp3", "rebirth/boss2_waterthrashing_reverb1.mp3"] def spin(begin, loop, end, tangent, at): return [{"animation": begin, "rolled": False, "next": at + 1, "sounds": [{"sounds": WATER, "on": "Sound"}]}, {"animation": loop, "rolled": False, "loop": {"at": "Back", "to": "Start", "count": 5}, "aura": {"radius": 1000, "push": 0, "swirl": {"tangent": tangent, "inward": 0.4, "ramp": 15, "cap": 1.5, "grounded": True}}, "next": at + 2}, {"animation": end, "rolled": False}] FANS = [[1, 0, 0, 1], [0, 1, -1, 0], [-1, 0, 0, -1], [0, -1, 1, 0]] def hell(spread, speed, fall): fans = FANS if spread > 0 else [[-xx, -xy, yx, yy] for xx, xy, yx, yy in FANS] # Mirrored: the other way round. return {"animation": "BulletHellLoop", "rolled": False, "loop": {"at": "Back", "to": "Start", "count": 7}, "shots": [{"shot": "spiral", "on": "Shoot", "spread": abs(spread), "speed": speed, "fan": fans, "over_terrain": 30}], "next": 12} attacks = [{"animation": "Spit", "rolled": False, "release": "Shoot", "spawn": ["drip"], "spawn_at": [0, 10], "spawn_velocity": [0, 5], "spawn_cone": {"turn": 90, "speed_random": 5}, "sounds": [{"sounds": ["rebirth/fat_wiggle.mp3"], "on": "Shoot"}]}] attacks += spin("SpinBegin", "SpinLoop", "SpinEnd", 0.8, 1) + spin("SpinBegin2", "SpinLoop2", "SpinEnd2", -0.8, 4) attacks.append({"animation": "BulletHellBegin", "rolled": False, "next": [8, 9, 10, 11], "sounds": [{"sounds": ["rebirth/fart_gurg.mp3", "rebirth/fart_gurg_2.mp3"], "on": "Sound"}]}) attacks += [hell(0.1745, 4, -0.1), hell(-0.1745, 4, -0.1), hell(0.4363, 6, -0.05), hell(-0.4363, 6, -0.05)] attacks.append({"animation": "BulletHellEnd", "rolled": False}) attacks.append({"animation": "Fart", "rolled": False, "release": "Shoot", "effects": [{"effect": "bolts", "directions": {"count": 3, "angle_random": 360}, "offset": 30, "bolt": {"art": {"anm2": "gfx/effects/fart/fart.anm2", "animation": "Explode", "scale": 0.6, "offset_y": 0}, "period": 25, "radius": 40, "enemy_damage": 0, "player_damage": 0, "friendly": True, "push": 6, "wave": {"spacing": 30, "period": 3}}}], "sounds": [{"sounds": ["rebirth/clog/clog_poopsmoke.mp3"], "on": "Shoot"}, {"sounds": ["rebirth/brownielaugh1.mp3", "rebirth/brownielaugh2.mp3"], "on": "Sound"}]}) upsert({"key": "clog", "name": "Clog", "flash_id": 91400000, "hp": 420, "mass": 120, "radius": 40, "contact_damage": 1, "gibs": {"large": True}, "behavior": {"kind": "scripted", "move": "anchor", "retention": 0, "idle_pose": "Idle", "spawn_clip": {"animation": "Appear"}, "choice": {"one_in": 10, "options": [0, 1, 4, 7, 13], "weights": [{"weight": 200, "per": -40, "type": "drip"}, {"weight": 0, "per": 10, "type": "drip", "least": 30, "rest": 309}, {"weight": 0, "per": 10, "type": "drip", "least": 30, "rest": 309}, {"weight": 30, "rest": 313}, {"weight": 30, "rest": 254}]}, "attacks": attacks}, "death": {"animation": "Death"}, "death_effects": [{"effect": "enemy_slay", "types": ["drip"], "room": False}], "death_burst": {"boss_sounds": ["rocket_blast_death_1.mp3"]}, "art": "gfx/bosses/clog/clog.anm2"})