int diamonds_needed; // diamonds needed to open outbox
int diamonds_collected; // diamonds collected
int skeletons_collected; // number of skeletons collected
+ int rockets_collected; // number of rockets collected
int gate_open_flash; // flashing of screen when gate opens
int score; // Score got this frame.
int amoeba_time; // Amoeba growing slow (low probability, default 3%) for
0,
"ROCKET_LAUNCHER", 0, 368, 368, 368
},
+ {
+ O_ROCKET, O_ROCKET, N_("Rocket"),
+ 0,
+ "ROCKET", 0, 365, 365, 365
+ },
{
O_ROCKET_1, O_ROCKET_1_scanned, N_("Rocket (right)"),
P_CAN_MOVE,
gd_sound_play(cave, GD_S_SKELETON_COLLECTING, element, x, y);
return O_SPACE;
+ case O_ROCKET:
+ cave->rockets_collected++;
+ return O_SPACE;
+
case O_OUTBOX:
case O_INVIS_OUTBOX:
cave->player_state = GD_PL_EXITED; // player now exits the cave!
{
case GD_MV_RIGHT:
store_dir(cave, x, y, player_move, O_ROCKET_1);
- if (!cave->infinite_rockets)
+ if (cave->rockets_collected > 0)
+ cave->rockets_collected--;
+ else if (!cave->infinite_rockets)
store(cave, x, y, O_PLAYER);
break;
case GD_MV_UP:
store_dir(cave, x, y, player_move, O_ROCKET_2);
- if (!cave->infinite_rockets)
+ if (cave->rockets_collected > 0)
+ cave->rockets_collected--;
+ else if (!cave->infinite_rockets)
store(cave, x, y, O_PLAYER);
break;
case GD_MV_LEFT:
store_dir(cave, x, y, player_move, O_ROCKET_3);
- if (!cave->infinite_rockets)
+ if (cave->rockets_collected > 0)
+ cave->rockets_collected--;
+ else if (!cave->infinite_rockets)
store(cave, x, y, O_PLAYER);
break;
case GD_MV_DOWN:
store_dir(cave, x, y, player_move, O_ROCKET_4);
- if (!cave->infinite_rockets)
+ if (cave->rockets_collected > 0)
+ cave->rockets_collected--;
+ else if (!cave->infinite_rockets)
store(cave, x, y, O_PLAYER);
break;