mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
* creature ID refactoring
* double week creatures are configurable now
This commit is contained in:
@ -168,7 +168,8 @@ class DLL_LINKAGE CGObjectInstance : public IObjectInterface
|
||||
public:
|
||||
mutable std::string hoverName;
|
||||
int3 pos; //h3m pos
|
||||
si32 ID, subID; //normal ID (this one from OH3 maps ;]) - eg. town=98; hero=34
|
||||
Obj::Obj ID;
|
||||
si32 subID; //normal subID (this one from OH3 maps ;])
|
||||
si32 id;//number of object in map's vector
|
||||
CGDefInfo * defInfo;
|
||||
ui8 animPhaseShift;
|
||||
@ -418,7 +419,7 @@ public:
|
||||
virtual ~CGHeroInstance();
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
ui8 bearerType() const override;
|
||||
ArtBearer::ArtBearer bearerType() const override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CBonusSystemNode *whereShouldBeAttached(CGameState *gs) override;
|
||||
@ -459,7 +460,7 @@ class DLL_LINKAGE CCreGenLeveledCastleInfo : public CCreGenAsCastleInfo, public
|
||||
class DLL_LINKAGE CGDwelling : public CArmedInstance
|
||||
{
|
||||
public:
|
||||
typedef std::vector<std::pair<ui32, std::vector<ui32> > > TCreaturesSet;
|
||||
typedef std::vector<std::pair<ui32, std::vector<CreatureID::CreatureID> > > TCreaturesSet;
|
||||
|
||||
CSpecObjInfo * info; //h3m info about dewlling
|
||||
TCreaturesSet creatures; //creatures[level] -> <vector of alternative ids (base creature and upgrades, creatures amount>
|
||||
@ -731,7 +732,7 @@ public:
|
||||
si8 character; //character of this set of creatures (0 - the most friendly, 4 - the most hostile) => on init changed to -4 (compliant) ... 10 value (savage)
|
||||
std::string message; //message printed for attacking hero
|
||||
TResources resources; // resources given to hero that has won with monsters
|
||||
TArtifactID gainedArtifact; //ID of artifact gained to hero, -1 if none
|
||||
ArtifactID::ArtifactID gainedArtifact; //ID of artifact gained to hero, -1 if none
|
||||
bool neverFlees; //if true, the troops will never flee
|
||||
bool notGrowingTeam; //if true, number of units won't grow
|
||||
ui64 temppower; //used to handle fractional stack growth for tiny stacks
|
||||
@ -1372,10 +1373,10 @@ struct BankConfig
|
||||
ui8 level; //1 - 4, how hard the battle will be
|
||||
ui8 chance; //chance for this level being chosen
|
||||
ui8 upgradeChance; //chance for creatures to be in upgraded versions
|
||||
std::vector< std::pair <ui16, ui32> > guards; //creature ID, amount
|
||||
std::vector< std::pair <CreatureID::CreatureID, ui32> > guards; //creature ID, amount
|
||||
ui32 combatValue; //how hard are guards of this level
|
||||
std::vector<si32> resources; //resources given in case of victory
|
||||
std::vector< std::pair <ui16, ui32> > creatures; //creatures granted in case of victory (creature ID, amount)
|
||||
std::vector< std::pair <CreatureID::CreatureID, ui32> > creatures; //creatures granted in case of victory (creature ID, amount)
|
||||
std::vector<ui16> artifacts; //number of artifacts given in case of victory [0] -> treasure, [1] -> minor [2] -> major [3] -> relic
|
||||
ui32 value; //overall value of given things
|
||||
ui32 rewardDifficulty; //proportion of reward value to difficulty of guards; how profitable is this creature Bank config
|
||||
@ -1390,7 +1391,7 @@ struct BankConfig
|
||||
class DLL_LINKAGE CObjectHandler
|
||||
{
|
||||
public:
|
||||
std::map<si32, si32> cregens; //type 17. dwelling subid -> creature ID
|
||||
std::map<si32, CreatureID::CreatureID> cregens; //type 17. dwelling subid -> creature ID
|
||||
std::map <ui32, std::vector < ConstTransitivePtr<BankConfig> > > banksInfo; //[index][preset]
|
||||
std::map <ui32, std::string> creBanksNames; //[crebank index] -> name of this creature bank
|
||||
std::vector<ui32> resVals; //default values of resources in gold
|
||||
|
Reference in New Issue
Block a user