Crossfire Server, Trunk
destroy-tower.py
Go to the documentation of this file.
1 import Crossfire
2 
3 import CFTowerDefense as td
4 
5 player = Crossfire.WhoIsActivator()
6 wrench = Crossfire.WhoAmI()
7 current_map = Crossfire.WhoIsActivator().Map
8 tile = td.player_objects(player, current_map)
9 
10 Crossfire.SetReturnValue(1)
11 
12 if tile and current_map.Path == '/darcap/darcap/circus/fz_tower_defense':
13  walls = td.bulletwall+td.firewall+td.lightningwall
14  if td.destroy_tower(tile, walls):
15  player.Message("You destroy the tower.")
16  else:
17  player.Message("There is no tower in front of you to destroy.")
18 else:
19  player.Message("Nothing happens here.")