einheit action true if tokens >0
This commit is contained in:
parent
35e75e86b4
commit
98bff63c20
2
gui.pl
2
gui.pl
@ -63,6 +63,7 @@ choose_units :-
|
||||
|
||||
send(D, open).
|
||||
|
||||
%TODO delete
|
||||
change_cell_content(T, Row, Col, NewContent) :-
|
||||
get(T, cell, Row, Col, Cell),
|
||||
send(Cell, free),
|
||||
@ -305,6 +306,7 @@ process_move_unit(FromX, FromY, ToX, ToY, Controls) :-
|
||||
update_controls,
|
||||
spielfeld.
|
||||
|
||||
%TODO delete
|
||||
test_change :-
|
||||
new(D, dialog),
|
||||
new(T, tabular),
|
||||
|
11
logik.pl
11
logik.pl
@ -115,8 +115,15 @@ einheit_action(Xold, Yold, Xnew, Ynew) :-
|
||||
einheit_attack(Xold, Yold, Xnew, Ynew)
|
||||
),
|
||||
|
||||
end_turn,!.
|
||||
|
||||
(
|
||||
current_player(Player),
|
||||
player_tokens(Player, Tokens),
|
||||
\+ Tokens > 0,
|
||||
end_turn,
|
||||
!
|
||||
;
|
||||
true
|
||||
).
|
||||
|
||||
einheit_alive(AP, HP, HPnew, HPmult) :-
|
||||
% berechnen der differenz nach anwenden des multplikators
|
||||
|
Loading…
x
Reference in New Issue
Block a user