mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
VCAI tweaks (#311)
* Add extra priority support for town capture evaluation * Improve building algorithm * GatherArmy: check free gold instead of total for when hiring heroes
This commit is contained in:
@@ -866,6 +866,11 @@ void CGHeroInstance::setPropertyDer( ui8 what, ui32 val )
|
||||
setStackCount(SlotID(0), val);
|
||||
}
|
||||
|
||||
TFaction CGHeroInstance::getFaction() const
|
||||
{
|
||||
return type->heroClass->faction;
|
||||
}
|
||||
|
||||
double CGHeroInstance::getFightingStrength() const
|
||||
{
|
||||
return sqrt((1.0 + 0.05*getPrimSkillLevel(PrimarySkill::ATTACK)) * (1.0 + 0.05*getPrimSkillLevel(PrimarySkill::DEFENSE)));
|
||||
|
||||
Reference in New Issue
Block a user