mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-30 08:57:00 +02:00
Implement NO_TERRAIN_PENALTY bonus
Penalty of specified terrain type is ignored if hero have this bonus
This commit is contained in:
parent
fca4deaad2
commit
52a52dcfd9
@ -369,6 +369,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"NO_TERRAIN_PENALTY":
|
||||||
|
{
|
||||||
|
"hidden": true
|
||||||
|
},
|
||||||
|
|
||||||
"NON_LIVING":
|
"NON_LIVING":
|
||||||
{
|
{
|
||||||
"graphics":
|
"graphics":
|
||||||
|
@ -215,6 +215,7 @@ public:
|
|||||||
BONUS_NAME(ADDITIONAL_UNITS) /*val of units with id = subtype will be added to hero's army at the beginning of battle */\
|
BONUS_NAME(ADDITIONAL_UNITS) /*val of units with id = subtype will be added to hero's army at the beginning of battle */\
|
||||||
BONUS_NAME(SPOILS_OF_WAR) /*val * 10^-6 * gained exp resources of subtype will be given to hero after battle*/\
|
BONUS_NAME(SPOILS_OF_WAR) /*val * 10^-6 * gained exp resources of subtype will be given to hero after battle*/\
|
||||||
BONUS_NAME(BLOCK)\
|
BONUS_NAME(BLOCK)\
|
||||||
|
BONUS_NAME(NO_TERRAIN_PENALTY) /* subtype - terrain type */\
|
||||||
BONUS_NAME(DISGUISED) /* subtype - spell level */\
|
BONUS_NAME(DISGUISED) /* subtype - spell level */\
|
||||||
BONUS_NAME(VISIONS) /* subtype - spell level */
|
BONUS_NAME(VISIONS) /* subtype - spell level */
|
||||||
|
|
||||||
|
@ -83,8 +83,6 @@ ui32 CGHeroInstance::getTileCost(const TerrainTile &dest, const TerrainTile &fro
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//FIXME: in H3 presence of Nomad in army will remove terrain penalty for sand. Bonus not implemented in VCMI
|
|
||||||
|
|
||||||
// NOTE: in H3 neutral stacks will ignore terrain penalty only if placed as topmost stack(s) in hero army.
|
// NOTE: in H3 neutral stacks will ignore terrain penalty only if placed as topmost stack(s) in hero army.
|
||||||
// This is clearly bug in H3 however intended behaviour is not clear.
|
// This is clearly bug in H3 however intended behaviour is not clear.
|
||||||
// Current VCMI behaviour will ignore neutrals in calculations so army in VCMI
|
// Current VCMI behaviour will ignore neutrals in calculations so army in VCMI
|
||||||
@ -101,7 +99,7 @@ ui32 CGHeroInstance::getTileCost(const TerrainTile &dest, const TerrainTile &fro
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!nativeArmy)
|
if(!nativeArmy && !hasBonusOfType(Bonus::NO_TERRAIN_PENALTY, from.terType))
|
||||||
{
|
{
|
||||||
ret = VLC->heroh->terrCosts[from.terType];
|
ret = VLC->heroh->terrCosts[from.terType];
|
||||||
ret-=getSecSkillLevel(SecondarySkill::PATHFINDING)*25;
|
ret-=getSecSkillLevel(SecondarySkill::PATHFINDING)*25;
|
||||||
|
Loading…
Reference in New Issue
Block a user