public sealed class PvpMatchOne PvP match: teams, objectives, score and the clock.
Remarks
⚠ A contested objective does not move in either direction. Not "the bigger group wins slowly" — frozen. The alternative makes numbers the whole game, and it makes standing on a point you already hold worth doing, which is how a battleground turns into everybody sitting still.
⚠ Score ticks for holding, and a capture pays once. Both, because they are different mechanics: resource control is won by holding more for longer, and a flag is won by taking it. A map uses whichever of the two numbers it sets.
⚠ The clock is checked after the score. A team that reaches the winning score on the same tick the clock runs out has won on score, not drawn — the same rule the dynamic-event director has, and the same reason: the work was done.
Fields and properties (8)
public PvpMap MapWhich map.
public float ElapsedHow long it has been running.
public int RoundWhich round it is on, counting from one.
public MatchOutcome OutcomeHow it ended, or Running.
public int WinnerWhich team won, or −1.
public bool IsOverWhether it is over.
public ReadOnlySpan<ObjectiveState> ObjectivesIts objectives' live state.
public IReadOnlyDictionary<PlayerId, int> TeamsEverybody in it, and which team they are on.
Events (2)
public Action<ObjectiveState, int>? CapturedRaised when an objective changes hands.
public Action<PvpMatch>? EndedRaised when the match ends.
Methods (9)
public PvpMatch(PvpMap map)Starts a match.
public int ScoreOf(int team)What a team has scored this round.
public int RoundsWonBy(int team)How many rounds a team has taken.
public int TeamOf(PlayerId player)Which team somebody is on, or −1.
public PvpRefusal Join(PlayerId player, int team)Puts somebody on a team.
public PvpRefusal Leave(PlayerId player)Takes somebody out, and forfeits the match when a team is emptied.
public PvpRefusal Occupy(int objective, ReadOnlySpan<int> present)Says how many of each team are standing on an objective.
public bool Tick(float delta)Advances the match.
public int Leader()Which team is ahead, or −1 when two are level.
Used by (1)
- PvpMatchTestsVixen.Gameplay.Pvp.Tests