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

Inherits SandBox.BoardGames.BoardGameBase.

Classes

class  BarrierInfo
 
struct  BoardInformation
 
struct  PawnInformation
 

Public Member Functions

 BoardGameSeega (MissionBoardGameLogic mission, PlayerTurn startingPlayer)
 
override void InitializeUnits ()
 
override void InitializeTiles ()
 
override void InitializeSound ()
 
override void Reset ()
 
override List< MoveCalculateValidMoves (PawnBase pawn)
 
override void SetPawnCaptured (PawnBase pawn, bool aiSimulation=false)
 
void AIMakeMove (Move move)
 
Dictionary< PawnBase, int > GetBlockingPawns (bool playerOneBlocked)
 
BoardInformation TakeBoardSnapshot ()
 
void UndoMove (ref BoardInformation board)
 
TileBase GetTile (int x, int y)
 
- Public Member Functions inherited from SandBox.BoardGames.BoardGameBase
abstract void InitializeUnits ()
 
abstract void InitializeTiles ()
 
abstract void InitializeSound ()
 
abstract List< MoveCalculateValidMoves (PawnBase pawn)
 
virtual void RollDice ()
 
virtual void InitializeDiceBoard ()
 
virtual void Reset ()
 
virtual void InitializeCapturedUnitsZones ()
 
virtual void SetPawnCaptured (PawnBase pawn, bool fake=false)
 
virtual List< List< Move > > CalculateAllValidMoves (BoardGameSide side)
 
void SetUserRay (Vec3 rayBegin, Vec3 rayEnd)
 
void SetStartingPlayer (PlayerTurn player)
 
void SetGameOverInfo (GameOverEnum info)
 
bool HasMovesAvailable (ref List< List< Move > > moves)
 
int GetTotalMovesAvailable (ref List< List< Move > > moves)
 
void PlayDiceRollSound ()
 
int GetPlayerOneUnitsAlive ()
 
int GetPlayerTwoUnitsAlive ()
 
int GetPlayerOneUnitsDead ()
 
int GetPlayerTwoUnitsDead ()
 
void Initialize ()
 
bool Tick (float dt)
 
void ForceDice (int value)
 

Static Public Attributes

static readonly int BoardWidth = 5
 
static readonly int BoardHeight = 5
 
- Static Public Attributes inherited from SandBox.BoardGames.BoardGameBase
const string StringBoardGame = "str_boardgame"
 
const string StringForfeitQuestion = "str_boardgame_forfeit_question"
 
const string StringMovePiecePlayer = "str_boardgame_move_piece_player"
 
const string StringMovePieceOpponent = "str_boardgame_move_piece_opponent"
 
const string StringCapturePiecePlayer = "str_boardgame_capture_piece_player"
 
const string StringCapturePieceOpponent = "str_boardgame_capture_piece_opponent"
 
const string StringVictoryMessage = "str_boardgame_victory_message"
 
const string StringDefeatMessage = "str_boardgame_defeat_message"
 
const string StringDrawMessage = "str_boardgame_draw_message"
 
const string StringNoAvailableMovesPlayer = "str_boardgame_no_available_moves_player"
 
const string StringNoAvailableMovesOpponent = "str_boardgame_no_available_moves_opponent"
 
const string StringSeegaBarrierByP1DrawMessage = "str_boardgame_seega_barrier_by_player_one_draw_message"
 
const string StringSeegaBarrierByP2DrawMessage = "str_boardgame_seega_barrier_by_player_two_draw_message"
 
const string StringSeegaBarrierByP1VictoryMessage = "str_boardgame_seega_barrier_by_player_one_victory_message"
 
const string StringSeegaBarrierByP2VictoryMessage = "str_boardgame_seega_barrier_by_player_two_victory_message"
 
const string StringSeegaBarrierByP1DefeatMessage = "str_boardgame_seega_barrier_by_player_one_defeat_message"
 
const string StringSeegaBarrierByP2DefeatMessage = "str_boardgame_seega_barrier_by_player_two_defeat_message"
 
const string StringRollDicePlayer = "str_boardgame_roll_dice_player"
 
const string StringRollDiceOpponent = "str_boardgame_roll_dice_opponent"
 

Protected Member Functions

override void OnPawnArrivesGoalPosition (PawnBase pawn, Vec3 prevPos, Vec3 currentPos)
 
override void SwitchPlayerTurn ()
 
override PawnBase SelectPawn (PawnBase pawn)
 
override void MovePawnToTileDelayed (PawnBase pawn, TileBase tile, bool instantMove, bool displayMessage, float delay)
 
override void HandlePreMovementStage (float dt)
 
override void HandlePreMovementStageAI (Move move)
 
override bool CheckGameEnded ()
 
override void OnAfterBoardSetUp ()
 
- Protected Member Functions inherited from SandBox.BoardGames.BoardGameBase
 BoardGameBase (MissionBoardGameLogic mission, TextObject name, PlayerTurn startingPlayer)
 
abstract PawnBase SelectPawn (PawnBase pawn)
 
abstract bool CheckGameEnded ()
 
abstract void OnAfterBoardSetUp ()
 
virtual void OnAfterBoardRotated ()
 
virtual void OnBeforeEndTurn ()
 
virtual void UpdateAllTilesPositions ()
 
virtual void OnPawnArrivesGoalPosition (PawnBase pawn, Vec3 prevPos, Vec3 currentPos)
 
virtual void HandlePreMovementStage (float dt)
 
virtual void HandlePreMovementStageAI (Move move)
 
virtual void SwitchPlayerTurn ()
 
virtual void MovePawnToTile (PawnBase pawn, TileBase tile, bool instantMove=false, bool displayMessage=true)
 
virtual void MovePawnToTileDelayed (PawnBase pawn, TileBase tile, bool instantMove, bool displayMessage, float delay)
 
virtual void OnAfterDiceRollAnimation ()
 
void RemovePawnFromBoard (PawnBase pawn, float speed, bool instantMove=false)
 
PawnBase InitializeUnit (PawnBase pawnToInit)
 
Move HandlePlayerInput (float dt)
 
PawnBase GetHoveredPawnIfAny ()
 
TileBase GetHoveredTileIfAny ()
 
void CheckSwitchPlayerTurn ()
 
void OnVictory (string message=StringVictoryMessage)
 
void OnAfterEndTurn ()
 
void OnDefeat (string message=StringDefeatMessage)
 
void OnDraw (string message=StringDrawMessage)
 
void EndTurn ()
 
void ClearValidMoves ()
 
void HideAllValidTiles ()
 
void ShowAllValidTiles ()
 
void OnAIWantsForfeit ()
 

Properties

override int TileCount [get]
 
override int UnitsToPlacePerTurnInPreMovementStage [get]
 
override bool RotateBoard [get]
 
override bool PreMovementStagePresent [get]
 
override bool DiceRollRequired [get]
 
- Properties inherited from SandBox.BoardGames.BoardGameBase
abstract int TileCount [get]
 
abstract bool RotateBoard [get]
 
abstract bool PreMovementStagePresent [get]
 
abstract bool DiceRollRequired [get]
 
virtual int UnitsToPlacePerTurnInPreMovementStage [get]
 
virtual PawnBase SelectedUnit [get, set]
 
TextObject Name [get]
 
bool InPreMovementStage [get, protected set]
 
TileBase[] Tiles [get, protected set]
 
List< PawnBasePlayerOneUnits [get, protected set]
 
List< PawnBasePlayerTwoUnits [get, protected set]
 
int LastDice [get, protected set]
 
bool IsReady [get]
 
PlayerTurn PlayerWhoStarted [get]
 
GameOverEnum GameOverInfo [get]
 
PlayerTurn PlayerTurn [get, protected set]
 
IInputContext InputManager [get]
 
List< PawnBasePawnSelectFilter [get]
 
BoardGameAIBase AIOpponent [get]
 

Additional Inherited Members

- Protected Attributes inherited from SandBox.BoardGames.BoardGameBase
uint PawnSelectedFactor = 0xFFFFFFFF
 
uint PawnUnselectedFactor = 0xFF3D3D3D
 
MissionBoardGameLogic MissionHandler
 
GameEntity BoardEntity
 
GameEntity DiceBoard
 
bool JustStoppedDraggingUnit
 
CapturedPawnsPool PlayerOnePool
 
bool ReadyToPlay
 
CapturedPawnsPool PlayerTwoPool
 
bool SettingUpBoard = true
 
bool HasToMovePawnsAcross
 
float DiceRollAnimationTimer
 
int MovesLeftToEndTurn
 
bool DiceRollAnimationRunning
 
int DiceRollSoundCodeID
 
- Static Protected Attributes inherited from SandBox.BoardGames.BoardGameBase
const int InvalidDice = -1
 
const float DelayBeforeMovingAnyPawn = 0.25f
 
const float DelayBetweenPawnMovementsBegin = 0.15f
 

Constructor & Destructor Documentation

◆ BoardGameSeega()

SandBox.BoardGames.BoardGameSeega.BoardGameSeega ( MissionBoardGameLogic  mission,
PlayerTurn  startingPlayer 
)

Member Function Documentation

◆ InitializeUnits()

override void SandBox.BoardGames.BoardGameSeega.InitializeUnits ( )
virtual

◆ InitializeTiles()

override void SandBox.BoardGames.BoardGameSeega.InitializeTiles ( )
virtual

◆ InitializeSound()

override void SandBox.BoardGames.BoardGameSeega.InitializeSound ( )
virtual

◆ Reset()

override void SandBox.BoardGames.BoardGameSeega.Reset ( )
virtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ CalculateValidMoves()

override List< Move > SandBox.BoardGames.BoardGameSeega.CalculateValidMoves ( PawnBase  pawn)
virtual

◆ SetPawnCaptured()

override void SandBox.BoardGames.BoardGameSeega.SetPawnCaptured ( PawnBase  pawn,
bool  aiSimulation = false 
)
virtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ OnPawnArrivesGoalPosition()

override void SandBox.BoardGames.BoardGameSeega.OnPawnArrivesGoalPosition ( PawnBase  pawn,
Vec3  prevPos,
Vec3  currentPos 
)
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ SwitchPlayerTurn()

override void SandBox.BoardGames.BoardGameSeega.SwitchPlayerTurn ( )
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ SelectPawn()

override PawnBase SandBox.BoardGames.BoardGameSeega.SelectPawn ( PawnBase  pawn)
protectedvirtual

◆ MovePawnToTileDelayed()

override void SandBox.BoardGames.BoardGameSeega.MovePawnToTileDelayed ( PawnBase  pawn,
TileBase  tile,
bool  instantMove,
bool  displayMessage,
float  delay 
)
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ HandlePreMovementStage()

override void SandBox.BoardGames.BoardGameSeega.HandlePreMovementStage ( float  dt)
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ HandlePreMovementStageAI()

override void SandBox.BoardGames.BoardGameSeega.HandlePreMovementStageAI ( Move  move)
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ CheckGameEnded()

override bool SandBox.BoardGames.BoardGameSeega.CheckGameEnded ( )
protectedvirtual

◆ OnAfterBoardSetUp()

override void SandBox.BoardGames.BoardGameSeega.OnAfterBoardSetUp ( )
protectedvirtual

◆ AIMakeMove()

void SandBox.BoardGames.BoardGameSeega.AIMakeMove ( Move  move)

◆ GetBlockingPawns()

Dictionary< PawnBase, int > SandBox.BoardGames.BoardGameSeega.GetBlockingPawns ( bool  playerOneBlocked)

◆ TakeBoardSnapshot()

BoardInformation SandBox.BoardGames.BoardGameSeega.TakeBoardSnapshot ( )

◆ UndoMove()

void SandBox.BoardGames.BoardGameSeega.UndoMove ( ref BoardInformation  board)

◆ GetTile()

TileBase SandBox.BoardGames.BoardGameSeega.GetTile ( int  x,
int  y 
)

Member Data Documentation

◆ BoardWidth

readonly int SandBox.BoardGames.BoardGameSeega.BoardWidth = 5
static

◆ BoardHeight

readonly int SandBox.BoardGames.BoardGameSeega.BoardHeight = 5
static

Property Documentation

◆ TileCount

override int SandBox.BoardGames.BoardGameSeega.TileCount
get

◆ UnitsToPlacePerTurnInPreMovementStage

override int SandBox.BoardGames.BoardGameSeega.UnitsToPlacePerTurnInPreMovementStage
getprotected

◆ RotateBoard

override bool SandBox.BoardGames.BoardGameSeega.RotateBoard
getprotected

◆ PreMovementStagePresent

override bool SandBox.BoardGames.BoardGameSeega.PreMovementStagePresent
getprotected

◆ DiceRollRequired

override bool SandBox.BoardGames.BoardGameSeega.DiceRollRequired
getprotected