Crossfire Server, Trunk
create-tower.py
Go to the documentation of this file.
1 import Crossfire
2 
3 import CFTowerDefense as td
4 
5 player = Crossfire.WhoIsActivator()
6 builder = Crossfire.WhoAmI()
7 current_map = Crossfire.WhoIsActivator().Map
8 tile = td.player_tile_objects(player, current_map)
9 
10 Crossfire.SetReturnValue(1) # do not read the card normally
11 
12 if tile and current_map.Path == '/darcap/darcap/circus/fz_tower_defense':
13  if td.create_tower(player, current_map, tile, builder):
14  player.Message("You build a tower.")
15  else:
16  player.Message("You must be standing on a tower placement square to build a tower.")
17 else:
18  player.Message("Nothing happens here.")