/***
@author	8boomgaa
@date	2010/03/05
@descr	displays info pop-ups for village fields
*/

go_village_info:-
	send(@playground, recogniser, click_gesture(right, '', single, message(@prolog,right_click_on_playground, @event?x, @event?y))).

% case village field
right_click_on_playground(X,Y):-
	which_tile(X,Y,TileID),
%	write_ln(TileID),
	villageFieldsRightNow(ListOfFields),
	nth1(TileID,ListOfFields,FieldID),
%	villageName(FieldID,FieldName),
%	write_ln(FieldName),
	open_village_infobox(FieldID).

open_village_infobox(FieldID):-
	new(Dialog,dialog('Infobox')),
	send(Dialog,append,new(Console,editor)),
	get_village_info(FieldID,Info),
	send(Console,append,Info),
	send(Dialog,open).

get_village_info(1,'Cemetery:\nResurrect a dead player and throw the curse dice (if it shows the curse-symbol, the cemetery field will be cursed).\nThe resurrected player continues the game with 2 qi.').
get_village_info(2,'Taoist Altar:\nUndo a curse on a village field (will bring a ghost into the game).').
get_village_info(3,'Herbalists Shop:\nThrow two tao dices. You will get tao markers of the colors you throw (in case of white you may choose your tao marker color).').
get_village_info(4,'Sorcerers Hut:\nKill any ghost for one qi. Curse and/or award will be ignored. Wu-Feng is not affected by the Sorcerers Hut.').
get_village_info(5,'Night Watchmens Post:\nPlace all haunting ghosts of one game-field back onto their ghost-card.').
get_village_info(6,'Buddhist Temple:\n').
get_village_info(7,'Circle of Prayer').
get_village_info(8,'Tea House:').
get_village_info(9,'Pavilion of the Heavenly Wind:').

:- go_village_info.
