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

Inherits SandBox.BoardGames.BoardGameBase.

Classes

struct  BoardInformation
 
struct  PawnInformation
 

Public Member Functions

 BoardGamePuluc (MissionBoardGameLogic mission, PlayerTurn startingPlayer)
 
override void InitializeUnits ()
 
override void InitializeTiles ()
 
override void InitializeSound ()
 
override void InitializeDiceBoard ()
 
override void Reset ()
 
override List< MoveCalculateValidMoves (PawnBase pawn)
 
override void RollDice ()
 
void AIMakeMove (Move move)
 
BoardInformation TakeBoardSnapshot ()
 
void UndoMove (ref BoardInformation board)
 
- Public Member Functions inherited from SandBox.BoardGames.BoardGameBase
void InitializeUnits ()
 
void InitializeTiles ()
 
void InitializeSound ()
 
List< MoveCalculateValidMoves (PawnBase pawn)
 
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

const int WhitePawnCount = 6
 
const int BlackPawnCount = 6
 
const int TrackTileCount = 11
 
- 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 OnAfterBoardSetUp ()
 
override PawnBase SelectPawn (PawnBase pawn)
 
override void SwitchPlayerTurn ()
 
override bool CheckGameEnded ()
 
override void UpdateAllTilesPositions ()
 
override void OnBeforeEndTurn ()
 
override void MovePawnToTile (PawnBase pawn, TileBase tile, bool instantMove=false, bool displayMessage=true)
 
override void OnAfterDiceRollAnimation ()
 
- Protected Member Functions inherited from SandBox.BoardGames.BoardGameBase
 BoardGameBase (MissionBoardGameLogic mission, TextObject name, PlayerTurn startingPlayer)
 
PawnBase SelectPawn (PawnBase pawn)
 
bool CheckGameEnded ()
 
void OnAfterBoardSetUp ()
 
virtual void OnAfterBoardRotated ()
 
virtual void OnPawnArrivesGoalPosition (PawnBase pawn, Vec3 prevPos, Vec3 currentPos)
 
virtual void HandlePreMovementStage (float dt)
 
virtual void HandlePreMovementStageAI (Move move)
 
virtual void MovePawnToTileDelayed (PawnBase pawn, TileBase tile, bool instantMove, bool displayMessage, float delay)
 
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 bool RotateBoard [get]
 
override bool PreMovementStagePresent [get]
 
override bool DiceRollRequired [get]
 
- Properties inherited from SandBox.BoardGames.BoardGameBase
int TileCount [get]
 
bool RotateBoard [get]
 
bool PreMovementStagePresent [get]
 
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

◆ BoardGamePuluc()

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

Member Function Documentation

◆ InitializeUnits()

override void SandBox.BoardGames.BoardGamePuluc.InitializeUnits ( )

◆ InitializeTiles()

override void SandBox.BoardGames.BoardGamePuluc.InitializeTiles ( )

◆ InitializeSound()

override void SandBox.BoardGames.BoardGamePuluc.InitializeSound ( )

◆ InitializeDiceBoard()

override void SandBox.BoardGames.BoardGamePuluc.InitializeDiceBoard ( )
virtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ Reset()

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

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ CalculateValidMoves()

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

◆ RollDice()

override void SandBox.BoardGames.BoardGamePuluc.RollDice ( )
virtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ OnAfterBoardSetUp()

override void SandBox.BoardGames.BoardGamePuluc.OnAfterBoardSetUp ( )
protected

◆ SelectPawn()

override PawnBase SandBox.BoardGames.BoardGamePuluc.SelectPawn ( PawnBase pawn)
protected

◆ SwitchPlayerTurn()

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

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ CheckGameEnded()

override bool SandBox.BoardGames.BoardGamePuluc.CheckGameEnded ( )
protected

◆ UpdateAllTilesPositions()

override void SandBox.BoardGames.BoardGamePuluc.UpdateAllTilesPositions ( )
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ OnBeforeEndTurn()

override void SandBox.BoardGames.BoardGamePuluc.OnBeforeEndTurn ( )
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ MovePawnToTile()

override void SandBox.BoardGames.BoardGamePuluc.MovePawnToTile ( PawnBase pawn,
TileBase tile,
bool instantMove = false,
bool displayMessage = true )
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ OnAfterDiceRollAnimation()

override void SandBox.BoardGames.BoardGamePuluc.OnAfterDiceRollAnimation ( )
protectedvirtual

Reimplemented from SandBox.BoardGames.BoardGameBase.

◆ AIMakeMove()

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

◆ TakeBoardSnapshot()

BoardInformation SandBox.BoardGames.BoardGamePuluc.TakeBoardSnapshot ( )

◆ UndoMove()

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

Member Data Documentation

◆ WhitePawnCount

const int SandBox.BoardGames.BoardGamePuluc.WhitePawnCount = 6
static

◆ BlackPawnCount

const int SandBox.BoardGames.BoardGamePuluc.BlackPawnCount = 6
static

◆ TrackTileCount

const int SandBox.BoardGames.BoardGamePuluc.TrackTileCount = 11
static

Property Documentation

◆ TileCount

override int SandBox.BoardGames.BoardGamePuluc.TileCount
get

◆ RotateBoard

override bool SandBox.BoardGames.BoardGamePuluc.RotateBoard
getprotected

◆ PreMovementStagePresent

override bool SandBox.BoardGames.BoardGamePuluc.PreMovementStagePresent
getprotected

◆ DiceRollRequired

override bool SandBox.BoardGames.BoardGamePuluc.DiceRollRequired
getprotected