import math, sys; sys.path.insert(0, '../../b5tools'); from rec import upsert; from snd import snd # Repentance's explosive gas (1000.141.1): it hangs where it is let out until a blast sets it off. GAS = {"radius": 30, "damage": 0, "frames": 900, "scale": 1, "is_blast_detonate": True, "look": {"anm2": "gfx/effects/smoke_cloud/smoke_cloud.anm2", "animation": "Idle"}} BROWN = [0.6, 0.45, 0.3, 0.1, 0.05, 0] SIDE = 110 * math.pi / 180 # The slide's shots, 1.9198622 rad either side of its heading. TWENTY = 20 * math.pi / 180 CHARGE = ["ChargeStartHori", "ChargeStartDown", "ChargeStartUp"] LOOP = ["ChargeLoopHori", "ChargeLoopDown", "ChargeLoopUp"] END = ["ChargeEndHori", "ChargeEndDown", "ChargeEndUp"] first = [ # 0-2 (states 8): hop, then slide along Isaac's nearest axis till a wall, a side pair (6-8) and a cloud every # 60 pixels slid; the room shakes as she hits the wall. {"animation": "ChargeStartHori", "rolled": False, "directional_poses": CHARGE, "release": "Shoot", "sounds": [snd(0x12d, "Shoot"), snd(0x1da, "Shoot")], "next": 1}, {"animation": "ChargeLoopHori", "rolled": False, "directional_poses": LOOP, "charge_speed": 12, "on_wall": "end", "repeat": {"limit": 40}, "retention": 1, "release": "Shoot", "gas": GAS, "shots": [{"shot": "aimed", "on": "Shoot", "speed": 7, "fan": [[round(math.cos(SIDE), 4), round(math.sin(SIDE), 4)], [round(math.cos(SIDE), 4), -round(math.sin(SIDE), 4)]]}], "sounds": [snd(0x25, "Shoot")], "next": 2}, {"animation": "ChargeEndHori", "rolled": False, "directional_poses": END, "sounds": [snd(0x30, "Start")], "cooldown": 1}, # 3 Attack (state 9): a butt bomb lobbed at Isaac, 40-59 ticks' rest. {"animation": "Attack", "rolled": False, "release": "Shoot", "bombs": 1, "bomb_at": "player", "sounds": [snd(0xd5, "Shoot")], "cooldown": 40, "cooldown_random": [20, 1]}, ] second = [ # 0 Pop (state 16): the bag bursts into six clouds and she settles, ringing eight shots and leaving her puddle. {"animation": "Pop", "rolled": False, "release": "Shoot", "gas": dict(GAS, ring_count=6, ring_radius=80), "shots": [{"shot": "eight", "on": "Land", "speed": 10}], "creep": {"from": "Land", "to": "Land", "spread": 0, "growth": 0, "scale": 2.5, "color": BROWN}, "sounds": [snd(0xed, "Shoot"), snd(0x1c, "Shoot"), snd(0xe2, "Land")], "next": 4}, # 1-2 GoUnder (state 11): a fart ringing her with eight clouds, then up again (6-15 ticks' rest). {"animation": "GoUnder", "rolled": False, "release": "Shoot", "gas": dict(GAS, ring_count=8, ring_radius=100), "sounds": [snd(0x25, "Shoot")], "next": 4}, # 2 Attack2 (state 10): two butt bombs spat 20 degrees apart toward Isaac. {"animation": "Attack2", "rolled": False, "release": "Shoot", "bombs": 2, "bomb_at": "player", "bomb_scatter": 40, "sounds": [snd(0xc, "Shoot")], "next": 4}, # 3 Dive (state 6): under and across to a spot near Isaac, landing in an eight-ring and her puddle (two at most). {"animation": "Dive", "rolled": False, "leap": 19, "lunge_from": "Jump", "release": "Land", "untouchable": {"from": "Jump", "to": "Land"}, "shots": [{"shot": "eight", "speed": 10}], "creep": {"from": "Land", "to": "Land", "spread": 0, "growth": 0, "scale": 2.5, "color": BROWN}, "sounds": [snd(0x48, "Jump"), snd(0xe2, "Land")], "next": 4}, # 4 Surface back up, the pick's rest after it. {"animation": "Surface", "rolled": False, "cooldown": 6, "cooldown_random": [30, 1]}, ] upsert({"key": "colostomia", "name": "Colostomia", "flash_id": 91700000, "hp": 380, "mass": 40, "radius": 30, "contact_damage": 0.5, "explosion_response": {"manned_damage": 0}, "gibs": {"large": True}, "behavior": {"kind": "scripted", "move": "still", "retention": 0.65, "idle_pose": "Idle", "spawn_clip": {"animation": "Appear"}, "attacks": first, "opening": [3, 1], # State 3: a slide each time her rest ends, a bomb once 8-12 clouds hang (here about one pick # in three). "choice": {"one_in": 1, "options": [0, 0, 3]}, # Below 40% health the bag bursts (state 16); then state 4's weighted pick: the fart ring 1 (3 # with under four clouds), the bombs 2, the dive 1. "phases": [{"when": [{"hp_share_below": 0.4}], "attack": 0, "patch": {"idle_pose": "Idle2", "attacks": second, "opening": None, "choice": {"one_in": 1, "options": [1, 2, 2, 3]}}}]}, "death": {"animation": "Death"}, "death_burst": {"boss_sounds": ["rocket_blast_death_1.mp3"]}, "art": "gfx/bosses/colostomia/colostomia.anm2"})