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

Full support for grant/revoke within upgrades #92

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 129 additions & 31 deletions data/upgrades.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,8 @@
"grants": [
{
"type": "slot",
"name": "Elite"
"name": "Elite",
"value": 1
}
]
},
Expand Down Expand Up @@ -1164,7 +1165,8 @@
"grants": [
{
"type": "slot",
"name": "Bomb"
"name": "Bomb",
"value": 1
}
]
},
Expand Down Expand Up @@ -1594,7 +1596,8 @@
"grants": [
{
"type": "slot",
"name": "Torpedo"
"name": "Torpedo",
"value": 1
}
],
"xws": "slavei"
Expand Down Expand Up @@ -1657,7 +1660,8 @@
"grants": [
{
"type": "slot",
"name": "Modification"
"name": "Modification",
"value": 1
}
],
"xws": "royalguardtie"
Expand Down Expand Up @@ -1688,7 +1692,8 @@
"grants": [
{
"type": "slot",
"name": "Elite"
"name": "Elite",
"value": 1
}
],
"xws": "awingtestpilot"
Expand All @@ -1708,11 +1713,13 @@
"grants": [
{
"type": "slot",
"name": "Crew"
"name": "Crew",
"value": 1
},
{
"type": "slot",
"name": "Team"
"name": "Team",
"value": 1
}
]
},
Expand Down Expand Up @@ -1813,6 +1820,15 @@
"type": "stats",
"name": "hull",
"value": 1
},
{
"type": "slotChoice",
"slotChoices": [
"Cannon",
"Torpedo",
"Missile"
],
"value": 1
}
]
},
Expand Down Expand Up @@ -1842,11 +1858,13 @@
"grants": [
{
"type": "slot",
"name": "System"
"name": "System",
"value": 1
},
{
"type": "slot",
"name": "Illicit"
"name": "Illicit",
"value": 1
}
],
"xws": "virago"
Expand All @@ -1865,11 +1883,8 @@
"grants": [
{
"type": "slot",
"name": "Bomb"
},
{
"type": "slot",
"name": "Bomb"
"name": "Bomb",
"value": 2
}
],
"xws": "andrasta"
Expand Down Expand Up @@ -1899,7 +1914,8 @@
"grants": [
{
"type": "slot",
"name": "System"
"name": "System",
"value": 1
}
],
"xws": "tiex1"
Expand Down Expand Up @@ -2103,7 +2119,8 @@
"grants": [
{
"type": "slot",
"name": "Crew"
"name": "Crew",
"value": 1
}
],
"xws": "bwinge2"
Expand Down Expand Up @@ -2535,7 +2552,8 @@
"grants": [
{
"type": "slot",
"name": "Bomb"
"name": "Bomb",
"value": 1
}
]
},
Expand All @@ -2550,7 +2568,21 @@
"TIE Defender"
],
"id": 219,
"xws": "tiex7"
"xws": "tiex7",
"grants": [
{
"type": "slot",
"name": "Cannon",
"value": 0,
"revoke": true
},
{
"type": "slot",
"name": "Missile",
"value": 0,
"revoke": true
}
]
},
{
"image": "upgrades/Title/tie-d.png",
Expand Down Expand Up @@ -2578,11 +2610,26 @@
"grants": [
{
"type": "slot",
"name": "Crew"
"name": "Torpedo",
"value": 0,
"revoke": true
},
{
"type": "slot",
"name": "Crew"
"name": "Missile",
"value": 0,
"revoke": true
},
{
"type": "slot",
"name": "Bomb",
"value": 0,
"revoke": true
},
{
"type": "slot",
"name": "Crew",
"value": 2
}
]
},
Expand Down Expand Up @@ -2708,7 +2755,14 @@
"xws": "adaptability",
"points": 0,
"slot": "Elite",
"id": 232
"id": 232,
"grants": [
{
"type": "stats",
"name": "skill",
"value": -1
}
]
},
{
"image": "upgrades/Elite/adaptability-increase.png",
Expand All @@ -2717,7 +2771,14 @@
"xws": "adaptability",
"points": 0,
"slot": "Elite",
"id": 233
"id": 233,
"grants": [
{
"type": "stats",
"name": "skill",
"value": 1
}
]
},
{
"image": "upgrades/System/electronic-baffle.png",
Expand Down Expand Up @@ -3051,11 +3112,13 @@
"grants": [
{
"type": "slot",
"name": "Crew"
"name": "Crew",
"value": 1
},
{
"type": "slot",
"name": "Illicit"
"name": "Illicit",
"value": 1
}
]
},
Expand Down Expand Up @@ -3154,7 +3217,14 @@
"ship": [
"U-Wing"
],
"id": 271
"id": 271,
"grants": [
{
"type": "stats",
"name": "agility",
"value": 1
}
]
},
{
"image": "upgrades/Title/pivot-wing-landing.png",
Expand Down Expand Up @@ -3184,7 +3254,13 @@
"grants": [
{
"type": "slot",
"name": "Illicit"
"name": "Illicit",
"value": 1
},
{
"type": "slot",
"name": "Modification",
"value": 1
}
]
},
Expand Down Expand Up @@ -3528,11 +3604,18 @@
"grants": [
{
"type": "slot",
"name": "Crew"
"name": "Crew",
"value": 1
},
{
"type": "slot",
"name": "Team",
"value": 1
},
{
"type": "slot",
"name": "Team"
"name": "Cargo",
"value": -1
}
]
},
Expand All @@ -3546,7 +3629,15 @@
"ship": [
"M3-A Interceptor"
],
"id": 303
"id": 303,
"grants": [
{
"type": "slot",
"name": "Modification",
"value": 0,
"revoke": true
}
]
},
{
"image": "upgrades/Crew/boshek.png",
Expand Down Expand Up @@ -3667,11 +3758,18 @@
"grants": [
{
"type": "slot",
"name": "System"
"name": "System",
"value": 1
},
{
"type": "slot",
"name": "Salvaged Astromech",
"value": 1
},
{
"type": "slot",
"name": "Salvaged Astromech"
"name": "Crew",
"value": -1
}
],
"id": 313
Expand Down
41 changes: 41 additions & 0 deletions schemas/upgrades.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,54 @@
"enum": [
"slot"
]
},
"value": {
"type": "integer",
"description": "The value of the modifier."
},
"revoke": {
"type": "boolean",
"description": "Indicates whether all (i.e. unknown number of) instances of the slot type are revoked."
}
},
"required": [
"value",
"name",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"description": "The modifier granted by this upgrade (slot choice).",
"properties": {
"type": {
"type": "string",
"description": "This upgrade grants a slot choice.",
"enum": [
"slotChoice"
]
},
"value": {
"type": "integer",
"description": "The number of choices that can be selected."
},
"slotChoices": {
"type": "array",
"description": "The list of slot choices.",
"uniqueItems": false,
"items": {
"description": "A slot choice.",
"$ref": "definitions.json#/definitions/slot"
}
}
},
"required": [
"value",
"slotChoices",
"type"
],
"additionalProperties": false
}
]
}
Expand Down