1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

* fixed #28 bug

* fixed #30 bug (those elementals were wrongly double-wide)
* fixed #40 bug
* RowAdd always initialized in getSprite

bugs from http://antypika.aplus.pl/vcmi/forum/viewtopic.php?t=148&sid=1813b5192666d21ca931aac9ad778606
This commit is contained in:
mateuszb
2009-05-24 14:32:36 +00:00
parent 6635cf4f23
commit d3e5020da1
3 changed files with 11 additions and 2 deletions

View File

@@ -207,6 +207,7 @@ void CArtHandler::addBonuses()
//Luck and morale //Luck and morale
ART_MORALE(45,+1); //Still Eye of the Dragon ART_MORALE(45,+1); //Still Eye of the Dragon
ART_LUCK(45,+1); //Still Eye of the Dragon
ART_LUCK(46,+1); //Clover of Fortune ART_LUCK(46,+1); //Clover of Fortune
ART_LUCK(47,+1); //Cards of Prophecy ART_LUCK(47,+1); //Cards of Prophecy
ART_LUCK(48,+1); //Ladybird of Luck ART_LUCK(48,+1); //Ladybird of Luck
@@ -280,7 +281,7 @@ void CArtHandler::addBonuses()
giveArtBonus(97,HeroBonus::STACKS_SPEED,+1);//Necklace of Swiftness giveArtBonus(97,HeroBonus::STACKS_SPEED,+1);//Necklace of Swiftness
giveArtBonus(98,HeroBonus::LAND_MOVEMENT,+600);//Boots of Speed giveArtBonus(98,HeroBonus::LAND_MOVEMENT,+600);//Boots of Speed
giveArtBonus(99,HeroBonus::STACKS_SPEED,+1);//Cape of Velocity giveArtBonus(99,HeroBonus::STACKS_SPEED,+2);//Cape of Velocity
giveArtBonus(100,HeroBonus::SPELL_IMMUNITY,59);//Pendant of Dispassion giveArtBonus(100,HeroBonus::SPELL_IMMUNITY,59);//Pendant of Dispassion
giveArtBonus(101,HeroBonus::SPELL_IMMUNITY,62);//Pendant of Second Sight giveArtBonus(101,HeroBonus::SPELL_IMMUNITY,62);//Pendant of Second Sight

View File

@@ -545,6 +545,9 @@ void CCreatureHandler::loadCreatures()
creatures[147].abilities += makeCreatureAbility(StackFeature::NOT_ACTIVE, 0); //First Aid Tent //TODO: remove when support is added creatures[147].abilities += makeCreatureAbility(StackFeature::NOT_ACTIVE, 0); //First Aid Tent //TODO: remove when support is added
creatures[148].abilities += makeCreatureAbility(StackFeature::NOT_ACTIVE, 0); //Ammo Cart creatures[148].abilities += makeCreatureAbility(StackFeature::NOT_ACTIVE, 0); //Ammo Cart
creatures[120].abilities -= StackFeature::DOUBLE_WIDE; //psychic elemental
creatures[121].abilities -= StackFeature::DOUBLE_WIDE; //magic elemental
creatures[0].abilities += makeCreatureAbility(StackFeature::CHARGE_IMMUNITY, 0); //pikeman immunity to Champion charge bonus creatures[0].abilities += makeCreatureAbility(StackFeature::CHARGE_IMMUNITY, 0); //pikeman immunity to Champion charge bonus
creatures[1].abilities += makeCreatureAbility(StackFeature::CHARGE_IMMUNITY, 0); //halberdier immunity to Champion charge bonus creatures[1].abilities += makeCreatureAbility(StackFeature::CHARGE_IMMUNITY, 0); //halberdier immunity to Champion charge bonus
creatures[4].abilities += makeCreatureAbility(StackFeature::ADDITIONAL_RETAILATION, 1); //griffins retailate twice creatures[4].abilities += makeCreatureAbility(StackFeature::ADDITIONAL_RETAILATION, 1); //griffins retailate twice

View File

@@ -316,7 +316,8 @@ SDL_Surface * CDefHandler::getSprite (int SIndex, unsigned char * FDef, BMPPalet
if (TopMargin > 0) if (TopMargin > 0)
ftcp += TopMargin*(FullWidth+add); ftcp += TopMargin*(FullWidth+add);
switch(defType2) { switch(defType2)
{
case 0: case 0:
{ {
for (int i=0;i<SpriteHeight;i++) for (int i=0;i<SpriteHeight;i++)
@@ -420,6 +421,8 @@ SDL_Surface * CDefHandler::getSprite (int SIndex, unsigned char * FDef, BMPPalet
if (RightMargin>0) if (RightMargin>0)
ftcp += RightMargin; ftcp += RightMargin;
RowAdd=SpriteWidth-TotalRowLength;
if (add>0) if (add>0)
ftcp += add+RowAdd; ftcp += add+RowAdd;
} }
@@ -474,6 +477,8 @@ SDL_Surface * CDefHandler::getSprite (int SIndex, unsigned char * FDef, BMPPalet
if (RightMargin>0) if (RightMargin>0)
ftcp += RightMargin; ftcp += RightMargin;
RowAdd=SpriteWidth-TotalRowLength;
if (add>0) if (add>0)
ftcp += add+RowAdd; ftcp += add+RowAdd;
} }