Sulk - data - missions - MISSIONS_INFO

The following is a template for Sulk missions.  

This format is 'simply' a Python module.  Of course you'll have to read the
code to find out what the hell all the namespaces are and suchlike.

Also, be warned that we are contemplating a switch to some kind of XML file
format.  If and when this occurs you may have to rework any files which you
have made for Sulk.


-------------- Cut here -----------


# NAME OF MISH HERE

#*****************************************************************************
#
#       Copyright (c) 2002 YOUR NAME HERE
#
# Sulk is free software.  See the file COPYING for details.
#
#******************************************************************************

"""
This module contains constants and functions for a Sulk mission.
"""

####### Import

from constants.mission_locals import *


####### Strings and things

NAME = "NAME OF MISH HERE"

# FAMILY - the name of the collection of missions
FAMILY = "NAME OF MISH FAMILY HERE"

# NUM - the number of this mission in the family sequence (an int)
NUM =

AUTHOR = "YOUR NAME HERE"

INFO = "DESCRIPTION OF OBJECTIVES HERE"

STORY = "BACKSTORY HERE"


####### Board array
#
# Each element of a board layout tuple is a boardsection tuple.
#
# Each elt of a boardsection tuple is a square tuple.
#
# A square tuple consists of:
#   [0], the 2-tuple of the square's coordinates (in multiples of SQ_LENGTH
#	measured down and then right)
#   [1], a dict (OPTIONAL)
#
# If there is a dict, the keys are feature types and the values are facings, ints or strings.
#
#   M =	marine deploy 		- takes arbitrary object, becoming the square.deploy_attribute
#   ENTRY = stealer entrypoint 	- takes a facing (facing 'off the board')
#   EXIT = marine exitpoint 	- takes a facing (facing 'off the board')
#   DOOR = Door 		- takes a facing
#   DUCTING = Ducting		- takes a facing
#   O = objective square 	- takes an int (objective #)
#   COMMENT = comment		- takes a string


BOARD = (...	)


####### Constants

# The coords of the square we want centered on the screen at load time (square coordinates as above):
BEGINPLACE = (,)

# This tuple governs various game elements.  Include any or all of the following:
# USE_AMBUSH_COUNTERS stealers may deploy ambush counters ==> FIXME!
# CAT there is at least one C.A.T. in this mission
FLAGS = ()

####### Marine initial forces:
#
# A tuple of squads.
#   Each squad is a 2-tuple of (string, tuple).
#	The string is the squad name.
#	The tuple is a squad, composed of member tuples.
#	    The first element in each member tuple is one of MARINE, SARGE, FLAMER, CAPT, CAT.
#	    The second element indicates which team places the piece - MARINETEAM or STEALERTEAM.
#	    The third element is present only for a C.A.T. and is one of:
#	    - WITHSQUAD = one of the other squad members must be carrying the C.A.T. initially
#	    - ONBOARD = the C.A.T. should be deployed on a square solo.
#
#   REMEMBER - a 1-tuple looks like this: (foo,)
MARINES =   (
		(
		"Name of squad 1", 
		    ( (MARINE,MARINETEAM), (...,), (,), (CAT,STEALERTEAM,WITHSQUAD), (,) ...)
		),
		(
		"Name of squad 2", 
		    ( ... )
		)
		...
	    )


####### Stealer forces:
#
# A 2-tuple.
# The first elt is an int for the # of blips stealer begins with.   
# The second is how many reinforcement blips he gets per turn.
BLIPS = (,)

# Stealer blip distribution:
# A dict of blip values and numbers.
# e.g. BLIP_SET_BASIC, which is {1:8, 2:4, 3:9}
BLIP_SET = 


####### Functions
def _init(sulkgame):
    """_init(sulkgame) -> None
    set up any global variables the module needs"""

    
def pre_deploy_rule(aclass, square, squadname=None):
    """pre_deploy_rule(aclass, square, squadname=None) -> bool
    
    Returns True if square is deployable for a piece from class 'aclass'.
    
    This funct is only called by mode_deploy_initial and so only applies with
    Marine and Blip instances, and not Blip conversion in an action
    phase.  If aclass.type is BLIP, we should assume the square is the
    _entrypoint_ for some LimboSquare, not a LimboSquare itself.  
    
    'squadname' if given is the name of the marine squad."""


def post_deploy_script(piece):
    """post_deploy_script(piece) -> None

    Acts on a piece that has just deployed (including as part of blip conversion)."""
    

def post_action_script(piece, actiontype):
    """post_action_script(piece, actiontype) -> None
    
    Acts on a piece that has just performed a 
    MOVING, USING, CCING, OVERWATCHING, TURNING or SHOOTING action.
    NB the piece may no longer be alive()."""


def maction_end_script(sulkgame):
    """maction_end_script(sulkgame) -> string
    
    Executes events scripted for the end of the marine action phase.
    
    Returns a string which will be made into a ScrollMessage."""


def end_script(sulkgame):
    """end_script(sulkgame) -> string
    
    Executes events scripted for the end phase.
    
    Returns a string which will be made into a ScrollMessage."""


def victory_check(sulkgame):
    """victory_check(sulkgame) -> team / NEITHER / None
    
    Returns the winning team, NEITHER if a draw, or None if no winner yet."""


def _finish(sulkgame):
    """_finish(sulkgame) -> None
    clear up _init()"""
