diff --git a/data/nondata/Drinking-Water-www.fesliyanstudios.com.mp3 b/data/nondata/Drinking-Water-www.fesliyanstudios.com.mp3 new file mode 100644 index 000000000..6c7152a03 Binary files /dev/null and b/data/nondata/Drinking-Water-www.fesliyanstudios.com.mp3 differ diff --git a/data/nondata/Opening-Wine-Cork-www.fesliyanstudios.com.mp3 b/data/nondata/Opening-Wine-Cork-www.fesliyanstudios.com.mp3 new file mode 100644 index 000000000..b704a0e95 Binary files /dev/null and b/data/nondata/Opening-Wine-Cork-www.fesliyanstudios.com.mp3 differ diff --git a/data/sound/pop.POP.500.wav b/data/sound/pop.POP.500.wav new file mode 100644 index 000000000..bb5f0c6dc Binary files /dev/null and b/data/sound/pop.POP.500.wav differ diff --git a/data/sound/pop1.POP.500.wav b/data/sound/pop1.POP.500.wav new file mode 100644 index 000000000..de2dff5f3 Binary files /dev/null and b/data/sound/pop1.POP.500.wav differ diff --git a/data/sound/pop2.POP.500.wav b/data/sound/pop2.POP.500.wav new file mode 100644 index 000000000..8092e6c38 Binary files /dev/null and b/data/sound/pop2.POP.500.wav differ diff --git a/data/sound/slurp1.SLRP.500.wav b/data/sound/slurp1.SLRP.500.wav new file mode 100644 index 000000000..13693d1fa Binary files /dev/null and b/data/sound/slurp1.SLRP.500.wav differ diff --git a/data/sound/slurp2.SLRRP.500.wav b/data/sound/slurp2.SLRRP.500.wav new file mode 100644 index 000000000..c75cb39e8 Binary files /dev/null and b/data/sound/slurp2.SLRRP.500.wav differ diff --git a/data/sound/slurp3.SLRP.500.wav b/data/sound/slurp3.SLRP.500.wav new file mode 100644 index 000000000..7dcb898a8 Binary files /dev/null and b/data/sound/slurp3.SLRP.500.wav differ diff --git a/data/sound/slurp4.SLRP.500.wav b/data/sound/slurp4.SLRP.500.wav new file mode 100644 index 000000000..9e1342989 Binary files /dev/null and b/data/sound/slurp4.SLRP.500.wav differ diff --git a/data/sound/slurp5.SLRP.500.wav b/data/sound/slurp5.SLRP.500.wav new file mode 100644 index 000000000..6d4a85959 Binary files /dev/null and b/data/sound/slurp5.SLRP.500.wav differ diff --git a/src/Dodge/Creature/Update.hs b/src/Dodge/Creature/Update.hs index ac10b571d..cfe8e6b01 100644 --- a/src/Dodge/Creature/Update.hs +++ b/src/Dodge/Creature/Update.hs @@ -73,11 +73,12 @@ slimeCritUpdate cid w | r < 5 = w & cWorld . lWorld . creatures . ix cid . crHP .~ CrDestroyed Gibbed | Just hitp <- w ^? cWorld . lWorld . creatures . ix cid . crDamage . ix 0 . dmPos , Just hitv <- w ^? cWorld . lWorld . creatures . ix cid . crDamage . ix 0 . dmVector - , Just (cr1,cr2) <- splitSlimeCrit hitp hitv cr - = - let cid' = IM.newKey $ w ^. cWorld . lWorld . creatures - in w & cWorld . lWorld . creatures . ix cid .~ cr1 - & cWorld . lWorld . creatures . at cid' ?~ (cr2 & crID .~ cid') +-- , Just (cr1,cr2) <- splitSlimeCrit hitp hitv cr +-- = +-- let cid' = IM.newKey $ w ^. cWorld . lWorld . creatures +-- in w & cWorld . lWorld . creatures . ix cid .~ cr1 +-- & cWorld . lWorld . creatures . at cid' ?~ (cr2 & crID .~ cid') + , Just w' <- splitSlimeCrit' hitp hitv cid cr w = w' | (cr ^?! crType . slimeIsCompressing) && r > norm p = let (w',g) = runState (setSlimeDir cid (cr & crDamage .~ []) w) (w ^. randGen) in w' & randGen .~ g @@ -108,15 +109,16 @@ setSlimeDir cid cr w = do if i < (r - 11) / 50 then do x <- randInCirc 1 - let (cr1,cr2) = splitSlimeCrit (x + cxy) (unitVectorAtAngle d) cr ^?! _Just - cid' = IM.newKey $ w ^. cWorld . lWorld . creatures - return $ w & tocr .~ cr1 - & tocr' cid' ?~ (cr2 & crID .~ cid') + return $ fromMaybe w $ splitSlimeCrit' (x + cxy) (unitVectorAtAngle d) cid cr w +-- let (cr1,cr2) = splitSlimeCrit (x + cxy) (unitVectorAtAngle d) cr ^?! _Just +-- cid' = IM.newKey $ w ^. cWorld . lWorld . creatures +-- return $ w & tocr .~ cr1 +-- & tocr' cid' ?~ (cr2 & crID .~ cid') else return $ w & tocr . crType . slimeCompression .~ r *^ unitVectorAtAngle d & tocr . crType . slimeIsCompressing .~ False where tocr = cWorld . lWorld . creatures . ix cid - tocr' i = cWorld . lWorld . creatures . at i +-- tocr' i = cWorld . lWorld . creatures . at i cxy = cr ^. crPos . _xy r = cr ^?! crType . slimeRad @@ -128,6 +130,16 @@ doSlimeRadChange = crType . slimeRadWobble %~ f | x < -1 = x + 1 | otherwise = 0 +splitSlimeCrit' :: Point2 -> Point2 -> Int -> Creature -> World -> Maybe World +splitSlimeCrit' p v cid cr w = do + (cr1,cr2) <- splitSlimeCrit p v cr + let cid' = IM.newKey $ w ^. cWorld . lWorld . creatures + (s,g) = runState (takeOne [popS,pop1S,pop2S]) (w ^. randGen) + return $ w & cWorld . lWorld . creatures . ix cid .~ cr1 + & cWorld . lWorld . creatures . at cid' ?~ (cr2 & crID .~ cid') + & soundStart (CrSound cid) (cr ^. crPos . _xy) s Nothing + & randGen .~ g + splitSlimeCrit :: Point2 -> Point2 -> Creature -> Maybe (Creature, Creature) splitSlimeCrit p v cr = do let mp = closestPointOnLine p (p+v) cxy diff --git a/src/Dodge/Room/Tutorial.hs b/src/Dodge/Room/Tutorial.hs index b6d2a7cbc..18ee49e66 100644 --- a/src/Dodge/Room/Tutorial.hs +++ b/src/Dodge/Room/Tutorial.hs @@ -58,7 +58,7 @@ tutAnoTree = do [ tToBTree "TutStartRez" . return . cleatOnward <$> tutRezBox , corDoor --, tToBTree "" . return . cleatOnward <$> (xChasm 200 200 - , tToBTree "" . return . cleatOnward <$> (roomRectAutoLights 200 200 + , tToBTree "" . return . cleatOnward <$> (roomRectAutoLights 300 300 <&> rmPmnts .:~ (sps0 (PutCrit slimeCrit) & plSpot . psPos .~ V2 100 100)) -- , tToBTree "" . return . cleatOnward <$> (cChasm -- <&> rmPmnts .:~ (sps0 (PutCrit slimeCrit) & plSpot . psPos .~ V2 100 20)) diff --git a/src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs b/src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs index 809914700..a4b19a68e 100644 --- a/src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs +++ b/src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs @@ -1,4 +1,4 @@ --- generated at 2026-04-10 11:38:00.904778995 UTC +-- generated at 2026-04-15 21:13:20.935856206 UTC module Dodge.SoundLogic.ExternallyGeneratedSounds where import Sound.Data soundToVol :: SoundID -> Float @@ -17,164 +17,172 @@ soundToVol v = case _getSoundID v of 11 -> 100 12 -> 100 13 -> 1000 - 14 -> 50 - 15 -> 200 - 16 -> 100 - 17 -> 2000 + 14 -> 500 + 15 -> 50 + 16 -> 200 + 17 -> 500 18 -> 100 - 19 -> 100 - 20 -> 500 + 19 -> 2000 + 20 -> 100 21 -> 100 - 22 -> 200 + 22 -> 500 23 -> 100 24 -> 200 - 25 -> 40 - 26 -> 100 - 27 -> 100 - 28 -> 1000 - 29 -> 1000 - 30 -> 500 - 31 -> 2000 - 32 -> 100 - 33 -> 2000 - 34 -> 200 - 35 -> 200 - 36 -> 1000 - 37 -> 100 + 25 -> 100 + 26 -> 200 + 27 -> 500 + 28 -> 40 + 29 -> 100 + 30 -> 100 + 31 -> 1000 + 32 -> 1000 + 33 -> 500 + 34 -> 2000 + 35 -> 100 + 36 -> 2000 + 37 -> 200 38 -> 200 - 39 -> 100 + 39 -> 1000 40 -> 100 - 41 -> 2000 - 42 -> 300 - 43 -> 200 - 44 -> 100 - 45 -> 500 + 41 -> 200 + 42 -> 100 + 43 -> 100 + 44 -> 2000 + 45 -> 300 46 -> 200 - 47 -> 200 - 48 -> 100 + 47 -> 100 + 48 -> 500 49 -> 200 - 50 -> 200 - 51 -> 2000 - 52 -> 2000 + 50 -> 500 + 51 -> 200 + 52 -> 100 53 -> 200 - 54 -> 100 - 55 -> 50 - 56 -> 100 - 57 -> 2000 - 58 -> 500 - 59 -> 1000 - 60 -> 40 - 61 -> 300 - 62 -> 250 - 63 -> 100 - 64 -> 500 - 65 -> 2000 - 66 -> 40 - 67 -> 200 - 68 -> 2000 - 69 -> 1000 - 70 -> 1000 - 71 -> 2000 - 72 -> 500 - 73 -> 500 - 74 -> 500 - 75 -> 500 - 76 -> 100 - 77 -> 100 - 78 -> 2000 - 79 -> 200 - 80 -> 200 - 81 -> 500 - 82 -> 200 + 54 -> 200 + 55 -> 2000 + 56 -> 2000 + 57 -> 200 + 58 -> 100 + 59 -> 50 + 60 -> 100 + 61 -> 500 + 62 -> 2000 + 63 -> 500 + 64 -> 1000 + 65 -> 40 + 66 -> 300 + 67 -> 250 + 68 -> 100 + 69 -> 500 + 70 -> 2000 + 71 -> 40 + 72 -> 200 + 73 -> 2000 + 74 -> 1000 + 75 -> 1000 + 76 -> 2000 + 77 -> 500 + 78 -> 500 + 79 -> 500 + 80 -> 500 + 81 -> 100 + 82 -> 100 83 -> 2000 84 -> 200 - 85 -> 1000 - 86 -> 1000 - 87 -> 50 - 88 -> 250 - 89 -> 300 - 90 -> 2000 - 91 -> 200 - 92 -> 1000 - 93 -> 100 + 85 -> 200 + 86 -> 500 + 87 -> 200 + 88 -> 2000 + 89 -> 200 + 90 -> 1000 + 91 -> 1000 + 92 -> 50 + 93 -> 250 94 -> 300 - 95 -> 100 - 96 -> 40 + 95 -> 2000 + 96 -> 200 97 -> 1000 98 -> 100 - 99 -> 1000 - 100 -> 500 - 101 -> 100 - 102 -> 200 - 103 -> 250 - 104 -> 200 - 105 -> 200 - 106 -> 50 - 107 -> 1000 - 108 -> 50 - 109 -> 500 - 110 -> 500 - 111 -> 1000 - 112 -> 200 - 113 -> 2000 - 114 -> 20 + 99 -> 300 + 100 -> 100 + 101 -> 40 + 102 -> 1000 + 103 -> 100 + 104 -> 1000 + 105 -> 500 + 106 -> 100 + 107 -> 200 + 108 -> 250 + 109 -> 200 + 110 -> 200 + 111 -> 50 + 112 -> 1000 + 113 -> 500 + 114 -> 50 115 -> 500 - 116 -> 200 - 117 -> 100 - 118 -> 50 + 116 -> 500 + 117 -> 1000 + 118 -> 200 119 -> 2000 - 120 -> 100 - 121 -> 100 - 122 -> 200 - 123 -> 300 - 124 -> 500 - 125 -> 100 - 126 -> 300 - 127 -> 200 - 128 -> 1000 - 129 -> 100 - 130 -> 50 - 131 -> 100 + 120 -> 500 + 121 -> 20 + 122 -> 500 + 123 -> 200 + 124 -> 100 + 125 -> 50 + 126 -> 2000 + 127 -> 100 + 128 -> 100 + 129 -> 200 + 130 -> 300 + 131 -> 500 132 -> 100 - 133 -> 50 - 134 -> 1000 - 135 -> 500 - 136 -> 40 - 137 -> 100 - 138 -> 200 - 139 -> 500 - 140 -> 1000 - 141 -> 300 - 142 -> 100 - 143 -> 300 - 144 -> 300 - 145 -> 100 - 146 -> 100 - 147 -> 500 - 148 -> 100 + 133 -> 300 + 134 -> 200 + 135 -> 1000 + 136 -> 100 + 137 -> 50 + 138 -> 100 + 139 -> 100 + 140 -> 50 + 141 -> 1000 + 142 -> 500 + 143 -> 40 + 144 -> 100 + 145 -> 200 + 146 -> 500 + 147 -> 1000 + 148 -> 300 149 -> 100 - 150 -> 500 - 151 -> 100 + 150 -> 300 + 151 -> 300 152 -> 100 - 153 -> 500 - 154 -> 40 - 155 -> 200 - 156 -> 50 + 153 -> 100 + 154 -> 500 + 155 -> 100 + 156 -> 100 157 -> 500 - 158 -> 2000 - 159 -> 200 - 160 -> 2000 - 161 -> 40 - 162 -> 100 - 163 -> 100 - 164 -> 500 - 165 -> 100 - 166 -> 1000 - 167 -> 100 - 168 -> 500 - 169 -> 8000 - 170 -> 200 - 171 -> 300 + 158 -> 500 + 159 -> 100 + 160 -> 100 + 161 -> 500 + 162 -> 40 + 163 -> 200 + 164 -> 50 + 165 -> 500 + 166 -> 2000 + 167 -> 200 + 168 -> 2000 + 169 -> 40 + 170 -> 100 + 171 -> 100 + 172 -> 500 + 173 -> 100 + 174 -> 1000 + 175 -> 100 + 176 -> 500 + 177 -> 8000 + 178 -> 200 + 179 -> 300 _ -> 50 soundToOnomato :: SoundID -> String soundToOnomato v = case _getSoundID v of @@ -192,164 +200,172 @@ soundToOnomato v = case _getSoundID v of 11 -> "SKWLCH" 12 -> "WHRR" 13 -> "CRMBL" - 14 -> "HMM" - 15 -> "WH" - 16 -> "SKWLCH" - 17 -> "BRAP" - 18 -> "PHF" - 19 -> "SLP" - 20 -> "DEDA" - 21 -> "CLCLH" - 22 -> "WH" - 23 -> "SQLEE" - 24 -> "WHH" - 25 -> "TIPTAP" - 26 -> "SLP" - 27 -> "SLP" - 28 -> "DHDHL" - 29 -> "ZHM" - 30 -> "CLANG" - 31 -> "UGGAUGGA" - 32 -> "SLP" - 33 -> "BRDBRDBRD" - 34 -> "DING" - 35 -> "CRNCH" - 36 -> "CRASH" - 37 -> "SPLRT" - 38 -> "ZMM" - 39 -> "SQLEE" - 40 -> "CHNKCHNKCHUNK" - 41 -> "CHUGUGUG" - 42 -> "BWEP" - 43 -> "TING" - 44 -> "FHP" - 45 -> "TINKLE" + 14 -> "POP" + 15 -> "HMM" + 16 -> "WH" + 17 -> "POP" + 18 -> "SKWLCH" + 19 -> "BRAP" + 20 -> "PHF" + 21 -> "SLP" + 22 -> "DEDA" + 23 -> "CLCLH" + 24 -> "WH" + 25 -> "SQLEE" + 26 -> "WHH" + 27 -> "SLRRP" + 28 -> "TIPTAP" + 29 -> "SLP" + 30 -> "SLP" + 31 -> "DHDHL" + 32 -> "ZHM" + 33 -> "CLANG" + 34 -> "UGGAUGGA" + 35 -> "SLP" + 36 -> "BRDBRDBRD" + 37 -> "DING" + 38 -> "CRNCH" + 39 -> "CRASH" + 40 -> "SPLRT" + 41 -> "ZMM" + 42 -> "SQLEE" + 43 -> "CHNKCHNKCHUNK" + 44 -> "CHUGUGUG" + 45 -> "BWEP" 46 -> "TING" - 47 -> "DING" - 48 -> "SMACK" - 49 -> "DING" - 50 -> "WHH" - 51 -> "WHSSH" - 52 -> "WE-OH" + 47 -> "FHP" + 48 -> "TINKLE" + 49 -> "TING" + 50 -> "SLRP" + 51 -> "DING" + 52 -> "SMACK" 53 -> "DING" - 54 -> "SLP" - 55 -> "BLIH" - 56 -> "DRR" - 57 -> "CRH" - 58 -> "AAA" - 59 -> "BLPCHCH" - 60 -> "CLNK" - 61 -> "WHRR" - 62 -> "WHR" - 63 -> "KKSQWL" - 64 -> "CLKCLK" - 65 -> "BANGG" - 66 -> "TIPTOP" - 67 -> "WHH" - 68 -> "BRPBRPBRP" - 69 -> "TTRKL" - 70 -> "CRUMBL" - 71 -> "SCREE" - 72 -> "BIPBIPBIP" - 73 -> "WRRR" - 74 -> "SCREE" - 75 -> "BIPBIPBIP" - 76 -> "SLP" - 77 -> "CLCLH" - 78 -> "CREUH" - 79 -> "SQWLTCH" - 80 -> "TING" - 81 -> "DEDEDA" - 82 -> "WHR" - 83 -> "CRUH" - 84 -> "SQWCH" - 85 -> "TRWNG" - 86 -> "CRSK" - 87 -> "CLK" - 88 -> "DMP" - 89 -> "BEP" - 90 -> "BOOM" - 91 -> "SKREL" - 92 -> "CRSNK" - 93 -> "SLP" - 94 -> "CHPCHPCHP" - 95 -> "SLP" - 96 -> "TAP" - 97 -> "CRNKL" - 98 -> "WRR" - 99 -> "CRNK" - 100 -> "CUHRUP" - 101 -> "SPLRT" - 102 -> "TING" - 103 -> "WHRHH" - 104 -> "CRSKRL" - 105 -> "WH" - 106 -> "FHFH" - 107 -> "BRAP" - 108 -> "WHHH" - 109 -> "PLH" - 110 -> "CLANG" - 111 -> "CRUNK" - 112 -> "TING" - 113 -> "TATATA" - 114 -> "SWSH" - 115 -> "DNDNDNDN" - 116 -> "THCK" - 117 -> "SLP" - 118 -> "CLK" - 119 -> "PEW" - 120 -> "SKLE" - 121 -> "THUD" - 122 -> "WH" - 123 -> "BWAH" - 124 -> "DEDEDUM" - 125 -> "WHUMWHUM" - 126 -> "WHRP" - 127 -> "TING" - 128 -> "CRMPL" - 129 -> "SKLE" - 130 -> "SHUHP" - 131 -> "SLP" - 132 -> "SPRT" - 133 -> "HSS" - 134 -> "TRNKL" - 135 -> "TAK" - 136 -> "CLICK" - 137 -> "DUHDEH" - 138 -> "SHTCK" - 139 -> "DEDUM" - 140 -> "BWMP" - 141 -> "BWAAH" - 142 -> "SLP" - 143 -> "DWAAH" - 144 -> "TNKTONK" - 145 -> "VFVFVF" - 146 -> "SLP" - 147 -> "CRTINK" - 148 -> "VHHP" - 149 -> "SPRT" - 150 -> "PRUM" - 151 -> "SLPP" - 152 -> "FWUMP" - 153 -> "CLANG" - 154 -> "TIP" - 155 -> "CRAKLE" - 156 -> "HSSS" - 157 -> "TRINKL" - 158 -> "BANG" - 159 -> "ZMM" - 160 -> "CHUGUGUG" - 161 -> "TAPP" - 162 -> "KKSQWL" - 163 -> "SKWLL" - 164 -> "DUDURAH" - 165 -> "SKWLL" - 166 -> "TRNKL" - 167 -> "SLP" - 168 -> "WHUAWUH" - 169 -> "RINGGG" - 170 -> "QWLPH" - 171 -> "WRRR" + 54 -> "WHH" + 55 -> "WHSSH" + 56 -> "WE-OH" + 57 -> "DING" + 58 -> "SLP" + 59 -> "BLIH" + 60 -> "DRR" + 61 -> "SLRP" + 62 -> "CRH" + 63 -> "AAA" + 64 -> "BLPCHCH" + 65 -> "CLNK" + 66 -> "WHRR" + 67 -> "WHR" + 68 -> "KKSQWL" + 69 -> "CLKCLK" + 70 -> "BANGG" + 71 -> "TIPTOP" + 72 -> "WHH" + 73 -> "BRPBRPBRP" + 74 -> "TTRKL" + 75 -> "CRUMBL" + 76 -> "SCREE" + 77 -> "BIPBIPBIP" + 78 -> "WRRR" + 79 -> "SCREE" + 80 -> "BIPBIPBIP" + 81 -> "SLP" + 82 -> "CLCLH" + 83 -> "CREUH" + 84 -> "SQWLTCH" + 85 -> "TING" + 86 -> "DEDEDA" + 87 -> "WHR" + 88 -> "CRUH" + 89 -> "SQWCH" + 90 -> "TRWNG" + 91 -> "CRSK" + 92 -> "CLK" + 93 -> "DMP" + 94 -> "BEP" + 95 -> "BOOM" + 96 -> "SKREL" + 97 -> "CRSNK" + 98 -> "SLP" + 99 -> "CHPCHPCHP" + 100 -> "SLP" + 101 -> "TAP" + 102 -> "CRNKL" + 103 -> "WRR" + 104 -> "CRNK" + 105 -> "CUHRUP" + 106 -> "SPLRT" + 107 -> "TING" + 108 -> "WHRHH" + 109 -> "CRSKRL" + 110 -> "WH" + 111 -> "FHFH" + 112 -> "BRAP" + 113 -> "SLRP" + 114 -> "WHHH" + 115 -> "PLH" + 116 -> "CLANG" + 117 -> "CRUNK" + 118 -> "TING" + 119 -> "TATATA" + 120 -> "SLRP" + 121 -> "SWSH" + 122 -> "DNDNDNDN" + 123 -> "THCK" + 124 -> "SLP" + 125 -> "CLK" + 126 -> "PEW" + 127 -> "SKLE" + 128 -> "THUD" + 129 -> "WH" + 130 -> "BWAH" + 131 -> "DEDEDUM" + 132 -> "WHUMWHUM" + 133 -> "WHRP" + 134 -> "TING" + 135 -> "CRMPL" + 136 -> "SKLE" + 137 -> "SHUHP" + 138 -> "SLP" + 139 -> "SPRT" + 140 -> "HSS" + 141 -> "TRNKL" + 142 -> "TAK" + 143 -> "CLICK" + 144 -> "DUHDEH" + 145 -> "SHTCK" + 146 -> "DEDUM" + 147 -> "BWMP" + 148 -> "BWAAH" + 149 -> "SLP" + 150 -> "DWAAH" + 151 -> "TNKTONK" + 152 -> "VFVFVF" + 153 -> "SLP" + 154 -> "CRTINK" + 155 -> "VHHP" + 156 -> "SPRT" + 157 -> "PRUM" + 158 -> "POP" + 159 -> "SLPP" + 160 -> "FWUMP" + 161 -> "CLANG" + 162 -> "TIP" + 163 -> "CRAKLE" + 164 -> "HSSS" + 165 -> "TRINKL" + 166 -> "BANG" + 167 -> "ZMM" + 168 -> "CHUGUGUG" + 169 -> "TAPP" + 170 -> "KKSQWL" + 171 -> "SKWLL" + 172 -> "DUDURAH" + 173 -> "SKWLL" + 174 -> "TRNKL" + 175 -> "SLP" + 176 -> "WHUAWUH" + 177 -> "RINGGG" + 178 -> "QWLPH" + 179 -> "WRRR" _ -> error "unitialised sound" soundPathList :: [String] soundPathList = @@ -367,8 +383,10 @@ soundPathList = , "bloodShort8.SKWLCH.100.wav" , "lowWhir.WHRR.100.wav" , "stone4.CRMBL.1000.wav" + , "pop1.POP.500.wav" , "fridgeHum.HMM.50.wav" , "whirdownShort2.WH.200.wav" + , "pop.POP.500.wav" , "blood8.SKWLCH.100.wav" , "autoGun.BRAP.2000.wav" , "whiteNoiseFadeOut.PHF.100.wav" @@ -378,6 +396,7 @@ soundPathList = , "whirdownShort1.WH.200.wav" , "blood7.SQLEE.100.wav" , "whirdown3.WHH.200.wav" + , "slurp2.SLRRP.500.wav" , "twoStep.TIPTAP.40.wav" , "slap7.SLP.100.wav" , "slap6.SLP.100.wav" @@ -400,6 +419,7 @@ soundPathList = , "whiteNoiseFadeIn.FHP.100.wav" , "smallGlass4.TINKLE.500.wav" , "ting1.TING.200.wav" + , "slurp5.SLRP.500.wav" , "marimbaG5.DING.200.wav" , "hit1.SMACK.100.wav" , "marimbaB6.DING.200.wav" @@ -410,6 +430,7 @@ soundPathList = , "slapClean2.SLP.100.wav" , "heal.BLIH.50.wav" , "slideDoor.DRR.100.wav" + , "slurp4.SLRP.500.wav" , "seagullCry1.CRH.2000.wav" , "tone440_30s.AAA.500.wav" , "oldMachineBoot.BLPCHCH.1000.wav" @@ -461,12 +482,14 @@ soundPathList = , "whirdownShort3.WH.200.wav" , "debris.FHFH.50.wav" , "tap3.BRAP.1000.wav" + , "slurp1.SLRP.500.wav" , "backgroundSpace.WHHH.50.wav" , "lasPulse.PLH.500.wav" , "clang2.CLANG.500.wav" , "metal2.CRUNK.1000.wav" , "ting.TING.200.wav" , "autoB.TATATA.2000.wav" + , "slurp3.SLRP.500.wav" , "knife.SWSH.20.wav" , "combine.DNDNDNDN.500.wav" , "connectItem.THCK.200.wav" @@ -504,6 +527,7 @@ soundPathList = , "reverseCymbal1.VHHP.100.wav" , "blood2.SPRT.100.wav" , "insertOne.PRUM.500.wav" + , "pop2.POP.500.wav" , "slap1.SLPP.100.wav" , "tap4.FWUMP.100.wav" , "clang1.CLANG.500.wav" @@ -554,319 +578,335 @@ lowWhirS :: SoundID lowWhirS = SoundID 12 stone4S :: SoundID stone4S = SoundID 13 +pop1S :: SoundID +pop1S = SoundID 14 fridgeHumS :: SoundID -fridgeHumS = SoundID 14 +fridgeHumS = SoundID 15 whirdownShort2S :: SoundID -whirdownShort2S = SoundID 15 +whirdownShort2S = SoundID 16 +popS :: SoundID +popS = SoundID 17 blood8S :: SoundID -blood8S = SoundID 16 +blood8S = SoundID 18 autoGunS :: SoundID -autoGunS = SoundID 17 +autoGunS = SoundID 19 whiteNoiseFadeOutS :: SoundID -whiteNoiseFadeOutS = SoundID 18 +whiteNoiseFadeOutS = SoundID 20 slapClean4S :: SoundID -slapClean4S = SoundID 19 +slapClean4S = SoundID 21 dedaS :: SoundID -dedaS = SoundID 20 +dedaS = SoundID 22 blood5S :: SoundID -blood5S = SoundID 21 +blood5S = SoundID 23 whirdownShort1S :: SoundID -whirdownShort1S = SoundID 22 +whirdownShort1S = SoundID 24 blood7S :: SoundID -blood7S = SoundID 23 +blood7S = SoundID 25 whirdown3S :: SoundID -whirdown3S = SoundID 24 +whirdown3S = SoundID 26 +slurp2S :: SoundID +slurp2S = SoundID 27 twoStepS :: SoundID -twoStepS = SoundID 25 +twoStepS = SoundID 28 slap7S :: SoundID -slap7S = SoundID 26 +slap7S = SoundID 29 slap6S :: SoundID -slap6S = SoundID 27 +slap6S = SoundID 30 metal3S :: SoundID -metal3S = SoundID 28 +metal3S = SoundID 31 teleS :: SoundID -teleS = SoundID 29 +teleS = SoundID 32 clangS :: SoundID -clangS = SoundID 30 +clangS = SoundID 33 seagullBarkS :: SoundID -seagullBarkS = SoundID 31 +seagullBarkS = SoundID 34 slapClean6S :: SoundID -slapClean6S = SoundID 32 +slapClean6S = SoundID 35 mini1S :: SoundID -mini1S = SoundID 33 +mini1S = SoundID 36 marimbaC5S :: SoundID -marimbaC5S = SoundID 34 +marimbaC5S = SoundID 37 gut2S :: SoundID -gut2S = SoundID 35 +gut2S = SoundID 38 stone1S :: SoundID -stone1S = SoundID 36 +stone1S = SoundID 39 bloodShort1S :: SoundID -bloodShort1S = SoundID 37 +bloodShort1S = SoundID 40 buzzS :: SoundID -buzzS = SoundID 38 +buzzS = SoundID 41 bloodShort7S :: SoundID -bloodShort7S = SoundID 39 +bloodShort7S = SoundID 42 crankSlowS :: SoundID -crankSlowS = SoundID 40 +crankSlowS = SoundID 43 seagullChatter1S :: SoundID -seagullChatter1S = SoundID 41 +seagullChatter1S = SoundID 44 tone440raiseS :: SoundID -tone440raiseS = SoundID 42 +tone440raiseS = SoundID 45 ting4S :: SoundID -ting4S = SoundID 43 +ting4S = SoundID 46 whiteNoiseFadeInS :: SoundID -whiteNoiseFadeInS = SoundID 44 +whiteNoiseFadeInS = SoundID 47 smallGlass4S :: SoundID -smallGlass4S = SoundID 45 +smallGlass4S = SoundID 48 ting1S :: SoundID -ting1S = SoundID 46 +ting1S = SoundID 49 +slurp5S :: SoundID +slurp5S = SoundID 50 marimbaG5S :: SoundID -marimbaG5S = SoundID 47 +marimbaG5S = SoundID 51 hit1S :: SoundID -hit1S = SoundID 48 +hit1S = SoundID 52 marimbaB6S :: SoundID -marimbaB6S = SoundID 49 +marimbaB6S = SoundID 53 whirdown2S :: SoundID -whirdown2S = SoundID 50 +whirdown2S = SoundID 54 missileLaunchS :: SoundID -missileLaunchS = SoundID 51 +missileLaunchS = SoundID 55 seagullWhistleS :: SoundID -seagullWhistleS = SoundID 52 +seagullWhistleS = SoundID 56 marimbaE5S :: SoundID -marimbaE5S = SoundID 53 +marimbaE5S = SoundID 57 slapClean2S :: SoundID -slapClean2S = SoundID 54 +slapClean2S = SoundID 58 healS :: SoundID -healS = SoundID 55 +healS = SoundID 59 slideDoorS :: SoundID -slideDoorS = SoundID 56 +slideDoorS = SoundID 60 +slurp4S :: SoundID +slurp4S = SoundID 61 seagullCry1S :: SoundID -seagullCry1S = SoundID 57 +seagullCry1S = SoundID 62 tone440_30sS :: SoundID -tone440_30sS = SoundID 58 +tone440_30sS = SoundID 63 oldMachineBootS :: SoundID -oldMachineBootS = SoundID 59 +oldMachineBootS = SoundID 64 tapQuietS :: SoundID -tapQuietS = SoundID 60 +tapQuietS = SoundID 65 whirS :: SoundID -whirS = SoundID 61 +whirS = SoundID 66 whirupS :: SoundID -whirupS = SoundID 62 +whirupS = SoundID 67 blood3S :: SoundID -blood3S = SoundID 63 +blood3S = SoundID 68 primeS :: SoundID -primeS = SoundID 64 +primeS = SoundID 69 bangEchoS :: SoundID -bangEchoS = SoundID 65 +bangEchoS = SoundID 70 twoStepSlowS :: SoundID -twoStepSlowS = SoundID 66 +twoStepSlowS = SoundID 71 whirdown1S :: SoundID -whirdown1S = SoundID 67 +whirdown1S = SoundID 72 miniS :: SoundID -miniS = SoundID 68 +miniS = SoundID 73 metal5S :: SoundID -metal5S = SoundID 69 +metal5S = SoundID 74 stone5S :: SoundID -stone5S = SoundID 70 +stone5S = SoundID 75 tone440sawtoothS :: SoundID -tone440sawtoothS = SoundID 71 +tone440sawtoothS = SoundID 76 beep3QuickS :: SoundID -beep3QuickS = SoundID 72 +beep3QuickS = SoundID 77 fireLoudS :: SoundID -fireLoudS = SoundID 73 +fireLoudS = SoundID 78 tone440sawtoothquietS :: SoundID -tone440sawtoothquietS = SoundID 74 +tone440sawtoothquietS = SoundID 79 computerBeepingS :: SoundID -computerBeepingS = SoundID 75 +computerBeepingS = SoundID 80 slapS :: SoundID -slapS = SoundID 76 +slapS = SoundID 81 bloodShort5S :: SoundID -bloodShort5S = SoundID 77 +bloodShort5S = SoundID 82 seagullCry2S :: SoundID -seagullCry2S = SoundID 78 +seagullCry2S = SoundID 83 gut5S :: SoundID -gut5S = SoundID 79 +gut5S = SoundID 84 ting2S :: SoundID -ting2S = SoundID 80 +ting2S = SoundID 85 dededaS :: SoundID -dededaS = SoundID 81 +dededaS = SoundID 86 whirdownSmall2S :: SoundID -whirdownSmall2S = SoundID 82 +whirdownSmall2S = SoundID 87 seagullCryS :: SoundID -seagullCryS = SoundID 83 +seagullCryS = SoundID 88 gut3S :: SoundID -gut3S = SoundID 84 +gut3S = SoundID 89 metal7S :: SoundID -metal7S = SoundID 85 +metal7S = SoundID 90 glassShat4S :: SoundID -glassShat4S = SoundID 86 +glassShat4S = SoundID 91 footPin1S :: SoundID -footPin1S = SoundID 87 +footPin1S = SoundID 92 energyReleaseS :: SoundID -energyReleaseS = SoundID 88 +energyReleaseS = SoundID 93 tone440S :: SoundID -tone440S = SoundID 89 +tone440S = SoundID 94 explosionS :: SoundID -explosionS = SoundID 90 +explosionS = SoundID 95 gut4S :: SoundID -gut4S = SoundID 91 +gut4S = SoundID 96 glassShat1S :: SoundID -glassShat1S = SoundID 92 +glassShat1S = SoundID 97 slap3S :: SoundID -slap3S = SoundID 93 +slap3S = SoundID 98 reload1S :: SoundID -reload1S = SoundID 94 +reload1S = SoundID 99 slapClean3S :: SoundID -slapClean3S = SoundID 95 +slapClean3S = SoundID 100 foot2S :: SoundID -foot2S = SoundID 96 +foot2S = SoundID 101 glassShat2S :: SoundID -glassShat2S = SoundID 97 +glassShat2S = SoundID 102 fireS :: SoundID -fireS = SoundID 98 +fireS = SoundID 103 glassShat3S :: SoundID -glassShat3S = SoundID 99 +glassShat3S = SoundID 104 insertS :: SoundID -insertS = SoundID 100 +insertS = SoundID 105 blood1S :: SoundID -blood1S = SoundID 101 +blood1S = SoundID 106 ting3S :: SoundID -ting3S = SoundID 102 +ting3S = SoundID 107 whirdownS :: SoundID -whirdownS = SoundID 103 +whirdownS = SoundID 108 gut6S :: SoundID -gut6S = SoundID 104 +gut6S = SoundID 109 whirdownShort3S :: SoundID -whirdownShort3S = SoundID 105 +whirdownShort3S = SoundID 110 debrisS :: SoundID -debrisS = SoundID 106 +debrisS = SoundID 111 tap3S :: SoundID -tap3S = SoundID 107 +tap3S = SoundID 112 +slurp1S :: SoundID +slurp1S = SoundID 113 backgroundSpaceS :: SoundID -backgroundSpaceS = SoundID 108 +backgroundSpaceS = SoundID 114 lasPulseS :: SoundID -lasPulseS = SoundID 109 +lasPulseS = SoundID 115 clang2S :: SoundID -clang2S = SoundID 110 +clang2S = SoundID 116 metal2S :: SoundID -metal2S = SoundID 111 +metal2S = SoundID 117 tingS :: SoundID -tingS = SoundID 112 +tingS = SoundID 118 autoBS :: SoundID -autoBS = SoundID 113 +autoBS = SoundID 119 +slurp3S :: SoundID +slurp3S = SoundID 120 knifeS :: SoundID -knifeS = SoundID 114 +knifeS = SoundID 121 combineS :: SoundID -combineS = SoundID 115 +combineS = SoundID 122 connectItemS :: SoundID -connectItemS = SoundID 116 +connectItemS = SoundID 123 slapClean7S :: SoundID -slapClean7S = SoundID 117 +slapClean7S = SoundID 124 footPin2S :: SoundID -footPin2S = SoundID 118 +footPin2S = SoundID 125 seagullWhistle1S :: SoundID -seagullWhistle1S = SoundID 119 +seagullWhistle1S = SoundID 126 bloodShort6S :: SoundID -bloodShort6S = SoundID 120 +bloodShort6S = SoundID 127 hitS :: SoundID -hitS = SoundID 121 +hitS = SoundID 128 whirdownShort4S :: SoundID -whirdownShort4S = SoundID 122 +whirdownShort4S = SoundID 129 sineRaisePitchOneSecS :: SoundID -sineRaisePitchOneSecS = SoundID 123 +sineRaisePitchOneSecS = SoundID 130 dededumS :: SoundID -dededumS = SoundID 124 +dededumS = SoundID 131 throbC4S :: SoundID -throbC4S = SoundID 125 +throbC4S = SoundID 132 whirTapS :: SoundID -whirTapS = SoundID 126 +whirTapS = SoundID 133 ting5S :: SoundID -ting5S = SoundID 127 +ting5S = SoundID 134 stone2S :: SoundID -stone2S = SoundID 128 +stone2S = SoundID 135 blood6S :: SoundID -blood6S = SoundID 129 +blood6S = SoundID 136 pickUpS :: SoundID -pickUpS = SoundID 130 +pickUpS = SoundID 137 slap2S :: SoundID -slap2S = SoundID 131 +slap2S = SoundID 138 bloodShort2S :: SoundID -bloodShort2S = SoundID 132 +bloodShort2S = SoundID 139 foamSprayFadeOutS :: SoundID -foamSprayFadeOutS = SoundID 133 +foamSprayFadeOutS = SoundID 140 metal6S :: SoundID -metal6S = SoundID 134 +metal6S = SoundID 141 tap1S :: SoundID -tap1S = SoundID 135 +tap1S = SoundID 142 click1S :: SoundID -click1S = SoundID 136 +click1S = SoundID 143 semitoneLoop1S :: SoundID -semitoneLoop1S = SoundID 137 +semitoneLoop1S = SoundID 144 disconnectItemS :: SoundID -disconnectItemS = SoundID 138 +disconnectItemS = SoundID 145 dedumS :: SoundID -dedumS = SoundID 139 +dedumS = SoundID 146 sawtoothFailS :: SoundID -sawtoothFailS = SoundID 140 +sawtoothFailS = SoundID 147 sineRaisePitchTwoSecS :: SoundID -sineRaisePitchTwoSecS = SoundID 141 +sineRaisePitchTwoSecS = SoundID 148 slap4S :: SoundID -slap4S = SoundID 142 +slap4S = SoundID 149 skwareFadeTwoSecS :: SoundID -skwareFadeTwoSecS = SoundID 143 +skwareFadeTwoSecS = SoundID 150 reloadFailS :: SoundID -reloadFailS = SoundID 144 +reloadFailS = SoundID 151 throb1S :: SoundID -throb1S = SoundID 145 +throb1S = SoundID 152 slap5S :: SoundID -slap5S = SoundID 146 +slap5S = SoundID 153 smallGlass3S :: SoundID -smallGlass3S = SoundID 147 +smallGlass3S = SoundID 154 reverseCymbal1S :: SoundID -reverseCymbal1S = SoundID 148 +reverseCymbal1S = SoundID 155 blood2S :: SoundID -blood2S = SoundID 149 +blood2S = SoundID 156 insertOneS :: SoundID -insertOneS = SoundID 150 +insertOneS = SoundID 157 +pop2S :: SoundID +pop2S = SoundID 158 slap1S :: SoundID -slap1S = SoundID 151 +slap1S = SoundID 159 tap4S :: SoundID -tap4S = SoundID 152 +tap4S = SoundID 160 clang1S :: SoundID -clang1S = SoundID 153 +clang1S = SoundID 161 foot1S :: SoundID -foot1S = SoundID 154 +foot1S = SoundID 162 elecCrackleS :: SoundID -elecCrackleS = SoundID 155 +elecCrackleS = SoundID 163 foamSprayLoopS :: SoundID -foamSprayLoopS = SoundID 156 +foamSprayLoopS = SoundID 164 smallGlass1S :: SoundID -smallGlass1S = SoundID 157 +smallGlass1S = SoundID 165 bangS :: SoundID -bangS = SoundID 158 +bangS = SoundID 166 buzz1S :: SoundID -buzz1S = SoundID 159 +buzz1S = SoundID 167 seagullChatterS :: SoundID -seagullChatterS = SoundID 160 +seagullChatterS = SoundID 168 foot3S :: SoundID -foot3S = SoundID 161 +foot3S = SoundID 169 bloodShort3S :: SoundID -bloodShort3S = SoundID 162 +bloodShort3S = SoundID 170 blood4S :: SoundID -blood4S = SoundID 163 +blood4S = SoundID 171 ejectS :: SoundID -ejectS = SoundID 164 +ejectS = SoundID 172 bloodShort4S :: SoundID -bloodShort4S = SoundID 165 +bloodShort4S = SoundID 173 metal1S :: SoundID -metal1S = SoundID 166 +metal1S = SoundID 174 slapClean5S :: SoundID -slapClean5S = SoundID 167 +slapClean5S = SoundID 175 warp1S :: SoundID -warp1S = SoundID 168 +warp1S = SoundID 176 tinitusS :: SoundID -tinitusS = SoundID 169 +tinitusS = SoundID 177 gut1S :: SoundID -gut1S = SoundID 170 +gut1S = SoundID 178 fireFadeS :: SoundID -fireFadeS = SoundID 171 +fireFadeS = SoundID 179 diff --git a/src/Dodge/TestString.hs b/src/Dodge/TestString.hs index 313c13521..e281e5acc 100644 --- a/src/Dodge/TestString.hs +++ b/src/Dodge/TestString.hs @@ -51,7 +51,6 @@ testStringInit u = u ^.. tocrs . ix 1 . crPos . _xy . to show <> u ^.. tocrs . ix 1 . crType . slimeIsCompressing . to show <> u ^.. tocrs . ix 1 . crDir . to show <> u ^.. tocrs . ix 1 . crDamage . to show - <> u ^.. tocrs . each . crType . to crRad . to show -- <> u ^.. tocrs . each . crID . to show -- where -- tocr = uvWorld . cWorld . lWorld . creatures . ix 0 diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index fef9fee4b..13664b4df 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -1019,9 +1019,10 @@ crCrSpring c1 c2 return $ z c1 > h2 || z c2 > h1 olap a b = ix (a ^. crID) . crPos . _xy +~ overlap b olap' a b = ix (a ^. crID) . crPos . _xy -~ overlap b - suckx = min 1 $ 2 * (1 - distance xy1 xy2 / (r1 + r2)) - rolap = ix id1 . crPos . _xy +~ (suckx * 1.5 * m2 / (m1+m2)) *^ normalize (xy2 - xy1) - rolap' = ix id2 . crPos . _xy +~ (suckx * 1.5*m1 / (m1+m2)) *^ normalize (xy1 - xy2) + suckx = (min 1 $ 2 * (1 - distance xy1 xy2 / (r1 + r2))) ^ (2:: Int) + rolap = ix id1 . crPos . _xy +~ f (suckx * 1.5 * m2 / (m1+m2)) *^ normalize (xy2 - xy1) + rolap' = ix id2 . crPos . _xy +~ f (suckx * 1.5*m1 / (m1+m2)) *^ normalize (xy1 - xy2) + f = min (distance xy1 xy2/2) id1 = _crID c1 id2 = _crID c2 xy1 = c1 ^. crPos . _xy @@ -1039,6 +1040,7 @@ crCrSpring c1 c2 fuseSlimes :: Creature -> Creature -> World -> World fuseSlimes c1 c2 = (cWorld . lWorld . creatures . ix mini .~ c) . (cWorld . lWorld . creatures . at maxi .~ Nothing) + . dosound where c' | c1 ^?! crType . slimeRad > c2 ^?! crType . slimeRad = c1 | otherwise = c2 @@ -1053,6 +1055,10 @@ fuseSlimes c1 c2 = (cWorld . lWorld . creatures . ix mini .~ c) r1 = c1 ^?! crType . slimeRad r2 = c2 ^?! crType . slimeRad r = sqrt (r1*r1 + r2*r2) + dosound w = w & soundStart (CrSound i1) (c ^. crPos . _xy) s Nothing + & randGen .~ g + where + (s,g) = runState (takeOne [slurp1S,slurp2S,slurp3S,slurp4S,slurp5S]) (w ^. randGen) updateDelayedEvents :: World -> World