summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts23
1 files changed, 5 insertions, 18 deletions
diff --git a/rules.ts b/rules.ts
index ebd1ab0..0221d33 100644
--- a/rules.ts
+++ b/rules.ts
@@ -2065,48 +2065,36 @@ function parley_ic_cost(lord: Lord, spend: number) {
return cost
}
-function common_ic_success(_lord: Lord, _report: boolean) {
+function common_ic_success(_lord: Lord) {
return false
}
-function vassal_ic_success(lord: Lord, report: boolean) {
+function vassal_ic_success(lord: Lord) {
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: Lord, report: boolean) {
+function parley_ic_success(lord: Lord) {
if (is_levy_phase()) {
if (game.levy_flags.jack_cade > 0) {
- if (report)
- logcap(EVENT_YORK_JACK_CADE) // TODO
return true
} else {
if (game.levy_flags.parliament_votes > 0) {
- if (report)
- logevent(EVENT_LANCASTER_PARLIAMENT_VOTES) // TODO
return true
}
if (game.levy_flags.succession > 0) {
- if (report)
- logevent(EVENT_YORK_SUCCESSION) // TODO
return true
}
}
} else {
if (lord === LORD_DEVON && get_lord_locale(lord) === LOC_EXETER && is_event_in_play(EVENT_YORK_DORSET)) {
- if (report)
- logcap(EVENT_YORK_DORSET)
return true
}
}
@@ -2200,7 +2188,7 @@ function parley_ic_rating(lord: Lord, spend: number, report: boolean) {
function prompt_influence_check(lord: Lord, calc=common_ic) {
let cost = calc.cost(lord, 0)
- if (calc.success(lord, false)) {
+ if (calc.success(lord)) {
view.prompt += ` Influence success for ${cost} IP.`
view.actions.check = [ 0 ]
} else {
@@ -2223,9 +2211,8 @@ function roll_influence_check(what: string, lord: Lord, spend: number, calc=comm
reduce_influence(cost)
- if (calc.success(lord, false)) {
+ if (calc.success(lord)) {
log(`${what}.`)
- calc.success(lord, true)
return true
} else {
let rating = Math.max(1, Math.min(5, calc.rating(lord, spend, false)))