Table of Contents

ChangeHeroStat()

Syntax

ChangeHeroStat(heroName, statID, delta);

heroName – the hero’s name statID – the stat’s ID delta – stat modification value

Description

This function modifies the hero’s specified stat by delta. The following stats can be modified: experience, attack, defense, spell power, knowledge, luck, morale, move points, mana points. delta can take on either positive (the stat is increased) or negative (the stat is decreased) values for all stats except experience, since experience can only grow.

The stats’ values themselves can not be negative. The top values of move points and mana points stats are additionally limited by the move points max and mana points max values. If the modification results in the stat exceeding the permissible limitations, it is truncated.

statID can take one of the following values:

  • STAT_EXPERIENCE – the hero’s experience
  • STAT_ATTACK – attack level
  • STAT_DEFENCE – defense level
  • STAT_SPELL_POWER – spell power
  • STAT_KNOWLEDGE – knowledge
  • STAT_LUCK – luck
  • STAT_MORALE – morale
  • STAT_MOVE_POINTS – remaining movement points number
  • STAT_MANA_POINTS – current mana points number
scripting/advmap/changeherostat.txt · Last modified: 2007/06/26 00:02 (external edit)
Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0