How often do mysterious wanderers give loot back?

Solution 1:

Taken from the wiki:

The Mysterious Wanderer: Wood

A mysterious wanderer arrives with a cart. He asks for wood and promises to come back with more. The player can choose to ignore them, give 100 wood for a 50% chance of receiving 300 wood in 1 minute, or give 500 wood for a 30% chance of receiving 1500 wood in 1 minute.

The Mysterious Wanderer: Fur

A mysterious wanderer arrives with a cart. She asks for fur and promises to come back with more. The player can choose to ignore them, give 100 fur for a 50% chance of receiving 300 fur in 1 minute, or give 500 fur for a 30% chance of receiving 1500 fur in 1 minute.

Excerpt from the code on github:

Room Events code:

We can see from the code that

  • giving 100 wood/fur has 50% chance to return 300.

  • giving 500 wood/fur has 30% chance to return 1500.

Here is relevant code:

{ /* Mysterious Wanderer  --  wood gambling */
    title: _('The Mysterious Wanderer'),
    isAvailable: function() {
        return Engine.activeModule == Room && $SM.get('stores.wood');
    },
    scenes: {
        start: {
            text: [
                _('a wanderer arrives with an empty cart. says if he leaves with wood, he\'ll be back with more.'),
                _("builder's not sure he's to be trusted.")
            ],
            notification: _('a mysterious wanderer arrives'),
            blink: true,
            buttons: {
                '100wood': {
                    text: _('give 100'),
                    cost: {wood: 100},
                    nextScene: { 1: '100wood'}
                },
                '500wood': {
                    text: _('give 500'),
                    cost: {wood: 500},
                    nextScene: { 1: '500wood' }
                },
                'deny': {
                    text: _('turn him away'),
                    nextScene: 'end'
                }
            }
        },
        '100wood': {
            text: [
                _('the wanderer leaves, cart loaded with wood')
            ],
            onLoad: function() {
                if(Math.random() < 0.5) {
                    Engine.setTimeout(function() {
                        $SM.add('stores.wood', 300);
                        Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
                    }, 60 * 1000);
                }
            },
            buttons: {
                'leave': {
                    text: _('say goodbye'),
                    nextScene: 'end'
                }
            }
        },
        '500wood': {
            text: [
                _('the wanderer leaves, cart loaded with wood')
            ],
            onLoad: function() {
                if(Math.random() < 0.3) {
                    Engine.setTimeout(function() {
                        $SM.add('stores.wood', 1500);
                        Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
                    }, 60 * 1000);
                }
            },
            buttons: {
                'leave': {
                    text: _('say goodbye'),
                    nextScene: 'end'
                }
            }
        }
    }
},

{ /* Mysterious Wanderer  --  fur gambling */
    title: _('The Mysterious Wanderer'),
    isAvailable: function() {
        return Engine.activeModule == Room && $SM.get('stores.fur');
    },
    scenes: {
        start: {
            text: [
                _('a wanderer arrives with an empty cart. says if she leaves with furs, she\'ll be back with more.'),
                _("builder's not sure she's to be trusted.")
            ],
            notification: _('a mysterious wanderer arrives'),
            blink: true,
            buttons: {
                '100fur': {
                    text: _('give 100'),
                    cost: {fur: 100},
                    nextScene: { 1: '100fur'}
                },
                '500fur': {
                    text: _('give 500'),
                    cost: {fur: 500},
                    nextScene: { 1: '500fur' }
                },
                'deny': {
                    text: _('turn her away'),
                    nextScene: 'end'
                }
            }
        },
        '100fur': {
            text: [
                _('the wanderer leaves, cart loaded with furs')
            ],
            onLoad: function() {
                if(Math.random() < 0.5) {
                    Engine.setTimeout(function() {
                        $SM.add('stores.fur', 300);
                        Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
                    }, 60 * 1000);
                }
            },
            buttons: {
                'leave': {
                    text: _('say goodbye'),
                    nextScene: 'end'
                }
            }
        },
        '500fur': {
            text: [
                _('the wanderer leaves, cart loaded with furs')
            ],
            onLoad: function() {
                if(Math.random() < 0.3) {
                    Engine.setTimeout(function() {
                        $SM.add('stores.fur', 1500);
                        Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
                    }, 60 * 1000);
                }
            },
            buttons: {
                'leave': {
                    text: _('say goodbye'),
                    nextScene: 'end'
                }
            }
        }
    }
},