java.lang.Object
|
+--Unit
|
+--Charactr
|
+--Sovereign
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 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 |
protected java.lang.String name
protected java.lang.String type
protected int combatRating
protected int enduranceRating
protected int leadershipRating
protected int spaceLeadershipRating
protected int starSystem
protected int environID
protected boolean isAlive
true by default.
| Constructor Detail |
public Sovereign(java.lang.String name,
java.lang.String type,
int combatRating,
int enduranceRating,
int leadershipRating,
int spaceLeadershipRating,
int starSystem,
int environID)
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 |
public static Sovereign get(int environID)
get returns a Sovereign
object containing the given data corresponding to the environID.
Note: Code does not currently have environID, currently uses
planetID.
environID - The integer value given to the Planet
+ Environ where the desired sovereign
is located.
Sovereign if there was a
match found for the given environID.;
null if there was no match
found for the given environID.
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.Sovereign