Difference between revisions of "DoEvilDeed"

From IvanWiki
Jump to navigation Jump to search
(Created page with "{{code}} DoEvilDeed is a function called to add to tip the player's alignment toward chaotic.<br> The primary means of doing evil is murdering innocent people. <pre> void ga...")
(No difference)

Revision as of 03:49, 8 September 2014

Coding: This article contains code which is for experienced users only, and may reveal game secrets


DoEvilDeed is a function called to add to tip the player's alignment toward chaotic.
The primary means of doing evil is murdering innocent people.

void game::DoEvilDeed(int Amount) 
{ 
  if(!Amount) 
    return; 

 
  for(int c = 1; c <= GODS; ++c) 
  { 
    int Change = Amount - Amount * GetGod(c)->GetAlignment() / 5; 

 
    if(!IsInWilderness() && Player->GetLSquareUnder()->GetDivineMaster() == c) 
      if(GetGod(c)->GetRelation() - (Change << 1) < -750) 
      { 
	if(GetGod(c)->GetRelation() > -750) 
	  GetGod(c)->SetRelation(-750); 
      } 
      else if(GetGod(c)->GetRelation() - (Change << 1) > 750) 
      { 
	if(GetGod(c)->GetRelation() < 750) 
	  GetGod(c)->SetRelation(750); 

      }
      else 
	GetGod(c)->SetRelation(GetGod(c)->GetRelation() - (Change << 1)); 
      else 
      if(GetGod(c)->GetRelation() - Change < -500) 
      { 
	if(GetGod(c)->GetRelation() > -500) 
	  GetGod(c)->SetRelation(-500);
      } 
      else if(GetGod(c)->GetRelation() - Change > 500) 
      { 
	if(GetGod(c)->GetRelation() < 500) 
	  GetGod(c)->SetRelation(500); 
      } 
      else 
	GetGod(c)->SetRelation(GetGod(c)->GetRelation() - Change); 
  }
} 

Doing Evil

Murdering people is the primary means of doing evil and making your character more chaotic:

if(DeathFlags & FORCE_DEATH || IsDead()) 
  { 
    if(Murderer && Murderer->IsPlayer() && GetTeam()->GetKillEvilness()) 
    game::DoEvilDeed(GetTeam()->GetKillEvilness()); 

How evil it is to kill a character is determined by what "team" they are on:

  • Attnamese = 50
  • Betrayed pets' = 10
  • Dungeon shopkeeper faction = 100
  • Ivan and Vlad = 100
  • Monsters = 0
  • New Attnam natives = 50
  • New Attnam tourists = 10
  • Richel Decos faction = 0

Other than murder, certain actions are considered evil. They are listed here with their evil values:

  • Attacking with certain weapons:
  • Eating certain materials:
    • Cannabilism = 25
    • Frog = volume / 50
    • Ommel materials = volume / 25
    • Pepsi = volume /10
    • Unicorn = volume /50
  • Necromancy or resurrection = 50