M&B: Bannerlord 1.2.10
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.CampaignSystem.BattleSimulation Class Reference

This class will handle all battle simulations (normal battle, siege etc) where the player choose to order his troops to attack while the hero stays back.

Inherits TaleWorlds.Core.IBattleObserver.

Public Member Functions

 BattleSimulation (FlattenedTroopRoster selectedTroopsForPlayerSide, FlattenedTroopRoster selectedTroopsForOtherSide)
 
void Play ()
 
void FastForward ()
 
void Skip ()
 
void OnReturn ()
 
void Tick (float dt)
 
void ResetSimulation ()
 
void TroopNumberChanged (BattleSideEnum side, IBattleCombatant battleCombatant, BasicCharacterObject character, int number=0, int numberKilled=0, int numberWounded=0, int numberRouted=0, int killCount=0, int numberReadyToUpgrade=0)
 
void HeroSkillIncreased (BattleSideEnum side, IBattleCombatant battleCombatant, BasicCharacterObject heroCharacter, SkillObject skill)
 
void BattleResultsReady ()
 
void TroopSideChanged (BattleSideEnum prevSide, BattleSideEnum newSide, IBattleCombatant battleCombatant, BasicCharacterObject character)
 

Static Public Member Functions

static void SimulateBattleFromUi ()
 

Public Attributes

List< TroopRostertempRosterRefs
 
readonly FlattenedTroopRoster[] SelectedTroops = new FlattenedTroopRoster[2]
 

Properties

bool IsSimulationPaused [get]
 
bool IsSimulationFinished [get]
 
MapEvent MapEvent [get]
 
IBattleObserver BattleObserver [get, set]
 
List< List< BattleResultPartyData > > Teams [get]
 

Constructor & Destructor Documentation

◆ BattleSimulation()

TaleWorlds.CampaignSystem.BattleSimulation.BattleSimulation ( FlattenedTroopRoster selectedTroopsForPlayerSide,
FlattenedTroopRoster selectedTroopsForOtherSide )

Member Function Documentation

◆ Play()

void TaleWorlds.CampaignSystem.BattleSimulation.Play ( )

◆ FastForward()

void TaleWorlds.CampaignSystem.BattleSimulation.FastForward ( )

◆ Skip()

void TaleWorlds.CampaignSystem.BattleSimulation.Skip ( )

◆ OnReturn()

void TaleWorlds.CampaignSystem.BattleSimulation.OnReturn ( )

◆ Tick()

void TaleWorlds.CampaignSystem.BattleSimulation.Tick ( float dt)

◆ SimulateBattleFromUi()

static void TaleWorlds.CampaignSystem.BattleSimulation.SimulateBattleFromUi ( )
static

◆ ResetSimulation()

void TaleWorlds.CampaignSystem.BattleSimulation.ResetSimulation ( )

◆ TroopNumberChanged()

void TaleWorlds.CampaignSystem.BattleSimulation.TroopNumberChanged ( BattleSideEnum side,
IBattleCombatant battleCombatant,
BasicCharacterObject character,
int number = 0,
int numberKilled = 0,
int numberWounded = 0,
int numberRouted = 0,
int killCount = 0,
int numberReadyToUpgrade = 0 )

◆ HeroSkillIncreased()

void TaleWorlds.CampaignSystem.BattleSimulation.HeroSkillIncreased ( BattleSideEnum side,
IBattleCombatant battleCombatant,
BasicCharacterObject heroCharacter,
SkillObject skill )

◆ BattleResultsReady()

void TaleWorlds.CampaignSystem.BattleSimulation.BattleResultsReady ( )

◆ TroopSideChanged()

void TaleWorlds.CampaignSystem.BattleSimulation.TroopSideChanged ( BattleSideEnum prevSide,
BattleSideEnum newSide,
IBattleCombatant battleCombatant,
BasicCharacterObject character )

Member Data Documentation

◆ tempRosterRefs

List<TroopRoster> TaleWorlds.CampaignSystem.BattleSimulation.tempRosterRefs

◆ SelectedTroops

readonly FlattenedTroopRoster [] TaleWorlds.CampaignSystem.BattleSimulation.SelectedTroops = new FlattenedTroopRoster[2]

Property Documentation

◆ IsSimulationPaused

bool TaleWorlds.CampaignSystem.BattleSimulation.IsSimulationPaused
get

◆ IsSimulationFinished

bool TaleWorlds.CampaignSystem.BattleSimulation.IsSimulationFinished
get

◆ MapEvent

MapEvent TaleWorlds.CampaignSystem.BattleSimulation.MapEvent
get

◆ BattleObserver

IBattleObserver TaleWorlds.CampaignSystem.BattleSimulation.BattleObserver
getset

◆ Teams

List<List<BattleResultPartyData> > TaleWorlds.CampaignSystem.BattleSimulation.Teams
get