update
This commit is contained in:
@@ -90,7 +90,7 @@ func setup(cfg: Dictionary) -> void:
|
||||
for i in int(cfg.ai):
|
||||
var b: Dictionary = bots[i] if i < bots.size() else {}
|
||||
seats.append({"peer": 0, "name": String(b.get("name", "Bot %d" % (i + 1))), "ai": true,
|
||||
"stufe": int(b.get("stufe", DiceAI.stufe)),
|
||||
"stufe": int(b.get("stufe", DiceAI.stufe)), "regler": b.get("regler", {}),
|
||||
"count": dice, "alive": true, "verwaist": false})
|
||||
|
||||
# Der Spielserver spielt nicht mit und bekommt deshalb keinen Platz.
|
||||
@@ -123,6 +123,9 @@ func setup(cfg: Dictionary) -> void:
|
||||
# Die Startmünze zieht nur der Host. Beim Client kommt sie mit dem
|
||||
# ersten Zustand, sonst läge dort kurz eine andere.
|
||||
hand[i] = [BoosterDB.zieh(rng)] if multiplayer.is_server() else []
|
||||
# Beute aus der Kampagne: eine gewählte Münze dazu, nur für den Spieler.
|
||||
if i == 0 and multiplayer.is_server() and String(cfg.get("beute", "")) != "":
|
||||
hand[i].append(String(cfg.beute))
|
||||
table.set_dice_count(i, seats[i].count)
|
||||
table.set_dice_visible(i, false)
|
||||
table.set_cup_down(i, i != local_seat)
|
||||
@@ -442,6 +445,7 @@ func _phase_bid() -> Dictionary:
|
||||
# Erst planen, dann passend dazu eine Münze werfen. Die kann die
|
||||
# Lage ändern - also danach noch einmal entscheiden.
|
||||
DiceAI.stufe = int(seats[turn].get("stufe", DiceAI.stufe))
|
||||
DiceAI.temperament = seats[turn].get("regler", {})
|
||||
var a := DiceAI.choose_action(host_values[turn], _total_dice(), bid,
|
||||
must_bid.get(turn, false), rng, _bot_wissen(turn))
|
||||
if await _bot_muenze(turn, a):
|
||||
@@ -460,6 +464,7 @@ func _phase_bid() -> Dictionary:
|
||||
return res
|
||||
else:
|
||||
# Zeit abgelaufen oder getrennt: automatisch entscheiden
|
||||
DiceAI.temperament = {}
|
||||
var a := DiceAI.choose_action(host_values[turn], _total_dice(), bid,
|
||||
must_bid.get(turn, false), rng, _bot_wissen(turn))
|
||||
_log("%s wird automatisch gespielt." % seats[turn].name)
|
||||
|
||||
Reference in New Issue
Block a user