+2005-12-27
+ * changed "score for each 10 seconds/steps left" to "1 second/step"
+ * added own score for collecting "extra time" instead of sharing it
+
2005-12-22
* added "set player shield: off / normal / deadly" to CE action options
* added new player option "use level start element" in level editor
-#define COMPILE_DATE_STRING "[2005-12-23 02:25]"
+#define COMPILE_DATE_STRING "[2005-12-27 23:30]"
GADGET_ID_LEVEL_TIMESCORE_DOWN, GADGET_ID_LEVEL_TIMESCORE_UP,
GADGET_ID_LEVEL_TIMESCORE_TEXT, GADGET_ID_NONE,
&level.score[SC_TIME_BONUS],
- "score for each 10 sec/steps left:", NULL, NULL
+ "score for each second/step left:", NULL, NULL
},
{
ED_LEVEL_SETTINGS_XPOS(0), ED_COUNTER2_YPOS(8),
{ CA_ARG_NUMBER_CE_SCORE, "CE score" },
{ CA_ARG_NUMBER_CE_VALUE, "CE value" },
{ CA_ARG_UNDEFINED, " " },
+ { CA_ARG_NUMBER_LEVEL_TIME, "time" },
+ { CA_ARG_NUMBER_LEVEL_GEMS, "gems" },
+ { CA_ARG_NUMBER_LEVEL_SCORE, "score" },
+ { CA_ARG_UNDEFINED, " " },
{ CA_ARG_ELEMENT_HEADLINE, "[CE value" },
{ CA_ARG_ELEMENT_HEADLINE, " of" },
{ CA_ARG_ELEMENT_HEADLINE, " element]" },
{ EL_DYNABOMB_INCREASE_POWER, &level.score[SC_DYNAMITE],TEXT_COLLECTING },
{ EL_SHIELD_NORMAL, &level.score[SC_SHIELD], TEXT_COLLECTING },
{ EL_SHIELD_DEADLY, &level.score[SC_SHIELD], TEXT_COLLECTING },
- { EL_EXTRA_TIME, &level.score[SC_TIME_BONUS], TEXT_COLLECTING },
+ { EL_EXTRA_TIME, &level.extra_time_score, TEXT_COLLECTING },
{ EL_KEY_1, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_KEY_2, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_KEY_3, &level.score[SC_KEY], TEXT_COLLECTING },
EL_EXTRA_TIME, CONF_VALUE_INTEGER_1,
&li.extra_time, 10
},
+ {
+ EL_EXTRA_TIME, CONF_VALUE_INTEGER_2,
+ &li.extra_time_score, 10
+ },
{
EL_TIME_ORB_FULL, CONF_VALUE_INTEGER_1,
&li.time_orb_time, 10
&li.use_start_element[0], FALSE
},
{
- EL_PLAYER_2, CONF_VALUE_ELEMENT_2,
+ EL_PLAYER_2, CONF_VALUE_BOOLEAN_2,
&li.use_start_element[1], FALSE
},
{
- EL_PLAYER_3, CONF_VALUE_ELEMENT_2,
+ EL_PLAYER_3, CONF_VALUE_BOOLEAN_2,
&li.use_start_element[2], FALSE
},
{
- EL_PLAYER_4, CONF_VALUE_ELEMENT_2,
+ EL_PLAYER_4, CONF_VALUE_BOOLEAN_2,
&li.use_start_element[3], FALSE
},
}
for (i = 0; i < LEVEL_SCORE_ELEMENTS; i++)
- level->score[i] = 10;
+ level->score[i] = (i == SC_TIME_BONUS ? 1 : 10);
level->num_yamyam_contents = STD_ELEMENT_CONTENTS;
for (i = 0; i < MAX_ELEMENT_CONTENTS; i++)
if (level->game_version < VERSION_IDENT(2,2,0,0))
level->use_spring_bug = TRUE;
- /* time orb caused limited time in endless time levels before 3.2.0-5 */
if (level->game_version < VERSION_IDENT(3,2,0,5))
+ {
+ /* time orb caused limited time in endless time levels before 3.2.0-5 */
level->use_time_orb_bug = TRUE;
- /* default behaviour for snapping was "no snap delay" before 3.2.0-5 */
- if (level->game_version < VERSION_IDENT(3,2,0,5))
+ /* default behaviour for snapping was "no snap delay" before 3.2.0-5 */
level->block_snap_field = FALSE;
+ /* extra time score was same value as time left score before 3.2.0-5 */
+ level->extra_time_score = level->score[SC_TIME_BONUS];
+
+ /* time bonus score was given for 10 s instead of 1 s before 3.2.0-5 */
+ level->score[SC_TIME_BONUS] /= 10;
+ }
+
/* only few elements were able to actively move into acid before 3.1.0 */
/* trigger settings did not exist before 3.1.0; set to default "any" */
if (level->game_version < VERSION_IDENT(3,1,0,0))
{
if (!tape.playing && !setup.sound_loops)
PlaySoundStereo(SND_GAME_LEVELTIME_BONUS, SOUND_MIDDLE);
- if (TimeLeft > 0 && !(TimeLeft % 10))
- RaiseScore(level.score[SC_TIME_BONUS]);
- if (TimeLeft > 100 && !(TimeLeft % 10))
+
+ if (TimeLeft > 100 && TimeLeft % 10 == 0)
+ {
TimeLeft -= 10;
+ RaiseScore(level.score[SC_TIME_BONUS] * 10);
+ }
else
+ {
TimeLeft--;
+ RaiseScore(level.score[SC_TIME_BONUS]);
+ }
DrawGameValue_Time(TimeLeft);
{
if (!tape.playing && !setup.sound_loops)
PlaySoundStereo(SND_GAME_LEVELTIME_BONUS, SOUND_MIDDLE);
- if (TimePlayed < 999 && !(TimePlayed % 10))
- RaiseScore(level.score[SC_TIME_BONUS]);
- if (TimePlayed < 900 && !(TimePlayed % 10))
+
+ if (TimePlayed < 900 && TimePlayed % 10 == 0)
+ {
TimePlayed += 10;
+ RaiseScore(level.score[SC_TIME_BONUS] * 10);
+ }
else
+ {
TimePlayed++;
+ RaiseScore(level.score[SC_TIME_BONUS]);
+ }
DrawGameValue_Time(TimePlayed);
if (!change->has_action)
return;
- /* ---------- determine action paramater values ---------- */
+ /* ---------- determine action paramater values -------------------------- */
+
+ int level_time_value =
+ (level.time > 0 ? TimeLeft :
+ TimePlayed);
int action_arg_element =
(action_arg == CA_ARG_PLAYER_TRIGGER ? change->actual_trigger_player :
action_arg == CA_ARG_NUMBER_CE_VALUE ? ei->custom_value_initial :
#endif
action_arg == CA_ARG_NUMBER_CE_DELAY ? GET_CHANGE_DELAY(change) :
+ action_arg == CA_ARG_NUMBER_LEVEL_TIME ? level_time_value :
+ action_arg == CA_ARG_NUMBER_LEVEL_GEMS ? local_player->gems_still_needed :
+ action_arg == CA_ARG_NUMBER_LEVEL_SCORE ? local_player->score :
action_arg == CA_ARG_ELEMENT_TARGET ? GET_NEW_CUSTOM_VALUE(change->target_element) :
action_arg == CA_ARG_ELEMENT_TRIGGER ? change->actual_trigger_ce_value :
-1);
action_arg == CA_ARG_PLAYER_TRIGGER ? trigger_player_bits :
PLAYER_BITS_ANY);
- /* ---------- execute action ---------- */
+ /* ---------- execute action -------------------------------------------- */
switch(action_type)
{
return;
}
- case CA_EXIT_PLAYER:
+ /* ---------- level actions ------------------------------------------- */
+
+ case CA_RESTART_LEVEL:
{
- for (i = 0; i < MAX_PLAYERS; i++)
- if (action_arg_player_bits & (1 << i))
- stored_player[i].LevelSolved = stored_player[i].GameOver = TRUE;
+ game.restart_level = TRUE;
break;
}
- case CA_KILL_PLAYER:
+ case CA_SHOW_ENVELOPE:
{
- for (i = 0; i < MAX_PLAYERS; i++)
- if (action_arg_player_bits & (1 << i))
- KillPlayer(&stored_player[i]);
+ int element = getSpecialActionElement(action_arg_element,
+ action_arg_number, EL_ENVELOPE_1);
+
+ if (IS_ENVELOPE(element))
+ local_player->show_envelope = element;
+
+ break;
+ }
+
+ case CA_SET_LEVEL_TIME:
+ {
+ if (level.time > 0) /* only modify limited time value */
+ {
+ TimeLeft = action_arg_number_new;
+
+ DrawGameValue_Time(TimeLeft);
+
+ if (!TimeLeft && setup.time_limit)
+ for (i = 0; i < MAX_PLAYERS; i++)
+ KillPlayer(&stored_player[i]);
+ }
+
+ break;
+ }
+
+ case CA_SET_LEVEL_SCORE:
+ {
+ local_player->score = action_arg_number_new;
+
+ DrawGameValue_Score(local_player->score);
+
+ break;
+ }
+
+ case CA_SET_LEVEL_GEMS:
+ {
+ local_player->gems_still_needed = action_arg_number_new;
+
+ DrawGameValue_Emeralds(local_player->gems_still_needed);
+
+ break;
+ }
+
+ case CA_SET_LEVEL_GRAVITY:
+ {
+ game.gravity = (action_arg == CA_ARG_GRAVITY_OFF ? FALSE :
+ action_arg == CA_ARG_GRAVITY_ON ? TRUE :
+ action_arg == CA_ARG_GRAVITY_TOGGLE ? !game.gravity :
+ game.gravity);
+ break;
+ }
+
+ case CA_SET_LEVEL_WIND:
+ {
+ game.wind_direction = action_arg_direction;
break;
}
+ /* ---------- player actions ------------------------------------------ */
+
case CA_MOVE_PLAYER:
{
/* automatically move to the next field in specified direction */
break;
}
- case CA_RESTART_LEVEL:
+ case CA_EXIT_PLAYER:
{
- game.restart_level = TRUE;
+ for (i = 0; i < MAX_PLAYERS; i++)
+ if (action_arg_player_bits & (1 << i))
+ stored_player[i].LevelSolved = stored_player[i].GameOver = TRUE;
break;
}
- case CA_SHOW_ENVELOPE:
+ case CA_KILL_PLAYER:
{
- int element = getSpecialActionElement(action_arg_element,
- action_arg_number, EL_ENVELOPE_1);
-
- if (IS_ENVELOPE(element))
- local_player->show_envelope = element;
+ for (i = 0; i < MAX_PLAYERS; i++)
+ if (action_arg_player_bits & (1 << i))
+ KillPlayer(&stored_player[i]);
break;
}
break;
}
- case CA_SET_LEVEL_GRAVITY:
- {
- game.gravity = (action_arg == CA_ARG_GRAVITY_OFF ? FALSE :
- action_arg == CA_ARG_GRAVITY_ON ? TRUE :
- action_arg == CA_ARG_GRAVITY_TOGGLE ? !game.gravity :
- game.gravity);
- break;
- }
-
- case CA_SET_LEVEL_WIND:
- {
- game.wind_direction = action_arg_direction;
-
- break;
- }
-
- case CA_SET_LEVEL_GEMS:
- {
- local_player->gems_still_needed = action_arg_number_new;
-
- DrawGameValue_Emeralds(local_player->gems_still_needed);
-
- break;
- }
-
- case CA_SET_LEVEL_TIME:
- {
- if (level.time > 0) /* only modify limited time value */
- {
- TimeLeft = action_arg_number_new;
-
- DrawGameValue_Time(TimeLeft);
-
- if (!TimeLeft && setup.time_limit)
- for (i = 0; i < MAX_PLAYERS; i++)
- KillPlayer(&stored_player[i]);
- }
-
- break;
- }
-
- case CA_SET_LEVEL_SCORE:
- {
- local_player->score = action_arg_number_new;
-
- DrawGameValue_Score(local_player->score);
-
- break;
- }
+ /* ---------- CE actions ---------------------------------------------- */
case CA_SET_CE_SCORE:
{
RaiseScore(level.score[SC_SHIELD]);
break;
case EL_EXTRA_TIME:
- RaiseScore(level.score[SC_TIME_BONUS]);
+ RaiseScore(level.extra_time_score);
break;
case EL_KEY_1:
case EL_KEY_2:
#define CA_ARG_NUMBER_CE_SCORE (CA_ARG_NUMBER + 3)
#define CA_ARG_NUMBER_CE_VALUE (CA_ARG_NUMBER + 4)
#define CA_ARG_NUMBER_CE_DELAY (CA_ARG_NUMBER + 5)
+#define CA_ARG_NUMBER_LEVEL_TIME (CA_ARG_NUMBER + 6)
+#define CA_ARG_NUMBER_LEVEL_GEMS (CA_ARG_NUMBER + 7)
+#define CA_ARG_NUMBER_LEVEL_SCORE (CA_ARG_NUMBER + 8)
#define CA_ARG_NUMBER_HEADLINE (CA_ARG_NUMBER + 999)
#define CA_ARG_ELEMENT 12000
#define CA_ARG_ELEMENT_TARGET (CA_ARG_ELEMENT + 0)
int extra_time;
int time_orb_time;
+ int extra_time_score;
+
int start_element[MAX_PLAYERS];
boolean use_start_element[MAX_PLAYERS];
+#if 1
/* values for the new EMC elements */
int android_move_time;
int android_clone_time;
int wind_direction_initial;
struct Content ball_content[MAX_ELEMENT_CONTENTS];
boolean android_array[16];
+#endif
int can_move_into_acid_bits; /* bitfield to store property for elements */
int dont_collide_with_bits; /* bitfield to store property for elements */