diff --git a/src/assets/sounds/index.js b/src/assets/sounds/index.js index ed94eb1..4eeab6b 100644 --- a/src/assets/sounds/index.js +++ b/src/assets/sounds/index.js @@ -1,10 +1,14 @@ +import AK47 from './weapons/AK47.mp3'; import AssaultRifle from './weapons/AssaultRifle.mp3'; import AutomaticShotgun from './weapons/AutomaticShotgun.mp3'; import BaseballBat from './weapons/BaseballBat.mp3'; import BatteringRam from './weapons/BatteringRam.mp3'; +import Bow from './weapons/Bow.mp3'; import Chainsaw from './weapons/Chainsaw.mp3'; import ColtPython from './weapons/ColtPython.mp3'; import ColtPythonAlt from './weapons/ColtPythonAlt.mp3'; +import ConcreteSaw from './weapons/ConcreteSaw.mp3'; +import Crossbow from './weapons/Crossbow.mp3'; import Crowbar from './weapons/Crowbar.mp3'; import DesertEagle from './weapons/DesertEagle.mp3'; import DoubleBarrel from './weapons/DoubleBarrel.mp3'; @@ -15,18 +19,26 @@ import ExpandableBaton from './weapons/ExpandableBaton.mp3'; import FireAxe from './weapons/FireAxe.mp3'; import Flamethrower from './weapons/FlameThrower.mp3'; import Flashbang from './weapons/Flashbang.mp3'; +import Handcannon from './weapons/Handcannon.mp3'; import Handgun from './weapons/Handgun.mp3'; +import Hatchet from './weapons/Hatchet.mp3'; import JacknJill from './weapons/JacknJill.mp3'; import Katana from './weapons/Katana.mp3'; import Knife from './weapons/Knife.mp3'; +import Kukri from './weapons/Kukri.mp3'; +import LaGuillotine from './weapons/LaGuillotine.mp3'; import M4 from './weapons/M4.mp3'; +import M4CQB from './weapons/M4-CQB.mp3'; +import Mac10 from './weapons/Mac10.mp3'; import Machete from './weapons/Machete.mp3'; import Magnum44 from './weapons/Magnum44.mp3'; import Magnum44Alt from './weapons/Magnum44Alt.mp3'; import MasShotgun from './weapons/MasShotgun.mp3'; +import MeatCleaver from './weapons/MeatCleaver.mp3'; import Minigun from './weapons/Minigun.mp3'; import Molotov from './weapons/Molotov.mp3'; import Mp5 from './weapons/Mp5.mp3'; +import Nailbat from './weapons/Nailbat.mp3'; import NedsAtomicFlashlight from './weapons/NedsAtomicFlashlight.mp3'; import NightStick from './weapons/NightStick.mp3'; import Pan from './weapons/Pan.mp3'; @@ -35,15 +47,22 @@ import PasGunAlt from './weapons/PasGunAlt.mp3'; import Pistol from './weapons/Pistol.mp3'; import Rifle from './weapons/Rifle.mp3'; import RocketLauncher from './weapons/RocketLauncher.mp3'; +import Saber from './weapons/Saber.mp3'; import SamuraiEdge from './weapons/SamuraiEdge.mp3'; import SawedOff from './weapons/SawedOff.mp3'; +import SBF from './weapons/SBF.mp3'; import Shotgun from './weapons/Shotgun.mp3'; import SmokeGrenade from './weapons/SmokeGrenade.mp3'; +import SPAS12 from './weapons/SPAS12.mp3'; import Special911 from './weapons/Special911.mp3'; import SubMG from './weapons/SubMG.mp3'; import SweetSisters from './weapons/SweetSisters.mp3'; import TaserGun from './weapons/TaserGun.mp3'; +import Thompson from './weapons/Thompson.mp3'; import VikingAxe from './weapons/VikingAxe.mp3'; +import Wakizashi from './weapons/Wakizashi.mp3'; +import Winchester from './weapons/Winchester.mp3'; +import ZombKnuckles from './weapons/ZombKnuckles.mp3'; import CarAttack from './actions/car-attack.mp3'; import CarEnterStart from './actions/car-enter-start.mp3'; @@ -168,13 +187,17 @@ import Rain from './intro/rain.mp3'; import Thunder from './intro/thunder.mp3'; export const SOUNDS = { + AK47, AssaultRifle, AutomaticShotgun, BaseballBat, BatteringRam, + Bow, Chainsaw, ColtPython, ColtPythonAlt, + ConcreteSaw, + Crossbow, Crowbar, DesertEagle, DoubleBarrel, @@ -185,18 +208,26 @@ export const SOUNDS = { FireAxe, Flamethrower, Flashbang, + Handcannon, Handgun, + Hatchet, JacknJill, Katana, Knife, + Kukri, + LaGuillotine, M4, + M4CQB, + Mac10, Machete, Magnum44, Magnum44Alt, MasShotgun, + MeatCleaver, Minigun, Molotov, Mp5, + Nailbat, NedsAtomicFlashlight, NightStick, Pan, @@ -205,6 +236,9 @@ export const SOUNDS = { Pistol, Rifle, RocketLauncher, + SBF, + SPAS12, + Saber, SamuraiEdge, SawedOff, Shotgun, @@ -213,7 +247,11 @@ export const SOUNDS = { SubMG, SweetSisters, TaserGun, + Thompson, VikingAxe, + Wakizashi, + Winchester, + ZombKnuckles, 'car-attack': CarAttack, 'car-enter-start': CarEnterStart, 'car-enter': CarEnter, diff --git a/src/assets/sounds/weapons/Thompsom.mp3 b/src/assets/sounds/weapons/Thompsom.mp3 deleted file mode 100644 index 244d9bd..0000000 Binary files a/src/assets/sounds/weapons/Thompsom.mp3 and /dev/null differ diff --git a/src/assets/sounds/weapons/Thompson.mp3 b/src/assets/sounds/weapons/Thompson.mp3 new file mode 100644 index 0000000..3cc6866 Binary files /dev/null and b/src/assets/sounds/weapons/Thompson.mp3 differ diff --git a/src/assets/sounds/weapons/Winchester.mp3 b/src/assets/sounds/weapons/Winchester.mp3 new file mode 100644 index 0000000..fdd24f4 Binary files /dev/null and b/src/assets/sounds/weapons/Winchester.mp3 differ diff --git a/src/components/Sections/PlayersSection/index.js b/src/components/Sections/PlayersSection/index.js index 145f69e..2396a6d 100644 --- a/src/components/Sections/PlayersSection/index.js +++ b/src/components/Sections/PlayersSection/index.js @@ -16,19 +16,16 @@ import { checkIfCharacterCanOpenDoors, checkIfCharacterHasFlashlight, checkIfHasAnyActionLeft, - getActionColor, getCharacterColor, getCombiningReference, getMediaQuery, - getXpColor, handlePromotionEffects, loadSavedGame, logger, orangeThreatThresold, useStateWithLabel, useTurnsCounter, - yellowThreatThresold, - totalActions + yellowThreatThresold } from '../../../utils'; import NewGame from '../../mainSections/NewGame'; import EndGame from '../../gameScreens/EndGame'; @@ -201,13 +198,11 @@ import { ExtraActivationImage, FirstPlayerToken, FirstPlayerWrapper, - IndicatorsWrapper, LevelIndicator, MainButton, MidScreenTag, ModalSign, ModalSignText, - MovementIcon, NavIconsWrapper, NextButton, NoiseIcon, @@ -1131,8 +1126,6 @@ const PlayersSection = ({ }; const onFindingItem = slotType => (item, currentSlot = slot - 1) => { - console.log('$$$ item', item); - const updChar = cloneDeep(character); const findingSlot = slotType === IN_HAND ? slot - 1 : slot - 3; const hasFlashlight = checkIfCharacterHasFlashlight([ @@ -1688,9 +1681,9 @@ const PlayersSection = ({ }, [ generalActions, extraMovementActions, - extraAttackActions[0], - extraAttackActions[1], - extraAttackActions[2], + extraAttackActions[0], // eslint-disable-line react-hooks/exhaustive-deps + extraAttackActions[1], // eslint-disable-line react-hooks/exhaustive-deps + extraAttackActions[2], // eslint-disable-line react-hooks/exhaustive-deps searchActions, bonusActions ]); diff --git a/src/components/elements/Items/ItemsSelectorModal/index.js b/src/components/elements/Items/ItemsSelectorModal/index.js index 8010b36..87da472 100644 --- a/src/components/elements/Items/ItemsSelectorModal/index.js +++ b/src/components/elements/Items/ItemsSelectorModal/index.js @@ -13,7 +13,10 @@ import { TABLET, WEAPONS } from '../../../../constants'; -import { ButtonsWrapper, CancelButton } from '../../../gameScreens/TradeArea/styles'; +import { + ButtonsWrapper, + CancelButton +} from '../../../gameScreens/TradeArea/styles'; import { SelectorArea } from '../../SoundBlock/styles'; import { SelectorButton, diff --git a/src/components/gameScreens/ConfigGame/index.js b/src/components/gameScreens/ConfigGame/index.js index b50d4f6..2e94f8e 100644 --- a/src/components/gameScreens/ConfigGame/index.js +++ b/src/components/gameScreens/ConfigGame/index.js @@ -85,6 +85,14 @@ const ConfigGame = ({ toggleConfig }) => { const onClickExpansion = expansion => { const updRules = { ...rules }; updRules[expansion] = !updRules[expansion]; + + if (expansion === 'nightShift') { + updRules.season2 = updRules[expansion]; + updRules.season3 = updRules[expansion]; + updRules.angryNeighbors = updRules[expansion]; + updRules.others = updRules[expansion]; + } + changeRules(updRules); }; @@ -135,12 +143,17 @@ const ConfigGame = ({ toggleConfig }) => { {Object.values(SETS).map(set => ( changeSetLabel(set.name)} + onMouseOver={() => changeSetLabel(set.label)} onMouseOut={() => changeSetLabel()} - onClick={() => changeSetLabel(CANT_DESELECT)} + onClick={() => + set.deselectable + ? onClickExpansion(set.name) + : changeSetLabel(CANT_DESELECT) + } /> ))} {setLabel} @@ -154,12 +167,17 @@ const ConfigGame = ({ toggleConfig }) => { {Object.values(EXPANSIONS).map(expansion => ( changeExpansionLabel(expansion.label)} onMouseOut={() => changeExpansionLabel()} - onClick={() => onClickExpansion(expansion.name)} + onClick={() => + expansion.deselectable + ? onClickExpansion(expansion.name) + : changeExpansionLabel(CANT_DESELECT) + } /> ))} {expansionLabel} diff --git a/src/setup/sets.js b/src/setup/sets.js index e88fa39..361b036 100644 --- a/src/setup/sets.js +++ b/src/setup/sets.js @@ -10,7 +10,15 @@ import { CHARACTERS_S1, CHARACTERS_TOXIC_MALL } from './characters'; -import { WEAPONS_S1, WEAPONS_NIGHT_SHIFT, WEAPONS_TOXIC_MALL } from './weapons'; +import { + WEAPONS_S1, + WEAPONS_S2, + WEAPONS_S3, + WEAPONS_NIGHT_SHIFT, + WEAPONS_TOXIC_MALL, + WEAPONS_ANGRY_NEIGHBORS, + WEAPONS_OTHERS +} from './weapons'; import { DOGZ, ZOMBIES_S1 } from './zombies'; import { ITEMS_S1, ITEMS_NIGHT_SHIFT, ITEMS_TOXIC_MALL } from './items'; @@ -18,12 +26,30 @@ export const SETS = { season1: { characters: CHARACTERS_S1, cover: Season1, + defaultSelected: true, deselectable: false, items: ITEMS_S1, label: 'Season 1', name: 'season1', weapons: WEAPONS_S1, zombies: ZOMBIES_S1 + }, + season2: { + cover: NightShift, + coverSize: 'small', + deselectable: false, + label: 'Season 2: Prison Outbreak', + name: 'season2', + weapons: WEAPONS_S2 + }, + season3: { + characters: CHARACTERS_NIGHT_SHIFT, + cover: NightShift, + coverSize: 'small', + deselectable: false, + label: 'Season 3: Rue Morgue', + name: 'season3', + weapons: WEAPONS_S3 } }; @@ -63,5 +89,23 @@ export const EXPANSIONS = { label: 'Night Shift Campaign (beta)', name: 'nightShift', weapons: WEAPONS_NIGHT_SHIFT + }, + angryNeighbors: { + characters: CHARACTERS_NIGHT_SHIFT, + cover: NightShift, + coverSize: 'small', + deselectable: false, + label: 'Angry Neighbors', + name: 'angryNeighbors', + weapons: WEAPONS_ANGRY_NEIGHBORS + }, + others: { + characters: CHARACTERS_NIGHT_SHIFT, + cover: NightShift, + coverSize: 'small', + deselectable: false, + label: 'Kickstarters & Others', + name: 'others', + weapons: WEAPONS_OTHERS } }; diff --git a/src/setup/weapons.js b/src/setup/weapons.js index 90c152c..98bd825 100644 --- a/src/setup/weapons.js +++ b/src/setup/weapons.js @@ -1,10 +1,15 @@ +import AK47 from '../assets/images/weapons/ak47.jpg'; +import AK47Golden from '../assets/images/weapons/ak47-golden.jpg'; import AssaultRifle from '../assets/images/weapons/assault-rifle.jpg'; import AutomaticShotgun from '../assets/images/weapons/automatic-shotgun.jpg'; import BaseballBat from '../assets/images/weapons/baseball-bat.jpg'; import BatteringRam from '../assets/images/weapons/battering-ram.jpg'; import Betty from '../assets/images/weapons/betty.jpg'; +import Bow from '../assets/images/weapons/bow.jpg'; import Chainsaw from '../assets/images/weapons/chainsaw.jpg'; import ColtPython from '../assets/images/weapons/colt-python.jpg'; +import ConcreteSaw from '../assets/images/weapons/concrete-saw.jpg'; +import Crossbow from '../assets/images/weapons/crossbow.jpg'; 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'; @@ -16,15 +21,24 @@ import ExpandableBatonClosed from '../assets/images/weapons/expandable-baton-clo import FireAxe from '../assets/images/weapons/fire-axe.jpg'; import Flamethrower from '../assets/images/weapons/flamethrower.jpg'; import Flashbang from '../assets/images/weapons/flashbang.jpg'; +import Handcannon from '../assets/images/weapons/handcannon.jpg'; +import Hatchet from '../assets/images/weapons/hatchet.jpg'; import JacknJill from '../assets/images/weapons/jack-and-jill.jpg'; import Katana from '../assets/images/weapons/katana.jpg'; -import Machete from '../assets/images/weapons/machete.jpg'; +import Knife from '../assets/images/weapons/knife.jpg'; +import Kukri from '../assets/images/weapons/kukri.jpg'; +import LaGuillotine from '../assets/images/weapons/la-guillotine.jpg'; +import M4Pink from '../assets/images/weapons/M4-pink.jpg'; import M4Cqb from '../assets/images/weapons/m4-cqb.jpg'; +import Mac10 from '../assets/images/weapons/mac10.jpg'; +import Machete from '../assets/images/weapons/machete.jpg'; import Magnum44 from '../assets/images/weapons/magnum44.jpg'; import MasShotgun from '../assets/images/weapons/mas-shotgun.jpg'; +import MeatCleaver from '../assets/images/weapons/meat-cleaver.jpg'; import Minigun from '../assets/images/weapons/minigun.jpg'; import Molotov from '../assets/images/weapons/molotov.jpg'; import Mp5 from '../assets/images/weapons/mp5.jpg'; +import Nailbat from '../assets/images/weapons/nailbat.jpg'; import NedsAtomicFlashlight from '../assets/images/weapons/neds-atomic-flashlight.jpg'; import NightStick from '../assets/images/weapons/night-stick.jpg'; import Pan from '../assets/images/weapons/pan.jpg'; @@ -32,16 +46,23 @@ import PasGun from '../assets/images/weapons/pas-gun.jpg'; import Pistol from '../assets/images/weapons/pistol.jpg'; import Rifle from '../assets/images/weapons/rifle.jpg'; import RocketLauncher from '../assets/images/weapons/rocket-launcher.jpg'; +import Saber from '../assets/images/weapons/saber.jpg'; import SamuraiEdge from '../assets/images/weapons/samurai-edge.jpg'; import SawedOff from '../assets/images/weapons/sawed-off.jpg'; +import SBF from '../assets/images/weapons/sbf.jpg'; import Shotgun from '../assets/images/weapons/shotgun.jpg'; import SmokeGrenade from '../assets/images/weapons/smoke-grenade.jpg'; import SniperRifle from '../assets/images/weapons/sniper-rifle.jpg'; +import SPAS12 from '../assets/images/weapons/spas12.jpg'; import Special911 from '../assets/images/weapons/special911.jpg'; import SweetSisters from '../assets/images/weapons/sweet-sisters.jpg'; import SubMG from '../assets/images/weapons/sub-mg.jpg'; import TaserGun from '../assets/images/weapons/taser-gun.jpg'; +import Thompson from '../assets/images/weapons/thompson.jpg'; import VikingAxe from '../assets/images/weapons/viking-axe.jpg'; +import Wakizashi from '../assets/images/weapons/wakizashi.jpg'; +import Winchester from '../assets/images/weapons/winchester.jpg'; +import ZombKnuckles from '../assets/images/weapons/zomb-knuckles.jpg'; import { SPECIAL, @@ -309,6 +330,48 @@ export const WEAPONS_S2 = { noise: true, type: WEAPONS }, + ConcreteSaw: { + attack: MELEE, + dice: 3, + img: ConcreteSaw, + name: 'Concrete Saw', + noise: true, + type: WEAPONS + }, + Hatchet: { + attack: MELEE, + dice: 1, + dual: true, + img: Hatchet, + name: 'Hatchet', + noise: false, + type: WEAPONS + }, + Kukri: { + attack: MELEE, + dice: 1, + dual: true, + img: Kukri, + name: 'Kukri', + noise: false, + type: WEAPONS + }, + MeatCleaver: { + attack: MELEE, + dice: 1, + img: MeatCleaver, + name: 'Meat Cleaver', + noise: false, + type: WEAPONS + }, + Nailbat: { + attack: MELEE, + dice: 2, + img: Nailbat, + name: 'Nailbat', + noise: false, + type: WEAPONS + }, NightStick: { attack: MELEE, dice: 1, @@ -316,10 +379,43 @@ export const WEAPONS_S2 = { name: 'NightStick', noise: false, type: WEAPONS + }, + Wakizashi: { + attack: MELEE, + dice: 1, + dual: true, + img: Wakizashi, + name: 'Wakizashi', + noise: false, + type: WEAPONS } }; export const WEAPONS_S3 = { + AK47: { + attack: RANGED, + dice: 2, + img: AK47, + name: 'AK47', + noise: true, + type: WEAPONS + }, + Bow: { + attack: RANGED, + dice: 1, + img: Bow, + name: 'Bow', + noise: false, + type: WEAPONS + }, + Crossbow: { + attack: RANGED, + dice: 1, + img: Crossbow, + name: 'Crossbow', + noise: false, + type: WEAPONS + }, DoubleBarrel: { attack: RANGED, dice: 2, @@ -328,6 +424,33 @@ export const WEAPONS_S3 = { noise: true, type: WEAPONS }, + Knife: { + attack: MELEE, + dice: 1, + dual: true, + img: Knife, + name: 'Knife', + noise: false, + type: WEAPONS + }, + LaGuillotine: { + attack: MELEE, + dice: 4, + img: LaGuillotine, + name: 'LaGuillotine', + noise: false, + type: WEAPONS + }, + Mac10: { + attack: RANGED, + dice: 5, + dual: true, + img: Mac10, + name: 'Mac10', + needsReloading: true, + noise: true, + type: WEAPONS + }, Mp5: { attack: RANGED, dice: 3, @@ -335,10 +458,65 @@ export const WEAPONS_S3 = { name: 'Mp5', noise: true, type: WEAPONS + }, + Saber: { + attack: MELEE, + dice: 2, + img: Saber, + name: 'Saber', + noise: true, + type: WEAPONS + } +}; + +export const WEAPONS_ANGRY_NEIGHBORS = { + SBF: { + attack: MELEE, + dice: 1, + dual: true, + img: SBF, + name: 'SBF', + noise: false, + type: WEAPONS + }, + Handcannon: { + attack: RANGED, + dice: 3, + img: Handcannon, + name: 'Handcannon', + needsReloading: true, + noise: true, + type: WEAPONS + }, + Winchester: { + attack: RANGED, + dice: 2, + img: Winchester, + name: 'Winchester', + noise: true, + type: WEAPONS + }, + ZombKnuckles: { + attack: MELEE, + dice: 1, + dual: true, + img: ZombKnuckles, + name: 'ZombKnuckles', + noise: false, + type: WEAPONS } }; export const WEAPONS_OTHERS = { + AK47Golden: { + attack: RANGED, + dice: 2, + img: AK47Golden, + name: 'AK47 Golden', + noise: true, + sound: 'AK47', + type: WEAPONS + }, DesertEagle: { attack: RANGED, dice: 1, @@ -346,6 +524,31 @@ export const WEAPONS_OTHERS = { name: 'Desert Eagle', noise: true, type: WEAPONS + }, + M4Pink: { + attack: RANGED, + dice: 3, + img: M4Pink, + name: 'M4 Pink', + noise: true, + sound: 'M4', + type: WEAPONS + }, + SPAS12: { + attack: RANGED, + dice: 3, + img: SPAS12, + name: 'SPAS12', + noise: true, + type: WEAPONS + }, + Thompson: { + attack: RANGED, + dice: 5, + img: Thompson, + name: 'Thompson', + noise: true, + type: WEAPONS } }; @@ -427,7 +630,7 @@ export const WEAPONS_NIGHT_SHIFT = { img: M4Cqb, name: 'M4 CQB', noise: true, - sound: 'M4', + sound: 'M4CQB', type: WEAPONS }, Minigun: { @@ -497,6 +700,7 @@ export const ALL_WEAPONS = { ...WEAPONS_TOXIC_MALL, ...WEAPONS_S2, ...WEAPONS_S3, + ...WEAPONS_ANGRY_NEIGHBORS, ...WEAPONS_OTHERS, ...WEAPONS_NIGHT_SHIFT };