diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-31 18:42:23 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-31 18:45:11 +0200 |
commit | 2dbf41126f4ddc8fa69811b84c4a06a0abc25c60 (patch) | |
tree | 046550d03bcb26a4edff9b2bf62d6a033d4361c3 /rules.js | |
parent | cbfcfe09f1d6634798c6de487e51da8c58a0d113 (diff) | |
download | plantagenet-2dbf41126f4ddc8fa69811b84c4a06a0abc25c60.tar.gz |
show automatic success event/capability effects:
- earl of richmond
- two roses
- dorset
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1584,21 +1584,25 @@ function parley_ic_cost(lord, spend) { } return cost; } -function common_ic_success(_lord) { +function common_ic_success(_lord, _report) { return false; } -function vassal_ic_success(lord) { +function vassal_ic_success(lord, report) { if (game.active === LANCASTER) { if (is_event_in_play(EVENT_LANCASTER_THE_EARL_OF_RICHMOND)) { + if (report) + logevent(EVENT_LANCASTER_THE_EARL_OF_RICHMOND); return true; } if (lord_has_capability(lord, AOW_LANCASTER_TWO_ROSES)) { + if (report) + logcap(AOW_LANCASTER_TWO_ROSES); return true; } } return false; } -function parley_ic_success(lord) { +function parley_ic_success(lord, report) { if (is_levy_phase()) { if (game.levy_flags.jack_cade > 0) { return true; @@ -1614,6 +1618,8 @@ function parley_ic_success(lord) { } else { if (lord === LORD_DEVON && get_lord_locale(lord) === LOC_EXETER && is_event_in_play(EVENT_YORK_DORSET)) { + if (report) + logevent(EVENT_YORK_DORSET); return true; } } @@ -1701,7 +1707,7 @@ function parley_ic_rating(lord, spend, report) { } function prompt_influence_check(lord, calc = common_ic) { let cost = calc.cost(lord, 0); - if (calc.success(lord)) { + if (calc.success(lord, false)) { view.prompt += ` Influence success for ${cost} IP.`; view.actions.check = [0]; } @@ -1720,8 +1726,9 @@ function prompt_influence_check(lord, calc = common_ic) { function roll_influence_check(what, lord, spend, calc = common_ic) { let cost = calc.cost(lord, spend); reduce_influence(cost); - if (calc.success(lord)) { + if (calc.success(lord, false)) { log(`${what}.`); + calc.success(lord, true); return true; } else { |