Crossfire Server, Trunk
|
Functions | |
def | create_tower (player, current_map, tile, builder) |
def | destroy_tower (tile, towerlist) |
list | player_objects (player, current_map) |
list | player_tile_objects (player, current_map) |
def | replace_tower (current_map, tile, towerlist, level=0) |
Variables | |
list | bulletwall |
list | firewall |
list | lightningwall |
def CFTowerDefense.create_tower | ( | player, | |
current_map, | |||
tile, | |||
builder | |||
) |
If a builder is dropped on a tower placement tile, a tower is built player: the player object current_map: the map object the player is in tile: all objects on a tile (a list of Crossfire objects) builder: the tower builder (a Crossfire object) Returns: True if a tower was built, False otherwise.
Definition at line 37 of file CFTowerDefense.py.
def CFTowerDefense.destroy_tower | ( | tile, | |
towerlist | |||
) |
If an object in tile exists in towerlist, the object is removed tile: all objects on a tile (a list of Crossfire objects) towerlist: bulletwall, firewall, or lightningwall Returns: True if a tower was destroyed, False otherwise.
Definition at line 70 of file CFTowerDefense.py.
list CFTowerDefense.player_objects | ( | player, | |
current_map | |||
) |
Returns all objects in the direction the player faces player: the player object current_map: the map object the player is in
Definition at line 119 of file CFTowerDefense.py.
list CFTowerDefense.player_tile_objects | ( | player, | |
current_map | |||
) |
Returns all objects in the tile the player is standing on player: the player object current_map: the map object the player is in
Definition at line 148 of file CFTowerDefense.py.
def CFTowerDefense.replace_tower | ( | current_map, | |
tile, | |||
towerlist, | |||
level = 0 |
|||
) |
If an object in tile exists in towerlist, the object is replaced with the next direction in towerlist current_map: the map object the player is in tile: all objects on a tile (a list of Crossfire objects) towerlist: bulletwall, firewall, or lightningwall level: the spell level of the tower Returns: True if a tower was replaced, False otherwise.
Definition at line 86 of file CFTowerDefense.py.
list CFTowerDefense.bulletwall |
Definition at line 3 of file CFTowerDefense.py.
list CFTowerDefense.firewall |
Definition at line 25 of file CFTowerDefense.py.
list CFTowerDefense.lightningwall |
Definition at line 14 of file CFTowerDefense.py.