public class GlobalStatusController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
BattleController |
bc
The battle that this controller is a part of.
|
Constructor and Description |
---|
GlobalStatusController(BattleController bc)
Initializes a global status controller.
|
Modifier and Type | Method and Description |
---|---|
void |
addGlobalStatus(PixelmonWrapper cause,
GlobalStatusBase g)
Adds the specified status.
|
boolean |
canWeatherChange(Weather newWeather) |
void |
endBattle()
On battle end, remove all statuses.
|
GlobalStatusBase |
getGlobalStatus(int index)
Gets the status at the specified index.
|
GlobalStatusBase |
getGlobalStatus(StatusType type)
Gets the specified status if it is active.
|
java.util.List<GlobalStatusBase> |
getGlobalStatuses()
Returns a list of global statuses.
|
int |
getGlobalStatusSize()
Returns the number of global statuses.
|
Terrain |
getTerrain()
Returns the active terrain.
|
Weather |
getWeather()
Returns the active weather.
|
Weather |
getWeatherIgnoreAbility()
Returns the active weather, ignoring Cloud Nine and Air Lock's weather canceling effects.
|
boolean |
hasStatus(StatusType type)
Returns whether the given status is currently active.
|
void |
removeGlobalStatus(GlobalStatusBase g)
Removes the specified status.
|
boolean |
removeGlobalStatus(StatusType status)
Removes the status with the specified type.
|
boolean |
removeGlobalStatuses(StatusType... statuses)
Removes statuses with the specified types.
|
void |
triggerTerrainChange(Terrain terrain)
Triggers effects when the terrain changes.
|
void |
triggerWeatherChange(Weather weather)
Triggers effects when the weather changes.
|
public BattleController bc
public GlobalStatusController(BattleController bc)
bc
- The battle controller to associate with the global status controller.public java.util.List<GlobalStatusBase> getGlobalStatuses()
public Weather getWeather()
public Weather getWeatherIgnoreAbility()
public Terrain getTerrain()
public boolean removeGlobalStatus(StatusType status)
status
- The type of status to remove.public boolean removeGlobalStatuses(StatusType... statuses)
statuses
- The types of statuses to remove.public void removeGlobalStatus(GlobalStatusBase g)
g
- The status to remove.public void addGlobalStatus(PixelmonWrapper cause, GlobalStatusBase g)
g
- The status to add.public GlobalStatusBase getGlobalStatus(int index)
index
- The index of the status to get.public GlobalStatusBase getGlobalStatus(StatusType type)
type
- The status to get.public int getGlobalStatusSize()
public boolean hasStatus(StatusType type)
type
- The status to check for.public void endBattle()
public void triggerWeatherChange(Weather weather)
weather
- The new weather.public void triggerTerrainChange(Terrain terrain)
terrain
- The new terrain.public boolean canWeatherChange(Weather newWeather)