# CDOTA_BaseNPC_Hero

extends CDOTA_BaseNPC

Function Description Client
bool AddExperience(flXP, nReason, bApplyBotDifficultyScaling, bIncrementTotal) Params: Float XP, Bool applyBotDifficultyScaling
void Buyback() Spend the gold and buyback with this hero.
void CalculateStatBonus() Recalculate all stats after the hero gains stats.
bool CanEarnGold() Returns boolean value result of buyback gold limit time less than game time.
void ClearLastHitMultikill() Value is stored in PlayerResource.
void ClearLastHitStreak() Value is stored in PlayerResource.
void ClearStreak() Value is stored in PlayerResource.
int GetAbilityPoints() Gets the current unspent ability points.
table GetAdditionalOwnedUnits()
float GetAgility() ✔️
float GetAgilityGain()
int GetAssists() Value is stored in PlayerResource.
int GetAttacker(nIndex)
float GetBaseAgility()
int GetBaseDamageMax() Hero damage is also affected by attributes.
int GetBaseDamageMin() Hero damage is also affected by attributes.
float GetBaseIntellect()
float GetBaseManaRegen() Returns the base mana regen.
float GetBaseStrength()
int GetBonusDamageFromPrimaryStat()
float GetBuybackCooldownTime() Return float value for the amount of time left on cooldown for this hero's buyback.
int GetBuybackCost(bReturnOldValues) Return integer value for the gold cost of a buyback.
float GetBuybackGoldLimitTime() Returns the amount of time gold gain is limited after buying back.
int GetCurrentXP() Returns the amount of XP
int GetDeathGoldCost()
int GetDeaths() Value is stored in PlayerResource.
int GetDenies() Value is stored in PlayerResource.
int GetGold() Returns gold amount for the player owning this hero
int GetGoldBounty()
float GetIncreasedAttackSpeed() Hero attack speed is also affected by agility.
float GetIntellect() ✔️
float GetIntellectGain()
int GetKills() Value is stored in PlayerResource.
int GetLastHits() Value is stored in PlayerResource.
float GetMostRecentDamageTime()
int GetMultipleKillCount()
int GetNumAttackers()
int GetNumItemsInInventory()
int GetNumItemsInStash()
float GetPhysicalArmorBaseValue() Hero armor is affected by attributes.
int GetPlayerID() Returns player ID of the player owning this hero
int GetPrimaryAttribute() 0 = strength, 1 = agility, 2 = intelligence.
float GetPrimaryStatValue()
float GetRespawnTime()
bool GetRespawnsDisabled() Is this hero prevented from respawning?
int GetStreak() Value is stored in PlayerResource.
float GetStrength() ✔️
float GetStrengthGain()
float GetTimeUntilRespawn()
handle GetTogglableWearable(nSlotType) Get wearable entity in slot (slot)
bool HasAnyAvailableInventorySpace()
bool HasFlyingVision()
bool HasOwnerAbandoned()
int HasRoomForItem(pItemName, bIncludeStashCombines, bAllowSelling) Args: const char* pItemName, bool bIncludeStashCombines, bool bAllowSelling
void HeroLevelUp(bPlayEffects) Levels up the hero, true or false to play effects.
void IncrementAssists(iKillerID) Value is stored in PlayerResource.
void IncrementDeaths(iKillerID) Value is stored in PlayerResource.
void IncrementDenies() Value is stored in PlayerResource.
void IncrementKills(iVictimID) Passed ID is for the victim, killer ID is ID of the current hero. Value is stored in PlayerResource.
void IncrementLastHitMultikill() Value is stored in PlayerResource.
void IncrementLastHitStreak() Value is stored in PlayerResource.
void IncrementLastHits() Value is stored in PlayerResource.
void IncrementNearbyCreepDeaths() Value is stored in PlayerResource.
void IncrementStreak() Value is stored in PlayerResource.
bool IsBuybackDisabledByReapersScythe()
bool IsReincarnating()
bool IsStashEnabled()
void KilledHero(hHero, hInflictor) Args: Hero, Inflictor
void ModifyAgility(flNewAgility) Adds passed value to base attribute value, then calls CalculateStatBonus.
int ModifyGold(iGoldChange, bReliable, iReason) Gives this hero some gold. Args: int nGoldChange, bool bReliable, int reason
void ModifyIntellect(flNewIntellect) Adds passed value to base attribute value, then calls CalculateStatBonus.
void ModifyStrength(flNewStrength) Adds passed value to base attribute value, then calls CalculateStatBonus.
void PerformTaunt()
void RecordLastHit()
void RespawnHero(bBuyBack, bRespawnPenalty) Respawn this hero.
void SetAbilityPoints(iPoints) Sets the current unspent ability points.
void SetBaseAgility(flAgility)
void SetBaseIntellect(flIntellect)
void SetBaseStrength(flStrength)
void SetBotDifficulty(nDifficulty)
void SetBuyBackDisabledByReapersScythe(bBuybackDisabled)
void SetBuybackCooldownTime(flTime) Sets the buyback cooldown time.
void SetBuybackGoldLimitTime(flTime) Set the amount of time gold gain is limited after buying back.
void SetCustomDeathXP(iValue) Sets a custom experience value for this hero. Note, GameRules boolean must be set for this to work!
void SetGold(iGold, bReliable) Sets the gold amount for the player owning this hero
void SetPlayerID(iPlayerID)
void SetPrimaryAttribute(nPrimaryAttribute) Set this hero's primary attribute value.
void SetRespawnPosition(vOrigin)
void SetRespawnsDisabled(bDisableRespawns) Prevent this hero from respawning.
void SetStashEnabled(bEnabled)
void SetTimeUntilRespawn(time)
bool ShouldDoFlyHeightVisual()
void SpendGold(iCost, iReason) Args: int nGold, int nReason
bool UnitCanRespawn()
void UpgradeAbility(hAbility) This upgrades the passed ability if it exists and the hero has enough ability points.
bool WillReincarnate()