Skip to content

Commit

Permalink
Wave 4 pilot and ship updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
guidokessels committed Jun 25, 2019
1 parent 4c00f13 commit 433c6df
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 11 deletions.
10 changes: 10 additions & 0 deletions data/conditions/conditions.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,15 @@
"name": "Suppressive Fire",
"ability": "While you perform an attack against a ship other than Captain Rex, roll 1 fewer attack die. After Captain Rex defends, remove this card. At the end of the Combat phase, if Captain Rex did not perform an attack this phase, remove this card. After Captain Rex is destroyed, remove this card.",
"xws": "suppressivefire"
},
{
"name": "Decoyed",
"ability": "While you defend, each friendly Naboo Handmaiden in the attack arc may spend 1 evade token to change one of your results to an [Evade] result. If you are a Naboo Royal N-1 Starfighter, each friendly Naboo Handmaiden in the attack may spend 1 evade token to add 1 [Evade] result instead.",
"xws": "decoyed"
},
{
"name": "Compromising Intel",
"ability": "During the System Phase, if the enemy Vi Moradi is at range 0-3, flip your dial faceup. While you defend or perform an attack against the enemy Vi Moradi, you cannot spend focus tokens.",
"xws": "compromisingintel"
}
]
13 changes: 10 additions & 3 deletions data/pilots/galactic-republic/naboo-royal-n-1-starfighter.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"xws": "anakinskywalker-nabooroyaln1starfighter",
"hyperspace": false,
"ability": "Before you reveal your maneuver, you may spend 1 [Force] to barrel roll (this is not an action).",
"force": { "value": 1, "recovers": 1, "side": ["light"] },
"shipAbility": {
"name": "Full Throttle",
"text": "After you fully execute a speed 3-5 maneuver, you may perform an [Evade] action."
Expand All @@ -57,7 +58,8 @@
"text": "After you fully execute a speed 3-5 maneuver, you may perform an [Evade] action."
},
"caption": "Bravo Leader",
"hyperspace": false
"hyperspace": false,
"ability": "While you defend or perform a primary attack, if the speed of yor revealed maneuver is higher than the enemy ship's, roll 1 additional die."
},
{
"name": "Padmé Amidala",
Expand All @@ -75,13 +77,15 @@
{
"name": "Dineé Ellberger",
"xws": "dineeellberger",
"caption": "Bravo Five",
"initiative": 3,
"limited": 1,
"shipAbility": {
"name": "Full Throttle",
"text": "After you fully execute a speed 3-5 maneuver, you may perform an [Evade] action."
},
"hyperspace": false
"hyperspace": false,
"ability": "While you defend or perform an attack, if the speed of your revealed maneuver is the same as the enemy ship's, that ship's dice cannot be modified."
},
{
"name": "Bravo Flight Officer",
Expand All @@ -98,13 +102,16 @@
{
"name": "Naboo Handmaiden",
"xws": "naboohandmaiden",
"caption": "Regal Ruse",
"initiative": 1,
"limited": 2,
"shipAbility": {
"name": "Full Throttle",
"text": "After you fully execute a speed 3-5 maneuver, you may perform an [Evade] action."
},
"hyperspace": false
"hyperspace": false,
"conditions": ["decoyed"],
"ability": "Setup: After placing forces, assign the Decoyed condition to 1 friendly ship other than Naboo Handmaiden."
}
]
}
15 changes: 13 additions & 2 deletions data/pilots/resistance/resistance-transport-pod.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"xws": "bb8",
"initiative": 3,
"limited": 1,
"hyperspace": false
"hyperspace": false,
"ability": "During the System Phase, you may perform a red [Barrel Roll] or [Boost] action."
},
{
"name": "Rose Tico",
Expand All @@ -56,7 +57,17 @@
"limited": 1,
"caption": "Starling",
"hyperspace": false,
"ability": "Setup: After placing forces, assign the Compromising Intel condition to 1 enemy ship."
"ability": "Setup: After placing forces, assign the Compromising Intel condition to 1 enemy ship.",
"conditions": ["compromisingintel"]
},
{
"name": "Finn",
"xws": "finn",
"initiative": 2,
"limited": 1,
"caption": "Big Deal",
"hyperspace": false,
"ability": "While you defend or perform an attack, you may add 1 blank result, or you may gain 1 strain token to add 1 focus result instead."
}
]
}
17 changes: 13 additions & 4 deletions data/pilots/resistance/resistance-transport.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,24 @@
"faction": "Resistance",
"stats": [
{ "arc": "Front Arc", "type": "attack", "value": 2 },
{ "type": "agility", "value": 1 }
{ "type": "agility", "value": 1 },
{ "type": "hull", "value": 5 },
{ "type": "shields", "value": 3 }
],
"actions": [
{ "difficulty": "White", "type": "Focus" },
{ "difficulty": "Red", "type": "Lock" },
{ "difficulty": "Red", "type": "Coordinate" },
{ "difficulty": "Red", "type": "Jam" }
],
"actions": [],
"pilots": [
{
"name": "Cova Nell",
"xws": "covanell",
"initiative": 4,
"limited": 1,
"hyperspace": false
"hyperspace": false,
"ability": "While you defend or perform a primary attack, if your revealed maneuver is red, roll 1 additional die."
},
{
"name": "Pammich Nerro Goode",
Expand All @@ -49,7 +57,8 @@
"xws": "nodinchavdri",
"initiative": 2,
"limited": 1,
"hyperspace": false
"hyperspace": false,
"ability": "After you coordinate or are coordinated, if you have 2 or fewer stress tokens, you may perform 1 action on your action bar as a red action, even if you are stressed."
},
{
"name": "Logistics Division Pilot",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"xws": "separatistbomber",
"initiative": 3,
"limited": 0,
"text": "The droid armies of the Separatists are callous of the plight of civilians and make not effort to limit collateral damage.",
"text": "The droid armies of the Separatists are callous to the plight of civilians and make not effort to limit collateral damage.",
"image": "https://images-cdn.fantasyflightgames.com/filer_public/5d/88/5d88fdec-55d6-4ea4-9fa1-af79d0ca5fcd/swz41_separatist-bomber.png",
"shipAbility": {
"name": "Networked Calculations",
Expand Down
26 changes: 25 additions & 1 deletion tests/helpers/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,29 @@ const validatePilotXWSId = id => {
}
};

const loadConditions = () => {
return require(`../../${manifest.conditions}`);
};

const getConditions = () => {
if (!loadedData.conditions) {
loadedData.conditions = loadConditions();
}
return loadedData.conditions;
};

const getConditionXWSIds = () => {
const conditions = getConditions();
return conditions.map(c => c.xws).filter(Boolean);
};

const validateConditionXWSId = id => {
const ids = getConditionXWSIds();
if (ids.indexOf(id) === -1) {
throw new Error(`Condition with xws id "${id}" does not exist`);
}
};

const loadUpgrades = () => {
const allUpgrades = [];

Expand Down Expand Up @@ -102,5 +125,6 @@ module.exports = {
getPilotXWSIds,
validatePilotXWSId,
getUpgradesXWSIds,
validateUpgradeXWSIdForSlot
validateUpgradeXWSIdForSlot,
validateConditionXWSId
};
4 changes: 4 additions & 0 deletions tests/pilots.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { checkKeywordsInString } = require("./helpers/keywords");
const { validateConditionXWSId } = require("./helpers/data");
const { matchers } = require("jest-json-schema");
expect.extend(matchers);

Expand Down Expand Up @@ -30,6 +31,9 @@ pilotFiles.forEach(({ faction, ships }) => {
if (p.shipAbility) {
checkKeywordsInString(p.shipAbility.text);
}
if (p.conditions) {
p.conditions.forEach(c => validateConditionXWSId(c));
}
});
});
});
Expand Down
4 changes: 4 additions & 0 deletions tests/upgrades.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require("path");
const { checkKeywordsInString } = require("./helpers/keywords");
const { validateConditionXWSId } = require("./helpers/data");
const { matchers } = require("jest-json-schema");
expect.extend(matchers);

Expand All @@ -22,6 +23,9 @@ describe("Upgrades", () => {
if (side.ability) {
checkKeywordsInString(side.ability);
}
if (side.conditions) {
side.conditions.forEach(c => validateConditionXWSId(c));
}
});
});
});
Expand Down

0 comments on commit 433c6df

Please sign in to comment.