2 CHARACTER(communist
, humanoid
)
5 virtual truth
MoveRandomly();
6 virtual void BeTalkedTo();
7 virtual truth
BoundToUse(citem
*, int) const;
8 //virtual truth MustBeRemovedFromBone() const;
10 virtual truth
ShowClassDescription() const;
17 truth
communist::ShowClassDescription () const { return (GetAssignedName() != "Ivan"); }
20 void communist::BeTalkedTo () {
21 if (GetRelation(PLAYER
) != HOSTILE
&& GetTeam() != PLAYER
->GetTeam() && PLAYER
->GetRelativeDanger(this, true) > 0.1) {
22 ADD_MESSAGE("%s seems to be very friendly. \"%s make good communist. %s go with %s!\"", CHAR_DESCRIPTION(DEFINITE
), PLAYER
->GetAssignedName().CStr(), CHAR_NAME(UNARTICLED
), PLAYER
->GetAssignedName().CStr());
23 for (std::list
<character
*>::const_iterator i
= GetTeam()->GetMember().begin(); i
!= GetTeam()->GetMember().end();) {
25 character
* Char
= *i
++;
26 Char
->ChangeTeam(PLAYER
->GetTeam());
27 if (GetTeam()->GetMembers() == 1) break; // only Ivan left in Party
32 ChangeTeam(PLAYER
->GetTeam());
33 } else if (GetTeam() != PLAYER
->GetTeam() && !(RAND() % 5)) {
34 ADD_MESSAGE("\"You weak. Learn killing and come back.\"");
36 character::BeTalkedTo();
41 truth
communist::MoveRandomly () {
42 switch (RAND()%1000) {
44 if (CanBeSeenByPlayer()) ADD_MESSAGE("%s engraves something to the ground.", CHAR_NAME(UNARTICLED
));
45 Engrave(CONST_S("The bourgeois is a bourgeois -- for the benefit of the working class."));
48 if (CanBeSeenByPlayer()) ADD_MESSAGE("%s engraves something to the ground.", CHAR_NAME(UNARTICLED
));
49 Engrave(CONST_S("Proletarians of all countries, unite!"));
52 if (CanBeSeenByPlayer()) ADD_MESSAGE("%s engraves something to the ground.", CHAR_NAME(UNARTICLED
));
53 Engrave(CONST_S("Capital is therefore not only personal; it is a social power."));
56 return character::MoveRandomly();
61 truth
communist::BoundToUse (citem
* Item
, int I
) const {
62 return (Item
&& Item
->IsGorovitsFamilyRelic() && Item
->IsInCorrectSlot(I
));
67 truth communist::MustBeRemovedFromBone () const {
68 //return (!IsEnabled() || GetTeam()->GetID() != IVAN_TEAM || GetDungeon()->GetIndex() != ELPURI_CAVE || GetLevel()->GetIndex() != IVAN_LEVEL);
69 return (!IsEnabled() || GetTeam()->GetID() != IVAN_TEAM || IsHomeLevel(GetLevel()));