RanvierMUD / ranviermud

A node.js based MUD game engine
https://ranviermud.com
MIT License
796 stars 247 forks source link

Handle more than one resource cost for a skill #215

Closed seanohue closed 7 years ago

seanohue commented 7 years ago

Description

Right now, resource costs support this sort of configuration:

    resource: {
      // attribute to deduct the cost from
      attribute: 'energy',
      // amount to deduct
      cost: energyCost,
    },

It would be cool if we also supported this:

resource: [{
    attribute: 'energy',
    cost: energyCost,
}, {
    attribute: 'health',
    cost: healthCost,
}],

Expected outcome

I can configure a skill to use a single resource or an array of resource costs.

Actual outcome

I can only configure a skill to use a single resource cost.

Steps to reproduce

Attempt to create a skill with a cost of more than one resource, in a non-hacky fashion.

Version of Ranvier

1.0.1

seanohue commented 7 years ago

Resolved by #218