wyvern.kernel.combat
Class Alignment

java.lang.Object
  extended bywyvern.kernel.combat.Alignment

public final class Alignment
extends java.lang.Object

Utilities for dealing with alignments.

Version:
1.0, Jan 02, 2004
Author:
Steve Yegge

Method Summary
static void adjustAlignments(Damageable target, Player winner, java.util.List names)
          Decides how much to adjust everyone's alignment for killing something.
static java.lang.String alignmentToString(int align, java.lang.String gender)
          Returns a string given an alignment value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

alignmentToString

public static java.lang.String alignmentToString(int align,
                                                 java.lang.String gender)
Returns a string given an alignment value.

Parameters:
gender - the monster's gender ("male", "female" or null)
align - the monster's alignment
Returns:
a string like "evil" or "paladin" or whatever, representing how good/neutral/evil the monster is.

adjustAlignments

public static void adjustAlignments(Damageable target,
                                    Player winner,
                                    java.util.List names)
Decides how much to adjust everyone's alignment for killing something.

Parameters:
target - the thing that was destroyed/killed
winner - the person who dealt the death-blow
names - a list of names of all players who participated in the kill (null if there's no group, and only the winner gets the XP). If non-null, should include the name of the winner.