1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Heroes start with appropriate spells.

Starting spells list has been prepared by Dru. Thanks!
This commit is contained in:
Michał W. Urbańczyk
2009-07-03 18:40:36 +00:00
parent 50a49460bf
commit 38f8745777
4 changed files with 165 additions and 26 deletions

View File

@ -496,9 +496,10 @@ void CGHeroInstance::initHero()
if(!type)
type = VLC->heroh->heroes[subID];
artifWorn[16] = 3;
if(type->heroType % 2 == 1) //it's a magical hero
if(type->startingSpell >= 0) //hero starts with a spell
{
artifWorn[17] = 0; //give him spellbook
spells.insert(type->startingSpell);
}
if(portrait < 0 || portrait == 255)