| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.String |
name |
Name of the ship
|
protected EShipUpgrade |
shipUpgradeLevel |
State of the design standard level
|
| Constructor | Description |
|---|---|
Ship() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPassenger(IPerson passanger) |
Move a passenger to the ship.
|
protected void |
clearLoadedWares() |
Clear all loaded wares.
|
void |
damage(int damage,
boolean destroyWeapon) |
Damage the ship
|
int |
getCapacity() |
Available capacity of the ship, this represent the free storage in barrels
|
double |
getCurrentSpeed() |
Current top speed of the ship.
|
int |
getDamage() |
Retrieve the damage of the ship in percentage [0,100]
|
int |
getLoadableSpace() |
Retrieve the total amount of space that is available to store stuff.
|
javafx.beans.binding.IntegerBinding |
getLoadBinding() |
Retrieve the amount of load in barrels that is loaded in actual wares (no wappen or crew)
|
java.util.Set<IWare> |
getLoadedWares() |
Retrieve a list of all loaded wares
|
int |
getMaxNumberOfSailors() |
Retrieve the maximum of sailors that can be put on the ship.
|
int |
getNumberOfSailors() |
Retrieve the number of sailors on the ship.
|
int |
getOccupiedSpaceByWeapons() |
Retrieve the amount of space used for the weapons.
|
IShipOwner |
getOwner() |
Retrieve the owner of the ship.
|
boolean |
getPirateFlag() |
Indicate if the vessel has hissed the pirate flag (Jolly Roger)
and the vessel therefore should be considered a pirate vessel.
|
double |
getTopSpeed() |
Retrieve the speed of the vessel in kilometer per hour
|
int |
getUpgradeSpaceReduction() |
Retrieve the reduction of the load capacity based on the upgrade level.
|
int |
getValue() |
Retrieve the current value of the ship without its cargo
|
AmountablePrice<IWare> |
getWare(IWare ware) |
Retrieve the amount of ware loaded
|
int |
getWeaponAmount(IWeapon weaponType) |
Retrieve the amount of weapons on the ship
|
protected void |
initializeProperties(ShipProperties.Ship shipConfiguration) |
|
boolean |
isUpgradable() |
Check if the ship can be upgraded
|
void |
leavePassenger() |
Passenger leave ship.
|
int |
load(IWare ware,
int amount,
int avgPrice) |
Load the ware in the specified amount onto the ship.
|
javafx.beans.property.IntegerProperty |
numberOfSailorsProperty() |
Retrieve the number of sailors as IntegerProperty.
|
javafx.beans.property.ObjectProperty<IShip> |
parentShipProperty() |
Property holding the parent ship in case of a grouping (convoy or group).
|
javafx.beans.binding.BooleanBinding |
passengerPresentProperty() |
Binding indicating if a passenger is present.
|
javafx.beans.property.BooleanProperty |
pirateFlagProperty() |
Property defining the pirate activit y of the vessel.
|
void |
repair() |
Repair the damage
|
void |
setCaptain(ICaptain captain) |
Set the captain on the ship
|
void |
setNumberOfSailors(int nbSailors) |
Set the number of sailors.
|
void |
setOwner(IShipOwner owner) |
Define the owner of the ship
|
void |
togglePirateFlag() |
Hiss or lower the pirate flag (Jolly Roger).
|
int |
unload(IWare ware,
int amount) |
Unload the specified quantity of the ware.
|
void |
updateHandweapon(int delta) |
Update the amount of handweapons on board.
|
void |
upgrade() |
Upgrade the ship if it is upgradable
|
getCaptian, getLocation, getName, getSize, getUuid, setLocationgetDistanceInKmForOneHealthPointReduction, getMinNumberOfSailors, getOccupiedSpace, getPassenger, getShipType, getShipUpgradeLevel, getWeaponSlots, isAvailable, setAvailable, setName, setOccupiedSpace, setWeaponSlotsprotected EShipUpgrade shipUpgradeLevel
protected java.lang.String name
protected final void initializeProperties(ShipProperties.Ship shipConfiguration)
public int getMaxNumberOfSailors()
IShipgetMaxNumberOfSailors in interface IShippublic void setCaptain(ICaptain captain)
IShipsetCaptain in interface IShipcaptain - to be assigned to the shippublic boolean isUpgradable()
IShipisUpgradable in interface IShippublic void upgrade()
IShippublic java.util.Set<IWare> getLoadedWares()
INavigableVesselgetLoadedWares in interface INavigableVesselpublic int load(IWare ware, int amount, int avgPrice)
load in interface INavigableVesselware - to be loadedamount - of items the wareavgPrice - average price of one item of the warepublic int unload(IWare ware, int amount)
unload in interface INavigableVesselware - to be unloadedamount - amount of items of ware to unloadpublic javafx.beans.binding.IntegerBinding getLoadBinding()
INavigableVesselgetLoadBinding in interface INavigableVesselprotected void clearLoadedWares()
public AmountablePrice<IWare> getWare(IWare ware)
INavigableVesselgetWare in interface INavigableVesselware - for which to retrieve price and amountpublic int getValue()
IShippublic int getNumberOfSailors()
INavigableVesselgetNumberOfSailors in interface INavigableVesselpublic void setNumberOfSailors(int nbSailors)
IShipsetNumberOfSailors in interface IShipnbSailors - number of sailors.public javafx.beans.property.IntegerProperty numberOfSailorsProperty()
IShipnumberOfSailorsProperty in interface IShippublic int getWeaponAmount(IWeapon weaponType)
INavigableVesselgetWeaponAmount in interface INavigableVesselweaponType - SWORD | BOW | CROSSBOW | MUSKETpublic void addPassenger(IPerson passanger)
IShipaddPassenger in interface IShippassanger - going oon board.public IShipOwner getOwner()
INavigableVesselgetOwner in interface INavigableVesselpublic void setOwner(IShipOwner owner)
IShippublic void leavePassenger()
leavePassenger in interface IShippublic int getCapacity()
INavigableVesselgetCapacity in interface INavigableVesselpublic int getUpgradeSpaceReduction()
IShipgetUpgradeSpaceReduction in interface IShippublic javafx.beans.binding.BooleanBinding passengerPresentProperty()
IShippassengerPresentProperty in interface IShippublic int getDamage()
INavigableVesselgetDamage in interface INavigableVesselpublic void damage(int damage,
boolean destroyWeapon)
INavigableVesseldamage in interface INavigableVesseldamage - amount of damage that is inflicteddestroyWeapon - flag indicating if weapons may be destroyed.public void repair()
IShippublic int getLoadableSpace()
INavigableVesselgetLoadableSpace in interface INavigableVesselpublic double getTopSpeed()
INavigableVesselgetTopSpeed in interface INavigableVesselpublic boolean getPirateFlag()
INavigableVesselgetPirateFlag in interface INavigableVesselpublic void togglePirateFlag()
INavigableVesseltogglePirateFlag in interface INavigableVesselpublic javafx.beans.property.BooleanProperty pirateFlagProperty()
INavigableVesselpirateFlagProperty in interface INavigableVesselpublic double getCurrentSpeed()
INavigableVesselgetCurrentSpeed in interface INavigableVesselpublic javafx.beans.property.ObjectProperty<IShip> parentShipProperty()
IShipparentShipProperty in interface IShippublic void updateHandweapon(int delta)
IShipupdateHandweapon in interface IShipdelta - difference to be changed.public int getOccupiedSpaceByWeapons()
IShipgetOccupiedSpaceByWeapons in interface IShipCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.