1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Implement missing functions, fixes linking errors

This commit is contained in:
Ivan Savenko
2023-10-05 21:18:11 +03:00
parent 910ad50417
commit 77facf9387
34 changed files with 452 additions and 201 deletions

View File

@@ -19,6 +19,7 @@
#include "constants/StringConstants.h"
#include "bonuses/Limiters.h"
#include "bonuses/Updaters.h"
#include "bonuses/BonusSubtypes.h"
#include "serializer/JsonDeserializer.h"
#include "serializer/JsonUpdater.h"
#include "mapObjectConstructors/AObjectTypeHandler.h"
@@ -291,6 +292,11 @@ CCreature::CCreature()
fightValue = AIValue = growth = hordeGrowth = ammMin = ammMax = 0;
}
void CCreature::addBonus(int val, BonusType type)
{
addBonus(val, type, TBonusSubtype::NONE);
}
void CCreature::addBonus(int val, BonusType type, TBonusSubtype subtype)
{
auto selector = Selector::typeSubtype(type, subtype).And(Selector::source(BonusSource::CREATURE_ABILITY, getIndex()));