"Minor changes."

This commit is contained in:
gyboth 2005-11-01 21:20:24 +00:00
parent b04615f5a7
commit 2e9476b04c
15 changed files with 294 additions and 112 deletions

View File

@ -1,25 +1,13 @@
11/16/2005: v1.9.3
- updated German country definition (thanks to Sebastian Vöcking)
- added strategies for CPU teams
- added option to randomise teams in cups in the startup window
(relevant for the World Cup definition, mainly)
- added betting
- minor bugfixes
10/16/2005: v1.9.2
10/10/2005: v1.9.2
- fixed some minor bugs
- updated translations
- added Spanish and Chinese translations
- switched from 'arj' to GNU 'zip' in the Windows port
- updated some translations
- switched to Gnu zip in the Windows port
- added player streaks (hot/cold)
- added definition for the Netherlands (thanks to Zwakstroom)
- added definition for the World Cup 2006 Germany
- minor definition system improvements
- window geometry can be saved
- boost and style change 'on the fly' during live games
- added season results view (Figures -> Season results)
- added command line options
- boost costs money
09/10/2005: v1.9.1
- updated German and Dutch translations

File diff suppressed because one or more lines are too long

View File

@ -1126,3 +1126,15 @@ game_get_default_penalty_shooter(const Team *tm)
return return_value;
}
/** Deduce some money for boost during a match. */
void
game_boost_cost(void)
{
gfloat wage_unit = finance_wage_unit(usr(stat2).tm);
gint deduce =
(gint)rint(wage_unit * const_float("float_boost_cost_factor"));
usr(stat2).money -= deduce;
usr(stat2).money_out[1][MON_OUT_BOOST] -= deduce;
}

View File

@ -117,7 +117,7 @@ game_reset_players(gint idx);
gint
game_get_default_penalty_shooter(const Team *tm);
/* void */
/* game_check_cpu_strategy(LiveGame *lg); */
void
game_boost_cost(void);
#endif

View File

@ -69,7 +69,7 @@ language_set(gint index)
opt_set_str("string_opt_language_code", buf);
{
extern int _nl_msg_cat_cntr;
extern int _nl_msg_cat_cntr;
++_nl_msg_cat_cntr;
}
@ -112,3 +112,94 @@ language_get_code_index(const gchar *code)
return return_value;
}
/** Compare country file names based on a preferred one (which
should get moved to the start). */
gint
language_compare_country_files(gconstpointer a, gconstpointer b, gpointer data)
{
gint i, j;
const gchar *prefdef = (const gchar*)data;
const gchar *def1 = *(const gchar**)a;
const gchar *def2 = *(const gchar**)b;
gint len1 = strlen(def1),
len2 = strlen(def2), lenmin = MIN(len1, len2);
gchar alphabet[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
gint return_value = 0;
if(strcmp(def1, def2) == 0)
return_value = 0;
else if(strcmp(prefdef, def1) == 0)
return_value = -1;
else if(strcmp(prefdef, def2) == 0)
return_value = 1;
else
{
for(i=0;i<lenmin;i++)
if(def1[i] != def2[i])
break;
if(i == lenmin)
return_value = (len2 < len1);
else
{
for(j=0;j<26;j++)
if(def1[i] == alphabet[j] ||
def2[i] == alphabet[j])
break;
if(j == 26)
{
g_warning("language_compare_country_files: chars %c and %c not comparable",
def1[i], def2[i]);
return_value = 0;
}
else
return_value = (def1[i] == alphabet[j]) ? -1 : 1;
}
}
return return_value;
}
/** Put the country matching the local language to the
beginning of the array if possible. */
void
language_pick_country(GPtrArray *country_files)
{
gint i, j;
GPtrArray *codes =
misc_separate_strings(const_str("string_language_codes"));
GPtrArray *defs =
misc_separate_strings(const_str("string_language_defs"));
gpointer prefdef = NULL;
const gchar *lang = g_getenv("LANG");
if(lang != NULL)
for(i=0;i<codes->len;i++)
{
if(((g_str_has_prefix(lang, "en") &&
strcmp((gchar*)g_ptr_array_index(codes, i), "C") == 0) ||
g_str_has_prefix(lang, (gchar*)g_ptr_array_index(codes, i))) &&
strcmp((gchar*)g_ptr_array_index(defs, i), "NONE") != 0)
for(j=0;j<country_files->len;j++)
if(strcmp((gchar*)g_ptr_array_index(country_files, j),
(gchar*)g_ptr_array_index(defs, i)) == 0)
{
prefdef = g_ptr_array_index(country_files, j);
break;
}
if(prefdef != NULL)
break;
}
g_ptr_array_sort_with_data(
country_files,
(GCompareDataFunc)language_compare_country_files,
prefdef);
free_gchar_array(&codes);
free_gchar_array(&defs);
}

View File

@ -37,8 +37,14 @@ language_get_code_index(const gchar *code);
void
language_set(gint index);
#ifndef G_OS_UNIX
extern int _nl_msg_cat_cntr;
#endif
gint
language_compare_country_files(gconstpointer a, gconstpointer b, gpointer data);
void
language_pick_country(GPtrArray *country_files);
/* #ifndef G_OS_UNIX */
/* extern int _nl_msg_cat_cntr; */
/* #endif */
#endif

View File

@ -53,7 +53,7 @@ gboolean show;
#define unis match->units
#define uni(i) g_array_index(unis, LiveGameUnit, i)
#define last_unit uni(unis->len - 1)
#define tm match->fix->teams
#define tms match->fix->teams
#define tm0 match->fix->teams[0]
#define tm1 match->fix->teams[1]
@ -334,7 +334,7 @@ live_game_event_foul(void)
printf("\t\tlive_game_event_foul\n");
if(math_rnd(0, 1) > const_float("float_live_game_foul_by_possession") *
game_get_foul_possession_factor(
tm[last_unit.possession]->boost, tm[!last_unit.possession]->boost))
tms[last_unit.possession]->boost, tms[!last_unit.possession]->boost))
{
foul_team = last_unit.event.team = !last_unit.possession;
if(uni(unis->len - 2).event.type == LIVE_GAME_EVENT_GENERAL)
@ -342,21 +342,21 @@ live_game_event_foul(void)
uni(unis->len - 2).event.player;
else
fouled_player = last_unit.event.player =
game_get_player(tm[last_unit.possession],
game_get_player(tms[last_unit.possession],
last_unit.area, 0, -1, FALSE);
foul_player = last_unit.event.player2 =
game_get_player(tm[!last_unit.possession],
game_get_player(tms[!last_unit.possession],
last_unit.area, 0, -1, FALSE);
}
else
{
foul_team = last_unit.event.team = last_unit.possession;
fouled_player = last_unit.event.player =
game_get_player(tm[!last_unit.possession],
game_get_player(tms[!last_unit.possession],
last_unit.area, 0, -1, FALSE);
foul_player = last_unit.event.player2 =
game_get_player(tm[last_unit.possession],
game_get_player(tms[last_unit.possession],
last_unit.area, 0, -1, FALSE);
}
@ -367,9 +367,9 @@ live_game_event_foul(void)
else if(rndom < const_float("float_live_game_foul_yellow"))
{
type = LIVE_GAME_EVENT_FOUL_YELLOW;
player_card_set(player_of_id_team(tm[foul_team], foul_player),
player_card_set(player_of_id_team(tms[foul_team], foul_player),
match->fix->clid, PLAYER_VALUE_CARD_YELLOW, 1, TRUE);
player_of_id_team(tm[foul_team], foul_player)->career[PLAYER_VALUE_CARD_YELLOW]++;
player_of_id_team(tms[foul_team], foul_player)->career[PLAYER_VALUE_CARD_YELLOW]++;
}
else
type = LIVE_GAME_EVENT_FOUL;
@ -412,7 +412,7 @@ live_game_event_lost_possession(void)
debug > 130)
printf("\t\tlive_game_event_lost_possession\n");
last_unit.event.player =
game_get_player(tm[last_unit.possession],
game_get_player(tms[last_unit.possession],
last_unit.area, 0, -1, TRUE);
if(uni(unis->len - 2).event.type == LIVE_GAME_EVENT_GENERAL)
@ -420,7 +420,7 @@ live_game_event_lost_possession(void)
uni(unis->len - 2).event.player;
else
last_unit.event.player2 =
game_get_player(tm[!last_unit.possession],
game_get_player(tms[!last_unit.possession],
uni(unis->len - 2).area, 0, -1, FALSE);
live_game_finish_unit();
@ -457,7 +457,7 @@ live_game_event_injury(gint team, gint player, gboolean create_new)
else
live_game_injury_get_player();
usr_idx = team_is_user(tm[last_unit.event.team]);
usr_idx = team_is_user(tms[last_unit.event.team]);
last_unit.minute = -1;
last_unit.event.type = LIVE_GAME_EVENT_INJURY;
@ -468,9 +468,9 @@ live_game_event_injury(gint team, gint player, gboolean create_new)
if(debug < 50 ||
usr_idx == -1)
player_of_id_team(tm[last_unit.event.team],
player_of_id_team(tms[last_unit.event.team],
last_unit.event.player)->fitness =
MAX(0, player_of_id_team(tm[last_unit.event.team],
MAX(0, player_of_id_team(tms[last_unit.event.team],
last_unit.event.player)->fitness -
math_rnd(const_float("float_live_game_temp_injury_fitness_decrease_lower"),
const_float("float_live_game_temp_injury_fitness_decrease_upper")));
@ -484,7 +484,7 @@ live_game_event_injury(gint team, gint player, gboolean create_new)
if(last_unit.event.type == LIVE_GAME_EVENT_INJURY)
{
game_player_injury(player_of_id_team(tm[last_unit.event.team],
game_player_injury(player_of_id_team(tms[last_unit.event.team],
last_unit.event.player));
if(match->subs_left[last_unit.event.team] > 0)
@ -495,21 +495,21 @@ live_game_event_injury(gint team, gint player, gboolean create_new)
&usr(usr_idx).options) &&
!option_int("int_opt_user_auto_sub",
&usr(usr_idx).options)) ||
tm[last_unit.event.team]->players->len == 11))
tms[last_unit.event.team]->players->len == 11))
misc_callback_pause_live_game();
else if(tm[last_unit.event.team]->players->len > 11)
else if(tms[last_unit.event.team]->players->len > 11)
{
sub_in = game_substitute_player(tm[last_unit.event.team],
player_id_index(tm[last_unit.event.team],
sub_in = game_substitute_player(tms[last_unit.event.team],
player_id_index(tms[last_unit.event.team],
last_unit.event.player));
if(sub_in != -1)
{
old_structure = tm[last_unit.event.team]->structure;
old_structure = tms[last_unit.event.team]->structure;
live_game_event_substitution(
last_unit.event.team, sub_in,
last_unit.event.player);
if(old_structure != tm[last_unit.event.team]->structure)
if(old_structure != tms[last_unit.event.team]->structure)
live_game_event_team_change(last_unit.event.team,
LIVE_GAME_EVENT_STRUCTURE_CHANGE);
}
@ -574,12 +574,12 @@ live_game_event_scoring_chance(void)
{
last_unit.event.type = LIVE_GAME_EVENT_OWN_GOAL;
last_unit.event.player =
game_get_player(tm[!last_unit.possession], GAME_PLAYER_TYPE_DEFEND, 0, -1, FALSE);
game_get_player(tms[!last_unit.possession], GAME_PLAYER_TYPE_DEFEND, 0, -1, FALSE);
last_unit.event.team = !last_unit.possession;
match->fix->result[last_unit.possession][res_idx]++;
last_unit.result[last_unit.possession]++;
player_streak_add_to_prob(player_of_id_team(tm[last_unit.event.team],
player_streak_add_to_prob(player_of_id_team(tms[last_unit.event.team],
last_unit.event.player),
const_float("float_player_streak_add_own_goal"));
}
@ -590,17 +590,17 @@ live_game_event_scoring_chance(void)
if(uni(unis->len - 2).event.player != -1 &&
math_rnd(0, 1) < const_float("float_live_game_player_in_poss_shoots") &&
query_player_id_in_team(uni(unis->len - 2).event.player,
tm[last_unit.possession]))
tms[last_unit.possession]))
last_unit.event.player =
uni(unis->len - 2).event.player;
else
{
if(uni(unis->len - 2).event.player != -1 &&
query_player_id_in_team(uni(unis->len - 2).event.player,
tm[last_unit.possession]))
tms[last_unit.possession]))
{
last_unit.event.player =
game_get_player(tm[last_unit.possession], last_unit.area, 0,
game_get_player(tms[last_unit.possession], last_unit.area, 0,
uni(unis->len - 2).event.player,
TRUE);
@ -610,10 +610,10 @@ live_game_event_scoring_chance(void)
else
{
last_unit.event.player =
game_get_player(tm[last_unit.possession], last_unit.area, 0, -1, TRUE);
game_get_player(tms[last_unit.possession], last_unit.area, 0, -1, TRUE);
last_unit.event.player2 =
game_get_player(tm[last_unit.possession], last_unit.area, 0,
game_get_player(tms[last_unit.possession], last_unit.area, 0,
last_unit.event.player, TRUE);
}
}
@ -659,21 +659,21 @@ live_game_event_penalty(void)
{
last_unit.possession = math_rndi(0, 1);
last_unit.event.player =
game_get_player(tm[last_unit.possession],
game_get_player(tms[last_unit.possession],
GAME_PLAYER_TYPE_PENALTY, -1, -1, FALSE);
}
else if(live_game_penalties_taken() == 2)
{
last_unit.possession = !uni(unis->len - 3).possession;
last_unit.event.player =
game_get_player(tm[last_unit.possession],
game_get_player(tms[last_unit.possession],
GAME_PLAYER_TYPE_PENALTY, -1, -1, FALSE);
}
else
{
last_unit.possession = !uni(unis->len - 3).possession;
last_unit.event.player =
game_get_player(tm[last_unit.possession],
game_get_player(tms[last_unit.possession],
GAME_PLAYER_TYPE_PENALTY,
uni(unis->len - 4).event.player, -1, FALSE);
}
@ -684,10 +684,10 @@ live_game_event_penalty(void)
last_unit.possession;
last_unit.event.player =
game_get_default_penalty_shooter(tm[last_unit.possession]);
game_get_default_penalty_shooter(tms[last_unit.possession]);
if(last_unit.event.player == -1)
last_unit.event.player =
game_get_player(tm[last_unit.possession], GAME_PLAYER_TYPE_PENALTY, -1, -1, FALSE);
game_get_player(tms[last_unit.possession], GAME_PLAYER_TYPE_PENALTY, -1, -1, FALSE);
}
live_game_finish_unit();
@ -800,22 +800,22 @@ live_game_event_general_get_players(void)
if(type == LIVE_GAME_EVENT_LOST_POSSESSION)
{
*pl2 = old_pl1;
*pl1 = game_get_player(tm[last_unit.possession],
*pl1 = game_get_player(tms[last_unit.possession],
last_unit.area, 0, *pl2,
TRUE);
}
else if(type != LIVE_GAME_EVENT_GENERAL)
{
*pl1 = game_get_player(tm[last_unit.possession],
*pl1 = game_get_player(tms[last_unit.possession],
last_unit.area, 0, -1, TRUE);
if(math_rnd(0, 1) < const_float("float_live_game_general_event_second_player"))
*pl2 = game_get_player(tm[last_unit.possession],
*pl2 = game_get_player(tms[last_unit.possession],
last_unit.area, 0, *pl1, TRUE);
}
else
{
*pl2 = query_player_id_in_team(old_pl1, tm[last_unit.possession]) ? old_pl1 : -1;
*pl1 = game_get_player(tm[last_unit.possession],
*pl2 = query_player_id_in_team(old_pl1, tms[last_unit.possession]) ? old_pl1 : -1;
*pl1 = game_get_player(tms[last_unit.possession],
last_unit.area, 0, *pl2, TRUE);
}
}
@ -840,11 +840,11 @@ live_game_event_free_kick(void)
new.event.commentary = NULL;
new.event.player =
game_get_default_penalty_shooter(tm[new.possession]);
game_get_default_penalty_shooter(tms[new.possession]);
if(new.event.player == -1)
new.event.player =
game_get_player(tm[new.possession], new.area, 0, -1, TRUE);
game_get_player(tms[new.possession], new.area, 0, -1, TRUE);
g_array_append_val(unis, new);
@ -859,7 +859,7 @@ live_game_event_send_off(gint team, gint player, gboolean second_yellow)
{
LiveGameUnit new = last_unit;
gint substitute = -1, to_substitute = -1;
gint usr_idx = team_is_user(tm[team]);
gint usr_idx = team_is_user(tms[team]);
if((debug > 100 && stat2 != -1) ||
debug > 130)
@ -882,27 +882,27 @@ live_game_event_send_off(gint team, gint player, gboolean second_yellow)
return;
player_streak_add_to_prob(
player_of_id_team(tm[team], player),
player_of_id_team(tms[team], player),
const_float("float_player_streak_add_sendoff"));
if(player_of_id_team(tm[team], player)->streak == PLAYER_STREAK_HOT)
if(player_of_id_team(tms[team], player)->streak == PLAYER_STREAK_HOT)
{
player_of_id_team(tm[team], player)->streak = PLAYER_STREAK_NONE;
player_streak_reset_count(player_of_id_team(tm[team], player));
player_of_id_team(tms[team], player)->streak = PLAYER_STREAK_NONE;
player_streak_reset_count(player_of_id_team(tms[team], player));
}
player_of_id_team(tm[team], player)->cskill = 0;
player_of_id_team(tms[team], player)->cskill = 0;
if(second_yellow)
player_card_set(player_of_id_team(tm[team], player), match->fix->clid, PLAYER_VALUE_CARD_RED, 2, FALSE);
player_card_set(player_of_id_team(tms[team], player), match->fix->clid, PLAYER_VALUE_CARD_RED, 2, FALSE);
else
player_card_set(player_of_id_team(tm[team], player), match->fix->clid, PLAYER_VALUE_CARD_RED,
player_card_set(player_of_id_team(tms[team], player), match->fix->clid, PLAYER_VALUE_CARD_RED,
game_player_get_ban_duration(), FALSE);
player_of_id_team(tm[team], player)->career[PLAYER_VALUE_CARD_RED]++;
player_of_id_team(tms[team], player)->career[PLAYER_VALUE_CARD_RED]++;
if(usr_idx != -1)
{
tm[team]->structure = team_find_appropriate_structure(tm[team]);
team_rearrange(tm[team]);
tms[team]->structure = team_find_appropriate_structure(tms[team]);
team_rearrange(tms[team]);
live_game_event_team_change(team, LIVE_GAME_EVENT_STRUCTURE_CHANGE);
}
@ -913,28 +913,28 @@ live_game_event_send_off(gint team, gint player, gboolean second_yellow)
&usr(usr_idx).options) &&
!option_int("int_opt_user_auto_sub",
&usr(usr_idx).options)) ||
tm[team]->players->len == 1))
tms[team]->players->len == 1))
misc_callback_pause_live_game();
else if(tm[team]->players->len > 11)
else if(tms[team]->players->len > 11)
{
game_substitute_player_send_off(match->fix->clid,
tm[team], player_id_index(tm[team], player),
tms[team], player_id_index(tms[team], player),
&to_substitute, &substitute);
if(to_substitute != -1)
live_game_event_substitution(team, substitute, to_substitute);
else
{
tm[team]->structure = team_find_appropriate_structure(tm[team]);
team_rearrange(tm[team]);
tms[team]->structure = team_find_appropriate_structure(tms[team]);
team_rearrange(tms[team]);
}
live_game_event_team_change(team, LIVE_GAME_EVENT_STRUCTURE_CHANGE);
}
}
else if(usr_idx == -1)
{
tm[team]->structure = team_find_appropriate_structure(tm[team]);
team_rearrange(tm[team]);
tms[team]->structure = team_find_appropriate_structure(tms[team]);
team_rearrange(tms[team]);
live_game_event_team_change(team, LIVE_GAME_EVENT_STRUCTURE_CHANGE);
}
@ -960,22 +960,22 @@ live_game_event_substitution(gint team_number, gint sub_in, gint sub_out)
new.event.player2 = sub_out;
new.event.commentary = NULL;
if(player_of_id_team(tm[team_number], sub_in)->cskill > 0)
if(player_of_id_team(tms[team_number], sub_in)->cskill > 0)
{
match->subs_left[team_number]--;
player_streak_add_to_prob(
player_of_id_team(tm[team_number], sub_in),
player_of_id_team(tms[team_number], sub_in),
const_float("float_player_streak_add_sub_out"));
player_streak_add_to_prob(
player_of_id_team(tm[team_number], sub_in),
player_of_id_team(tms[team_number], sub_in),
const_float("float_player_streak_add_sub_in"));
player_games_goals_set(player_of_id_team(tm[team_number], sub_in),
player_games_goals_set(player_of_id_team(tms[team_number], sub_in),
match->fix->clid, PLAYER_VALUE_GAMES, 1);
player_of_id_team(tm[team_number], sub_in)->career[PLAYER_VALUE_GAMES]++;
player_of_id_team(tm[team_number], sub_in)->participation = TRUE;
player_of_id_team(tms[team_number], sub_in)->career[PLAYER_VALUE_GAMES]++;
player_of_id_team(tms[team_number], sub_in)->participation = TRUE;
if(show)
game_gui_live_game_show_opponent();
@ -1030,12 +1030,12 @@ live_game_event_duel(void)
new.event.team = new.possession;
new.event.commentary = NULL;
attacker = player_of_id_team(tm[new.possession],
attacker = player_of_id_team(tms[new.possession],
new.event.player);
goalie = player_of_idx_team(tm[!new.possession], 0);
goalie = player_of_idx_team(tms[!new.possession], 0);
assistant = (new.event.player2 != -1) ?
player_of_id_team(tm[new.possession], new.event.player2) : NULL;
player_of_id_team(tms[new.possession], new.event.player2) : NULL;
new.event.player2 = goalie->id;
@ -1417,6 +1417,9 @@ live_game_finish_unit(void)
if(unit->minute != -1 && unit->time != LIVE_GAME_UNIT_TIME_PENALTIES)
{
if(stat2 != -1 && usr(stat2).tm->boost == 1)
game_boost_cost();
game_decrease_fitness(match->fix);
game_get_values(match->fix, match->team_values,
match->home_advantage);
@ -1484,19 +1487,19 @@ live_game_injury_get_player(void)
for(j=0;j<2;j++)
{
fitness_factor = (player_of_idx_team(tm[j], 0)->fitness < 0.025) ?
40 : 1 / player_of_idx_team(tm[j], 0)->fitness;
fitness_factor = (player_of_idx_team(tms[j], 0)->fitness < 0.025) ?
40 : 1 / player_of_idx_team(tms[j], 0)->fitness;
probs[j * 11] = goalie_factor * fitness_factor *
(player_of_idx_team(tm[j], 0)->cskill != 0) * (1 + tm[j]->boost * boost_factor);
(player_of_idx_team(tms[j], 0)->cskill != 0) * (1 + tms[j]->boost * boost_factor);
if(j == 1)
probs[11] += probs[10];
for(i=1;i<11;i++)
{
fitness_factor = (player_of_idx_team(tm[j], i)->fitness < 0.025) ?
40 : 1 / ((gfloat)player_of_idx_team(tm[j], i)->fitness);
fitness_factor = (player_of_idx_team(tms[j], i)->fitness < 0.025) ?
40 : 1 / ((gfloat)player_of_idx_team(tms[j], i)->fitness);
probs[i + j * 11] = probs[i + j * 11 - 1] + (1 - goalie_factor) * fitness_factor *
(player_of_idx_team(tm[j], i)->cskill != 0) * (1 + tm[j]->boost * boost_factor);
(player_of_idx_team(tms[j], i)->cskill != 0) * (1 + tms[j]->boost * boost_factor);
}
}
@ -1513,7 +1516,7 @@ live_game_injury_get_player(void)
if(probs[i - 1] <= rndom && rndom < probs[i])
{
last_unit.event.player =
player_of_idx_team(tm[(i > 10)], i % 11)->id;
player_of_idx_team(tms[(i > 10)], i % 11)->id;
last_unit.event.team = (i > 10);
}
}
@ -1537,16 +1540,16 @@ live_game_resume(void)
live_game_event_substitution(i, subs_in[j], subs_out[j]);
}
if(tm[i]->structure != usr(stat2).live_game.team_state[i].structure)
if(tms[i]->structure != usr(stat2).live_game.team_state[i].structure)
live_game_event_team_change(i, LIVE_GAME_EVENT_STRUCTURE_CHANGE);
if(tm[i]->style != usr(stat2).live_game.team_state[i].style)
if(tms[i]->style != usr(stat2).live_game.team_state[i].style)
live_game_event_team_change(i, LIVE_GAME_EVENT_STYLE_CHANGE_ALL_OUT_DEFEND +
tm[i]->style + 2);
tms[i]->style + 2);
if(tm[i]->boost != usr(stat2).live_game.team_state[i].boost)
if(tms[i]->boost != usr(stat2).live_game.team_state[i].boost)
live_game_event_team_change(i, LIVE_GAME_EVENT_BOOST_CHANGE_ANTI +
tm[i]->boost + 1);
tms[i]->boost + 1);
}
live_game_calculate_fixture(usr(stat2).live_game.fix);

View File

@ -1,6 +1,23 @@
//i18n: file support_files/strategy/strategy_fit.xml line 4
// xgettext: no-c-format
_("442, defend, fittest players play");
//i18n: file support_files/strategy/strategy_normal1.xml line 4
// xgettext: no-c-format
_("442, balanced, best players play");
/*
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View File

@ -1,3 +1,26 @@
/*
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/

View File

@ -1,3 +1,26 @@
/*
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/

View File

@ -23,6 +23,7 @@
#include "cup.h"
#include "file.h"
#include "finance.h"
#include "fixture.h"
#include "game.h"
#include "game_gui.h"
@ -543,11 +544,20 @@ team_change_attribute_with_message(Team *tm, gint attribute, gint new_value)
break;
case TEAM_ATTRIBUTE_STYLE:
current_user.tm->style = new_value;
game_gui_print_message(_("Team style changed to %s."), team_attribute_to_char(attribute, new_value));
game_gui_print_message(_("Team style changed to %s."),
team_attribute_to_char(attribute, new_value));
break;
case TEAM_ATTRIBUTE_BOOST:
current_user.tm->boost = new_value;
game_gui_print_message(_("Boost changed to %s."), team_attribute_to_char(attribute, new_value));
if(new_value == 1)
game_gui_print_message(
_("Boost changed to %s (costs %d per minute)."),
team_attribute_to_char(attribute, new_value),
(gint)rint(finance_wage_unit(current_user.tm) *
const_float("float_boost_cost_factor")));
else
game_gui_print_message(_("Boost changed to %s."),
team_attribute_to_char(attribute, new_value));
break;
}
}

View File

@ -1344,7 +1344,9 @@ treeview_create_finances(const User* user)
_("Journey costs"),
/* Money paid to players a user fired. */
_("Compensations"),
_("Betting")};
_("Betting"),
/* Applying boost costs money. */
_("Boost costs")};
GtkTreeIter iter;
GtkListStore *ls =

View File

@ -54,6 +54,7 @@ enum MonOut
MON_OUT_JOURNEY,
MON_OUT_COMPENSATIONS,
MON_OUT_BETS,
MON_OUT_BOOST,
MON_OUT_TRANSFERS,
MON_OUT_STADIUM_IMPROVEMENT,
MON_OUT_STADIUM_BILLS,

View File

@ -28,6 +28,7 @@
#include "game_gui.h"
#include "gui.h"
#include "interface.h"
#include "language.h"
#include "league.h"
#include "live_game.h"
#include "load_save.h"
@ -148,6 +149,7 @@ window_show_startup(void)
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo_country), renderer, TRUE);
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo_country), renderer, "text", 1, NULL);
language_pick_country(country_files);
model = treeview_create_country_list(country_files);
gtk_combo_box_set_model(GTK_COMBO_BOX(combo_country), model);
g_object_unref(model);

View File

@ -383,7 +383,7 @@ float_season_end_team_change_upper 4000
# additional percentage if a user was first league
# champion
float_season_end_user_champ_addition 1000
float_season_end_user_champ_addition 2000
# bounds for new teams when user's been fired
# counted in the tables relative to his team
@ -582,6 +582,9 @@ float_team_boost_foul_by_possession_factor2 90000
# influence of boost on foul probability
float_team_boost_foul_factor 40000
# costs factor of boost per minute
float_boost_cost_factor 2000
# probability that be better goalie gets substituted
# when updating the cpu teams
float_team_replace_worse_goalie 80000
@ -724,6 +727,7 @@ float_name_random_list_prob 20000
string_language_names English Deutsch Français Spanish Nederlands Polski Danish Romanian Bulgarian Chinese
string_language_codes C de fr es nl pl da ro bg zh
string_language_symbols flag_england.png flag_germany.png flag_france.png flag_spain.png flag_netherlands.png flag_poland.png flag_dk.png flag_romania.png flag_bulgaria.png flag_china.png
string_language_defs country_england.xml country_germany.xml country_france.xml country_spain.xml country_netherlands.xml country_poland.xml NONE country_romania.xml country_bulgaria.xml NONE
# lower and upper limits of which percentage
# of the player wages a sponsor pays; the actual