digraph G { bgcolor = "#000000"; ranksep = 1; // Cluster options graph [ compound = true; // Allow edges between clusters with lhead/ltail color = "#FFFFFF"; // Border colour fontcolor = "#FFFFFF"; style = "rounded"; ]; node [ shape = ellipse; style = filled; color = "#FFFFFF"; // Border colour fontcolor = "#FFFFFF"; fillcolor = "#404040"; ] edge [ color = "#FFFFFF"; fontcolor = "#FFFFFF"; ] // Node labels _A354 [label = "$A354: Transition to flying"]; _A35B [label = "$A35B: Initial"]; _A377 [label = "$A377: Wait to fade in"]; _A389 [label = "$A389: Fade in eye"]; _A3DF [label = "$A3DF: Fade in body"]; _A455 [label = "$A455: Wait to roar"]; _A478 [label = "$A478: Roar before fly"]; _B2F3 [label = "$B2F3: Liftoff"]; _B321 [label = "$B321: Decide action"]; _B3EC [label = "$B3EC: Setup"]; _B3F8 [label = "$B3F8: Move to position"]; _B455 [label = "$B455: Move to position"]; _B493 [label = "$B493: Descending - aiming down"]; _B4D1 [label = "$B4D1: Descending - aiming left"]; _B516 [label = "$B516: Ascending - aiming up"]; _B554 [label = "$B554: Ascending - aiming up faster"]; _B594 [label = "$B594: Ascending - decelerate"]; _B5E5 [label = "$B5E5: Move to wall behind Ridley"]; _B613 [label = "$B613: Move to wall in front of Ridley"]; _B6A7 [label = "$B6A7: Fly to position"]; _B6DD [label = "$B6DD: Wait at position"]; _B70E [label = "$B70E: Descending"]; _B7B9 [label = "$B7B9: Ascending"]; _BAB7 [label = "$BAB7: Lunge"]; _BB8F [label = "$BB8F: Setup"]; _BBC4 [label = "$BBC4: Rising to up to 40h px"]; _BBF1 [label = "$BBF1: Rising to room middle"]; _BC2E [label = "$BC2E: Release Samus"]; _BD4E [label = "$BD4E: Dodging power bomb"]; _C538 [label = "$C538: Dying - grabbed Samus"]; _C53E [label = "$C53E: Death roar"]; _C551 [label = "$C551: Move to death spot"]; _C588 [label = "$C588: Lowering acid and release Samus"]; _C5A8 [label = "$C5A8: Start falling apart"]; _C5C8 [label = "$C5C8: Falling apart"]; _C5DA [label = "$C5DA: Still falling apart"]; // Conditions. From_To [... label = "condition"] _Start_A35B [shape = hexagon, fillcolor = "#008000", label = "room load"]; _Start_BAB7 [shape = hexagon, fillcolor = "#008000", label = "power bomb active and not holding Samus"]; _C5DA_Finish [shape = hexagon, fillcolor = "#800000", label = "dead"]; _B321_Hover [shape = hexagon, fillcolor = "#000000", label = "decided hover"]; _B321_Swoop [shape = hexagon, fillcolor = "#000000", label = "decided swoop"]; _B321_Pogo [shape = hexagon, fillcolor = "#000000", label = "decided pogo"]; _B321_Lunge [shape = hexagon, fillcolor = "#000000", label = "decided lunge"]; _B5E5_Pogo [shape = hexagon, fillcolor = "#000000", label = "not spin jumping"]; _B70E_Pogo [shape = hexagon, fillcolor = "#000000", label = "cannot grab Samus"]; _B70E_GrabbedSamus [shape = hexagon, fillcolor = "#000000", label = "can grab Samus"]; _B7B9_Pogo [shape = hexagon, fillcolor = "#000000", label = "pogo not finished"]; _B7B9_DecideAction [shape = hexagon, fillcolor = "#000000", label = "pogo finished"]; _B594_DecideAction [shape = hexagon, fillcolor = "#000000", label = "Samus is spin jumping / damage boosting"]; _B594_Lunge [shape = hexagon, fillcolor = "#000000", label = "Samus is not spin jumping / damage boosting"]; _BAB7_MissedSamus [shape = hexagon, fillcolor = "#000000", label = "lunge missed Samus"]; _BAB7_CanGrabSamus [shape = hexagon, fillcolor = "#000000", label = "can grab Samus"]; _MissedSamus_DeathSequence [shape = hexagon, fillcolor = "#000000", label = "missed 10 times"]; _MissedSamus_Dodge [shape = hexagon, fillcolor = "#000000", label = "power bomb laid"]; _CanGrabSamus_Dying [shape = hexagon, fillcolor = "#000000", label = "zero health"]; _CanGrabSamus_Dodge [shape = hexagon, fillcolor = "#000000", label = "power bomb laid"]; _BD4E_GrabbedSamus [shape = hexagon, fillcolor = "#000000", label = "holding Samus"]; _BD4E_DecideAction [shape = hexagon, fillcolor = "#000000", label = "not holding Samus"]; // Clusters (cluster is a required prefix). Edges connecting nodes within the cluster must be listed here subgraph cluster_Initial_Sequence { bgcolor = "#202020"; label = "Initial sequence"; _A35B -> _A377; _A377 -> _A389; _A389 -> _A3DF; _A3DF -> _A455; _A455 -> _A478; _A478 -> _A354; _A354 -> _B2F3; } subgraph cluster_Hover { bgcolor = "#202020"; label = "Hover"; _B5E5 -> _B613; _B613 -> _B5E5; } subgraph cluster_Swoop { bgcolor = "#202020"; label = "Swoop"; _B455 -> _B493; _B493 -> _B4D1; _B4D1 -> _B516; _B516 -> _B554; _B554 -> _B594; _B594 -> _B594_DecideAction; _B594 -> _B594_Lunge; } subgraph cluster_Pogo { bgcolor = "#202020"; label = "Pogo"; _B6A7 -> _B6DD; _B6DD -> _B70E; _B70E -> _B70E_Pogo; _B70E_Pogo -> _B7B9; _B70E -> _B70E_GrabbedSamus; _B7B9 -> _B7B9_Pogo; _B7B9_Pogo -> _B70E; _B7B9 -> _B7B9_DecideAction; } subgraph cluster_GrabbedSamus { bgcolor = "#202020"; label = "Grabbed Samus"; _BB8F -> _BBC4; _BBC4 -> _BBF1; _BBF1 -> _BC2E; } subgraph cluster_Lunge { bgcolor = "#202020"; label = "Lunge"; _BAB7 -> _BAB7_MissedSamus; _BAB7_MissedSamus -> _MissedSamus_DeathSequence; _BAB7_MissedSamus -> _MissedSamus_Dodge; _BAB7 -> _BAB7_CanGrabSamus; _BAB7_CanGrabSamus -> _CanGrabSamus_Dying; _BAB7_CanGrabSamus -> _CanGrabSamus_Dodge; } subgraph cluster_LungeMissedSamus { bgcolor = "#202020"; label = "Lunge - missed Samus"; _B3EC -> _B3F8; } subgraph cluster_DeathSequence { bgcolor = "#202020"; label = "Death sequence"; _C53E -> _C551; _C551 -> _C588; _C588 -> _C5A8; _C5A8 -> _C5C8; _C5C8 -> _C5DA; } subgraph cluster_DecideAction { bgcolor = "#202020"; _B321 -> _B321_Hover; _B321 -> _B321_Swoop; _B321 -> _B321_Pogo; _B321 -> _B321_Lunge; } subgraph cluster_Dodge { bgcolor = "#202020"; _BD4E -> _BD4E_GrabbedSamus; _BD4E -> _BD4E_DecideAction; } // Edges that aren't contained within a cluster // // Start/finish points _Start_A35B -> _A35B; _Start_BAB7 -> _BAB7; _C5DA -> _C5DA_Finish; // Liftoff _B2F3 -> _B321; // -> decide action // Grabbed Samus _B321 -> _BC2E [dir=back]; // -> decide action // Lunge - missed Samus _B321 -> _B3F8 [dir=back]; // -> decide action // Dying - grabbed Samus _C538 -> _C53E; // -> death sequence // Decide action _B321_Hover -> _B5E5; _B321_Swoop -> _B455; _B321_Pogo -> _B6A7; _B321_Lunge -> _BAB7; // Swoop _B321 -> _B594_DecideAction [dir=back]; _B594_Lunge -> _BAB7; // Pogo _B70E_GrabbedSamus -> _BB8F; _B321 -> _B7B9_DecideAction [dir=back]; // Hover _B5E5 -> _B5E5_Pogo [ltail=cluster_Hover]; _B5E5_Pogo -> _B6A7; // Lunge _BAB7_CanGrabSamus -> _BB8F; // -> grabbed Samus _MissedSamus_DeathSequence -> _C53E; _MissedSamus_Dodge -> _BD4E; _BAB7_MissedSamus -> _B3EC; // -> lunge - missed Samus _CanGrabSamus_Dying -> _C538; _CanGrabSamus_Dodge -> _BD4E; // Dodging power bomb _BD4E_GrabbedSamus -> _BB8F; _B321 -> _BD4E_DecideAction [dir=back]; }