Schemes aka Minion Projects

In the codebase, Schemes are called Minion Projects. You staff them with minions that fit criteria and send them to work for a number of turns. Minion Projects can optionally have a mana cost. Minion Projects can be repeatable (e.g. go on an expedition) or non-repeatable (e.g. invent the robo-doll).

Standalone Minion Project

Minion projects are always announced by an EventCard (show_after_card), and when they complete, that fires an EventCard too (completion_event_ids). Minion projects don’t actually do anything themselves when the project finishes, that’s the completion event card’s job. If you want it to do something novel, you’ll probably have to subclass EventCard to get that behaviour.

progress_event_ids even lets you fire EventCards in the middle of the project. It’s specified as a list of pairs: which turn to display on (where 1 is the next turn after starting), and the constant ID of the card to show. In the example below we can see the expedition will complete on the 2nd turn and on the 1st turn show a random mid-journey event. As always, an event deck can sub in for an Event Card.

        minion_project = MinionProjectDef(constant_id='minionproject.underworld_expedition_minion',
            name='Send Minions on an Underworld Expedition',
            desc='Send representatives to seek out tomes and artefacts',
            num_turns=2,
            minion_slots=[
                MinionCriteria('apprentice', display_str='buyer'),
                MinionCriteria('beast', display_str='guard'),
                MinionCriteria('beast', display_str='guard')
            ],
            is_repeatable=True,
            show_after_card='eventcard.underworld_expedition_intro',
            progress_event_ids=[(1, 'eventdeck.underworld_journey_minion')],
            completion_event_ids=['eventcard.pick_underworld_journey_item'])
        faust.MinionProject.all_projects.append(minion_project)

Minion Projects in a Side Quest

    quest_line.add_project_transition(
        name='Bribe OWG mole',
        before_stage='mole_known',
        after_stage='locker_found',
        desc='Find out what they know.',
        num_turns=1, mana_cost=50,
        slots=[MinionCriteria('concubine')],
        completion_event_ids=['eventcard.evidence_locker_ready'])

This will create both a quest transition and a Minion Project. The transition runs once the player completes the project. In this case, the project is called Bribe OWG mole and it requires paying 50 mana and sending a concubine away for 1 turn.