Support paid current-turn travel deals
Verify and publish checkpoint container / container (push) Successful in 10m34s
Verify and publish checkpoint container / container (push) Successful in 10m34s
This commit is contained in:
1 parent
82c639c977
commit
a1b2aacbac
9 files changed
+371
-23
No files matched your search
+2
-2
@@ -42395,7 +42395,7 @@ function applyActionWithInitiator(state: Game, id: string, action: Action, initi
|
||||
if (action.type === 'dealOffer') {
|
||||
const keys = Object.keys(action).sort().join(',');
|
||||
const single = (keys === 'target,terms,type' || keys === 'payment,target,terms,type' ||
|
||||
keys === 'target,terms,travel,type') && typeof action.target === 'string';
|
||||
keys === 'target,terms,travel,type' || keys === 'payment,target,terms,travel,type') && typeof action.target === 'string';
|
||||
const multiple = (keys === 'targets,terms,type' || keys === 'payment,targets,terms,type') && Array.isArray(action.targets) &&
|
||||
action.targets.every(target => typeof target === 'string');
|
||||
const hasPayment = Object.hasOwn(action, 'payment');
|
||||
@@ -42413,7 +42413,7 @@ function applyActionWithInitiator(state: Game, id: string, action: Action, initi
|
||||
? createMultipartyPublicDeal(seats, id, action.targets as string[], action.terms as string, g.turn, event, payment!)
|
||||
: createMultipartyPublicDeal(seats, id, action.targets as string[], action.terms as string, g.turn, event));
|
||||
if (Object.hasOwn(action, 'travel')) {
|
||||
requireRule(single && !hasPayment && !g.advanced && g.expansions.length === 0 &&
|
||||
requireRule(single && !g.advanced && g.expansions.length === 0 &&
|
||||
nativePromiseScopeSupported(g), 'Choose a two-player travel agreement in a supported Basic table.');
|
||||
offer = publicDealRule(() => setPublicDealTravel(offer, action.travel, seats));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user