mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
MetaIdentifier now uses std::variant internally
This commit is contained in:
@@ -150,7 +150,7 @@ JsonNode Bonus::toJsonNode() const
|
||||
JsonNode root(JsonNode::JsonType::DATA_STRUCT);
|
||||
// only add values that might reasonably be found in config files
|
||||
root["type"].String() = vstd::findKey(bonusNameMap, type);
|
||||
if(subtype != TBonusSubtype::NONE)
|
||||
if(subtype != TBonusSubtype())
|
||||
root["subtype"].String() = subtype.toString();
|
||||
if(additionalInfo != CAddInfo::NONE)
|
||||
root["addInfo"] = additionalInfoToJson(type, additionalInfo);
|
||||
@@ -158,7 +158,7 @@ JsonNode Bonus::toJsonNode() const
|
||||
root["sourceType"].String() = vstd::findKey(bonusSourceMap, source);
|
||||
if(targetSourceType != BonusSource::OTHER)
|
||||
root["targetSourceType"].String() = vstd::findKey(bonusSourceMap, targetSourceType);
|
||||
if(sid != TBonusSourceID::NONE)
|
||||
if(sid != TBonusSourceID())
|
||||
root["sourceID"].String() = sid.toString();
|
||||
if(val != 0)
|
||||
root["val"].Integer() = val;
|
||||
@@ -184,11 +184,11 @@ JsonNode Bonus::toJsonNode() const
|
||||
}
|
||||
|
||||
Bonus::Bonus(BonusDuration::Type Duration, BonusType Type, BonusSource Src, si32 Val, TBonusSourceID ID)
|
||||
: Bonus(Duration, Type, Src, Val, ID, TBonusSubtype::NONE, std::string())
|
||||
: Bonus(Duration, Type, Src, Val, ID, TBonusSubtype(), std::string())
|
||||
{}
|
||||
|
||||
Bonus::Bonus(BonusDuration::Type Duration, BonusType Type, BonusSource Src, si32 Val, TBonusSourceID ID, std::string Desc)
|
||||
: Bonus(Duration, Type, Src, Val, ID, TBonusSubtype::NONE, Desc)
|
||||
: Bonus(Duration, Type, Src, Val, ID, TBonusSubtype(), Desc)
|
||||
{}
|
||||
|
||||
Bonus::Bonus(BonusDuration::Type Duration, BonusType Type, BonusSource Src, si32 Val, TBonusSourceID ID, TBonusSubtype Subtype)
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "BonusEnum.h"
|
||||
#include "BonusSubtypeID.h"
|
||||
#include "../constants/MetaIdentifier.h"
|
||||
#include "../constants/EntityIdentifiers.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
@@ -23,8 +25,8 @@ class IUpdater;
|
||||
class BonusList;
|
||||
class CSelector;
|
||||
|
||||
using TBonusSubtype = MetaIdentifier;
|
||||
using TBonusSourceID = MetaIdentifier;
|
||||
using TBonusSubtype = MetaIdentifier<BonusSubtypeID, SpellID, CreatureID, PrimarySkill, TerrainId, GameResID, SpellSchool>;
|
||||
using TBonusSourceID = MetaIdentifier<BonusSourceID, SpellID, CreatureID, ArtifactID, CampaignScenarioID, SecondarySkill, HeroTypeID, Obj, ObjectInstanceID, BuildingTypeUniqueID, BattleField>;
|
||||
using TBonusListPtr = std::shared_ptr<BonusList>;
|
||||
using TConstBonusListPtr = std::shared_ptr<const BonusList>;
|
||||
using TLimiterPtr = std::shared_ptr<ILimiter>;
|
||||
|
||||
@@ -275,4 +275,4 @@ DLL_LINKAGE std::ostream & operator<<(std::ostream &out, const BonusList &bonusL
|
||||
return out;
|
||||
}
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
@@ -111,4 +111,4 @@ public:
|
||||
DLL_LINKAGE std::ostream & operator<<(std::ostream &out, const BonusList &bonusList);
|
||||
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
@@ -13,9 +13,11 @@
|
||||
#include "BonusEnum.h"
|
||||
#include "BonusParams.h"
|
||||
#include "BonusSelector.h"
|
||||
#include "BonusSubtypes.h"
|
||||
|
||||
#include "../ResourceSet.h"
|
||||
#include "../VCMI_Lib.h"
|
||||
#include "../modding/IdentifierStorage.h"
|
||||
#include "../modding/ModScope.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
@@ -88,28 +90,28 @@ BonusParams::BonusParams(std::string deprecatedTypeStr, std::string deprecatedSu
|
||||
type = BonusType::LEARN_MEETING_SPELL_LIMIT;
|
||||
else if(deprecatedSubtype == SecondarySkill::ARCHERY|| deprecatedSubtypeStr == "skill.archery")
|
||||
{
|
||||
subtype = BonusSubtypes::damageTypeRanged;
|
||||
subtype = BonusSubtypeID::damageTypeRanged;
|
||||
type = BonusType::PERCENTAGE_DAMAGE_BOOST;
|
||||
}
|
||||
else if(deprecatedSubtype == SecondarySkill::OFFENCE || deprecatedSubtypeStr == "skill.offence")
|
||||
{
|
||||
subtype = BonusSubtypes::damageTypeMelee;
|
||||
subtype = BonusSubtypeID::damageTypeMelee;
|
||||
type = BonusType::PERCENTAGE_DAMAGE_BOOST;
|
||||
}
|
||||
else if(deprecatedSubtype == SecondarySkill::ARMORER || deprecatedSubtypeStr == "skill.armorer")
|
||||
{
|
||||
subtype = BonusSubtypes::damageTypeAll;
|
||||
subtype = BonusSubtypeID::damageTypeAll;
|
||||
type = BonusType::GENERAL_DAMAGE_REDUCTION;
|
||||
}
|
||||
else if(deprecatedSubtype == SecondarySkill::NAVIGATION || deprecatedSubtypeStr == "skill.navigation")
|
||||
{
|
||||
subtype = BonusSubtypes::heroMovementSea;
|
||||
subtype = BonusSubtypeID::heroMovementSea;
|
||||
valueType = BonusValueType::PERCENT_TO_BASE;
|
||||
type = BonusType::MOVEMENT;
|
||||
}
|
||||
else if(deprecatedSubtype == SecondarySkill::LOGISTICS || deprecatedSubtypeStr == "skill.logistics")
|
||||
{
|
||||
subtype = BonusSubtypes::heroMovementLand;
|
||||
subtype = BonusSubtypeID::heroMovementLand;
|
||||
valueType = BonusValueType::PERCENT_TO_BASE;
|
||||
type = BonusType::MOVEMENT;
|
||||
}
|
||||
@@ -146,12 +148,12 @@ BonusParams::BonusParams(std::string deprecatedTypeStr, std::string deprecatedSu
|
||||
else if (deprecatedSubtype == SecondarySkill::FIRST_AID || deprecatedSubtypeStr == "skill.firstAid")
|
||||
{
|
||||
type = BonusType::SPECIFIC_SPELL_POWER;
|
||||
subtype = TBonusSubtype("spell", "firstAid");
|
||||
subtype = SpellID(*VLC->identifiers()->getIdentifier( ModScope::scopeGame(), "spell", "firstAid"));
|
||||
}
|
||||
else if (deprecatedSubtype == SecondarySkill::BALLISTICS || deprecatedSubtypeStr == "skill.ballistics")
|
||||
{
|
||||
type = BonusType::CATAPULT_EXTRA_SHOTS;
|
||||
subtype = TBonusSubtype("spell", "catapultShot");
|
||||
subtype = SpellID(*VLC->identifiers()->getIdentifier( ModScope::scopeGame(), "spell", "catapultShot"));
|
||||
}
|
||||
else
|
||||
isConverted = false;
|
||||
@@ -170,20 +172,20 @@ BonusParams::BonusParams(std::string deprecatedTypeStr, std::string deprecatedSu
|
||||
}
|
||||
else if (deprecatedTypeStr == "SEA_MOVEMENT")
|
||||
{
|
||||
subtype = BonusSubtypes::heroMovementSea;
|
||||
subtype = BonusSubtypeID::heroMovementSea;
|
||||
valueType = BonusValueType::ADDITIVE_VALUE;
|
||||
type = BonusType::MOVEMENT;
|
||||
}
|
||||
else if (deprecatedTypeStr == "LAND_MOVEMENT")
|
||||
{
|
||||
subtype = BonusSubtypes::heroMovementLand;
|
||||
subtype = BonusSubtypeID::heroMovementLand;
|
||||
valueType = BonusValueType::ADDITIVE_VALUE;
|
||||
type = BonusType::MOVEMENT;
|
||||
}
|
||||
else if (deprecatedTypeStr == "MAXED_SPELL")
|
||||
{
|
||||
type = BonusType::SPELL;
|
||||
subtype = TBonusSubtype("spell", deprecatedSubtypeStr);
|
||||
subtype = SpellID(*VLC->identifiers()->getIdentifier( ModScope::scopeGame(), "spell", deprecatedSubtypeStr));
|
||||
valueType = BonusValueType::INDEPENDENT_MAX;
|
||||
val = 3;
|
||||
}
|
||||
@@ -224,52 +226,52 @@ BonusParams::BonusParams(std::string deprecatedTypeStr, std::string deprecatedSu
|
||||
else if (deprecatedTypeStr == "DIRECT_DAMAGE_IMMUNITY")
|
||||
{
|
||||
type = BonusType::SPELL_DAMAGE_REDUCTION;
|
||||
subtype = MetaIdentifier(SpellSchool::ANY);
|
||||
subtype = TBonusSubtype(SpellSchool::ANY);
|
||||
val = 100;
|
||||
}
|
||||
else if (deprecatedTypeStr == "AIR_SPELL_DMG_PREMY")
|
||||
{
|
||||
type = BonusType::SPELL_DAMAGE;
|
||||
subtype = MetaIdentifier(SpellSchool::AIR);
|
||||
subtype = TBonusSubtype(SpellSchool::AIR);
|
||||
}
|
||||
else if (deprecatedTypeStr == "FIRE_SPELL_DMG_PREMY")
|
||||
{
|
||||
type = BonusType::SPELL_DAMAGE;
|
||||
subtype = MetaIdentifier(SpellSchool::FIRE);
|
||||
subtype = TBonusSubtype(SpellSchool::FIRE);
|
||||
}
|
||||
else if (deprecatedTypeStr == "WATER_SPELL_DMG_PREMY")
|
||||
{
|
||||
type = BonusType::SPELL_DAMAGE;
|
||||
subtype = MetaIdentifier(SpellSchool::WATER);
|
||||
subtype = TBonusSubtype(SpellSchool::WATER);
|
||||
}
|
||||
else if (deprecatedTypeStr == "EARTH_SPELL_DMG_PREMY")
|
||||
{
|
||||
type = BonusType::SPELL_DAMAGE;
|
||||
subtype = MetaIdentifier(SpellSchool::EARTH);
|
||||
subtype = TBonusSubtype(SpellSchool::EARTH);
|
||||
}
|
||||
else if (deprecatedTypeStr == "AIR_SPELLS")
|
||||
{
|
||||
type = BonusType::SPELLS_OF_SCHOOL;
|
||||
subtype = MetaIdentifier(SpellSchool::AIR);
|
||||
subtype = TBonusSubtype(SpellSchool::AIR);
|
||||
}
|
||||
else if (deprecatedTypeStr == "FIRE_SPELLS")
|
||||
{
|
||||
type = BonusType::SPELLS_OF_SCHOOL;
|
||||
subtype = MetaIdentifier(SpellSchool::FIRE);
|
||||
subtype = TBonusSubtype(SpellSchool::FIRE);
|
||||
}
|
||||
else if (deprecatedTypeStr == "WATER_SPELLS")
|
||||
{
|
||||
type = BonusType::SPELLS_OF_SCHOOL;
|
||||
subtype = MetaIdentifier(SpellSchool::WATER);
|
||||
subtype = TBonusSubtype(SpellSchool::WATER);
|
||||
}
|
||||
else if (deprecatedTypeStr == "EARTH_SPELLS")
|
||||
{
|
||||
type = BonusType::SPELLS_OF_SCHOOL;
|
||||
subtype = MetaIdentifier(SpellSchool::EARTH);
|
||||
subtype = TBonusSubtype(SpellSchool::EARTH);
|
||||
}
|
||||
else if (deprecatedTypeStr == "AIR_IMMUNITY")
|
||||
{
|
||||
subtype = MetaIdentifier(SpellSchool::AIR);
|
||||
subtype = TBonusSubtype(SpellSchool::AIR);
|
||||
switch(deprecatedSubtype)
|
||||
{
|
||||
case 0:
|
||||
@@ -285,7 +287,7 @@ BonusParams::BonusParams(std::string deprecatedTypeStr, std::string deprecatedSu
|
||||
}
|
||||
else if (deprecatedTypeStr == "FIRE_IMMUNITY")
|
||||
{
|
||||
subtype = MetaIdentifier(SpellSchool::FIRE);
|
||||
subtype = TBonusSubtype(SpellSchool::FIRE);
|
||||
switch(deprecatedSubtype)
|
||||
{
|
||||
case 0:
|
||||
@@ -301,7 +303,7 @@ BonusParams::BonusParams(std::string deprecatedTypeStr, std::string deprecatedSu
|
||||
}
|
||||
else if (deprecatedTypeStr == "WATER_IMMUNITY")
|
||||
{
|
||||
subtype = MetaIdentifier(SpellSchool::WATER);
|
||||
subtype = TBonusSubtype(SpellSchool::WATER);
|
||||
switch(deprecatedSubtype)
|
||||
{
|
||||
case 0:
|
||||
@@ -317,7 +319,7 @@ BonusParams::BonusParams(std::string deprecatedTypeStr, std::string deprecatedSu
|
||||
}
|
||||
else if (deprecatedTypeStr == "EARTH_IMMUNITY")
|
||||
{
|
||||
subtype = MetaIdentifier(SpellSchool::EARTH);
|
||||
subtype = TBonusSubtype(SpellSchool::EARTH);
|
||||
switch(deprecatedSubtype)
|
||||
{
|
||||
case 0:
|
||||
|
||||
76
lib/bonuses/BonusSubtypeID.cpp
Normal file
76
lib/bonuses/BonusSubtypeID.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Bonus.cpp, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "BonusSubtypeID.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
const BonusSubtypeID BonusSubtypeID::creatureDamageBoth(0);
|
||||
const BonusSubtypeID BonusSubtypeID::creatureDamageMin(1);
|
||||
const BonusSubtypeID BonusSubtypeID::creatureDamageMax(2);
|
||||
const BonusSubtypeID BonusSubtypeID::damageTypeAll(-1);
|
||||
const BonusSubtypeID BonusSubtypeID::damageTypeMelee(0);
|
||||
const BonusSubtypeID BonusSubtypeID::damageTypeRanged(1);
|
||||
const BonusSubtypeID BonusSubtypeID::heroMovementLand(1);
|
||||
const BonusSubtypeID BonusSubtypeID::heroMovementSea(0);
|
||||
const BonusSubtypeID BonusSubtypeID::heroMovementPenalty(2);
|
||||
const BonusSubtypeID BonusSubtypeID::heroMovementFull(1);
|
||||
const BonusSubtypeID BonusSubtypeID::deathStareGorgon(0);
|
||||
const BonusSubtypeID BonusSubtypeID::deathStareCommander(1);
|
||||
const BonusSubtypeID BonusSubtypeID::rebirthRegular(0);
|
||||
const BonusSubtypeID BonusSubtypeID::rebirthSpecial(1);
|
||||
const BonusSubtypeID BonusSubtypeID::visionsMonsters(0);
|
||||
const BonusSubtypeID BonusSubtypeID::visionsHeroes(1);
|
||||
const BonusSubtypeID BonusSubtypeID::visionsTowns(2);
|
||||
const BonusSubtypeID BonusSubtypeID::immunityBattleWide(0);
|
||||
const BonusSubtypeID BonusSubtypeID::immunityEnemyHero(1);
|
||||
const BonusSubtypeID BonusSubtypeID::transmutationPerHealth(0);
|
||||
const BonusSubtypeID BonusSubtypeID::transmutationPerUnit(1);
|
||||
const BonusSubtypeID BonusSubtypeID::destructionKillPercentage(0);
|
||||
const BonusSubtypeID BonusSubtypeID::destructionKillAmount(1);
|
||||
const BonusSubtypeID BonusSubtypeID::soulStealPermanent(0);
|
||||
const BonusSubtypeID BonusSubtypeID::soulStealBattle(1);
|
||||
const BonusSubtypeID BonusSubtypeID::movementFlying(0);
|
||||
const BonusSubtypeID BonusSubtypeID::movementTeleporting(1);
|
||||
|
||||
const BonusSourceID BonusSourceID::undeadMoraleDebuff(-2);
|
||||
|
||||
BonusSubtypeID BonusSubtypeID::spellLevel(int level)
|
||||
{
|
||||
return BonusSubtypeID(level);
|
||||
}
|
||||
|
||||
BonusSubtypeID BonusSubtypeID::creatureLevel(int level)
|
||||
{
|
||||
return BonusSubtypeID(level);
|
||||
}
|
||||
|
||||
si32 BonusSubtypeID::decode(const std::string & identifier)
|
||||
{
|
||||
return std::stoi(identifier);
|
||||
}
|
||||
|
||||
std::string BonusSubtypeID::encode(const si32 index)
|
||||
{
|
||||
return std::to_string(index);
|
||||
}
|
||||
|
||||
si32 BonusSourceID::decode(const std::string & identifier)
|
||||
{
|
||||
return std::stoi(identifier);
|
||||
}
|
||||
|
||||
std::string BonusSourceID::encode(const si32 index)
|
||||
{
|
||||
return std::to_string(index);
|
||||
}
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
78
lib/bonuses/BonusSubtypeID.h
Normal file
78
lib/bonuses/BonusSubtypeID.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* BonusSubtypeID.h, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../constants/EntityIdentifiers.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class DLL_LINKAGE BonusSourceID : public Identifier<BonusSourceID>
|
||||
{
|
||||
public:
|
||||
using Identifier<BonusSourceID>::Identifier;
|
||||
|
||||
static std::string encode(int32_t index);
|
||||
static si32 decode(const std::string & identifier);
|
||||
|
||||
static const BonusSourceID undeadMoraleDebuff; // -2
|
||||
};
|
||||
|
||||
class DLL_LINKAGE BonusSubtypeID : public Identifier<BonusSubtypeID>
|
||||
{
|
||||
public:
|
||||
using Identifier<BonusSubtypeID>::Identifier;
|
||||
|
||||
static std::string encode(int32_t index);
|
||||
static si32 decode(const std::string & identifier);
|
||||
|
||||
static const BonusSubtypeID creatureDamageBoth; // 0
|
||||
static const BonusSubtypeID creatureDamageMin; // 1
|
||||
static const BonusSubtypeID creatureDamageMax; // 2
|
||||
|
||||
static const BonusSubtypeID damageTypeAll; // -1
|
||||
static const BonusSubtypeID damageTypeMelee; // 0
|
||||
static const BonusSubtypeID damageTypeRanged; // 1
|
||||
|
||||
static const BonusSubtypeID heroMovementLand; // 1
|
||||
static const BonusSubtypeID heroMovementSea; // 0
|
||||
|
||||
static const BonusSubtypeID heroMovementPenalty; // 2
|
||||
static const BonusSubtypeID heroMovementFull; // 1
|
||||
|
||||
static const BonusSubtypeID deathStareGorgon; // 0
|
||||
static const BonusSubtypeID deathStareCommander;
|
||||
|
||||
static const BonusSubtypeID rebirthRegular; // 0
|
||||
static const BonusSubtypeID rebirthSpecial; // 1
|
||||
|
||||
static const BonusSubtypeID visionsMonsters; // 0
|
||||
static const BonusSubtypeID visionsHeroes; // 1
|
||||
static const BonusSubtypeID visionsTowns; // 2
|
||||
|
||||
static const BonusSubtypeID immunityBattleWide; // 0
|
||||
static const BonusSubtypeID immunityEnemyHero; // 1
|
||||
|
||||
static const BonusSubtypeID transmutationPerHealth; // 0
|
||||
static const BonusSubtypeID transmutationPerUnit; // 1
|
||||
|
||||
static const BonusSubtypeID destructionKillPercentage; // 0
|
||||
static const BonusSubtypeID destructionKillAmount; // 1
|
||||
|
||||
static const BonusSubtypeID soulStealPermanent; // 0
|
||||
static const BonusSubtypeID soulStealBattle; // 1
|
||||
|
||||
static const BonusSubtypeID movementFlying; // 0
|
||||
static const BonusSubtypeID movementTeleporting; // 1
|
||||
|
||||
static BonusSubtypeID spellLevel(int level);
|
||||
static BonusSubtypeID creatureLevel(int level);
|
||||
};
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Bonus.cpp, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "BonusSubtypes.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
const TBonusSubtype BonusSubtypes::creatureDamageBoth("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::creatureDamageMin("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::creatureDamageMax("", "", 2);
|
||||
const TBonusSubtype BonusSubtypes::damageTypeAll("", "", -1);
|
||||
const TBonusSubtype BonusSubtypes::damageTypeMelee("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::damageTypeRanged("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::heroMovementLand("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::heroMovementSea("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::heroMovementPenalty("", "", 2);
|
||||
const TBonusSubtype BonusSubtypes::heroMovementFull("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::deathStareGorgon("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::deathStareCommander("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::rebirthRegular("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::rebirthSpecial("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::visionsMonsters("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::visionsHeroes("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::visionsTowns("", "", 2);
|
||||
const TBonusSubtype BonusSubtypes::immunityBattleWide("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::immunityEnemyHero("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::transmutationPerHealth("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::transmutationPerUnit("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::destructionKillPercentage("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::destructionKillAmount("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::soulStealPermanent("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::soulStealBattle("", "", 1);
|
||||
const TBonusSubtype BonusSubtypes::movementFlying("", "", 0);
|
||||
const TBonusSubtype BonusSubtypes::movementTeleporting("", "", 1);
|
||||
|
||||
TBonusSubtype BonusSubtypes::spellLevel(int level)
|
||||
{
|
||||
assert(0); //todo
|
||||
return TBonusSubtype();
|
||||
}
|
||||
|
||||
TBonusSubtype BonusSubtypes::creatureLevel(int level)
|
||||
{
|
||||
assert(0); //todo
|
||||
return TBonusSubtype();
|
||||
}
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* BonusSubtypes.h, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../constants/MetaIdentifier.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
using TBonusSubtype = MetaIdentifier;
|
||||
|
||||
class DLL_LINKAGE BonusSubtypes
|
||||
{
|
||||
public:
|
||||
static const TBonusSubtype creatureDamageBoth; // 0
|
||||
static const TBonusSubtype creatureDamageMin; // 1
|
||||
static const TBonusSubtype creatureDamageMax; // 2
|
||||
|
||||
static const TBonusSubtype damageTypeAll; // -1
|
||||
static const TBonusSubtype damageTypeMelee; // 0
|
||||
static const TBonusSubtype damageTypeRanged; // 1
|
||||
|
||||
static const TBonusSubtype heroMovementLand; // 1
|
||||
static const TBonusSubtype heroMovementSea; // 0
|
||||
|
||||
static const TBonusSubtype heroMovementPenalty; // 2
|
||||
static const TBonusSubtype heroMovementFull; // 1
|
||||
|
||||
static const TBonusSubtype deathStareGorgon; // 0
|
||||
static const TBonusSubtype deathStareCommander;
|
||||
|
||||
static const TBonusSubtype rebirthRegular; // 0
|
||||
static const TBonusSubtype rebirthSpecial; // 1
|
||||
|
||||
static const TBonusSubtype visionsMonsters; // 0
|
||||
static const TBonusSubtype visionsHeroes; // 1
|
||||
static const TBonusSubtype visionsTowns; // 2
|
||||
|
||||
static const TBonusSubtype immunityBattleWide; // 0
|
||||
static const TBonusSubtype immunityEnemyHero; // 1
|
||||
|
||||
static const TBonusSubtype transmutationPerHealth; // 0
|
||||
static const TBonusSubtype transmutationPerUnit; // 1
|
||||
|
||||
static const TBonusSubtype destructionKillPercentage; // 0
|
||||
static const TBonusSubtype destructionKillAmount; // 1
|
||||
|
||||
static const TBonusSubtype soulStealPermanent; // 0
|
||||
static const TBonusSubtype soulStealBattle; // 1
|
||||
|
||||
static const TBonusSubtype movementFlying; // 0
|
||||
static const TBonusSubtype movementTeleporting; // 1
|
||||
|
||||
static TBonusSubtype spellLevel(int level);
|
||||
static TBonusSubtype creatureLevel(int level);
|
||||
};
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
Reference in New Issue
Block a user