mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Corrected monster agressiveness #2034
This commit is contained in:
parent
c22c3cdd80
commit
9f05f53e65
@ -32,11 +32,15 @@ public:
|
|||||||
|
|
||||||
class DLL_LINKAGE CGCreature : public CArmedInstance //creatures on map
|
class DLL_LINKAGE CGCreature : public CArmedInstance //creatures on map
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
enum Action {
|
enum Action {
|
||||||
FIGHT = -2, FLEE = -1, JOIN_FOR_FREE = 0 //values > 0 mean gold price
|
FIGHT = -2, FLEE = -1, JOIN_FOR_FREE = 0 //values > 0 mean gold price
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
enum Character {
|
||||||
|
COMPLIANT = 0, FRIENDLY = 1, AGRESSIVE = 2, HOSTILE = 3, SAVAGE = 4
|
||||||
|
};
|
||||||
|
|
||||||
ui32 identifier; //unique code for this monster (used in missions)
|
ui32 identifier; //unique code for this monster (used in missions)
|
||||||
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)
|
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
|
std::string message; //message printed for attacking hero
|
||||||
|
@ -681,7 +681,7 @@ bool CRmgTemplateZone::addMonster(CMapGenerator* gen, int3 &pos, si32 strength,
|
|||||||
auto guard = new CGCreature();
|
auto guard = new CGCreature();
|
||||||
guard->ID = Obj::MONSTER;
|
guard->ID = Obj::MONSTER;
|
||||||
guard->subID = creId;
|
guard->subID = creId;
|
||||||
guard->character = 1; //MUST be initialized or switch will diverge
|
guard->character = CGCreature::HOSTILE;
|
||||||
auto hlp = new CStackInstance(creId, amount);
|
auto hlp = new CStackInstance(creId, amount);
|
||||||
//will be set during initialization
|
//will be set during initialization
|
||||||
guard->putStack(SlotID(0), hlp);
|
guard->putStack(SlotID(0), hlp);
|
||||||
|
Loading…
Reference in New Issue
Block a user