|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.globalse.arena.sword.algorithm.Mission
The class Mission is responsible for realizing the Mission description. There is only one instance of the class during program execution. It takes as an input the mission description file and creates the game world and all objects and artificial players. During gameplay, it watches all player actions, to check wether any subtasks of the mission are fulfilled. If so, it can generate actions in the game world and change its state.
Therefore it has one method for every kind of action that a player can do. Seen from a different perspective, Mission is a view for player actions and a controller for the game world / frag.
Constructor Summary | |
Mission()
|
Method Summary | |
void |
actionEvent(ObjectActionEvent event)
|
void |
changeAdvHitpoints(java.lang.String adventurerName,
double hitPoints)
|
boolean |
checkAdvHitpointsGE(java.lang.String adventurerName,
double hitPoints)
|
MathVector |
checkCollision(java.lang.String other,
MathVector oldPos,
MathVector delta)
|
boolean |
checkHasItem(java.lang.String adventurerName,
java.lang.String itemName)
|
boolean |
checkItemExists(java.lang.String itemName)
|
void |
createConsumableItem(java.lang.String objectName,
double weight,
java.lang.String type,
double healthBonus,
double healthMaxBonus,
double manaBonus,
double manaMaxBonus,
double magicPowerBonus,
double magicInventoryMaxBonus,
double strenghtBonus,
double x,
double y)
|
void |
createItems()
Creates all Items listed in the mission description. |
void |
createLandscape(long seed,
java.lang.String type,
double water,
double roughness)
|
void |
createSpell(java.lang.String objectName,
double weight,
java.lang.String type,
double healthBonus,
double healthMaxBonus,
double manaBonus,
double manaMaxBonus,
double magicPowerBonus,
double inventoryMaxBonus,
double strengthBonus,
double manaNeeded,
double magicPowerNeeded,
double x,
double y)
|
void |
createWeapon(java.lang.String objectName,
double weight,
java.lang.String type,
double damage,
double range,
double x,
double y)
|
void |
drop(java.lang.String itemName,
java.lang.String adventurerName)
|
World |
getWorld()
Returns the world of the mission. |
void |
init(GameManager gameManager)
Constructs a new Mission object. |
void |
lookAt(java.lang.String itemName,
java.lang.String adventurerName)
|
void |
pickUp(java.lang.String itemName,
java.lang.String adventurerName)
|
void |
useWith(java.lang.String item1Name,
java.lang.String item2Name,
java.lang.String adventurerName)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Mission()
Method Detail |
public void init(GameManager gameManager) throws java.lang.Exception
GameManager
- The FRAG Gamemanagerthe FRAG status already contains the MissionXML FRAGObject
A world has been created, according to the mission description
in MissionXML and all objects etc. have been created in frag.
public World getWorld()
public void pickUp(java.lang.String itemName, java.lang.String adventurerName)
public void lookAt(java.lang.String itemName, java.lang.String adventurerName)
public void drop(java.lang.String itemName, java.lang.String adventurerName)
public void useWith(java.lang.String item1Name, java.lang.String item2Name, java.lang.String adventurerName)
public boolean checkItemExists(java.lang.String itemName)
public boolean checkHasItem(java.lang.String adventurerName, java.lang.String itemName)
public boolean checkAdvHitpointsGE(java.lang.String adventurerName, double hitPoints)
public void changeAdvHitpoints(java.lang.String adventurerName, double hitPoints)
public void createLandscape(long seed, java.lang.String type, double water, double roughness)
public void createSpell(java.lang.String objectName, double weight, java.lang.String type, double healthBonus, double healthMaxBonus, double manaBonus, double manaMaxBonus, double magicPowerBonus, double inventoryMaxBonus, double strengthBonus, double manaNeeded, double magicPowerNeeded, double x, double y)
public void createConsumableItem(java.lang.String objectName, double weight, java.lang.String type, double healthBonus, double healthMaxBonus, double manaBonus, double manaMaxBonus, double magicPowerBonus, double magicInventoryMaxBonus, double strenghtBonus, double x, double y)
public void createWeapon(java.lang.String objectName, double weight, java.lang.String type, double damage, double range, double x, double y)
public void createItems()
the world has already been created
all items are created and placed on the world
public MathVector checkCollision(java.lang.String other, MathVector oldPos, MathVector delta)
public void actionEvent(ObjectActionEvent event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |