Class CommunityService

Properties

BoozeDrop: CommunityService = ...
CoilWire: CommunityService = ...
FamiliarWeight: CommunityService = ...
HotRes: CommunityService = ...
log: {
    [index: string]: {
        predictedTurns: number;
        seconds: number;
        turnCost: number;
        type: "test" | "task";
    };
} = {}

A log of the predicted turns, actual turns, and duration of each CS test performed.

Moxie: CommunityService = ...
Muscle: CommunityService = ...
Mysticality: CommunityService = ...
Noncombat: CommunityService = ...
path: Path = ...
SpellDamage: CommunityService = ...
WeaponDamage: CommunityService = ...

Accessors

Methods

  • Checks council.php for the number of turns this test will take; more reliable than prediction, but requires an additional pagehit.

    Returns number

    The number of turns to complete this test according to council.php.

  • Checks the "csServicesPerformed" property to see whether mafia currently believes this test is complete.

    Returns boolean

    Whether mafia currently believes this test is complete.

  • Wrapper function that prepares for a test and then completes it, adding time and turn details to the log.

    Parameters

    • prepare: (() => number | void)

      A function that does all necessary preparations for this CS test, including choosing your outfit. Optionally returns the number of turns you expect to spend preparing for the test.

        • (): number | void
        • Returns number | void

    • maxTurns: number = Infinity

      We will run the test iff the predicted/actual turns is less than or equal to this parameter.

    Returns "completed" | "failed" | "already completed"

    "completed", "failed", or "already completed".

  • Parameters

    • Rest...effects: Effect[]

      A spread array of Effects to consider

    Returns number

    The number of turns we expect to save if we start using those effects

  • Checks council.php to verify that a test is complete; more reliable than isDone, but requires an additional pagehit.

    Returns boolean

    Whether council.php suggests that the test is complete.

  • Prints turncount and time details of the test in question.

    Parameters

    • colour: string = "blue"

      The colour (or color) you'd like the log to be printed in.

    Returns void