public class DeathmatchArena extends Arena implements java.io.Serializable, MessageCallback
| Modifier and Type | Class and Description |
|---|---|
class |
DeathmatchArena.ArenaCleanup
Teleports all players out and then sends out a message to remove this arena
instance from the Map stored in the ArenaPlugin.
|
class |
DeathmatchArena.ArenaCountdown |
class |
DeathmatchArena.ArenaEnd
The class to handle when the arenas timer has expired.
|
class |
DeathmatchArena.ArenaReady |
class |
DeathmatchArena.ArenaStart
Starts the arena.
|
class |
DeathmatchArena.CollisionCheck
Iterates through every player in the arena and compares their location to
all the other players in the other teams.
|
arenaDatabaseID, arenaGameType, arenaID, arenaName, arenaObjects, category, centreY, defeatPayment, defeatXP, goalType, instanceOid, instanceTemplateID, length, numTeams, PLAYER_IMMUNE, PLAYER_INACTIVE, PROP_HEALTH, PROP_MAX_HEALTH, PROP_WEAPON, scheduledExecutioner, startTime, state, STATE_END, STATE_RUNNING, STATE_SETUP, STATE_UNSET, teams, useWeapons, victoryCondition, victoryPayment, victoryXPNO_FLAGS, RESPONSE_EXPECTED| Constructor and Description |
|---|
DeathmatchArena(int numTeams)
The default constructor.
|
DeathmatchArena(int numTeams,
java.util.ArrayList<ArenaQueue.QueueMember>[] members,
int type,
int arenaDatabaseID,
java.lang.String arenaName,
int category,
int dur,
int[] goals,
java.lang.String[] teamNames,
Point[] spawnPoints,
int condition,
int id,
int[] minPlayers,
int instanceTemplateID,
java.util.HashMap<java.lang.Integer,java.lang.Integer> victoryPayment,
java.util.HashMap<java.lang.Integer,java.lang.Integer> defeatPayment,
int victoryExp,
int defeatExp,
boolean useWeapons)
Constructor that takes in two lists that contain the oids of the players
on each team.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateAbility(OID playerOid,
OID targetOid,
int slot) |
protected boolean |
addAbility(OID playerOid,
int team) |
void |
addDotScore(OID attackerOid)
This is called whenever a pac eats a dot.
|
void |
addKillScore(OID attackerOid,
OID victimOid)
This will be called whenever one player kills another.
|
protected boolean |
addPowerup(ArenaMember member,
int playerTeam) |
protected void |
alterTeamScore(int team,
int score)
Add the score to the teams score.
|
protected boolean |
canPlaceObject(int x,
int z) |
void |
completeTutorial(OID oid) |
protected java.util.LinkedList<java.lang.Integer> |
getAbilityList(int team) |
protected int |
getGridXTile(float f) |
protected int |
getGridZTile(float f) |
protected java.util.LinkedList<java.lang.Integer> |
getPowerupList(int team) |
void |
handleDeath(OID attackerOid,
OID victimOid) |
void |
handleMessage(Message msg,
int flags)
process network messages
|
protected boolean |
placeObjectInGrid(int x,
int z,
java.lang.Object object) |
void |
releaseRequest(OID playerOid) |
protected boolean |
removeObjectFromGrid(int x,
int z,
java.lang.Object object) |
boolean |
sendMessageSingle(java.lang.String msgType,
OID oid,
java.io.Serializable data)
Sends an extension message of the specified type to the specified player
|
void |
setup()
This is run once the Arena object is created.
|
activateMachine, addArenaObject, addHealth, addIndividualDeath, addIndividualKill, addIndividualScore, addWeapon, changePlayerRace, createSubs, despawnGates, getArenaCategory, getArenaID, getArenaInstanceOid, getArenaPlayer, getArenaType, getInstanceTemplateID, getLength, getOpposingTeams, getPlayerTeam, getState, getTeam, getTeams, getUsableSkins, logArenaResult, removePlayer, sendAbilities, sendChatMessageAll, sendChatMessageSingle, sendChatMessageTeam, sendMessageAll, sendMessageTeam, sendStatMessageAll, sendStatMessageSingle, setArenaCategory, setArenaID, setArenaInstanceOid, setArenaType, setInstanceTemplateID, setLength, setPlayerProperty, setPlayerSkin, setPlayerTeamColour, setState, setTeams, teleportAllBase, teleportAllOut, teleportOutpublic DeathmatchArena(int numTeams)
numTeams: - the number of teams in the arenapublic DeathmatchArena(int numTeams,
java.util.ArrayList<ArenaQueue.QueueMember>[] members,
int type,
int arenaDatabaseID,
java.lang.String arenaName,
int category,
int dur,
int[] goals,
java.lang.String[] teamNames,
Point[] spawnPoints,
int condition,
int id,
int[] minPlayers,
int instanceTemplateID,
java.util.HashMap<java.lang.Integer,java.lang.Integer> victoryPayment,
java.util.HashMap<java.lang.Integer,java.lang.Integer> defeatPayment,
int victoryExp,
int defeatExp,
boolean useWeapons)
public void setup()
public void handleMessage(Message msg, int flags)
handleMessage in interface MessageCallbackhandleMessage in class Arenamsg - Message sent from other agent.flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED.protected boolean addAbility(OID playerOid, int team)
addAbility in class Arenaprotected boolean addPowerup(ArenaMember member, int playerTeam)
protected boolean canPlaceObject(int x,
int z)
protected boolean placeObjectInGrid(int x,
int z,
java.lang.Object object)
protected boolean removeObjectFromGrid(int x,
int z,
java.lang.Object object)
protected int getGridXTile(float f)
protected int getGridZTile(float f)
public void handleDeath(OID attackerOid, OID victimOid)
handleDeath in class Arenapublic void addKillScore(OID attackerOid, OID victimOid)
addKillScore in class ArenaattackerOid: - the oid of the attackervictimOid: - the oid of the victimpublic void addDotScore(OID attackerOid)
attackerOid: - the oid of the pac who ate the dotpublic void releaseRequest(OID playerOid)
releaseRequest in class Arenapublic void completeTutorial(OID oid)
completeTutorial in class Arenaprotected java.util.LinkedList<java.lang.Integer> getAbilityList(int team)
protected java.util.LinkedList<java.lang.Integer> getPowerupList(int team)
protected void alterTeamScore(int team,
int score)
alterTeamScore in class Arenateam: - Which team to add score to.score: - Score value to add. Can be negative.public boolean sendMessageSingle(java.lang.String msgType,
OID oid,
java.io.Serializable data)
sendMessageSingle in class ArenamsgType: - the message typeoid: - the oid to send the message todata: - some form of data to be sentpublic void activateAbility(OID playerOid, OID targetOid, int slot)
activateAbility in class Arena