Skip to content

Commit

Permalink
feat: [#176] Updated Night Shift campaign material
Browse files Browse the repository at this point in the history
  • Loading branch information
annabranco committed Jan 25, 2021
1 parent abf2d6b commit f0f6a93
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 44 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/weapons/expandable-baton.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/zombies/ZombieCop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions src/components/SoundBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ const SoundBlock = ({
slotType !== IN_BACKPACK &&
type !== ITEMS &&
type !== WOUND &&
name === 'SniperRifle'
name === 'Sniper Rifle'
? 'Rifle'
: name;
: name.replace(' ', '');

const getImage = () => {
if (((trade && isMobile) || isMobile) && type !== ACTIVATIONS) {
Expand Down Expand Up @@ -112,8 +112,6 @@ const SoundBlock = ({
return <PlayText>{label || name}</PlayText>;
};

console.log('$$$ isMobile', isMobile);

const play = () => {
if (
type === WEAPONS &&
Expand Down Expand Up @@ -170,6 +168,7 @@ const SoundBlock = ({
<PlayImageButton
canAttack={canAttack}
isActive={isActive}
isText={!img}
damageMode={damageMode}
onClick={damageMode || trade || setupMode ? onClickCard : play}
setupMode={setupMode}
Expand Down
1 change: 1 addition & 0 deletions src/constants/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ export const WEAPONS = 'weapons';
export const WOUND = 'wound';
export const WOUNDED = 'Wounded';
export const XP = 'XP';
export const ZOMBIE = 'zombie';
4 changes: 2 additions & 2 deletions src/setup/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const ITEMS_MALL = {
}
};

export const ITEMS_TD = {
export const ITEMS_NIGHT_SHIFT = {
GasMask: {
img: GasMask,
name: 'GasMask',
Expand Down Expand Up @@ -124,7 +124,7 @@ export const ITEMS_TD = {
}
};

const selectedSets = [ITEMS_S1, ITEMS_MALL, ITEMS_TD];
const selectedSets = [ITEMS_S1, ITEMS_MALL, ITEMS_NIGHT_SHIFT];

export const setupItems = sets => {
let allItems = {};
Expand Down
56 changes: 30 additions & 26 deletions src/setup/weapons.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Crowbar from '../assets/images/weapons/crowbar.jpg';
import DesertEagle from '../assets/images/weapons/desert-eagle.jpg';
import DoubleBarrel from '../assets/images/weapons/double-barreled-shotgun.jpg';
import EvilTwins from '../assets/images/weapons/evil-twins.jpg';
import ExpandableBaton from '../assets/images/weapons/expandable-baton.jpg';
import ExpandableBatonClosed from '../assets/images/weapons/expandable-baton-closed.jpg';
import FireAxe from '../assets/images/weapons/fire-axe.jpg';
import Flashbang from '../assets/images/weapons/flashbang.jpg';
import Katana from '../assets/images/weapons/katana.jpg';
Expand Down Expand Up @@ -41,7 +43,7 @@ export const WEAPONS_S1 = {
attack: MELEE,
dice: 1,
img: BaseballBat,
name: 'BaseballBat',
name: 'Baseball Bat',
noise: false,
type: WEAPONS
},
Expand All @@ -67,7 +69,7 @@ export const WEAPONS_S1 = {
attack: RANGED,
dice: 2,
img: EvilTwins,
name: 'EvilTwins',
name: 'Evil Twins',
noise: true,
type: WEAPONS
},
Expand All @@ -76,7 +78,7 @@ export const WEAPONS_S1 = {
attack: MELEE,
dice: 1,
img: FireAxe,
name: 'FireAxe',
name: 'Fire Axe',
noise: false,
type: WEAPONS
},
Expand All @@ -92,7 +94,7 @@ export const WEAPONS_S1 = {
attack: MELEE_RANGED,
dice: 2,
img: MasShotgun,
name: 'MasShotgun',
name: 'Mas Shotgun',
noise: SPECIAL,
type: WEAPONS
},
Expand Down Expand Up @@ -142,7 +144,7 @@ export const WEAPONS_S1 = {
attack: RANGED,
dice: 2,
img: SawedOff,
name: 'SawedOff',
name: 'Sawed Off',
noise: true,
type: WEAPONS
},
Expand All @@ -158,7 +160,7 @@ export const WEAPONS_S1 = {
attack: RANGED,
dice: 1,
img: SniperRifle,
name: 'SniperRifle',
name: 'Sniper Rifle',
noise: true,
type: WEAPONS
},
Expand All @@ -177,7 +179,7 @@ export const WEAPONS_MALL = {
attack: RANGED,
dice: 3,
img: AssaultRifle,
name: 'AssaultRifle',
name: 'Assault Rifle',
noise: true,
type: WEAPONS
}
Expand All @@ -188,7 +190,7 @@ export const WEAPONS_S2 = {
attack: RANGED,
dice: 3,
img: AutomaticShotgun,
name: 'AutomaticShotgun',
name: 'Automatic Shotgun',
noise: true,
type: WEAPONS
},
Expand All @@ -207,7 +209,7 @@ export const WEAPONS_S3 = {
attack: RANGED,
dice: 2,
img: DoubleBarrel,
name: 'DoubleBarrel',
name: 'Double Barrel',
noise: true,
type: WEAPONS
},
Expand All @@ -226,18 +228,18 @@ export const WEAPONS_OTHERS = {
attack: RANGED,
dice: 1,
img: DesertEagle,
name: 'DesertEagle',
name: 'Desert Eagle',
noise: false,
type: WEAPONS
}
};

export const WEAPONS_TD = {
export const WEAPONS_NIGHT_SHIFT = {
AutomaticShotgun: {
attack: RANGED,
dice: 3,
img: AutomaticShotgun,
name: 'AutomaticShotgun',
name: 'Automatic Shotgun',
noise: true,
type: WEAPONS
},
Expand All @@ -246,7 +248,7 @@ export const WEAPONS_TD = {
attack: MELEE,
dice: 2,
img: BatteringRam,
name: 'BatteringRam',
name: 'Battering Ram',
noise: false,
type: WEAPONS
},
Expand All @@ -255,10 +257,20 @@ export const WEAPONS_TD = {
attack: RANGED,
dice: 1,
img: ColtPython,
name: 'ColtPython',
name: 'Colt Python',
noise: true,
type: WEAPONS
},

ExpandableBaton: {
altImage: ExpandableBatonClosed,
attack: MELEE,
dice: 1,
img: ExpandableBaton,
name: 'Expandable Baton',
noise: false,
type: WEAPONS
},
Flashbang: {
attack: RANGED,
dice: 0,
Expand All @@ -276,35 +288,27 @@ export const WEAPONS_TD = {
noise: true,
type: WEAPONS
},
NightStick: {
attack: MELEE,
dice: 1,
img: NightStick,
name: 'NightStick',
noise: false,
type: WEAPONS
},
SamuraiEdge: {
attack: RANGED,
dice: 1,
img: SamuraiEdge,
name: 'SamuraiEdge',
name: 'Samurai Edge',
noise: true,
type: WEAPONS
},
SmokeGrenade: {
attack: RANGED,
dice: 0,
img: SmokeGrenade,
name: 'SmokeGrenade',
name: 'Smoke Grenade',
noise: false,
type: WEAPONS
},
TaserGun: {
attack: RANGED,
dice: 0,
img: TaserGun,
name: 'TaserGun',
name: 'Taser Gun',
noise: false,
type: WEAPONS
}
Expand All @@ -316,7 +320,7 @@ const selectedSets = [
WEAPONS_S2,
WEAPONS_S3,
WEAPONS_OTHERS,
WEAPONS_TD
WEAPONS_NIGHT_SHIFT
];

export const setupWeapons = sets => {
Expand Down
21 changes: 15 additions & 6 deletions src/setup/zombies.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,45 @@ import WalkerIntro from '../assets/images/zombies/Walker.png';
import RunnerIntro from '../assets/images/zombies/Runner.png';
import FattyIntro from '../assets/images/zombies/Fatty.png';
import AbominationIntro from '../assets/images/zombies/Abomination.png';
import NightShiftIntro from '../assets/images/zombies/ZombieCop.png';
import { ZOMBIE } from '../constants';

export const ZOMBIES_S1 = {
Walker: {
img: Walker,
imgSmall: WalkerSmall,
name: 'Walker',
sounds: 9
sounds: 9,
type: ZOMBIE
},
Runner: {
img: Runner,
imgSmall: RunnerSmall,
name: 'Runner',
sounds: 5,
special: 'Instant kill'
special: 'Instant kill',
type: ZOMBIE
},
Fatty: {
img: Fatty,
imgSmall: FattySmall,
name: 'Fatty',
sounds: 5
sounds: 5,
type: ZOMBIE
},
Abomination: {
img: Abomination,
imgSmall: AbominationSmall,
name: 'Abomination',
sounds: 4
sounds: 4,
type: ZOMBIE
},
Horde: {
img: Horde,
imgSmall: HordeSmall,
name: 'Horde',
sounds: 2,
type: ZOMBIE,
special: 'Feast on survivor'
}
};
Expand All @@ -58,7 +65,8 @@ export const DOGZ = {
imgSmall: DogzSmall,
name: 'Dogz',
sounds: 5,
special: 'Instant kill'
special: 'Instant kill',
type: ZOMBIE
}
};

Expand All @@ -67,7 +75,8 @@ export const ZOMBIES_INTRO = [
RunnerIntro,
FattyIntro,
AbominationIntro,
DogzIntro
DogzIntro,
NightShiftIntro
];

const selectedSets = [ZOMBIES_S1, DOGZ];
Expand Down
13 changes: 7 additions & 6 deletions src/utils/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ export const checkIfCharacterCanOpenDoors = currentItems => {
};

export const getItemPhoto = item => {
if (Object.keys(SPECIALS_CARDS).find(name => item === name)) {
return SPECIALS_CARDS[item].img;
const photoName = item.replace(' ', '');
if (Object.keys(SPECIALS_CARDS).find(name => photoName === name)) {
return SPECIALS_CARDS[photoName].img;
}
if (Object.keys(ALL_WEAPONS).find(name => item === name)) {
return ALL_WEAPONS[item].img;
if (Object.keys(ALL_WEAPONS).find(name => photoName === name)) {
return ALL_WEAPONS[photoName].img;
}
if (Object.keys(ALL_ITEMS).find(name => item === name)) {
return ALL_ITEMS[item].img;
if (Object.keys(ALL_ITEMS).find(name => photoName === name)) {
return ALL_ITEMS[photoName].img;
}
return null;
};
Expand Down

0 comments on commit f0f6a93

Please sign in to comment.