mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
* bug 151 fixed
This commit is contained in:
parent
c08151cb5b
commit
88f209a86f
@ -724,20 +724,13 @@ ui32 CStack::Speed( int turn /*= 0*/ ) const
|
||||
int percentBonus = 0;
|
||||
for(int g=0; g<features.size(); ++g)
|
||||
{
|
||||
if(features[g].type == StackFeature::SPEED_BONUS, -1024, turn)
|
||||
if(features[g].type == StackFeature::SPEED_BONUS)
|
||||
{
|
||||
percentBonus += features[g].additionalInfo;
|
||||
}
|
||||
}
|
||||
|
||||
if(percentBonus < 0)
|
||||
{
|
||||
speed = (abs(percentBonus) * speed)/100;
|
||||
}
|
||||
else
|
||||
{
|
||||
speed = ((100 + percentBonus) * speed)/100;
|
||||
}
|
||||
speed = ((100 + percentBonus) * speed)/100;
|
||||
|
||||
//bind effect check
|
||||
if(getEffect(72))
|
||||
|
@ -910,7 +910,7 @@ static std::vector<StackFeature> stackEffectToFeature(const CStack::StackEffect
|
||||
sf.push_back(featureGenerator(StackFeature::SPEED_BONUS, 0, VLC->spellh->spells[sse.id].powers[sse.level], sse.turnsRemain));
|
||||
break;
|
||||
case 54: //slow
|
||||
sf.push_back(featureGenerator(StackFeature::SPEED_BONUS, 0, 0, sse.turnsRemain, -1 * VLC->spellh->spells[sse.id].powers[sse.level]));
|
||||
sf.push_back(featureGenerator(StackFeature::SPEED_BONUS, 0, 0, sse.turnsRemain, -1 * ( 100 - VLC->spellh->spells[sse.id].powers[sse.level] ) ));
|
||||
break;
|
||||
case 55: //slayer
|
||||
sf.push_back(featureGenerator(StackFeature::SLAYER, 0, sse.level, sse.turnsRemain));
|
||||
|
Loading…
Reference in New Issue
Block a user