Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for slot _choices_ in upgrade card text #82

Open
spiegela opened this issue Mar 27, 2017 · 3 comments
Open

Add support for slot _choices_ in upgrade card text #82

spiegela opened this issue Mar 27, 2017 · 3 comments

Comments

@spiegela
Copy link
Contributor

There is only one example of this that I know of, but the "Heavy Scyk" Interceptor card allows for a choice of multiple upgrade slots. To support this, we could extend the format of grants in a couple different ways:

...
    "grants": [
      { "type": "oneOf",
        "values": [
          {
            "type": "slot",
            "name": "Cannon"
          },
          {
            "type": "slot",
            "name": "Torpedo"
          },
          {
            "type": "slot",
            "name": "Missile"
          }
        ]
      },
      {
        "type": "stats",
        "name": "hull",
        "value": 1
      }
    ]
...

Thoughts?

@jesseflorig
Copy link

I think this could benefit from my comment in #81 making it something like:

...
    "shipMods": {
        "chooseAddSlot": [
          "Cannon",
          "Torpedo",
          "Missile"
        ],
        "hull": 1
      },
    ]
...

@philtomblin
Copy link

philtomblin commented May 18, 2017

I'd suggest something similar to Jesse's comment, which I think is more elegant, but taking account of my comment in #81. Like this:

{
    "name": "\"Heavy Scyk\" Interceptor",
    "id": 165,
    "slot": "Title",
    "points": 2,
    "ship": [
      "M3-A Interceptor"
    ],
    "text": "Your upgrade bar gains the [Cannon], [Torpedo] or [Missile] upgrade icon.<br /><br />Increase your hull value by 1.",
    "image": "upgrades/Title/heavy-scyk-interceptor.png",
    "xws": "heavyscykinterceptor",
    "grants": [
      {
        "type": "stats",
        "name": "hull",
        "value": 1
      },
      {
        "type": "slotChoice",
        "choice": [
          "Cannon",
          "Torpedo",
          "Missile"
        ],
        "value": 1
      }
    ]
  },

I'm happy to make the change if we can agree an approach...

@philtomblin
Copy link

Okay, I've submitted a pull request to address this issue.

Comments welcome...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants