Skip to content

H7CombatMapGridController

Class in MMH7Game · MMH7Game.H7CombatMapGridController · native, config, placeable

Object › Actor › H7EditorMapGrid › H7EditorCombatGrid › H7CombatMapGridController

Implements: H7IEffectTargetable, H7ICaster

Using it from Lua
h7.find_all("H7CombatMapGridController")            -- live instances
h7.find_class("MMH7Game.H7CombatMapGridController")   -- the class
h7.hook("MMH7Game.H7CombatMapGridController.AddAbilityHighlightCells", fn)

Properties

NameTypeNotes
mAbilityHighlightCellsarray<H7CombatMapCell>protected
mAbilityManagerH7AbilityManagerprotected
mAuraManagerH7AuraManagerprotected
mBufferedHitCellH7CombatMapCellprotected
mBufferedHitCellsarray<H7CombatMapCell>protected
mBuffManagerH7BuffManagerprotected
mCanForceUpdateGridboolprotected
mCombatControllerH7CombatControllerprotected
mConePreviewDynamicSMActor_Spawnableprotected
mCouldAttackBeforeboolprotected
mCurrentAttackPositionarray<H7CombatMapCell>protected
mCurrentHoverTargetH7IEffectTargetableprotected
mCurrentMouseOverCellH7CombatMapCellprotected
mCurrentMouseOverTrueCellH7CombatMapCellprotected
mCurrentReachableAltCreatureH7Unitprotected
mEffectManagerH7EffectManagerprotected
mEventManagerH7EventManagerprotected
mFCTH7FCTControllerprotected
mGridH7CombatMapGridprotected
mIsDecalDirtyboolprotected
mIsSiegeMapboolprotected
mLastAttackPositionarray<H7CombatMapCell>protected
mLookForToiletboolprotected
mMoatXintprotected
mMouseOverCellsarray<H7CombatMapCell>protected
mNewAbilityHighlightCellsarray<H7CombatMapCell>protected
mParticleListarrayprotected
mPathPreviewerH7CombatMapPathPreviewerprotected
mPlacedObstaclesarray<H7CombatObstacleObject>protected
mPreviousAttackerH7CreatureStackprotected
mReachableAltCellsarray<H7CombatMapCell>protected
mReachableCellsarray<H7CombatMapCell>protected
mSelectedCellsarray<H7CombatMapCell>protected
mSelectedCreatureSizeH7StructsAndEnumsNative.ECellSizeprotected
mSelectedStackH7CreatureStackprotected
mSelectedWarUnitH7WarUnitprotected
mTacticsPlaceableColumnsintprotected
mTraceBufferActorsarray<Actor>protected
mTraceBufferLocationsarray<Vector>protected

Functions

NameDeclaration
AddAbilityHighlightCellsfunction AddAbilityHighlightCells(H7CombatMapCell cell)
AddParticleSystemToMonitorListnative function AddParticleSystemToMonitorList(ParticleSystemComponent newParticle)
ApplyDamagesimulated function ApplyDamage(H7CombatResult Result, int resultIdx, bool isForecast, optional bool isRetaliation = false, optional bool raiseEvent = true)
BeginCombatsimulated function BeginCombat()
BeginTacticssimulated function BeginTactics(bool forAttacker, int numberColumns)
CalculateIsSiegeMapsimulated function CalculateIsSiegeMap()
CalculateReachableCellsFornative function CalculateReachableCellsFor(H7Unit Unit, optional int movePoints = -1)
CanPlaceCreaturenative simulated function bool CanPlaceCreature(IntPoint gridPos, H7CreatureStack creatureStack)
CanPlaceObstaclefunction bool CanPlaceObstacle(IntPoint pos, int xSize, int ySize)
CanPlaceRandomObstaclefunction bool CanPlaceRandomObstacle(IntPoint pos, int xSize, int ySize)
CanPlaceSummonedObstaclefunction bool CanPlaceSummonedObstacle(IntPoint pos, int xSize, int ySize)
CheckIfCellIsReachablenative function bool CheckIfCellIsReachable(H7CombatMapCell cell, H7StructsAndEnumsNative.ECellSize cellSize)
CleanAfterCombatfunction CleanAfterCombat()
ClearCurrentAttackPositionsimulated function ClearCurrentAttackPosition()
ClearMouseOverCellsprotected native simulated function ClearMouseOverCells()
ClearParticlesfunction ClearParticles()
CreateCombatControllerAndRNGprotected function CreateCombatControllerAndRNG()
CreateGridsimulated function CreateGrid()
DataChangedfunction DataChanged(optional string cause)
DeleteTownDataReffunction DeleteTownDataRef()
DestroyGridnative function DestroyGrid()
DestroyPlacedObstaclesfunction DestroyPlacedObstacles()
DetermineFlankingTypefunction H7StructsAndEnumsNative.EFlankingType DetermineFlankingType(H7CombatMapCell attackCell, H7CreatureStack attackTarget)
DisplayHeroHoverEffectprotected simulated function DisplayHeroHoverEffect(H7CombatMapCell HitCell, array<H7CombatMapCell> hitCells, Vector HitLocation, optional H7CombatMapCell TrueHitCell)
DisplayHoverEffectprotected simulated function DisplayHoverEffect(H7CombatMapCell HitCell, array<H7CombatMapCell> hitCells, optional H7CombatMapCell TrueHitCell)
DoAbilitysimulated function bool DoAbility(H7CombatMapCell HitCell, optional H7StructsAndEnumsNative.EDirection Direction = 8, optional H7CombatMapCell TrueHitCell, optional array<H7CombatMapCell> hitCells)
DoAttackAIsimulated function bool DoAttackAI(H7CombatMapCell HitCell, optional H7CombatMapCell attackCell, optional H7StructsAndEnumsNative.EDirection Direction = 8)
DoCurrentUnitActionsimulated function DoCurrentUnitAction(optional bool fireFCT = true)
DoMovementprotected native simulated function DoMovement(H7CombatMapCell HitCell, array<H7CombatMapCell> hitCells, optional bool takeShortest = false, optional bool isRealAttack = true, optional H7StructsAndEnumsNative.EDirection turnDirection = 8)
DoRuneMovementsimulated function DoRuneMovement(H7CombatMapCell HitCell, array<H7CombatMapCell> hitCells)
DrawRotationfunction DrawRotation()
FindDoubleLinePositionsnative simulated function FindDoubleLinePositions(out IntPoint attackerPos1, out IntPoint defenderPos1, out IntPoint attackerPos2, out IntPoint defenderPos2, IntPoint rotationPos, int quadrant, bool targetSizeIs2x2)
FindQuadrantnative simulated function int FindQuadrant(H7CombatMapCell casterPivot, H7CombatMapCell targetPivot)
ForceGridStateUpdatesimulated function ForceGridStateUpdate()
ForceMouseOverCellUpdatesimulated function ForceMouseOverCellUpdate()
GetAbilityManagernative function H7AbilityManager GetAbilityManager()
GetActionIDfunction H7StructsAndEnumsNative.ECommandTag GetActionID(H7BaseAbility Ability)
GetAdjacentCellsInConenative simulated function GetAdjacentCellsInCone(out array<H7CombatMapCell> outCells, H7CreatureStack castingCreature, H7CombatMapCell targetCell, float Angle)
GetAttackevent int GetAttack()
GetAttackerPositionsimulated function IntPoint GetAttackerPosition()
GetAttackerWarUnitPositionfunction IntPoint GetAttackerWarUnitPosition(H7StructsAndEnumsNative.EWarUnitClass Id)
GetAuraManagerfunction H7AuraManager GetAuraManager()
GetBufferedHitCellfunction H7CombatMapCell GetBufferedHitCell()
GetBuffManagernative function H7BuffManager GetBuffManager()
GetCellnative simulated function H7CombatMapCell GetCell(Vector pos)
GetCellLocationsimulated function Vector GetCellLocation(IntPoint gridPos)
GetCellsForSunburstnative simulated function GetCellsForSunburst(out array<H7CombatMapCell> outCells, IntPoint originPoint, out array indeces, out array<IntPoint> targetPoints)
GetCellsForTsunaminative simulated function GetCellsForTsunami(out array<H7CombatMapCell> outCells, IntPoint originPoint, int Rows)
GetCellsInColumnnative simulated function GetCellsInColumn(out array<H7CombatMapCell> outCells, H7CombatMapCell cell)
GetCellsInConenative simulated function GetCellsInCone(out array<H7CombatMapCell> outCells, H7CreatureStack castingCreature, H7CombatMapCell targetCell, H7BaseAbility Ability, bool PreviewCone)
GetCenterPosForColCellsnative simulated function Vector GetCenterPosForColCells(int ColNum)
GetCombatArmynative function H7CombatArmy GetCombatArmy()
GetCombatGridsimulated function H7CombatMapGrid GetCombatGrid()
GetCurrentAttackPositionsimulated function array<H7CombatMapCell> GetCurrentAttackPosition()
GetCurrentHoverTargetfunction H7IEffectTargetable GetCurrentHoverTarget()
GetCurrentMouseOverCellsimulated function H7CombatMapCell GetCurrentMouseOverCell()
GetDefenderPositionsimulated function IntPoint GetDefenderPosition()
GetDefenderWarUnitPositionfunction IntPoint GetDefenderWarUnitPosition(H7StructsAndEnumsNative.EWarUnitClass Id)
GetDistanceTilesfunction float GetDistanceTiles(H7Unit attacker, H7Unit defender, bool forecast, int Range)
GetDoubleLineCellsIntersectingGridnative simulated function GetDoubleLineCellsIntersectingGrid(out array<H7CombatMapCell> outCells, H7CreatureStack castingCreature, H7CombatMapCell targetCell)
GetEffectManagerfunction H7EffectManager GetEffectManager()
GetEntityTypenative function H7StructsAndEnumsNative.EUnitType GetEntityType()
GetEventManagernative function H7EventManager GetEventManager()
GetGridPositionnative function IntPoint GetGridPosition()
GetHitPointsfunction int GetHitPoints()
GetIDnative function int GetID()
GetInstancestatic simulated function H7CombatMapGridController GetInstance()
GetLineCellsIntersectingGridnative simulated function GetLineCellsIntersectingGrid(out array<H7CombatMapCell> outCells, IntPoint lineOriginPoint, IntPoint lineTargetPoint)
GetLocationnative function Vector GetLocation()
GetLuckDestinynative function int GetLuckDestiny()
GetMagicevent int GetMagic()
GetMasterCellForObstaclesimulated function H7CombatMapCell GetMasterCellForObstacle(H7CombatObstacleObject theObstacle)
GetMaximumDamageevent float GetMaximumDamage()
GetMinimumDamageevent float GetMinimumDamage()
GetMoatXfunction int GetMoatX()
GetMouseHitActorsimulated function Actor GetMouseHitActor(name classTypeName)
GetMouseHitActorAndLocationsimulated function Actor GetMouseHitActorAndLocation(out Vector HitLocation)
GetMouseHitActorAndLocationIgnoringClasssimulated function Actor GetMouseHitActorAndLocationIgnoringClass(out Vector HitLocation, optional name classTypeNameToIgnore)
GetMouseOverCellprotected simulated function bool GetMouseOverCell(out H7CombatMapCell HitCell, out array<H7CombatMapCell> hitCells, optional out Vector HitLocation, optional out H7StructsAndEnumsNative.EDirection hitDirection, optional out H7CombatMapCell TrueHitCell, optional out H7IEffectTargetable Target)
GetMouseOverCellssimulated function array<H7CombatMapCell> GetMouseOverCells()
GetMouseOverTargetnative simulated function H7IEffectTargetable GetMouseOverTarget(out Vector HitLocation)
GetMovementPreviewCellsnative simulated function GetMovementPreviewCells(out array<H7CombatMapCell> outCells)
GetNamefunction string GetName()
GetObstaclefunction H7CombatObstacleObject GetObstacle(int Id)
GetObstaclesfunction array<H7CombatObstacleObject> GetObstacles()
GetOriginalnative function H7ICaster GetOriginal()
GetPathPreviewersimulated function H7CombatMapPathPreviewer GetPathPreviewer()
GetPlayernative function H7Player GetPlayer()
GetPostCellsForTsunaminative simulated function GetPostCellsForTsunami(out array<H7CombatMapCell> outCells, IntPoint originPoint, int Rows)
GetPreCellsForTsunaminative simulated function GetPreCellsForTsunami(out array<H7CombatMapCell> outCells, IntPoint originPoint, int Rows)
GetPreparedAbilityfunction H7BaseAbility GetPreparedAbility()
GetReachableCellsFornative function GetReachableCellsFor(H7CreatureStack currentStack, out array<H7CombatMapCell> Cells, optional int movePoints = -1)
GetResistanceModifierFornative function float GetResistanceModifierFor(H7StructsAndEnumsNative.EAbilitySchool school, array<H7StructsAndEnumsNative.ESpellTag> tags, optional bool checkOnlyBuffs = false, optional bool forcedResistanceOnly = false)
GetRotationSelectionDirectionfunction H7StructsAndEnumsNative.EDirection GetRotationSelectionDirection()
GetRuneUnitStartPositionfunction IntPoint GetRuneUnitStartPosition(bool IsAttacker)
GetSchoolevent H7StructsAndEnumsNative.EAbilitySchool GetSchool()
GetSelectedStacksimulated function H7CreatureStack GetSelectedStack()
GetSiegeTownDatasimulated function H7SiegeTownData GetSiegeTownData()
GetStackSizefunction int GetStackSize()
GetTargetsFromCombatCellssimulated function array<H7IEffectTargetable> GetTargetsFromCombatCells(array<H7CombatMapCell> Cells)
GetTargetsOnMouseOverCellssimulated function array<H7IEffectTargetable> GetTargetsOnMouseOverCells(optional bool Dead = false)
HasReachableCellsfunction bool HasReachableCells(H7CreatureStack Stack)
Initsimulated function Init()
InitCellsForObstaclePlacementfunction InitCellsForObstaclePlacement()
InitTraceBuffersimulated function InitTraceBuffer()
IsDecalDirtyfunction bool IsDecalDirty()
IsDefaultAttackActivenative function bool IsDefaultAttackActive()
IsMouseInRotationSelectionAreafunction bool IsMouseInRotationSelectionArea()
IsShipfunction bool IsShip()
IsSiegeMapsimulated function bool IsSiegeMap()
IsTargetInMeleeRangesimulated function bool IsTargetInMeleeRange(H7Unit Active, H7IEffectTargetable Target)
IsUnitInFarRangesimulated function bool IsUnitInFarRange(H7Unit Active, H7Unit Target)
IsUnitIsInMoveRangesimulated function bool IsUnitIsInMoveRange(H7Unit Active, H7Unit Target)
MPSetPlayerReadyprotected simulated function MPSetPlayerReady()
PlaceCreaturenative simulated function PlaceCreature(IntPoint gridPos, H7CreatureStack Creature)
PlaceObstaclesimulated function PlaceObstacle(IntPoint gridPos, out H7CombatObstacleObject theObstacle, H7SiegeTownData siegeTownData, optional H7BaseBuff addedBuff, optional H7EffectContainer Source, optional AkEvent placeSound, optional Actor NewOwner)
PlaceRandomObstaclessimulated function PlaceRandomObstacles()
PlaceRuneUnitsimulated function PlaceRuneUnit(IntPoint gridPos, H7RuneUnit runeUnit)
PlaceWarfareUnitsimulated function PlaceWarfareUnit(IntPoint gridPos, H7WarUnit warUnit)
PostBeginPlaysimulated function PostBeginPlay()
PrepareAbilityfunction PrepareAbility(H7BaseAbility Ability)
RaiseEventOnObstaclesfunction RaiseEventOnObstacles(H7StructsAndEnumsNative.ETrigger Trigger, optional H7EventContainerStruct container)
RecalculateReachableCellsnative function RecalculateReachableCells()
RefreshThreatMapsimulated function RefreshThreatMap()
RemoveBlockedCellsFromLinenative simulated function RemoveBlockedCellsFromLine(out array<H7CombatMapCell> Line)
RemoveObstaclefunction RemoveObstacle(H7CombatObstacleObject fruit)
ResetSelectedAndReachableCellsnative simulated function ResetSelectedAndReachableCells(optional bool removeUnit = false)
ResetTacticsGridsimulated function ResetTacticsGrid()
RotateAround2x2native simulated function RotateAround2x2(IntPoint inPos, out IntPoint outPos, int quadrant, bool reverse, bool targetSizeIs2x2)
SelectUnitnative simulated function SelectUnit(H7Unit Unit, bool isCombatPhase)
SetAbilityHighlightCellsfunction SetAbilityHighlightCells(array<H7CombatMapCell> Cells)
SetArmyForeShadowedCellssimulated function SetArmyForeShadowedCells(bool ignoreUnits)
SetCombatControllersimulated function SetCombatController(H7CombatController combatController)
SetDecalDirtynative function SetDecalDirty(bool isDirty)
SetMoatXfunction SetMoatX(int val)
SetMouseOverBufferfunction bool SetMouseOverBuffer()
ShowHUDUnitOverEffectssimulated function ShowHUDUnitOverEffects(H7Unit targetUnit)
ShowPathPreviewsimulated function bool ShowPathPreview(array<H7CombatMapCell> hitCells, optional bool takeShortest = false)
StartRuneMovementsimulated function StartRuneMovement(array<H7CombatMapCell> Path)
StartUnitMovementsimulated event StartUnitMovement(H7CombatMapCell HitCell, array<H7CombatMapCell> hitCells, array<H7CombatMapCell> Path, optional bool isRealAttack = true, optional H7StructsAndEnumsNative.EDirection turnDirection = 8)
TacticsPickUnitsimulated function TacticsPickUnit(H7CreatureStack creatureStack)
TacticsReleaseUnitsimulated function TacticsReleaseUnit(optional bool releasedOnBar)
TacticsStoreUnitOnBarsimulated function TacticsStoreUnitOnBar()
Ticksimulated event Tick(float DeltaTime)
TriggerEventsfunction TriggerEvents(H7StructsAndEnumsNative.ETrigger triggerEvent, bool forecast, optional H7EventContainerStruct container)
UnregisterEventssimulated function UnregisterEvents()
UpdateAbilityHighlightCellsprotected simulated function UpdateAbilityHighlightCells()
UpdateCellSelectionTypesfunction UpdateCellSelectionTypes()
UpdateCreatureDeploymentsimulated function UpdateCreatureDeployment(IntPoint gridPos, H7CreatureStack Creature)
UpdateGridStateprotected simulated function UpdateGridState(H7CombatMapCell HitCell, array<H7CombatMapCell> hitCells, Vector HitLocation, optional H7CombatMapCell TrueHitCell)
UpdateHoverEffectsprotected simulated function UpdateHoverEffects()
UpdateMouseOverCellsprotected simulated function UpdateMouseOverCells(H7CombatMapCell HitCell, array<H7CombatMapCell> newHighlightCells, optional int isMouseOverMaster = 0, optional H7CombatMapCell masterCell = none, optional bool highlightTargetCell = true, optional array<H7CombatMapCell> casterCells)
UpdateNeighboursprotected simulated function UpdateNeighbours()
UpdateObstaclePosfunction UpdateObstaclePos(H7CombatObstacleObject obst, IntPoint gridPos)
UpdateObstaclessimulated function UpdateObstacles()
UpdateReachableAltCellsprotected simulated function UpdateReachableAltCells(H7IEffectTargetable Target)
UpdateSiegeMapDecorationsimulated function UpdateSiegeMapDecoration()
UsePreparedAbilityfunction UsePreparedAbility(H7IEffectTargetable Target)

States

State code replaces the class's functions while the object is in that state. Hook a state's version as MMH7Game.H7CombatMapGridController.<State>.<Function>.

StateFunctions
combatBeginState, DoCurrentUnitAction, EndState, UpdateGridState, UpdateReachableAltCells
NotInitBeginState, EndState
TacticsBeginState, DoCurrentUnitAction, EndState, TacticsPickUnit, TacticsReleaseUnit, UpdateGridState

Inherited

FromMembers
H7EditorCombatGridProperties: cMaximumCombatGridHeight, cMaximumCombatGridWidth, cMinimumCombatGridHeight, cMinimumCombatGridWidth, mAdjustedGridSizeX, mAttackerHeroOffset, mAttackerPreviewMesh, mAttackerWarUnitOffset, mAttackerWarUnitPreviewMesh, mCanFlee, mCanSurrender, mCombatCells, mCustomDecalColor, mDecorations, mDefenderHeroOffset, mDefenderPreviewMesh, mDefenderWarUnitOffset, mDefenderWarUnitPreviewMesh, mGridDecal, mIsShip, mObstaclePlacementCells, mObstacles, mRandomObstacleList, mSpecialCombatMapAmbient, mSpecialMapMusic, mUseCustomDecalColor
Functions: GetAttackerHeroOffset, GetCenter, GetDecal, GetDefenderHeroOffset, GetDeploymentZoneCenter, GetGridSizeX, GetGridSizeY, GetMapSpecialAmbient, GetMapSpecialMusic, HideDecal, ShowDecal, Tick
H7EditorMapGridProperties: mEditorPreviewMesh, mGridSizeX, mGridSizeY, Mid, mInitialLandscapePosition, mLandscape, mSynchLandscapeAndGridPosition
Functions: GetCenter, GetGridSizeX, GetGridSizeY, GetMouseHitActorAndLocation
Actor156 properties, 262 functions
Object13 properties, 308 functions