Problem with stats (armor, speed, xp)

Asked by Endytroll

Hello there!
I have some questions about stats.
If you make an upgrade that increases unit’s speed, speed actually won’t change. For some reason unit’s speed is depends on its animation. Is there some way to increase unit’s speed using upgrades?
Also I have a question about Armor. Even if I make unit’s Armor equal 100, it will has the same effect of Armor’s value of 10 or 5… Why is it? How can I influence Armor?
Other question is about Experience. How can I use Experience at all? What is depends on it? If I turn on the increasing of Damage by Experience, Damage won’t change at all even if Experience is more than 15000. How can I make something being depended on Experience? For example, check if Experience of unit is more than some value to make an upgrade.
Thank you!

Question information

Language:
English Edit question
Status:
Answered
For:
Wargus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Joris Dauphin (joris-dauphin) said :
#1

1-
Speed is managed by animation...
Speed can be modified by Slow and Haste which half/double each wait in animation.
So you can change haste (value/increase) to (1/0) haste one time.

2-
Default Damage formula is
-- 8< --
 int basic_damage = attacker.BASICDAMAGE;
 int piercing_damage = attacker.PIERCINGDAMAGE;

 if (bloodlust) {
  basic_damage *= 2;
  piercing_damage *= 2;
 }
 int maxdamage = max(basic_damage - defender.ARMOR, 1);
 maxdamage += piercing_damage;
 damage = RandomNumberBetween(1 + maxDamage / 2, maxDamage);
 return damage;
-- >8 --
So armor only reduce "BasicDamage" down to 1.

You can specify other formula (using XP per example) by using lua function SetDamageFormula.

3-
Upgrade are currently by type and not by unit.
However by "hacking" magic system, you can autocast a polymorph spell to change to a better type when XP reach a certain level.

Revision history for this message
Endytroll (endytroll) said :
#2

Thank you for your answers, but I have another question. Why autocast doesn’t work for player, but only for AI? If I build paladin and I have wounded unit, paladin won’t heal him by himself, without my order. Why it is so?

Revision history for this message
Joris Dauphin (joris-dauphin) said :
#3

You can activate auto-cast by rigth-click on the spell icon (as for auto-repair)

The definition of the spell (with the autocast part) is in spells.lua

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Pali (pali) said :
#5

Marked as answered

Can you help with this problem?

Provide an answer of your own, or ask Endytroll for more information if necessary.

To post a message you must log in.