M&B: Bannerlord 1.1.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
SandBox.Tournaments.MissionLogics.TournamentBehavior Class Reference

Inherits TaleWorlds.MountAndBlade.MissionLogic, and TaleWorlds.Core.ICameraModeLogic.

Public Member Functions

SpectatorCameraTypes GetMissionCameraLockMode (bool lockedToMainPlayer)
 
 TournamentBehavior (TournamentGame tournamentGame, Settlement settlement, ITournamentGameBehavior gameBehavior, bool isPlayerParticipating)
 
MBList< CharacterObjectGetAllPossibleParticipants ()
 
override void AfterStart ()
 
override void OnMissionTick (float dt)
 
void StartMatch ()
 
void SkipMatch (bool isLeave=false)
 
void EndTournamentViaLeave ()
 
override InquiryData OnEndMissionRequest (out bool canPlayerLeave)
 
void PlaceABet (int bet)
 
int GetExpectedDenarsForBet (int bet)
 
int GetMaximumBet ()
 
- Public Member Functions inherited from TaleWorlds.MountAndBlade.MissionLogic
virtual InquiryData OnEndMissionRequest (out bool canLeave)
 
virtual bool MissionEnded (ref MissionResult missionResult)
 
virtual void OnBattleEnded ()
 
virtual void ShowBattleResults ()
 
virtual void OnRetreatMission ()
 
virtual void OnSurrenderMission ()
 
virtual void OnAutoDeployTeam (Team team)
 
virtual List< EquipmentElementGetExtraEquipmentElementsForCharacter (BasicCharacterObject character, bool getAllEquipments=false)
 
virtual void OnMissionResultReady (MissionResult missionResult)
 
- Public Member Functions inherited from TaleWorlds.MountAndBlade.MissionBehavior
virtual void OnAfterMissionCreated ()
 
virtual void OnBehaviorInitialize ()
 
virtual void OnCreated ()
 
virtual void EarlyStart ()
 
virtual void AfterStart ()
 
virtual void OnMissileHit (Agent attacker, Agent victim, bool isCanceled, AttackCollisionData collisionData)
 
virtual void OnMeleeHit (Agent attacker, Agent victim, bool isCanceled, AttackCollisionData collisionData)
 
virtual void OnMissileCollisionReaction (Mission.MissileCollisionReaction collisionReaction, Agent attackerAgent, Agent attachedAgent, sbyte attachedBoneIndex)
 
virtual void OnMissionScreenPreLoad ()
 
virtual void OnAgentCreated (Agent agent)
 
virtual void OnAgentBuild (Agent agent, Banner banner)
 
virtual void OnAgentTeamChanged (Team prevTeam, Team newTeam, Agent agent)
 
virtual void OnAgentHit (Agent affectedAgent, Agent affectorAgent, in MissionWeapon affectorWeapon, in Blow blow, in AttackCollisionData attackCollisionData)
 
virtual void OnScoreHit (Agent affectedAgent, Agent affectorAgent, WeaponComponentData attackerWeapon, bool isBlocked, bool isSiegeEngineHit, in Blow blow, in AttackCollisionData collisionData, float damagedHp, float hitDistance, float shotDifficulty)
 
virtual void OnEarlyAgentRemoved (Agent affectedAgent, Agent affectorAgent, AgentState agentState, KillingBlow blow)
 
virtual void OnAgentRemoved (Agent affectedAgent, Agent affectorAgent, AgentState agentState, KillingBlow blow)
 
virtual void OnAgentDeleted (Agent affectedAgent)
 
virtual void OnAgentFleeing (Agent affectedAgent)
 
virtual void OnAgentPanicked (Agent affectedAgent)
 
virtual void OnFocusGained (Agent agent, IFocusable focusableObject, bool isInteractable)
 
virtual void OnFocusLost (Agent agent, IFocusable focusableObject)
 
virtual void OnAddTeam (Team team)
 
virtual void AfterAddTeam (Team team)
 
virtual void OnAgentInteraction (Agent userAgent, Agent agent)
 
virtual void OnClearScene ()
 
virtual void OnEndMissionInternal ()
 Do not override this.
 
virtual void OnRemoveBehavior ()
 
virtual void OnPreMissionTick (float dt)
 
virtual void OnPreDisplayMissionTick (float dt)
 
virtual void OnMissionTick (float dt)
 
virtual void OnAgentMount (Agent agent)
 
virtual void OnAgentDismount (Agent agent)
 
virtual bool IsThereAgentAction (Agent userAgent, Agent otherAgent)
 
virtual void OnEntityRemoved (GameEntity entity)
 
virtual void OnObjectUsed (Agent userAgent, UsableMissionObject usedObject)
 
virtual void OnObjectStoppedBeingUsed (Agent userAgent, UsableMissionObject usedObject)
 
virtual void OnRenderingStarted ()
 
virtual void OnMissionStateActivated ()
 Called either after the mission is first initialized or the mission state is re-activated when a prior state (like inventory) is popped out of GameState stack.
 
virtual void OnMissionStateFinalized ()
 Called right before the mission state is finalized and any remaining allocated mission resources are released. This is not the same as OnMissionEnd callback which is called after the player clicks end/retreat button on battle results screen. MissionState is deallocated some time after OnMissionEnd to let MissionBehaviors to correctly deallocated themselves. Certain data structures (like Mission's agent list) are emptied here so do not depend on them. This is the final callback mission behaviors will receive before they are removed entirely.
 
virtual void OnMissionStateDeactivated ()
 Called either before mission is finalized or the mission state is deactivated due to another state (like inventory) being pushed into GameStates stack.
 
virtual void OnMissionRestart ()
 
virtual List< CompassItemUpdateParamsGetCompassTargets ()
 
virtual void OnAssignPlayerAsSergeantOfFormation (Agent agent)
 
virtual void OnDeploymentFinished ()
 
virtual void OnFormationUnitsSpawned (Team team)
 
virtual void OnAgentAlarmedStateChanged (Agent agent, Agent.AIStateFlag flag)
 
virtual void OnMissionModeChange (MissionMode oldMissionMode, bool atStart)
 
virtual void OnItemPickup (Agent agent, SpawnedItemEntity item)
 
virtual void OnItemDrop (Agent agent, SpawnedItemEntity item)
 
virtual void OnRegisterBlow (Agent attacker, Agent victim, GameEntity realHitEntity, Blow b, ref AttackCollisionData collisionData, in MissionWeapon attackerWeapon)
 
virtual void OnAgentShootMissile (Agent shooterAgent, EquipmentIndex weaponIndex, Vec3 position, Vec3 velocity, Mat3 orientation, bool hasRigidBody, int forcedMissileIndex)
 
SpectatorCameraTypes GetMissionCameraLockMode (bool lockedToMainPlayer)
 

Static Public Member Functions

static void DeleteTournamentSetsExcept (GameEntity selectedSetEntity)
 
static void DeleteAllTournamentSets ()
 

Static Public Attributes

const int RoundCount = 4
 
const int ParticipantCount = 16
 
const float EndMatchTimerDuration = 6
 
const float CheerTimerDuration = 1
 
const float MaximumOdd = 4.0f
 

Properties

TournamentGame TournamentGame [get]
 
TournamentRound[] Rounds [get]
 
bool IsPlayerEliminated [get]
 
int CurrentRoundIndex [get]
 
TournamentMatch LastMatch [get]
 
TournamentRound CurrentRound [get]
 
TournamentRound NextRound [get]
 
TournamentMatch CurrentMatch [get]
 
TournamentParticipant Winner [get]
 
bool IsPlayerParticipating [get]
 
Settlement Settlement [get]
 
float BetOdd [get]
 
int MaximumBetInstance [get]
 
int BettedDenars [get]
 
int OverallExpectedDenars [get]
 
int PlayerDenars [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.MissionLogic
override MissionBehaviorType BehaviorType [get]
 
- Properties inherited from TaleWorlds.MountAndBlade.MissionBehavior
Mission Mission [get]
 
IInputContext DebugInput [get]
 
abstract MissionBehaviorType BehaviorType [get]
 

Events

Action TournamentEnd
 

Additional Inherited Members

- Protected Member Functions inherited from TaleWorlds.MountAndBlade.MissionBehavior
virtual void OnEndMission ()
 Called right before the mission ends (i.e. after player clicks done/retreat button in battle results screen for SP missions). Preferably unregister all your Mission dependent events here. Some mission fields (like agent lists) will be deallocated after the mission ends.
 

Constructor & Destructor Documentation

◆ TournamentBehavior()

SandBox.Tournaments.MissionLogics.TournamentBehavior.TournamentBehavior ( TournamentGame  tournamentGame,
Settlement  settlement,
ITournamentGameBehavior  gameBehavior,
bool  isPlayerParticipating 
)

Member Function Documentation

◆ GetMissionCameraLockMode()

SpectatorCameraTypes SandBox.Tournaments.MissionLogics.TournamentBehavior.GetMissionCameraLockMode ( bool  lockedToMainPlayer)

◆ GetAllPossibleParticipants()

MBList< CharacterObject > SandBox.Tournaments.MissionLogics.TournamentBehavior.GetAllPossibleParticipants ( )

◆ DeleteTournamentSetsExcept()

static void SandBox.Tournaments.MissionLogics.TournamentBehavior.DeleteTournamentSetsExcept ( GameEntity  selectedSetEntity)
static

◆ DeleteAllTournamentSets()

static void SandBox.Tournaments.MissionLogics.TournamentBehavior.DeleteAllTournamentSets ( )
static

◆ AfterStart()

override void SandBox.Tournaments.MissionLogics.TournamentBehavior.AfterStart ( )
virtual

◆ OnMissionTick()

override void SandBox.Tournaments.MissionLogics.TournamentBehavior.OnMissionTick ( float  dt)
virtual

◆ StartMatch()

void SandBox.Tournaments.MissionLogics.TournamentBehavior.StartMatch ( )

◆ SkipMatch()

void SandBox.Tournaments.MissionLogics.TournamentBehavior.SkipMatch ( bool  isLeave = false)

◆ EndTournamentViaLeave()

void SandBox.Tournaments.MissionLogics.TournamentBehavior.EndTournamentViaLeave ( )

◆ OnEndMissionRequest()

override InquiryData SandBox.Tournaments.MissionLogics.TournamentBehavior.OnEndMissionRequest ( out bool  canPlayerLeave)
virtual

◆ PlaceABet()

void SandBox.Tournaments.MissionLogics.TournamentBehavior.PlaceABet ( int  bet)

◆ GetExpectedDenarsForBet()

int SandBox.Tournaments.MissionLogics.TournamentBehavior.GetExpectedDenarsForBet ( int  bet)

◆ GetMaximumBet()

int SandBox.Tournaments.MissionLogics.TournamentBehavior.GetMaximumBet ( )

Member Data Documentation

◆ RoundCount

const int SandBox.Tournaments.MissionLogics.TournamentBehavior.RoundCount = 4
static

◆ ParticipantCount

const int SandBox.Tournaments.MissionLogics.TournamentBehavior.ParticipantCount = 16
static

◆ EndMatchTimerDuration

const float SandBox.Tournaments.MissionLogics.TournamentBehavior.EndMatchTimerDuration = 6
static

◆ CheerTimerDuration

const float SandBox.Tournaments.MissionLogics.TournamentBehavior.CheerTimerDuration = 1
static

◆ MaximumOdd

const float SandBox.Tournaments.MissionLogics.TournamentBehavior.MaximumOdd = 4.0f
static

Property Documentation

◆ TournamentGame

TournamentGame SandBox.Tournaments.MissionLogics.TournamentBehavior.TournamentGame
get

◆ Rounds

TournamentRound [] SandBox.Tournaments.MissionLogics.TournamentBehavior.Rounds
get

◆ IsPlayerEliminated

bool SandBox.Tournaments.MissionLogics.TournamentBehavior.IsPlayerEliminated
get

◆ CurrentRoundIndex

int SandBox.Tournaments.MissionLogics.TournamentBehavior.CurrentRoundIndex
get

◆ LastMatch

TournamentMatch SandBox.Tournaments.MissionLogics.TournamentBehavior.LastMatch
get

◆ CurrentRound

TournamentRound SandBox.Tournaments.MissionLogics.TournamentBehavior.CurrentRound
get

◆ NextRound

TournamentRound SandBox.Tournaments.MissionLogics.TournamentBehavior.NextRound
get

◆ CurrentMatch

TournamentMatch SandBox.Tournaments.MissionLogics.TournamentBehavior.CurrentMatch
get

◆ Winner

TournamentParticipant SandBox.Tournaments.MissionLogics.TournamentBehavior.Winner
get

◆ IsPlayerParticipating

bool SandBox.Tournaments.MissionLogics.TournamentBehavior.IsPlayerParticipating
get

◆ Settlement

Settlement SandBox.Tournaments.MissionLogics.TournamentBehavior.Settlement
get

◆ BetOdd

float SandBox.Tournaments.MissionLogics.TournamentBehavior.BetOdd
get

◆ MaximumBetInstance

int SandBox.Tournaments.MissionLogics.TournamentBehavior.MaximumBetInstance
get

◆ BettedDenars

int SandBox.Tournaments.MissionLogics.TournamentBehavior.BettedDenars
get

◆ OverallExpectedDenars

int SandBox.Tournaments.MissionLogics.TournamentBehavior.OverallExpectedDenars
get

◆ PlayerDenars

int SandBox.Tournaments.MissionLogics.TournamentBehavior.PlayerDenars
get

Event Documentation

◆ TournamentEnd

Action SandBox.Tournaments.MissionLogics.TournamentBehavior.TournamentEnd