update
This commit is contained in:
@@ -386,10 +386,6 @@ func _apply(id: int, action: Dictionary) -> void:
|
||||
var p: Game.Player = game.players[seats[id]]
|
||||
if game.winner != "":
|
||||
return
|
||||
if str(action.get("type", "")) == "pick": # wählen geht jederzeit, auch außerhalb des Zugs
|
||||
game.pick(p, int(action.get("index", -1)))
|
||||
action_applied.emit()
|
||||
return
|
||||
if game.current() != p:
|
||||
return
|
||||
match str(action.get("type", "")):
|
||||
@@ -415,9 +411,14 @@ func _apply(id: int, action: Dictionary) -> void:
|
||||
game.attack(cr, t)
|
||||
"draw":
|
||||
game.draw(p)
|
||||
"fuse":
|
||||
var a := game.find_creature(int(action.get("uid", -1)))
|
||||
var b := game.find_creature(int(action.get("other", -1)))
|
||||
"fuse": # zwei Wesen (uid, other) oder zwei Handkarten (hand, other_hand)
|
||||
var a = game.find_creature(int(action.get("uid", -1)))
|
||||
var b = game.find_creature(int(action.get("other", -1)))
|
||||
var i := int(action.get("hand", -1))
|
||||
var j := int(action.get("other_hand", -1))
|
||||
if a == null and i >= 0 and j >= 0 and i < p.hand.size() and j < p.hand.size():
|
||||
a = p.hand[i]
|
||||
b = p.hand[j]
|
||||
if a != null and b != null:
|
||||
game.fuse(p, a, b)
|
||||
"end":
|
||||
|
||||
Reference in New Issue
Block a user