diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -2142,7 +2142,7 @@ states.campaign = { } } else if (game.decree.campaign.length < 4) { for (let s of SPACES[game.decree.campaign.at(-1)].adjacent) { - if (!game.decree.campaign.includes(s) && is_campaign_succ(s)) + if (!game.decree.campaign.includes(s) && is_campaign_succ(s) && has_valid_campaign_connection(s)) gen_action_space(s) } } @@ -2225,6 +2225,17 @@ function is_campaign_succ(s) { return true } +function has_valid_campaign_connection(s) { + if (game.decree.campaign.length === 3) + return true + + for (let ss of SPACES[s].adjacent) { + if (!game.decree.campaign.includes(ss)) + return true + } + return false +} + /* REBELS DECREES */ function can_build() { @@ -5801,11 +5812,17 @@ CODE[1 * 2 + 1] = [ [ vm_prompt, "Select a Space to move in Units and Attack for free." ], [ vm_space, true, 1, 1, (s)=>s ], [ vm_prompt, ()=>`Move up to ${8-game.vm.pl.length} units in the selected space.` ], + [ vm_mark_space ], [ vm_move_to, ()=>(game.vm.s), (p,s)=>(is_ds_unit(p) && is_piece_on_map(p) && !is_piece_in_event_space(p) && game.vm.pl.length < 8) ], + [ vm_if, ()=>(has_piece_faction(game.vm.s, BK) || has_piece_faction(game.vm.s, VE)) ], [ vm_to_rebel, BK ], [ vm_to_rebel, VE ], - [ vm_log, "" ], + [ vm_log_br ], [ vm_log, ()=>`Opposing Units to Rebelling in ${SPACE_NAME[game.vm.s]}` ], + [ vm_endif ], + [ vm_endspace ], + [ vm_prompt, "Free Attack in selected Space." ], + [ vm_space, true, 1, 1, (s)=>(s === game.vm.m[0] && can_attack_in_space(s)) ], [ vm_free_attack ], [ vm_endspace ], [ vm_return ], |