-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from mardanbeigi/main
40k: 10th tweaks and fixes
- Loading branch information
Showing
77 changed files
with
28,289 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
node_modules | ||
#dist | ||
.idea | ||
.vscode/settings.json | ||
/dist/app* | ||
/dist/main* | ||
/dist/renderer* | ||
/dist/roster* | ||
/dist/app* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
import { readZippedRosterFile } from '../helpers/readRosterFile'; | ||
import { Wh40k } from "../../src/roster40k10th"; | ||
|
||
function mapWithKeys(keys: string[]) { | ||
return new Map(keys.map(e => [e, jasmine.any(String)])); | ||
} | ||
|
||
describe("CreateRoster", function() { | ||
it("loads test/40k10th/Necrons 10e.rosz", async function() { | ||
const doc = await readZippedRosterFile('test/40k10th/Necrons 10e.rosz'); | ||
const roster = Wh40k.CreateRoster(doc); | ||
|
||
expect(roster).toEqual( | ||
jasmine.objectContaining({ | ||
'_cost': jasmine.objectContaining({_points: 1205}), | ||
'_forces': [ | ||
jasmine.objectContaining({ | ||
'_configurations': [ | ||
"Detachment Choice: Awakened Dynasty", | ||
"Battle Size: 2. Strike Force (2000 Point limit)", | ||
"Show Legends", | ||
], | ||
'_units': [ | ||
jasmine.objectContaining({ | ||
'_name': "The Silent King", | ||
'_cost': jasmine.objectContaining({_points: 470}), | ||
'_profileTables': { | ||
"Melee Weapons": jasmine.objectContaining({ | ||
'_headers': ["Melee Weapons","Range","A","WS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Scythe of Dust"]), | ||
jasmine.arrayContaining(["Close combat weapon"]), | ||
], | ||
}), | ||
"Ranged Weapons": jasmine.objectContaining({ | ||
'_headers': ["Ranged Weapons","Range","A","BS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Sceptre of Eternal Glory"]), | ||
jasmine.arrayContaining(["Staff of Stars"]), | ||
jasmine.arrayContaining(["Annihilator beam"]), | ||
], | ||
}), | ||
"Unit": jasmine.objectContaining({ | ||
'_headers': ["Unit","M","T","SV","W","LD","OC"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Szarekh"]), | ||
jasmine.arrayContaining(["Triarchal Menhir"]), | ||
], | ||
}) | ||
}, | ||
'_modelList': [ | ||
"Szarekh (Sceptre of Eternal Glory, Scythe of Dust, Staff of Stars)", | ||
"2x Triarchal Menhir (Annihilator beam, Close combat weapon)", | ||
"Unit Upgrades (Warlord)" | ||
], | ||
'_rules': mapWithKeys(["Command Protocols", "Deadly Demise D6+3 (Szarekh model only)", "Devastating Wounds", "Indirect Fire", "Lethal Hits", "Reanimation Protocols"]), | ||
'_abilities': { | ||
"Abilities": mapWithKeys(["Damaged: 1-6 wounds remaining", "Invulnerable Save", "The Silent King", "Triarchal Menhirs", "Voice of the Triarch"]), | ||
"Triarch Abilities": mapWithKeys(["Bringer of Unity (Aura)", "Phaeron of the Blades (Aura)", "Phaeron of the Stars (Aura)"]), | ||
}}), | ||
jasmine.objectContaining({ | ||
'_name': "Overlord", | ||
'_cost': jasmine.objectContaining({_points: 85}), | ||
'_profileTables': { | ||
"Melee Weapons": jasmine.objectContaining({ | ||
'_headers': ["Melee Weapons","Range","A","WS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Overlord's blade"]), | ||
], | ||
}), | ||
"Ranged Weapons": jasmine.objectContaining({ | ||
'_headers': ["Ranged Weapons","Range","A","BS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Tachyon arrow"]), | ||
], | ||
}), | ||
"Unit": jasmine.objectContaining({ | ||
'_headers': ["Unit","M","T","SV","W","LD","OC"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Overlord"]), | ||
], | ||
}) | ||
}, | ||
'_modelList': [ | ||
"Overlord (Overlord's blade, Tachyon arrow)" | ||
], | ||
'_rules': mapWithKeys(["Command Protocols", "Devastating Wounds", "Leader", "One Shot", "Reanimation Protocols"]), | ||
'_abilities': { | ||
"Abilities": mapWithKeys(["Implacable Resilience", "Invulnerable Save", "Leader", "My Will Be Done"]), | ||
}}), | ||
jasmine.objectContaining({ | ||
'_name': "Doom Scythe", | ||
'_cost': jasmine.objectContaining({_points: 225}), | ||
'_profileTables': { | ||
"Melee Weapons": jasmine.objectContaining({ | ||
'_headers': ["Melee Weapons","Range","A","WS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Armoured bulk"]), | ||
], | ||
}), | ||
"Ranged Weapons": jasmine.objectContaining({ | ||
'_headers': ["Ranged Weapons","Range","A","BS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Heavy death ray"]), | ||
jasmine.arrayContaining(["Twin tesla destructor"]), | ||
], | ||
}), | ||
"Unit": jasmine.objectContaining({ | ||
'_headers': ["Unit","M","T","SV","W","LD","OC"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Doom Scythe"]), | ||
], | ||
}) | ||
}, | ||
'_modelList': [ | ||
"Doom Scythe (Armoured bulk, Heavy death ray, Twin tesla destructor)" | ||
], | ||
'_rules': mapWithKeys(["Command Protocols", "Deadly Demise D3", "Reanimation Protocols", "Sustained Hits", "Twin-linked"]), | ||
'_abilities': { | ||
"Abilities": mapWithKeys(["Atavistic Instigation", "Damaged: 1-4 wounds remaining"]), | ||
}}), | ||
jasmine.objectContaining({ | ||
'_name': "Tesseract Vault", | ||
'_cost': jasmine.objectContaining({_points: 425}), | ||
'_profileTables': { | ||
"C'tan Powers": jasmine.objectContaining({ | ||
'_headers': ["C'tan Powers","Range","A","BS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Cosmic Fire"]), | ||
jasmine.arrayContaining(["Time's Arrow"]), | ||
jasmine.arrayContaining(["Antimatter Meteor"]), | ||
], | ||
}), | ||
"Melee Weapons": jasmine.objectContaining({ | ||
'_headers': ["Melee Weapons","Range","A","WS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Armoured bulk"]), | ||
], | ||
}), | ||
"Ranged Weapons": jasmine.objectContaining({ | ||
'_headers': ["Ranged Weapons","Range","A","BS","S","AP","D","Keywords"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Tesla sphere"]), | ||
], | ||
}), | ||
"Unit": jasmine.objectContaining({ | ||
'_headers': ["Unit","M","T","SV","W","LD","OC"], | ||
'_contents': [ | ||
jasmine.arrayContaining(["Tesseract Vault"]), | ||
], | ||
}) | ||
}, | ||
'_modelList': [ | ||
"Tesseract Vault (Armoured bulk, C'tan Powers, 4x Tesla sphere)" | ||
], | ||
'_rules': mapWithKeys(["Anti-", "Blast", "Command Protocols", "Deadly Demise D6+3", "Devastating Wounds", "Ignores Cover", "Indirect Fire", "Precision", "Reanimation Protocols", "Sustained Hits", "Torrent"]), | ||
'_abilities': { | ||
"Abilities": mapWithKeys(["Damaged: 1-8 wounds remaining", "Invulnerable Save", "Powers of the C’tan"]), | ||
}}), | ||
], | ||
'_rules': new Map([ | ||
["Devastating Wounds", jasmine.any(String)], | ||
["One Shot", jasmine.any(String)], | ||
["Command Protocols", jasmine.any(String)], | ||
["Leader", jasmine.any(String)], | ||
["Reanimation Protocols", jasmine.any(String)], | ||
["Anti-", jasmine.any(String)], | ||
["Sustained Hits", jasmine.any(String)], | ||
["Blast", jasmine.any(String)], | ||
["Indirect Fire", jasmine.any(String)], | ||
["Ignores Cover", jasmine.any(String)], | ||
["Torrent", jasmine.any(String)], | ||
["Precision", jasmine.any(String)], | ||
["Deadly Demise D6+3", jasmine.any(String)], | ||
["Lethal Hits", jasmine.any(String)], | ||
["Deadly Demise D6+3 (Szarekh model only)", jasmine.any(String)], | ||
["Twin-linked", jasmine.any(String)], | ||
["Deadly Demise D3", jasmine.any(String)], | ||
]), | ||
'_factionRules': new Map(), | ||
}), | ||
]})); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
spec/BlackTemplar-TestOutputSpec.ts → spec/40k8th/BlackTemplar-TestOutputSpec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
spec/BlackTemplar2000Spec.ts → spec/40k8th/BlackTemplar2000Spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
spec/DeathGuardand1000SonsSpec.ts → spec/40k8th/DeathGuardand1000SonsSpec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.