mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-01-31 07:54:50 +01:00
Header event.
This commit is contained in:
parent
c4d40f55b6
commit
40def6a3ad
@ -543,6 +543,9 @@ live_game_event_scoring_chance(void)
|
|||||||
last_unit.event.values[LIVE_GAME_EVENT_VALUE_PLAYER], TRUE);
|
last_unit.event.values[LIVE_GAME_EVENT_VALUE_PLAYER], TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(math_rnd(0, 1) < const_float("float_live_game_scoring_chance_is_header"))
|
||||||
|
last_unit.event.type = LIVE_GAME_EVENT_HEADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
live_game_finish_unit();
|
live_game_finish_unit();
|
||||||
@ -1228,6 +1231,11 @@ live_game_generate_commentary(LiveGameUnit *unit)
|
|||||||
player_of_id_team(tm[unit->possession],
|
player_of_id_team(tm[unit->possession],
|
||||||
unit->event.values[LIVE_GAME_EVENT_VALUE_PLAYER])->name->str);
|
unit->event.values[LIVE_GAME_EVENT_VALUE_PLAYER])->name->str);
|
||||||
break;
|
break;
|
||||||
|
case LIVE_GAME_EVENT_HEADER:
|
||||||
|
g_string_printf(commentary, "header by %s",
|
||||||
|
player_of_id_team(tm[unit->possession],
|
||||||
|
unit->event.values[LIVE_GAME_EVENT_VALUE_PLAYER])->name->str);
|
||||||
|
break;
|
||||||
case LIVE_GAME_EVENT_PENALTY:
|
case LIVE_GAME_EVENT_PENALTY:
|
||||||
g_string_printf(commentary, "%s shoots penalty",
|
g_string_printf(commentary, "%s shoots penalty",
|
||||||
player_of_id_team(tm[unit->possession],
|
player_of_id_team(tm[unit->possession],
|
||||||
|
@ -19,6 +19,7 @@ enum LiveGameEventType
|
|||||||
LIVE_GAME_EVENT_END_MATCH,
|
LIVE_GAME_EVENT_END_MATCH,
|
||||||
LIVE_GAME_EVENT_LOST_POSSESSION,
|
LIVE_GAME_EVENT_LOST_POSSESSION,
|
||||||
LIVE_GAME_EVENT_SCORING_CHANCE,
|
LIVE_GAME_EVENT_SCORING_CHANCE,
|
||||||
|
LIVE_GAME_EVENT_HEADER,
|
||||||
LIVE_GAME_EVENT_PENALTY,
|
LIVE_GAME_EVENT_PENALTY,
|
||||||
LIVE_GAME_EVENT_FREE_KICK,
|
LIVE_GAME_EVENT_FREE_KICK,
|
||||||
LIVE_GAME_EVENT_GOAL,
|
LIVE_GAME_EVENT_GOAL,
|
||||||
|
@ -177,6 +177,8 @@ treeview_helper_live_game_icon(gint event_type)
|
|||||||
else if(event_type == LIVE_GAME_EVENT_SCORING_CHANCE ||
|
else if(event_type == LIVE_GAME_EVENT_SCORING_CHANCE ||
|
||||||
event_type == LIVE_GAME_EVENT_FREE_KICK)
|
event_type == LIVE_GAME_EVENT_FREE_KICK)
|
||||||
return const_app("string_live_game_event_scoring_chance_icon");
|
return const_app("string_live_game_event_scoring_chance_icon");
|
||||||
|
else if(event_type == LIVE_GAME_EVENT_HEADER)
|
||||||
|
return const_app("string_live_game_event_header_icon");
|
||||||
else if(event_type == LIVE_GAME_EVENT_GOAL)
|
else if(event_type == LIVE_GAME_EVENT_GOAL)
|
||||||
return const_app("string_live_game_event_goal_icon");
|
return const_app("string_live_game_event_goal_icon");
|
||||||
else if(event_type == LIVE_GAME_EVENT_OWN_GOAL)
|
else if(event_type == LIVE_GAME_EVENT_OWN_GOAL)
|
||||||
|
@ -125,6 +125,7 @@ string_live_game_event_start_match_icon whistle.png
|
|||||||
string_live_game_event_lost_possession_icon
|
string_live_game_event_lost_possession_icon
|
||||||
string_live_game_event_penalty_icon penalty.png
|
string_live_game_event_penalty_icon penalty.png
|
||||||
string_live_game_event_scoring_chance_icon scoring_chance.png
|
string_live_game_event_scoring_chance_icon scoring_chance.png
|
||||||
|
string_live_game_event_header_icon
|
||||||
string_live_game_event_goal_icon goal.png
|
string_live_game_event_goal_icon goal.png
|
||||||
string_live_game_event_own_goal_icon own_goal.png
|
string_live_game_event_own_goal_icon own_goal.png
|
||||||
string_live_game_event_post_icon post.png
|
string_live_game_event_post_icon post.png
|
||||||
|
@ -371,7 +371,10 @@ float_live_game_scoring_chance_team_exponent 12500
|
|||||||
|
|
||||||
# probability that it's the player in possession who
|
# probability that it's the player in possession who
|
||||||
# has the scoring chance.
|
# has the scoring chance.
|
||||||
float_live_game_player_in_poss_shoots 5000
|
float_live_game_player_in_poss_shoots 3000
|
||||||
|
|
||||||
|
# prob that the scoring chance is a header
|
||||||
|
float_live_game_scoring_chance_is_header 3000
|
||||||
|
|
||||||
# base probability to score with a scoring chance.
|
# base probability to score with a scoring chance.
|
||||||
float_live_game_score_base_prob 3000
|
float_live_game_score_base_prob 3000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user