Skip to content

H7TownBuilding

Class in MMH7Game · MMH7Game.H7TownBuilding · native, perobjectconfig

Object › H7TownBuilding

Implements: H7IEffectTargetable, H7IAliasable

Subclasses: H7ArtifactRecycler, H7BlackMarket, H7Inscriber, H7TownArcaneLibrary, H7TownBank, H7TownCastingStage, H7TownCommerceBuilding, H7TownDwelling, H7TownEmbassy, H7TownFortificationEnhancer, H7TownFurnace, H7TownGrowthEnhancer, H7TownGuardBuilding, H7TownGuardGrowthEnhancer, H7TownHall, H7TownHallOfIntrigue, H7TownIdolOfFertility, H7TownMagicGuild, H7TownMarketplace, H7TownMoat, H7TownPortal, H7TownSiloBuilding, H7TownSpiesGuild, H7TownTearOfAsha, H7TownThiefGuild, H7TownTower, H7TownUnitConverter, H7TownUtilityUnitDwelling

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

Properties

NameTypeNotes
mAbilityObjectno declaration: type is approximate
mAbilityManagerObjectno declaration: type is approximate
mAiBaseUtilityfloatno declaration: type is approximate
mAlternateH7TownBuilding
mCostsarray<H7ResourceQuantity>
mCostsSkirmisharray<H7ResourceQuantity>
mDescstringconst, localized
mEventManagerObjectno declaration: type is approximate
mIconDynLoadObjectno declaration: type is approximate
mIsUniqueboolprotected
mNamestringconst, localized
mNameInststringno declaration: type is approximate
mPopupbyteno declaration: type is approximate
mPrerequisitesarray<H7TownBuilding>
mProductionarray<H7ResourceQuantity>
mProductionSkirmisharray
mRequiredLevelintprotected
mTownObjectno declaration: type is approximate
mTownAssetDynLoadObjectno declaration: type is approximate
mTownAssetsarrayno declaration: type is approximate
mUpgradeH7TownBuilding

Functions

NameDeclaration
ApplyDamagesimulated function ApplyDamage(H7CombatResult Result, int resultIdx, bool isForecast, optional bool isRetaliation = false, optional bool raiseEvent = true)
CostResourceCompareGUIfunction int CostResourceCompareGUI(H7ResourceQuantity A, H7ResourceQuantity B)
DataChangedevent DataChanged(optional string cause)
DelIconfunction DelIcon()
DelTownAssetfunction DelTownAsset()
DelTownAssetsfunction DelTownAssets()
Deserializefunction Deserialize(JsonObject Data)
GetAbilityfunction H7BaseAbility GetAbility()
GetAbilityManagernative function H7AbilityManager GetAbilityManager()
GetAlternatefunction H7TownBuilding GetAlternate()
GetAlternateBothwaysfunction H7TownBuilding GetAlternateBothways(H7Town Town)
GetArchetypeDescriptionfunction string GetArchetypeDescription()
GetBuffManagernative function H7BuffManager GetBuffManager()
GetBuildingBaseUtilityfunction float GetBuildingBaseUtility()
GetCostfunction array<H7ResourceQuantity> GetCost(optional H7Town Town)
GetDescfunction string GetDesc()
GetEffectManagerfunction H7EffectManager GetEffectManager()
GetEntityTypenative function H7StructsAndEnumsNative.EUnitType GetEntityType()
GetEventManagernative function H7EventManager GetEventManager()
GetFlashIconPathfunction string GetFlashIconPath()
GetFlashInfoIconPathfunction string GetFlashInfoIconPath(bool Build)
GetGridPositionnative function IntPoint GetGridPosition()
GetHitPointsfunction int GetHitPoints()
GetIDnative function int GetID()
GetIDStringfunction string GetIDString()
GetIncomefunction array<H7ResourceQuantity> GetIncome()
GetIncomeForResourcenative function int GetIncomeForResource(H7Resource Resource)
GetNamefunction string GetName()
GetPlayernative function H7Player GetPlayer()
GetPopupfunction H7StructsAndEnums.ETownPopup GetPopup()
GetPrerequisiteLevelfunction int GetPrerequisiteLevel()
GetPrerequisitesfunction array<H7TownBuilding> GetPrerequisites()
GetResistanceModifierFornative function float GetResistanceModifierFor(H7StructsAndEnumsNative.EAbilitySchool school, array<H7StructsAndEnumsNative.ESpellTag> tags, optional bool checkOnlyBuffs = false, optional bool forcedResistanceOnly = false)
GetStackSizefunction int GetStackSize()
GetTownnative function H7Town GetTown()
GetTownAssetfunction H7TownAsset GetTownAsset()
GetTownAssetsfunction array<H7TownAsset> GetTownAssets()
GetUpgradefunction H7TownBuilding GetUpgrade()
HasTownAssetLoadedfunction bool HasTownAssetLoaded()
HasTownAssetsLoadedfunction bool HasTownAssetsLoaded()
InitTownBuildingfunction InitTownBuilding(H7Town Town)
IsArchetypefunction bool IsArchetype()
IsUniquefunction bool IsUnique()
LocalizeNamefunction LocalizeName()
OnBeginDayfunction OnBeginDay()
PostSerializeevent PostSerialize()
Serializefunction JsonObject Serialize()
SetPrerequisiteLevelfunction SetPrerequisiteLevel(int Level)
SetTownfunction SetTown(H7Town Town)
ShouldDisplayIncomefunction bool ShouldDisplayIncome()
TriggerEventsnative function TriggerEvents(H7StructsAndEnumsNative.ETrigger triggerEvent, bool forecast, optional H7EventContainerStruct container)

Default values

mAiBaseUtility=1.0000000

Inherited

FromMembers
Object13 properties, 308 functions