Skip to content

Commit

Permalink
Add SoB Battalions (fixes #1382)
Browse files Browse the repository at this point in the history
* adding SOB

* Update data formatting

* fixes #1381

Co-authored-by: Davis Ford <[email protected]>
  • Loading branch information
wspencermiller and daviseford authored Aug 23, 2021
1 parent c5e8fc6 commit d768a42
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 35 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"@auth0/auth0-react": "1.6.0",
"@reduxjs/toolkit": "1.6.1",
"@stripe/react-stripe-js": "1.4.1",
"@stripe/stripe-js": "1.17.0",
"@stripe/stripe-js": "1.17.1",
"bootstrap": "4.6.0",
"core-js": "3.16.1",
"core-js": "3.16.2",
"deepmerge": "4.2.2",
"jspdf": "1.5.3",
"lodash": "4.17.21",
Expand All @@ -21,7 +21,7 @@
"react": "17.0.2",
"react-beautiful-dnd": "13.1.0",
"react-bootstrap": "1.6.1",
"react-copy-to-clipboard": "5.0.3",
"react-copy-to-clipboard": "5.0.4",
"react-dom": "17.0.2",
"react-dropzone": "11.3.4",
"react-ga": "3.3.0",
Expand Down Expand Up @@ -88,7 +88,7 @@
"@types/parse5": "6.0.1",
"@types/pdfjs-dist": "2.7.1",
"@types/qs": "6.9.7",
"@types/react": "17.0.17",
"@types/react": "17.0.19",
"@types/react-beautiful-dnd": "13.1.1",
"@types/react-copy-to-clipboard": "5.0.1",
"@types/react-dom": "17.0.9",
Expand Down Expand Up @@ -116,4 +116,4 @@
"workbox-strategies": "6.2.4",
"xlsx": "0.17.0"
}
}
}
22 changes: 22 additions & 0 deletions src/factions/sons_of_behemat/battalions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { tagAs } from 'factions/metatagger'
import { MagnificentBattalionEffect, SwiftBattalionEffect } from 'generic_rules/core_battalions'
import { OneDropDeploymentEffect } from 'generic_rules/core_rules'
import rule_sources from './rule_sources'

// Battalions from White Dwarf August 2021
const Battalions = {
'Bosses of the Stomp - Unified': {
effects: [{ ...OneDropDeploymentEffect, rule_sources: [rule_sources.WHITE_DWARF_AUGUST_2021] }],
},
'Bosses of the Stomp - Magnificent': {
effects: [{ ...MagnificentBattalionEffect, rule_sources: [rule_sources.WHITE_DWARF_AUGUST_2021] }],
},
'Footsloggas - Unified': {
effects: [{ ...OneDropDeploymentEffect, rule_sources: [rule_sources.WHITE_DWARF_AUGUST_2021] }],
},
'Footsloggas - Swift': {
effects: [{ ...SwiftBattalionEffect, rule_sources: [rule_sources.WHITE_DWARF_AUGUST_2021] }],
},
}

export default tagAs(Battalions, 'battalion')
19 changes: 19 additions & 0 deletions src/factions/sons_of_behemat/grand_strategies.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { tagAs } from 'factions/metatagger'
import { END_OF_GAME } from 'types/phases'
import rule_sources from './rule_sources'

// SOB Specific grand strategy available from WD Aug 2021
const GrandStrategies = {
'Stomping Order': {
effects: [
{
name: `Make the Land Tremble`,
desc: `When the battle ends, you complete this grand strategy if any friendly units made a run or charge move in every battle round (it does not have to be the same unit that runs or makes a charge move in every battle round).`,
when: [END_OF_GAME],
rule_sources: [rule_sources.WHITE_DWARF_AUGUST_2021],
},
],
},
}

export default tagAs(GrandStrategies, 'grand_strategy')
4 changes: 4 additions & 0 deletions src/factions/sons_of_behemat/rule_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const rule_sources = {
type: 'errata',
url: 'https://www.warhammer-community.com/wp-content/uploads/2020/11/DFG60Pr3z7N58B4w.pdf',
},
WHITE_DWARF_AUGUST_2021: {
name: 'White Dwarf (August 2021)',
type: 'white_dwarf',
},
}

export default rule_sources
6 changes: 5 additions & 1 deletion src/factions/sons_of_behemat/subfactions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { SONS_OF_BEHEMAT } from 'meta/factions'
import Artifacts from './artifacts'
import Battalions from './battalions'
import command_abilities from './command_abilities'
import CommandTraits from './command_traits'
import Flavors from './flavors'
import GrandStrategies from './grand_strategies'
import Units from './units'

const subFactions = {
Expand All @@ -11,10 +13,12 @@ const subFactions = {

available: {
artifacts: [Artifacts],
battalions: [Battalions],
command_abilities: [command_abilities],
command_traits: [CommandTraits],
units: [Units],
grand_strategies: [GrandStrategies],
flavors: [Flavors],
units: [Units],
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion src/factions/sylvaneth/units.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ const Units = {
{
name: `Alarielle's Song`,
desc: `Add 1 to the Bravery characteristic of friendly Sylvaneth units wholly within 12" of any models with this ability. Subtract 1 from enemy unit bravery characterisitics while they are within 12" of any models with this ability.`,
when: [DURING_GAME],
when: [BATTLESHOCK_PHASE],
rule_sources: [meta_rule_sources.BOOK_BROKEN_REALMS_KRAGNOS],
},
{
Expand Down
24 changes: 12 additions & 12 deletions src/generic_rules/core_battalions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@ import {
} from 'types/phases'
import { OneDropDeploymentEffect } from './core_rules'

const ExpertEffect = {
export const ExpertBattalionEffect = {
name: `Expert`,
desc: `Once per battle, 1 unit from this battalion can receive the All-out Attack or All-out Defence command without the command being issued and without a command point being spent.`,
when: [SHOOTING_PHASE, COMBAT_PHASE],
rule_sources: [meta_rule_sources.CORE_RULES_2021],
shared: true,
}
const MagnificentEffect = {
export const MagnificentBattalionEffect = {
name: `Magnificent`,
desc: `When you pick enhancements for your army (see 27.3), you can pick 1 extra enhancement.`,
when: [START_OF_SETUP],
rule_sources: [meta_rule_sources.CORE_RULES_2021],
shared: true,
}
const SlayersEffect = {
export const SlayersBattalionEffect = {
name: `Slayers`,
desc: `Once per battle, 1 unit from this battalion can receive the All-out Attack or Unleash Hell command without the command being issued and without a command point being spent.`,
when: [SHOOTING_PHASE, COMBAT_PHASE, CHARGE_PHASE],
rule_sources: [meta_rule_sources.CORE_RULES_2021],
shared: true,
}
const StrategistsEffect = {
export const StrategistsBattalionEffect = {
name: `Strategists`,
desc: `Once per battle, when you receive command points at the start of your hero phase, you can receive 1 extra command point.`,
when: [START_OF_HERO_PHASE],
rule_sources: [meta_rule_sources.CORE_RULES_2021],
shared: true,
}
const SwiftEffect = {
export const SwiftBattalionEffect = {
name: `Swift`,
desc: `Once per battle, 1 unit from this battalion can receive the At the Double or Forward to Victory command without the command being issued and without a command point being spent.`,
when: [MOVEMENT_PHASE],
Expand All @@ -52,35 +52,35 @@ const SwiftEffect = {
const CoreBattalions: TEntry[] = [
{
name: 'Warlord',
effects: [StrategistsEffect, MagnificentEffect],
effects: [StrategistsBattalionEffect, MagnificentBattalionEffect],
},
{
name: 'Battle Regiment',
effects: [OneDropDeploymentEffect],
},
{
name: 'Grand Battery',
effects: [SlayersEffect],
effects: [SlayersBattalionEffect],
},
{
name: 'Vanguard',
effects: [SwiftEffect],
effects: [SwiftBattalionEffect],
},
{
name: 'Linebreaker',
effects: [ExpertEffect],
effects: [ExpertBattalionEffect],
},
{
name: 'Command Entourage',
effects: [StrategistsEffect, MagnificentEffect],
effects: [StrategistsBattalionEffect, MagnificentBattalionEffect],
},
{
name: 'Command Entourage - Magnificent',
effects: [MagnificentEffect],
effects: [MagnificentBattalionEffect],
},
{
name: 'Command Entourage - Strategists',
effects: [StrategistsEffect],
effects: [StrategistsBattalionEffect],
},
{
name: 'Alpha-Beast Pack',
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2325,10 +2325,10 @@
dependencies:
prop-types "^15.7.2"

"@stripe/[email protected].0":
version "1.17.0"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.17.0.tgz#1961aad0aa4d2f1609753c2807ed39baea025691"
integrity sha512-LztkapiDV+2bEjsmAL2QnmTQBJwx37VnvuBkgXxPe9cJr2jbK0UGzumxSZUiRXeUlgh5j3CXh5jsGFTdc3iv+Q==
"@stripe/[email protected].1":
version "1.17.1"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.17.1.tgz#afcb7e86d0b05d1a7af53af89111abd2e8d437ae"
integrity sha512-c9MyDvdi5Xou0j0JPNy86NebtTDfh9o62Ifuzx6GSm2YO0oedBpy51WSyOue2L8Fb+mqESS5gd6mGVEIPUnXsA==

"@surma/rollup-plugin-off-main-thread@^1.1.1":
version "1.4.2"
Expand Down Expand Up @@ -2756,10 +2756,10 @@
"@types/prop-types" "*"
csstype "^3.0.2"

"@types/[email protected].17":
version "17.0.17"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.17.tgz#1772d3d5425128e0635a716f49ef57c2955df055"
integrity sha512-nrfi7I13cAmrd0wje8czYpf5SFbryczCtPzFc6ijqvdjKcyA3tCvGxwchOUlxb2ucBPuJ9Y3oUqKrRqZvrz0lw==
"@types/[email protected].19":
version "17.0.19"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.19.tgz#8f2a85e8180a43b57966b237d26a29481dacc991"
integrity sha512-sX1HisdB1/ZESixMTGnMxH9TDe8Sk709734fEQZzCV/4lSu9kJCPbo2PbTRoZM+53Pp0P10hYVyReUueGwUi4A==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
Expand Down Expand Up @@ -4753,10 +4753,10 @@ core-js-pure@^3.0.0:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813"
integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==

[email protected].1:
version "3.16.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.1.tgz#f4485ce5c9f3c6a7cb18fa80488e08d362097249"
integrity sha512-AAkP8i35EbefU+JddyWi12AWE9f2N/qr/pwnDtWz4nyUIBGMJPX99ANFFRSw6FefM374lDujdtLDyhN2A/btHw==
[email protected].2:
version "3.16.2"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.2.tgz#3f485822889c7fc48ef463e35be5cc2a4a01a1f4"
integrity sha512-P0KPukO6OjMpjBtHSceAZEWlDD1M2Cpzpg6dBbrjFqFhBHe/BwhxaP820xKOjRn/lZRQirrCusIpLS/n2sgXLQ==

core-js@^2.4.0:
version "2.6.11"
Expand Down Expand Up @@ -11048,10 +11048,10 @@ [email protected]:
uncontrollable "^7.2.1"
warning "^4.0.3"

[email protected].3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.3.tgz#2a0623b1115a1d8c84144e9434d3342b5af41ab4"
integrity sha512-9S3j+m+UxDZOM0Qb8mhnT/rMR0NGSrj9A/073yz2DSxPMYhmYFBMYIdI2X4o8AjOjyFsSNxDRnCX6s/gRxpriw==
[email protected].4:
version "5.0.4"
resolved "https://registry.yarnpkg.com/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.4.tgz#42ec519b03eb9413b118af92d1780c403a5f19bf"
integrity sha512-IeVAiNVKjSPeGax/Gmkqfa/+PuMTBhutEvFUaMQLwE2tS0EXrAdgOpWDX26bWTXF3HrioorR7lr08NqeYUWQCQ==
dependencies:
copy-to-clipboard "^3"
prop-types "^15.5.8"
Expand Down

0 comments on commit d768a42

Please sign in to comment.