Class Sovereign

java.lang.Object
  |
  +--Unit
        |
        +--Charactr
              |
              +--Sovereign

public class Sovereign
extends Charactr

Sovereign is the class which handles Sovereigns in Freedom in the Galaxy. A Sovereign is a character which has absolute control over a given Environ. A Sovereign is also highly respected and obeyed by his subjects.


Field Summary
protected  int combatRating
          The assigned combat rating for the sovereign.
protected  int enduranceRating
          The assigned endurance rating for the sovereign.
protected  int environID
          The integer value for the Planet and Environ in which the sovereign is assigned to.
protected  boolean isAlive
          The current status of the sovereign.
protected  int leadershipRating
          The assigned leadership rating for the sovereign.
protected  java.lang.String name
          The name of the sovereign.
protected  int spaceLeadershipRating
          The assigned leadership rating for the sovereign in space.
protected  int starSystem
          The integer value for the Star System in which the sovereign is assigned to.
protected  java.lang.String type
          What side the Sovereign supports.
 
Fields inherited from class Charactr
groupType, MiliUnit, ship, side
 
Fields inherited from class Unit
combat, environ, group, isChar, moved, orbit, unitType
 
Constructor Summary
Sovereign(java.lang.String name, java.lang.String type, int combatRating, int enduranceRating, int leadershipRating, int spaceLeadershipRating, int starSystem, int environID)
          Create a Sovereign object initialized with the values passed.
 
Method Summary
static Sovereign get(int environID)
          When given a unique environID, get returns a Sovereign object containing the given data corresponding to the environID.
 
Methods inherited from class Charactr
addMUnitsLed, addPossession, changeLife, getAboardShip, getActive, getCharInitArray, getCharName, getDiplomacy, getEndurance, getHomePlanet, getIcon, getIconURL, getInPlay, getIntelligence, getIsDetected, getIsHealing, getIsLeader, getIsPilot, getIsPrisoner, getLeadership, getLife, getLocation, getLoyalty, getMUnitsLed, getNavigation, getPossessions, getRace, getShip, getSide, getSpaceLeadership, getSpecialDraws, getTitle, init, removeLeadMilUnit, removeMUnitsLed, setAboardShip, setInPlay, setIsDetected, setisHealing, setIsLeader, setIsPilot, setIsPrisoner, setLeader
 
Methods inherited from class Unit
getCombat, getEnviron, getGroupType, getMoved, getName, getOrbit, getUnitType, moveFromOrbitBox, moveFromOrbitBox, moveFromOrbitBox, moveFromOrbitBox, moveFromOrbitBox, moveFromOrbitBox, moveShip, moveTo, moveTo, moveToOrbitBox, moveToOrbitBox, moveToOrbitBox, reactionMove, reactionMove, setEnviron, setGroupType, setOrbit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name of the sovereign.


type

protected java.lang.String type
What side the Sovereign supports. Valid values are "imperial", "rebel", or "neutral"


combatRating

protected int combatRating
The assigned combat rating for the sovereign.


enduranceRating

protected int enduranceRating
The assigned endurance rating for the sovereign.


leadershipRating

protected int leadershipRating
The assigned leadership rating for the sovereign.


spaceLeadershipRating

protected int spaceLeadershipRating
The assigned leadership rating for the sovereign in space.


starSystem

protected int starSystem
The integer value for the Star System in which the sovereign is assigned to.


environID

protected int environID
The integer value for the Planet and Environ in which the sovereign is assigned to.


isAlive

protected boolean isAlive
The current status of the sovereign. Value is set to true by default.

Constructor Detail

Sovereign

public Sovereign(java.lang.String name,
                 java.lang.String type,
                 int combatRating,
                 int enduranceRating,
                 int leadershipRating,
                 int spaceLeadershipRating,
                 int starSystem,
                 int environID)
Create a Sovereign object initialized with the values passed.

Parameters:
name - The name of the sovereign.
type - Specifies who the sovereign supports. Valid responses are: "imperial", "rebel", or "neutral"
combatRating - The sovereign's combat rating.
enduranceRating - The sovereign's endurance rating.
leadershipRating - The sovereign's leadership rating.
spaceLeadershipRating - The sovereign's leadership rating while in space.
starSystem - The integer value given to the Star System where the sovereign is located.
environID - The integer value given to the Planet + Environ where the sovereign is located.
Method Detail

get

public static Sovereign get(int environID)
When given a unique environID, get returns a Sovereign object containing the given data corresponding to the environID. Note: Code does not currently have environID, currently uses planetID.

Parameters:
environID - The integer value given to the Planet + Environ where the desired sovereign is located.
Returns:
Sovereign if there was a match found for the given environID.; null if there was no match found for the given environID.
Throws:
java.lang.UnsupportedOperationException - If a Sovereign has already been assigned to the specified environID.
java.lang.IllegalArgumentException - If the total number of summoned sovereigns exceeds 12.
See Also:
Sovereign