player_position(yellow,5).
player_position(red,5).
player_position(green,5).
player_position(blue,5).
taoist_offset(yellow,45,20).
taoist_offset(red,80,20).
taoist_offset(green,45,45).
taoist_offset(blue,80,45).

/**

	@descr	These are facts about the postion and the TileID of each tile around the village fields. On this tile the player sets 			the monstercards during the game. Every tile is 120x120 in dimension. TileID is a tuple (A,B).
	@form	tile(TileID,Position X, Position Y)

**/


% top from left to right:
tile( (1,3), 182, 2, updown).
tile( (2,3), 304, 2, updown).
tile( (3,3), 426, 2, updown).
% left from top to bottom
tile( (1,1), 1 ,184, leftside).
tile( (4,1), 1, 306, leftside).
tile( (7,1), 1, 428, leftside).
% bottom from left to right
tile( (7,-3), 182, 550, updown).
tile( (8,-3), 304, 550, updown).
tile( (9,-3), 426, 550, updown).
% right from top to bottom
tile( (3,-1), 548, 184, rightside).
tile( (6,-1), 548, 306, rightside).
tile( (9,-1), 548, 428, rightside).


/**

	@descr	Listed are facts about the postion and the TileID of each villagefields. Like monster tiles each villagefield is 			120x120 in dimension. The TileID is a single number.
	@form	tile(TileID,Postion X, Postion Y)  

**/
% village fields:
tile( 1, 182, 184, v ). tile( 2, 304, 184, v ). tile( 3, 426, 184, v ).
tile( 4, 182, 306, v ). tile( 5, 304, 306, v ). tile( 6, 426, 306, v ).
tile( 7, 182, 428, v ). tile( 8, 304, 428, v ). tile( 9, 426, 428, v ).

%-------------------------------------------------------------------

%FROM: playersgroup.pl

/**

	@descr label_player: shows the relation between playerX and statusPlayerX
	@form	label_player(Colour,StatusPlayer).

**/
:- retractall(label_player(_,_)).
label_player(yellow,@statusPlayer1).
label_player(red,@statusPlayer2).
label_player(green,@statusPlayer3).
label_player(blue,@statusPlayer4).

/**
            @descr taomarker: initialises the start number of tao tokens and qi tokens
	    @form taomarker(Player,ListOfNumbers)

**/
:-retractall(taomarker(_,_)).
taomarker(yellow,[1,0,0,0,0,4]).
taomarker(red,[0,1,0,0,0,4]).
taomarker(green,[0,0,1,0,0,4]).
taomarker(blue,[0,0,0,1,0,4]).

:- dynamic(active/6).
:- retractall(active).
active(1,@player1,yellow,5,7,player1).
active(2,@player2,red,5,55,player2).
active(3,@player3,green,5,103,player3).
active(4,@player4,blue,5,151,player4).
%------------------------------------------------

%FROM: buddha.pl
:-dynamic(player_buddha/3).
%player_buddha(PlayerObject,PosX,PosY,BuddhaObject)
player_buddha(@player1,250,1,@buddha1).
player_buddha(@player2,250,46,@buddha1).
player_buddha(@player3,250,94,@buddha1).
player_buddha(@player4,250,144,@buddha1).

player_buddha(@player1,222,1,@buddha2).
player_buddha(@player2,222,46,@buddha2).
player_buddha(@player3,222,94,@buddha2).
player_buddha(@player4,222,144,@buddha2).

:-dynamic(buddha/3).
%buddha(BuddhaObject,Xoffset,Yoffset)
buddha(@buddha1, 58, 72).
buddha(@buddha2, 86, 72).
	

:-dynamic(ghostfield_buddha_offset/3).
%ghostfield_buddha_offset(GhostFieldID,Offset1,Offset2)

%top from left to right
ghostfield_buddha_offset((1,3),45,65).
ghostfield_buddha_offset((2,3),45,65).
ghostfield_buddha_offset((3,3),45,65).
%left from top to bottom
ghostfield_buddha_offset((1,1),65,45).
ghostfield_buddha_offset((4,1),65,45).
ghostfield_buddha_offset((7,1),65,45).
%bottom from left to right
ghostfield_buddha_offset((7,-3),45,65).
ghostfield_buddha_offset((8,-3),45,65).
ghostfield_buddha_offset((9,-3),45,65).
%right from top to bottom
ghostfield_buddha_offset((3,-1),65,45).
ghostfield_buddha_offset((6,-1),65,45).
ghostfield_buddha_offset((9,-1),65,45).

%buddha_symbol(BuddhaObejct,BuddhaSymbolObject)
buddha_symbol(@buddha1,@buddhasymbol1).
buddha_symbol(@buddha2,@buddhasymbol2).

%id2buddha(ID,BuddhaObject,BuddhaSymbolObject)
id2buddha(1,@buddha1,@buddhasymbol1).
id2buddha(2,@buddha2,@buddhasymbol2).
%---------------------------------------------

%FROM: diceresult.pl
%int2colour(Int,Colour)
int2colour(0,white).
int2colour(1,yellow).
int2colour(2,red).
int2colour(3,green).
int2colour(4,blue).
int2colour(5,black).

%dice(DiceObject,PosX,PosY)
dice(@dice_circle3,574,674).
dice(@dice_circle1,574,574).
dice(@dice_circle2,659,574).
dice(@dice_circle4,659,674).

%------------------------------------------------

%FROM: hauntghost.pl
haunt_offset(offset1, (60, 20), (60, 80)). % top 
haunt_offset(offset2, (20, 10), (80, 10)). % left
haunt_offset(offset3, (60, 80), (60, 20)). % bottom
haunt_offset(offset4, (110, 60), (50, 60)). % right


% top from left to right
haunt_position( (1,3), offset1).
haunt_position( (2,3), offset1).
haunt_position( (3,3), offset1).
% left from top to bottom
haunt_position( (1,1), offset2).
haunt_position( (4,1), offset2).
haunt_position( (7,1), offset2).
% bottom from left to right
haunt_position( (7,-3), offset3).
haunt_position( (8,-3), offset3).
haunt_position( (9,-3), offset3).
% right from top to bottom
haunt_position( (3,-1), offset4).
haunt_position( (6,-1), offset4).
haunt_position( (9,-1), offset4).


%FROM: death.pl
%player_figure(FigurObject,Player)
player_figure(@figYellow,player1).
player_figure(@figRed,player2).
player_figure(@figGreen,player3).
player_figure(@figBlue,player4).
%death_offset(FigurObject,XPos,YPos)
death_offset(@figYellow,600,40).
death_offset(@figRed,600,70).
death_offset(@figGreen,600,100).
death_offset(@figBlue,600,130).
