Class Charactr

java.lang.Object
  |
  +--Unit
        |
        +--Charactr
Direct Known Subclasses:
Sovereign

public class Charactr
extends Unit

This class models all aspects of Characters, both the cardboard "unit" and the card used in missions and combat. The reason it is not named Character is to avoid a name conflict with java.lang. You can read more about class Charactr in the design documentation.


Field Summary
protected  char groupType
           
protected  java.util.Vector MiliUnit
           
protected  Spaceship ship
           
protected  char side
           
 
Fields inherited from class Unit
combat, environ, group, isChar, moved, name, orbit, unitType
 
Constructor Summary
Charactr(char s, java.lang.String nm, int com, int spaclead, Environ env)
           
Charactr(char s, java.lang.String nm, int com, int spaclead, Environ env, java.lang.String hp, java.lang.String t, java.lang.String r, java.lang.String sd, java.lang.String iu, int e, int i, int le, int d, int nv, int li, boolean pil)
          This constructor initializes the attributes of a FITG character by inputting those values explicitly
Charactr(java.lang.String input)
          This constructor initializes the attributes of a FITG character by inputing and parsing a String, implicitly from the charactr data file.
Charactr(java.lang.String inputString, int dummyvariable)
          This constructor takes the string from the varu-or-whatever.dat file and looks up the rest of the info according to that Note that the dummyvariable just gives this a different function header from the above but actually serves no purpose!
 
Method Summary
 void addMUnitsLed(Charactr c)
           
 void addPossession(java.lang.Object p)
           
 void changeLife(int li)
           
 boolean getAboardShip()
           
 java.util.Vector getActive(java.util.Vector chara)
           
static Charactr[] getCharInitArray()
           
 java.lang.String getCharName()
           
 int getDiplomacy()
           
 int getEndurance()
           
 java.lang.String getHomePlanet()
           
 javax.swing.ImageIcon getIcon()
           
 java.lang.String getIconURL()
           
 boolean getInPlay()
           
 int getIntelligence()
           
 boolean getIsDetected()
           
 boolean getIsHealing()
           
 boolean getIsLeader()
           
 boolean getIsPilot()
           
 boolean getIsPrisoner()
           
 int getLeadership()
           
 int getLife()
           
 java.lang.String getLocation()
           
 java.lang.String getLoyalty()
           
 java.util.Vector getMUnitsLed()
           
 int getNavigation()
           
 java.util.Vector getPossessions()
           
 java.lang.String getRace()
           
 Spaceship getShip()
           
 char getSide()
          getSide() returns the loyalty (char) of the unit
 int getSpaceLeadership()
           
 java.lang.String getSpecialDraws()
           
 java.lang.String getTitle()
           
static void init()
          This method initializes all the characters in FITG (rebel and imperial) and places them into a static array.
 void removeLeadMilUnit(MilitaryUnit M)
           
 void removeMUnitsLed(Charactr c)
           
 void setAboardShip(boolean b)
           
 void setInPlay(boolean p)
           
 void setIsDetected(boolean d)
           
 void setisHealing(boolean h)
           
 void setIsLeader(boolean le)
           
 void setIsPilot(boolean b, Spaceship s)
           
 void setIsPrisoner(boolean b)
           
 void setLeader(MilitaryUnit M)
           
 
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

groupType

protected char groupType

side

protected char side

ship

protected Spaceship ship

MiliUnit

protected java.util.Vector MiliUnit
Constructor Detail

Charactr

public Charactr(char s,
                java.lang.String nm,
                int com,
                int spaclead,
                Environ env)

Charactr

public Charactr(char s,
                java.lang.String nm,
                int com,
                int spaclead,
                Environ env,
                java.lang.String hp,
                java.lang.String t,
                java.lang.String r,
                java.lang.String sd,
                java.lang.String iu,
                int e,
                int i,
                int le,
                int d,
                int nv,
                int li,
                boolean pil)
This constructor initializes the attributes of a FITG character by inputting those values explicitly


Charactr

public Charactr(java.lang.String input)
This constructor initializes the attributes of a FITG character by inputing and parsing a String, implicitly from the charactr data file.


Charactr

public Charactr(java.lang.String inputString,
                int dummyvariable)
This constructor takes the string from the varu-or-whatever.dat file and looks up the rest of the info according to that Note that the dummyvariable just gives this a different function header from the above but actually serves no purpose!

Method Detail

getCharName

public java.lang.String getCharName()

getHomePlanet

public java.lang.String getHomePlanet()

getTitle

public java.lang.String getTitle()

getRace

public java.lang.String getRace()

getLocation

public java.lang.String getLocation()

getLoyalty

public java.lang.String getLoyalty()

getSide

public char getSide()
Description copied from class: Unit
getSide() returns the loyalty (char) of the unit

Overrides:
getSide in class Unit

getEndurance

public int getEndurance()

getIntelligence

public int getIntelligence()

getLeadership

public int getLeadership()

getSpaceLeadership

public int getSpaceLeadership()

getDiplomacy

public int getDiplomacy()

getNavigation

public int getNavigation()

getLife

public int getLife()

getIsDetected

public boolean getIsDetected()

getInPlay

public boolean getInPlay()

getIsPilot

public boolean getIsPilot()

getIsLeader

public boolean getIsLeader()

getIsHealing

public boolean getIsHealing()

getAboardShip

public boolean getAboardShip()

getIsPrisoner

public boolean getIsPrisoner()

getPossessions

public java.util.Vector getPossessions()

getMUnitsLed

public java.util.Vector getMUnitsLed()

getIcon

public javax.swing.ImageIcon getIcon()

getIconURL

public java.lang.String getIconURL()

getActive

public java.util.Vector getActive(java.util.Vector chara)

getShip

public Spaceship getShip()

getSpecialDraws

public java.lang.String getSpecialDraws()

getCharInitArray

public static Charactr[] getCharInitArray()

changeLife

public void changeLife(int li)

setIsDetected

public void setIsDetected(boolean d)

setInPlay

public void setInPlay(boolean p)

setIsLeader

public void setIsLeader(boolean le)

setisHealing

public void setisHealing(boolean h)

addPossession

public void addPossession(java.lang.Object p)

setLeader

public void setLeader(MilitaryUnit M)

removeLeadMilUnit

public void removeLeadMilUnit(MilitaryUnit M)

addMUnitsLed

public void addMUnitsLed(Charactr c)

removeMUnitsLed

public void removeMUnitsLed(Charactr c)

setIsPilot

public void setIsPilot(boolean b,
                       Spaceship s)

setAboardShip

public void setAboardShip(boolean b)

setIsPrisoner

public void setIsPrisoner(boolean b)

init

public static void init()
This method initializes all the characters in FITG (rebel and imperial) and places them into a static array.