?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #define make_caravan(start_time, x, tile, type, hp, bonus)      \
  2.     case start_time:                                            \
  3.         push_npc(x, -32, 0, 2, tile, type, hp, bonus);          \
  4.         push_npc(x + 32, -32, 0, 2, tile, type, hp, bonus);     \
  5.         break;                                                  \
  6.     case start_time + 5:                                        \
  7.         push_npc(x, -32, 0, 2, tile, type + 1, hp, bonus);      \
  8.         push_npc(x + 32, -32, 0, 2, tile, type + 1, hp, bonus); \
  9.         break;                                                  \
  10.     case start_time + 10:                                       \
  11.         push_npc(x, -32, 0, 2, tile, type + 2, hp, bonus);      \
  12.         push_npc(x + 32, -32, 0, 2, tile, type + 2, hp, bonus); \
  13.         break;                                                  \
  14.     case start_time + 15:                                       \
  15.         npc_by_type_set_speed(type, (x > 160) ? -4 : 4, 0);     \
  16.         break;                                                  \
  17.     case start_time + 20:                                       \
  18.         npc_by_type_set_speed(type + 1, (x > 160) ? -4 : 4, 0); \
  19.         break;                                                  \
  20.     case start_time + 25:                                       \
  21.         npc_type_shoot(type, 3, 3);                             \
  22.         npc_type_shoot(type + 1, 4, 3);                         \
  23.         npc_type_shoot(type + 2, 5, 3);                         \
  24.         npc_by_type_set_speed(type + 2, (x > 160) ? -4 : 4, 0); \
  25.         break;                                                  \
  26.     case start_time + 27:                                       \
  27.         npc_type_shoot(type, 2, 3);                             \
  28.         npc_type_shoot(type + 1, 1, 3);                         \
  29.         npc_type_shoot(type + 2, 0, 3);                         \
  30.         break;                                                  \
  31.     case start_time + 29:                                       \
  32.         npc_type_shoot(type, 1, 3);                             \
  33.         npc_type_shoot(type + 1, 0, 3);                         \
  34.         npc_type_shoot(type + 2, -1, 3);                        \
  35.         break;                                                  \
  36.     case start_time + 35:                                       \
  37.         npc_by_type_set_speed(type, 1, 3);                      \
  38.         npc_by_type_set_speed(type + 1, 0, 3);                  \
  39.         npc_by_type_set_speed(type + 2, -2, 3);                 \
  40.         break;
  41.  
  42. #define make_double_caravan(start_time, tile, type, hp, bonus) \
  43.     case start_time:                                           \
  44.         push_npc(32, -32, 0, 2, tile, type, hp, bonus);        \
  45.         push_npc(270, -32, 0, 2, tile, type + 10, hp, bonus);  \
  46.         break;                                                 \
  47.     case start_time + 4:                                       \
  48.         push_npc(32, -32, 0, 2, tile, type + 1, hp, bonus);    \
  49.         push_npc(270, -32, 0, 2, tile, type + 11, hp, bonus);  \
  50.         break;                                                 \
  51.     case start_time + 8:                                       \
  52.         push_npc(32, -32, 0, 2, tile, type + 2, hp, bonus);    \
  53.         push_npc(270, -32, 0, 2, tile, type + 12, hp, bonus);  \
  54.         break;                                                 \
  55.     case start_time + 9:                                       \
  56.         npc_by_type_set_speed(type, 2, 0);                     \
  57.         npc_by_type_set_speed(type + 10, -2, 0);               \
  58.         break;                                                 \
  59.     case start_time + 14:                                      \
  60.         npc_by_type_set_speed(type + 1, 2, 0);                 \
  61.         npc_by_type_set_speed(type + 11, -2, 0);               \
  62.         break;                                                 \
  63.     case start_time + 19:                                      \
  64.         npc_by_type_set_speed(type + 2, 2, 0);                 \
  65.         npc_by_type_set_speed(type + 12, -2, 0);               \
  66.         break;                                                 \
  67.     case start_time + 20:                                      \
  68.         npc_aimed_shoot(type);                            \
  69.         npc_aimed_shoot(type + 1);                        \
  70.         npc_aimed_shoot(type + 2);                        \
  71.         npc_aimed_shoot(type + 10);                      \
  72.         npc_aimed_shoot(type + 11);                      \
  73.         npc_aimed_shoot(type + 12);                      \
  74.         break;                                                 \
  75.     case start_time + 21:                                      \
  76.         npc_by_type_set_speed(type + 10, 0, 2);                \
  77.         npc_by_type_set_speed(type + 11, 0, 2);                \
  78.         npc_by_type_set_speed(type + 12, 0, 2);                \
  79.         npc_by_type_set_speed(type, 0, 2);                     \
  80.         npc_by_type_set_speed(type + 1, 0, 2);                 \
  81.         npc_by_type_set_speed(type + 2, 0, 2);                 \
  82.         break;
  83.  
  84. #define make_boom_fairy(start_time, x, hp, bonus)       \
  85.     case start_time:                                    \
  86.         push_npc(x, -32, 0, 5, FIARY3, 100, hp, bonus); \
  87.         break;                                          \
  88.     case start_time + 3:                                \
  89.         npc_by_type_set_speed(100, 0, 0);               \
  90.         break;                                          \
  91.     case start_time + 5:                                \
  92.         npc_type_star(100);                             \
  93.         break;                                          \
  94.     case start_time + 7:                                \
  95.         npc_type_star(100);                             \
  96.         break;                                          \
  97.     case start_time + 11:                               \
  98.         npc_by_type_set_speed(100, 2, 2);               \
  99.         break;
  100.  
  101. #define left_flyers(start_time, y, tile, hp, bonus)   \
  102.     case start_time:                                  \
  103.     case start_time + 3:                              \
  104.     case start_time + 6:                              \
  105.         push_npc(320, y, -3, 0, tile, 30, hp, bonus); \
  106.         break;
  107.  
  108. #define right_flyers(start_time, y, tile, hp, bonus) \
  109.     case start_time:                                 \
  110.     case start_time + 3:                             \
  111.     case start_time + 6:                             \
  112.         push_npc(-20, y, 3, 0, tile, 30, hp, bonus); \
  113.         break;
  114.  
  115. #define just_star(start_time, x, y) \
  116.     case start_time:                \
  117.         push_star(x, y);            \
  118.         break;
  119.  
  120. #define boss_shoot1(start_time, x, y) \
  121.     case start_time:                  \
  122.         push_star(x, y);              \
  123.         break;                        \
  124.     case start_time + 1:              \
  125.         push_bullet(x, y, -2, 3);     \
  126.         break;                        \
  127.     case start_time + 2:              \
  128.         push_bullet(x, y, -1, 4);     \
  129.         break;                        \
  130.     case start_time + 3:              \
  131.         push_bullet(x, y, 0, 5);      \
  132.         break;                        \
  133.     case start_time + 4:              \
  134.         push_bullet(x, y, -2, 3);     \
  135.         push_bullet(x, y, 1, 4);      \
  136.         break;                        \
  137.     case start_time + 5:              \
  138.         push_bullet(x, y, -1, 4);     \
  139.         push_bullet(x, y, 2, 3);      \
  140.         break;                        \
  141.     case start_time + 6:              \
  142.         push_bullet(x, y, 0, 5);      \
  143.         push_bullet(x, y, 1, 4);      \
  144.         break;                        \
  145.     case start_time + 7:              \
  146.         push_bullet(x, y, 0, 5);      \
  147.         push_bullet(x, y, 0, 5);      \
  148.         break;                        \
  149.     case start_time + 8:              \
  150.         push_bullet(x, y, 1, 4);      \
  151.         push_bullet(x, y, -1, 4);     \
  152.         break;                        \
  153.     case start_time + 9:              \
  154.         push_bullet(x, y, 2, 3);      \
  155.         push_bullet(x, y, -2, 3);     \
  156.         break;
  157.  
  158. #define make_corridor(start_time, tile, type, hp, bonus)     \
  159.     case start_time:                                         \
  160.     case start_time + 3:                                     \
  161.     case start_time + 6:                                     \
  162.     case start_time + 9:                                     \
  163.         push_npc(10, -32, 0, 3, tile, type, hp, bonus);      \
  164.         push_npc(290, -32, 0, 3, tile, type + 1, hp, bonus); \
  165.         break;                                               \
  166.     case start_time + 16:                                    \
  167.         npc_by_type_set_speed(type, 0, 0);                   \
  168.         npc_by_type_set_speed(type + 1, 0, 0);               \
  169.         break;                                               \
  170.     case start_time + 18:                                    \
  171.         npc_aimed_shoot(type);                               \
  172.         npc_aimed_shoot(type + 1);                            \
  173.         break;                                               \
  174.     case start_time + 19:                                    \
  175.         npc_by_type_set_speed(type, 0, 3);                   \
  176.         npc_by_type_set_speed(type + 1, 0, 3);               \
  177.         break;
  178.  
  179. #define enemy_wave(start_time, tile, type, hp)           \
  180.     case start_time:                                     \
  181.         push_npc(144, -32, 2, 2, tile, type, hp, 0);     \
  182.         push_npc(176, -32, 2, 2, tile, type, hp, 0);     \
  183.         break;                                           \
  184.     case start_time + 5:                                 \
  185.         push_npc(144, -32, 2, 2, tile, type + 1, hp, 0); \
  186.         push_npc(176, -32, 2, 2, tile, type + 1, hp, 0); \
  187.         npc_by_type_set_speed(type, 0, 2);               \
  188.         break;                                           \
  189.     case start_time + 10:                                \
  190.         push_npc(144, -32, 2, 2, tile, type + 2, hp, 0); \
  191.         push_npc(176, -32, 2, 2, tile, type + 2, hp, 0); \
  192.         npc_by_type_set_speed(type, -2, 2);              \
  193.         npc_by_type_set_speed(type + 1, 0, 2);           \
  194.         break;                                           \
  195.     case start_time + 15:                                \
  196.         push_npc(144, -32, 2, 2, tile, type, hp, 0);     \
  197.         push_npc(176, -32, 2, 2, tile, type, hp, 0);     \
  198.         npc_type_shoot(type, 3, 0);                      \
  199.         npc_type_shoot(type, -3, 0);                     \
  200.         npc_type_shoot(type + 1, 3, 0);                  \
  201.         npc_type_shoot(type + 1, -3, 0);                 \
  202.         npc_type_shoot(type + 2, 3, 0);                  \
  203.         npc_type_shoot(type + 2, -3, 0);                 \
  204.         npc_by_type_set_speed(type, 0, 2);               \
  205.         npc_by_type_set_speed(type + 1, -2, 2);          \
  206.         npc_by_type_set_speed(type + 2, 0, 2);           \
  207.         break;                                           \
  208.     case start_time + 20:                                \
  209.         npc_by_type_set_speed(type, 2, 2);               \
  210.         npc_by_type_set_speed(type + 1, 0, 2);           \
  211.         npc_by_type_set_speed(type + 2, -2, 2);          \
  212.         npc_type_shoot(type, 3, 3);                      \
  213.         npc_type_shoot(type, -3, 3);                     \
  214.         npc_type_shoot(type + 1, 3, 0);                  \
  215.         npc_type_shoot(type + 1, -3, 0);                 \
  216.         npc_type_shoot(type + 2, 3, -3);                 \
  217.         npc_type_shoot(type + 2, -3, -3);                \
  218.         break;                                           \
  219.     case start_time + 25:                                \
  220.         npc_by_type_set_speed(type, 0, 2);               \
  221.         npc_by_type_set_speed(type + 1, 2, 2);           \
  222.         npc_by_type_set_speed(type + 2, 0, 2);           \
  223.         npc_type_shoot(type, 3, 3);                      \
  224.         npc_type_shoot(type, -3, 3);                     \
  225.         npc_type_shoot(type + 1, 3, 0);                  \
  226.         npc_type_shoot(type + 1, -3, 0);                 \
  227.         npc_type_shoot(type + 2, 3, -3);                 \
  228.         npc_type_shoot(type + 2, -3, -3);                \
  229.         break;                                           \
  230.     case start_time + 30:                                \
  231.         npc_by_type_set_speed(type, -2, 2);              \
  232.         npc_by_type_set_speed(type + 1, 0, 2);           \
  233.         npc_by_type_set_speed(type + 2, 2, 2);           \
  234.         npc_type_shoot(type, 3, -3);                     \
  235.         npc_type_shoot(type, -3, -3);                    \
  236.         npc_type_shoot(type + 1, 3, -3);                 \
  237.         npc_type_shoot(type + 1, -3, -3);                \
  238.         npc_type_shoot(type + 2, 3, -3);                 \
  239.         npc_type_shoot(type + 2, -3, -3);                \
  240.         break;                                           \
  241.     case start_time + 35:                                \
  242.         npc_by_type_set_speed(type, 0, 2);               \
  243.         npc_by_type_set_speed(type + 1, 0, 2);           \
  244.         npc_by_type_set_speed(type + 2, 0, 2);           \
  245.         break;
  246.  
  247. #define make_enemies_pair(start_time, tile, type, hp) \
  248.     case start_time: \
  249.         push_npc(32, -32, 0, 2, tile, type, hp, 0); \
  250.         push_npc(266, -32, 0, 2, tile, type, hp, 0); \
  251.         break; \
  252.     case start_time + 10: \
  253.         npc_by_type_set_speed(type, 0, 0); \
  254.         break; \
  255.     case start_time + 11: \
  256.         npc_type_star(type); \
  257.         break; \
  258.     case start_time + 15: \
  259.         npc_by_type_set_speed(type, 0, 5); \
  260.         break;
  261.  
  262. #define make_shooting_star(start_time, tile, type, hp)        \
  263.     case start_time:                                          \
  264.         push_npc(97, 100, 0, 0, tile, type, hp, BONUS_CARD);  \
  265.         break;                                                \
  266.     case start_time + 1:                                      \
  267.         push_npc(109, 63, 0, 0, tile, type, hp, BONUS_CARD);  \
  268.         break;                                                \
  269.     case start_time + 2:                                      \
  270.         push_npc(141, 40, 0, 0, tile, type, hp, BONUS_CARD);  \
  271.         break;                                                \
  272.     case start_time + 3:                                      \
  273.         push_npc(180, 40, 0, 0, tile, type, hp, BONUS_CARD);  \
  274.         break;                                                \
  275.     case start_time + 4:                                      \
  276.         push_npc(212, 63, 0, 0, tile, type, hp, BONUS_CARD);  \
  277.         break;                                                \
  278.     case start_time + 5:                                      \
  279.         push_npc(224, 101, 0, 0, tile, type, hp, BONUS_CARD); \
  280.         break;                                                \
  281.     case start_time + 6:                                      \
  282.         push_npc(212, 138, 0, 0, tile, type, hp, BONUS_CARD); \
  283.         break;                                                \
  284.     case start_time + 7:                                      \
  285.         push_npc(180, 161, 0, 0, tile, type, hp, BONUS_CARD); \
  286.         break;                                                \
  287.     case start_time + 8:                                      \
  288.         push_npc(141, 161, 0, 0, tile, type, hp, BONUS_CARD); \
  289.         break;                                                \
  290.     case start_time + 9:                                     \
  291.         push_npc(109, 138, 0, 0, tile, type, hp, BONUS_CARD); \
  292.         break;                                                \
  293.     case start_time + 15:                                     \
  294.     case start_time + 20:                                     \
  295.     case start_time + 25:                                     \
  296.         push_star(170, 110);                                  \
  297.         break;                                                \
  298.     case start_time + 30:                                     \
  299.         npc_by_type_set_speed(type, 0, 5);                    \
  300.         break;
  301.  
  302.  
  303. #define make_star_xy(start_time, x, y, tile, type, hp)        \
  304.     case start_time:                                          \
  305.         push_npc(x - 52, y - 100, 0, 0, tile, type, hp, BONUS_CARD);  \
  306.         break;                                                \
  307.     case start_time + 1:                                      \
  308.         push_npc(x - 51, y - 37, 0, 0, tile, type, hp, BONUS_CARD);  \
  309.         break;                                                \
  310.     case start_time + 2:                                      \
  311.         push_npc(x - 19, y - 60, 0, 0, tile, type, hp, BONUS_CARD);  \
  312.         break;                                                \
  313.     case start_time + 3:                                      \
  314.         push_npc(x + 20, y - 60, 0, 0, tile, type, hp, BONUS_CARD);  \
  315.         break;                                                \
  316.     case start_time + 4:                                      \
  317.         push_npc(x + 52, y - 37, 0, 0, tile, type, hp, BONUS_CARD);  \
  318.         break;                                                \
  319.     case start_time + 5:                                      \
  320.         push_npc(x + 64, y, 0, 0, tile, type, hp, BONUS_CARD); \
  321.         break;                                                \
  322.     case start_time + 7:                                      \
  323.         push_npc(x + 52, y + 38, 0, 0, tile, type, hp, BONUS_CARD); \
  324.         break;                                                \
  325.     case start_time + 8:                                      \
  326.         push_npc(x + 20, y + 61, 0, 0, tile, type, hp, BONUS_CARD); \
  327.         break;                                                \
  328.     case start_time + 9:                                      \
  329.         push_npc(x - 19, y + 61, 0, 0, tile, type, hp, BONUS_CARD); \
  330.         break;                                                \
  331.     case start_time + 10:                                     \
  332.         push_npc(x - 51, y + 30, 0, 0, tile, type, hp, BONUS_CARD); \
  333.         break;                                                \
  334.     case start_time + 30:                                     \
  335.         npc_by_type_set_speed(type, 0, 5);                    \
  336.         break;
  337.        
  338. #define make_shooting_star_xy(start_time, x, y, tile, type, hp)        \
  339.     case start_time:                                          \
  340.         push_npc(x - 52, y - 100, 0, 0, tile, type, hp, BONUS_CARD);  \
  341.         break;                                                \
  342.     case start_time + 1:                                      \
  343.         push_npc(x - 51, y - 37, 0, 0, tile, type, hp, BONUS_CARD);  \
  344.         break;                                                \
  345.     case start_time + 2:                                      \
  346.         push_npc(x - 19, y - 60, 0, 0, tile, type, hp, BONUS_CARD);  \
  347.         break;                                                \
  348.     case start_time + 3:                                      \
  349.         push_npc(x + 20, y - 60, 0, 0, tile, type, hp, BONUS_CARD);  \
  350.         break;                                                \
  351.     case start_time + 4:                                      \
  352.         push_npc(x + 52, y - 37, 0, 0, tile, type, hp, BONUS_CARD);  \
  353.         break;                                                \
  354.     case start_time + 5:                                      \
  355.         push_npc(x + 64, y, 0, 0, tile, type, hp, BONUS_CARD); \
  356.         break;                                                \
  357.     case start_time + 7:                                      \
  358.         push_npc(x + 52, y + 38, 0, 0, tile, type, hp, BONUS_CARD); \
  359.         break;                                                \
  360.     case start_time + 8:                                      \
  361.         push_npc(x + 20, y + 61, 0, 0, tile, type, hp, BONUS_CARD); \
  362.         break;                                                \
  363.     case start_time + 9:                                      \
  364.         push_npc(x - 19, y + 61, 0, 0, tile, type, hp, BONUS_CARD); \
  365.         break;                                                \
  366.     case start_time + 10:                                     \
  367.         push_npc(x - 51, y + 30, 0, 0, tile, type, hp, BONUS_CARD); \
  368.         break;                                                \
  369.     case start_time + 15:                                     \
  370.     case start_time + 20:                                     \
  371.     case start_time + 25:                                     \
  372.         push_star(x + 10, y + 10);                                  \
  373.         break;                                                \
  374.     case start_time + 30:                                     \
  375.         npc_by_type_set_speed(type, 0, 5);                    \
  376.         break;
  377.  
  378. #define triangle(start_time, tile, hp, bonus) \
  379.     case start_time: \
  380.         push_npc(160, -10, 0, 2, tile, 10, hp, bonus); \
  381.         break; \
  382.     case start_time + 2: \
  383.         push_npc(128, -10, 0, 2, tile, 11, hp, bonus); \
  384.         push_npc(192, -10, 0, 2, tile, 11, hp, bonus); \
  385.         break; \
  386.     case start_time + 4: \
  387.         push_npc(96, -10, 0, 2, tile, 12, hp, bonus); \
  388.         push_npc(224, -10, 0, 2, tile, 12, hp, bonus); \
  389.         break; \
  390.     case start_time + 8: \
  391.         push_npc(64, -10, 0, 2, tile, 13, hp, bonus); \
  392.         push_npc(256, -10, 0, 2, tile, 13, hp, bonus); \
  393.         break; \
  394.     case start_time + 12: \
  395.         push_npc(32, -10, 0, 2, tile, 14, hp, bonus); \
  396.         push_npc(288, -10, 0, 2, tile, 14, hp, bonus); \
  397.         break; \
  398.     case start_time + 14: \
  399.         npc_by_type_set_speed(10, 0, 0); \
  400.         npc_by_type_set_speed(11, 0, 0); \
  401.         npc_by_type_set_speed(12, 0, 0); \
  402.         npc_by_type_set_speed(13, 0, 0); \
  403.         npc_by_type_set_speed(14, 0, 0); \
  404.         npc_type_shoot(12, 0, 4); \
  405.         npc_type_shoot(13, 0, 4); \
  406.         npc_type_shoot(11, 0, 4); \
  407.         npc_type_shoot(10, 0, 4); \
  408.         break; \
  409.     case start_time + 15: \
  410.     case start_time + 16: \
  411.     case start_time + 17: \
  412.     case start_time + 18: \
  413.         npc_type_shoot(12, 0, 4); \
  414.         npc_type_shoot(13, 0, 4); \
  415.         npc_type_shoot(14, 0, 4); \
  416.         npc_type_shoot(11, 0, 4); \
  417.         npc_type_shoot(10, 0, 4); \
  418.         break; \
  419.     case start_time + 25: \
  420.         npc_by_type_set_speed(10, 0, 2); \
  421.         npc_by_type_set_speed(11, 0, 2); \
  422.         npc_by_type_set_speed(12, 0, 2); \
  423.         npc_by_type_set_speed(13, 0, 2); \
  424.         npc_by_type_set_speed(14, 0, 2); \
  425.         break;
  426.  
  427. #define triangle_non_shoot(start_time, tile, hp, bonus) \
  428.     case start_time: \
  429.         push_npc(160, -10, 0, 2, tile, 10, hp, bonus); \
  430.         break; \
  431.     case start_time + 2: \
  432.         push_npc(128, -10, 0, 2, tile, 11, hp, bonus); \
  433.         push_npc(192, -10, 0, 2, tile, 11, hp, bonus); \
  434.         break; \
  435.     case start_time + 4: \
  436.         push_npc(96, -10, 0, 2, tile, 12, hp, bonus); \
  437.         push_npc(224, -10, 0, 2, tile, 12, hp, bonus); \
  438.         break; \
  439.     case start_time + 8: \
  440.         push_npc(64, -10, 0, 2, tile, 13, hp, bonus); \
  441.         push_npc(256, -10, 0, 2, tile, 13, hp, bonus); \
  442.         break; \
  443.     case start_time + 12: \
  444.         push_npc(32, -10, 0, 2, tile, 14, hp, bonus); \
  445.         push_npc(288, -10, 0, 2, tile, 14, hp, bonus); \
  446.         break;
  447.  
  448. #define triangle_left(start_time, tile, hp, bonus) \
  449.     case start_time: \
  450.         push_npc(160, -10, 0, 2, tile, 10, hp, bonus); \
  451.         break; \
  452.     case start_time + 2: \
  453.         push_npc(128, -10, 0, 2, tile, 11, hp, bonus); \
  454.         break; \
  455.     case start_time + 4: \
  456.         push_npc(96, -10, 0, 2, tile, 12, hp, bonus); \
  457.         break; \
  458.     case start_time + 8: \
  459.         push_npc(64, -10, 0, 2, tile, 13, hp, bonus); \
  460.         break; \
  461.     case start_time + 12: \
  462.         push_npc(32, -10, 0, 2, tile, 14, hp, bonus); \
  463.         break; \
  464.     case start_time + 14: \
  465.         npc_by_type_set_speed(10, 0, 0); \
  466.         npc_by_type_set_speed(11, 0, 0); \
  467.         npc_by_type_set_speed(12, 0, 0); \
  468.         npc_by_type_set_speed(13, 0, 0); \
  469.         npc_by_type_set_speed(14, 0, 0); \
  470.         npc_aimed_shoot(10); \
  471.         npc_aimed_shoot(11); \
  472.         npc_aimed_shoot(12); \
  473.         npc_aimed_shoot(13); \
  474.         npc_aimed_shoot(14); \
  475.         break; \
  476.     case start_time + 15: \
  477.     case start_time + 16: \
  478.     case start_time + 17: \
  479.     case start_time + 18: \
  480.         npc_aimed_shoot(10); \
  481.         npc_aimed_shoot(11); \
  482.         npc_aimed_shoot(12); \
  483.         npc_aimed_shoot(13); \
  484.         npc_aimed_shoot(14); \
  485.         break; \
  486.     case start_time + 25: \
  487.         npc_by_type_set_speed(10, 2, 2); \
  488.         npc_by_type_set_speed(11, 2, 2); \
  489.         npc_by_type_set_speed(12, 2, 2); \
  490.         npc_by_type_set_speed(13, 2, 2); \
  491.         npc_by_type_set_speed(14, 2, 2); \
  492.         break;
  493.  
  494. #define triangle_right(start_time, tile, hp, bonus) \
  495.     case start_time: \
  496.         push_npc(160, -10, 0, 2, tile, 20, hp, bonus); \
  497.         break; \
  498.     case start_time + 2: \
  499.         push_npc(188, -10, 0, 2, tile, 21, hp, bonus); \
  500.         break; \
  501.     case start_time + 4: \
  502.         push_npc(220, -10, 0, 2, tile, 22, hp, bonus); \
  503.         break; \
  504.     case start_time + 8: \
  505.         push_npc(252, -10, 0, 2, tile, 23, hp, bonus); \
  506.         break; \
  507.     case start_time + 12: \
  508.         push_npc(284, -10, 0, 2, tile, 24, hp, bonus); \
  509.         break; \
  510.     case start_time + 14: \
  511.         npc_by_type_set_speed(20, 0, 0); \
  512.         npc_by_type_set_speed(21, 0, 0); \
  513.         npc_by_type_set_speed(22, 0, 0); \
  514.         npc_by_type_set_speed(23, 0, 0); \
  515.         npc_by_type_set_speed(24, 0, 0); \
  516.         npc_aimed_shoot(20); \
  517.         npc_aimed_shoot(21); \
  518.         npc_aimed_shoot(22); \
  519.         npc_aimed_shoot(23); \
  520.         npc_aimed_shoot(24); \
  521.         break; \
  522.     case start_time + 15: \
  523.     case start_time + 16: \
  524.     case start_time + 17: \
  525.     case start_time + 18: \
  526.         npc_aimed_shoot(20); \
  527.         npc_aimed_shoot(21); \
  528.         npc_aimed_shoot(22); \
  529.         npc_aimed_shoot(23); \
  530.         npc_aimed_shoot(24); \
  531.         break; \
  532.     case start_time + 25: \
  533.         npc_by_type_set_speed(20, -2, 2); \
  534.         npc_by_type_set_speed(21, -2, 2); \
  535.         npc_by_type_set_speed(22, -2, 2); \
  536.         npc_by_type_set_speed(23, -2, 2); \
  537.         npc_by_type_set_speed(24, -2, 2); \
  538.         break;
  539.  
  540. #define droped_enemy(start_time, x, tile, hp) \
  541.     case start_time: \
  542.         push_npc(x, -10, 0, 4, tile, 1, hp, 0); \
  543.         push_npc(x + 96, -10, 0, 4, tile, 1, hp, 0); \
  544.         break;
  545.  
  546. #define firing_ice(start_time) \
  547.     case start_time: \
  548.         push_npc(32, 32, 0 ,0, SHARP_ICE, 50, 50, BONUS_CARD); \
  549.         push_npc(288, 32, 0 ,0, SHARP_ICE, 50, 50, HEALTH_CARD); \
  550.         push_npc(32, 120, 0 ,0, SHARP_ICE, 50, 50, HEALTH_CARD); \
  551.         push_npc(288, 120, 0 ,0, SHARP_ICE, 50, 50, BONUS_CARD); \
  552.         break; \
  553.     case start_time + 5: \
  554.     case start_time + 15: \
  555.     case start_time + 25: \
  556.     case start_time + 35: \
  557.     case start_time + 45: \
  558.     case start_time + 55: \
  559.     case start_time + 65: \
  560.     case start_time + 75: \
  561.     case start_time + 80: \
  562.         npc_aimed_shoot(50); \
  563.         break; \
  564.     case start_time + 85: \
  565.         npc_by_type_set_speed(50, 0, 3); \
  566.         break;
  567.  
  568. #define mid_boss1(start_time, tile, hp) \
  569.     case start_time: \
  570.         push_npc(160, -32, 0, 5, tile, 200, hp, 0); \
  571.         break; \
  572.     case start_time + 3: \
  573.         npc_by_type_set_speed(200, 2, 0); \
  574.         scroll_speed = 0; \
  575.         break; \
  576.     just_star(start_time + 5, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  577.     case start_time + 6: \
  578.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  579.         break; \
  580.     just_star(start_time + 7, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  581.     case start_time + 8: \
  582.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  583.         break; \
  584.     just_star(start_time + 9, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  585.     case start_time + 10: \
  586.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  587.         break; \
  588.     just_star(start_time + 11, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  589.     case start_time + 12: \
  590.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  591.         break; \
  592.     case start_time + 13: \
  593.         npc_by_type_set_speed(200, -2, 0); \
  594.         break; \
  595.         just_star(start_time + 15, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  596.     case start_time + 16: \
  597.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  598.         break; \
  599.     just_star(start_time + 19, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  600.     case start_time + 20: \
  601.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  602.         break; \
  603.     just_star(start_time + 21, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  604.     case start_time + 22: \
  605.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  606.         break; \
  607.     just_star(start_time + 23, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  608.     case start_time + 24: \
  609.         if (find_npc_by_type(200)) level_loop = start_time + 2; \
  610.         break; \
  611.     case start_time + 25: \
  612.         scroll_speed = 1; \
  613.         for (push_counter = 0;push_counter < 5;push_counter ++) \
  614.             push_bonus((push_counter % 2) == 1 ? BONUS_CARD : HEALTH_CARD, 160, 70, 3 - (push_counter * 2), 3); \
  615.         break;
  616.  
  617. #define mid_boss2(start_time, tile, hp) \
  618.     case start_time: \
  619.         push_npc(160, 32, 2, 0, tile, 200, hp, HEALTH_CARD); \
  620.         scroll_speed = 0; \
  621.         break; \
  622.     case start_time + 2: \
  623.     case start_time + 4: \
  624.     case start_time + 7: \
  625.     case start_time + 9: \
  626.         npc_aimed_shoot(200); \
  627.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  628.         break; \
  629.     just_star(start_time + 10, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  630.     case start_time + 11: \
  631.         npc_by_type_set_speed(200, -2, 0); \
  632.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  633.         break; \
  634.     case start_time + 12: \
  635.     case start_time + 14: \
  636.     case start_time + 18: \
  637.         npc_aimed_shoot(200); \
  638.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  639.         break; \
  640.     just_star(start_time + 22, find_npc_by_type(200)->sprite.x + 16, find_npc_by_type(200)->sprite.y + 16); \
  641.     case start_time + 23: \
  642.         npc_by_type_set_speed(200, 2, 0); \
  643.         level_loop = start_time; \
  644.         if (find_npc_by_type(200) == 0) level_loop = start_time + 24; \
  645.         break; \
  646.     case start_time + 25: \
  647.         scroll_speed = 1; \
  648.         push_bonus(HEALTH_CARD, 160, 120, 0, -5); \
  649.         push_bonus(BONUS_CARD, 170, 110, 0, -5); \
  650.         push_bonus(HEALTH_CARD, 150, 150, 0, -5); \
  651.         push_bonus(BONUS_CARD, 130, 100, 0, -5); \
  652.         push_bonus(BONUS_CARD, 140, 110, 0, -5); \
  653.         push_bonus(HEALTH_CARD, 150, 140, 0, -5); \
  654.         push_bonus(BONUS_CARD, 130, 120, 0, -5); \
  655.         break;
  656.  
  657. #define boss_attack_drop_npc(start_time, tile) \
  658.         droped_enemy(start_time    , 20,  tile, 1); \
  659.         droped_enemy(start_time + 1, 50,  tile, 1); \
  660.         droped_enemy(start_time + 2, 10,  tile, 1); \
  661.         droped_enemy(start_time + 3, 80,  tile, 1); \
  662.         droped_enemy(start_time + 4, 160, tile, 1); \
  663.         droped_enemy(start_time + 5, 220, tile, 1);
  664.