~stratagus/stratagus/nettcp

« back to all changes in this revision

Viewing changes to src/unit/unit.cpp

  • Committer: cybermind
  • Date: 2014-05-31 12:41:18 UTC
  • Revision ID: iddqd_mail@mail.ru-20140531124118-y72us2v19c92cpr0
[+] Added "position-autocast" field for "autocast" spell section, allowing to set up autocast for position spells

Show diffs side-by-side

added added

removed removed

Lines of Context:
2368
2368
        }
2369
2369
 
2370
2370
        // Priority 0-255
2371
 
        cost -= dtype.Priority * PRIORITY_FACTOR;
 
2371
        cost -= dtype.DefaultStat.Variables[PRIORITY_INDEX].Value * PRIORITY_FACTOR;
2372
2372
        // Remaining HP (Health) 0-65535
2373
2373
        cost += dest.Variable[HP_INDEX].Value * 100 / dest.Variable[HP_INDEX].Max * HEALTH_FACTOR;
2374
2374