Re: [CONCEPT] Global Alignment (Repost)

From: Daniel Koepke (dkoepke@california.com)
Date: 02/04/97


On Tue, 4 Feb 1997, JEREMY IRISH wrote:

> It seems doable, although adding all the alignments of all 
> the mobiles/players would be a real cpu hog, but I can 
> see no problems in a global check, say, every 15 minutes, 
> and have a command for 'force' sensitive players to feel 
> the alignment of the mud. 

When a character or mobile is created, you add there alignment (divide
by 10 so it doesn't get too high) into the global align.  When they are
taken out of the game, you adjust align again to account for it.

For instance:

  // player enters
  GlobalAlignment += GET_ALIGNMENT(ch) / 10;

  // player leaves
  GlobalAlignment -= GET_ALIGNEMNT(ch) / 10;

Essentially, if the players alignment is 1000, they add 100 to the
GlobalAlignment, and 100 is subtracted when they leave.  If they have
a negative alignemnt, say -1000, they add -100 to the global align
(adding a negative is the same as subtracting), and when they leave,
they subtract -100 (subtracting a negative [eg, a double negative, as
in English] is the same as adding).


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST