Difference between revisions of "Sadist"

From IvanWiki
Jump to navigation Jump to search
m
Line 35: Line 35:
  
 
== Sadists ==
 
== Sadists ==
*All types of [[dark mage]]
+
*All types of [[Dark Knight]]s
*All types of [[guard]]
+
*All types of [[Dark Mage|dark magi]]
*All types of [[mistress]]
+
*All types of [[guard]]s
*All types of [[necromancer]]
+
*All types of [[mistress]]es
*All types of [[orc]]
+
*All types of [[necromancer]]es
 +
*All types of [[orc]]s
 
*All [[shopkeeper]]s
 
*All [[shopkeeper]]s
 
*[[Angel]] of [[Cleptia]]
 
*[[Angel]] of [[Cleptia]]
Line 49: Line 50:
 
*[[Angel]] of [[Scabies]]
 
*[[Angel]] of [[Scabies]]
 
*[[Banana grower encourager]]
 
*[[Banana grower encourager]]
*Black [[unicorn]]
+
*Black [[unicorn]]s
*[[Dark knight]]
+
*[[Hunter]]s
*[[Hunter]]
 
*[[Orc]]
 
 
*[[Oree]] the blood daemon king
 
*[[Oree]] the blood daemon king
*[[Punisher]]
+
*[[Punisher]]s
 
*[[Richel Decos]]
 
*[[Richel Decos]]
 
*[[Rondol]] the [[kobold]] patriarch
 
*[[Rondol]] the [[kobold]] patriarch

Revision as of 18:06, 18 September 2014

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


IsSadist is a char.dat tag that designates the character as a sadist. A sadist character equipped with a sadist weapon (belt, whip, banana, banana peel, broken bottle, nut, bodypart) will randomly attack allied masochistic characters.

truth character::CheckSadism()
{
  if(!IsSadist() || !HasSadistAttackMode() || !IsSmall()) // gum
    return false;

  if(!RAND_N(10))
  {
    for(int d = 0; d < 8; ++d)
    {
      square* Square = GetNeighbourSquare(d);

      if(Square)
      {
	character* Char = Square->GetCharacter();

	if(Char && Char->IsMasochist() && GetRelation(Char) == FRIEND
	   && Char->GetHP() * 3 >= Char->GetMaxHP() * 2
	   && Hit(Char, Square->GetPos(), d, SADIST_HIT))
	{
	  TerminateGoingTo();
	  return true;
	}
      }
    }
  }

  return false;
}

Sadists