This commit is contained in:
2024-09-30 12:54:31 +01:00
parent 65564c993b
commit fc5539cb38
58 changed files with 802 additions and 1255 deletions
+1 -110
View File
@@ -1,110 +1 @@
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:4:1-37: warning: [-Wunused-imports]
The qualified import of Data.Map.Strict is redundant
|
4 | import qualified Data.Map.Strict as M
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:6:1-24: warning: [-Wunused-imports]
The import of Dodge.Module.Info is redundant
|
6 | import Dodge.Module.Info
| ^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:8:1-17: warning: [-Wunused-imports]
The import of StringHelp is redundant
|
8 | import StringHelp
| ^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Data/Item/Combine.hs:12:1-37: warning: [-Wunused-imports]
The qualified import of Data.Map.Strict is redundant
|
12 | import qualified Data.Map.Strict as M
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Data/Item/Combine.hs:15:1-38: warning: [-Wunused-imports]
The import of Dodge.Data.Item.Use.Consumption is redundant
|
15 | import Dodge.Data.Item.Use.Consumption
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:8:1-17: warning: [-Wunused-top-binds]
Defined but not used: displayBulletBody
|
8 | displayBulletBody be = case be of
| ^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:14:1-20: warning: [-Wunused-top-binds]
Defined but not used: displayBulletPayload
|
14 | displayBulletPayload x = case x of
| ^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:22:1-21: warning: [-Wunused-top-binds]
Defined but not used: displayEnergyBallType
|
22 | displayEnergyBallType ebt = case ebt of
| ^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:29:1-17: warning: [-Wunused-top-binds]
Defined but not used: displayBulletTraj
|
29 | displayBulletTraj x = case x of
| ^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Module.hs:7:1-37: warning: [-Wunused-imports]
The qualified import of Data.Map.Strict is redundant
|
7 | import qualified Data.Map.Strict as M
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Module.hs:8:1-22: warning: [-Wunused-imports]
The import of Dodge.Data.Item is redundant
|
8 | import Dodge.Data.Item
| ^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Module.hs:9:1-24: warning: [-Wunused-imports]
The import of Dodge.Module.Info is redundant
|
9 | import Dodge.Module.Info
| ^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/SlotsTaken.hs:7:1-19: warning: [-Wunused-imports]
The import of Dodge.Module is redundant
|
7 | import Dodge.Module
| ^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Held/BatteryGuns.hs:9:1-37: warning: [-Wunused-imports]
The qualified import of Data.Map.Strict is redundant
|
9 | import qualified Data.Map.Strict as M
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:8:1-37: warning: [-Wunused-imports]
The qualified import of Data.Map.Strict is redundant
|
8 | import qualified Data.Map.Strict as M
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:16:1-19: warning: [-Wunused-imports]
The import of Dodge.Module is redundant
|
16 | import Dodge.Module
| ^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:3:1-20: warning: [-Wunused-imports]
The import of Data.Foldable is redundant
|
3 | import Data.Foldable
| ^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:4:1-22: warning: [-Wunused-imports]
The import of Dodge.Data.Beam is redundant
|
4 | import Dodge.Data.Beam
| ^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:5:1-22: warning: [-Wunused-imports]
The import of Dodge.Data.Item is redundant
|
5 | import Dodge.Data.Item
| ^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:6:1-18: warning: [-Wunused-imports]
The import of Dodge.Tesla is redundant
|
6 | import Dodge.Tesla
| ^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:7:1-15: warning: [-Wunused-imports]
The import of Geometry is redundant
|
7 | import Geometry
| ^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:8:1-15: warning: [-Wunused-imports]
The import of LensHelp is redundant
|
8 | import LensHelp
| ^^^^^^^^^^^^^^^
All good (611 modules, at 12:49:31)
+160 -204
View File
@@ -10,94 +10,84 @@ digraph {
11 [shape=box
,label="EQUIP {_ibtEquip = FUELPACK}"];
15 [shape=box
,label="EQUIP {_ibtEquip = TARGETINGHAT TARGETLASER}"];
16 [shape=box
,label="EQUIP {_ibtEquip = HAT}"];
19 [shape=box
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetRBPress}"];
22 [shape=box
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetRBLine}"];
25 [shape=box
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetRBCreature}"];
28 [shape=box
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetCursor}"];
31 [shape=box
,label="AMMOMAG {_ibtAmmoMag = TINMAG}"];
35 [shape=box
19 [shape=box
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 1}}"];
39 [shape=box
23 [shape=box
,label="HELD {_ibtHeld = PISTOL}"];
41 [shape=box
25 [shape=box
,label="HELD {_ibtHeld = AUTOPISTOL}"];
43 [shape=box
27 [shape=box
,label="HELD {_ibtHeld = SMG}"];
46 [shape=box
30 [shape=box
,label="HELD {_ibtHeld = MACHINEPISTOL}"];
48 [shape=box
32 [shape=box
,label="HELD {_ibtHeld = BANGCONE}"];
51 [shape=box
35 [shape=box
,label="HELD {_ibtHeld = BLUNDERBUSS}"];
53 [shape=box
37 [shape=box
,label="HELD {_ibtHeld = GRAPECANNON {_xNum = 1}}"];
55 [shape=box
39 [shape=box
,label="HELD {_ibtHeld = RIFLE}"];
57 [shape=box
41 [shape=box
,label="HELD {_ibtHeld = VOLLEYGUN {_xNum = 3}}"];
59 [shape=box
43 [shape=box
,label="HELD {_ibtHeld = AUTORIFLE}"];
61 [shape=box
45 [shape=box
,label="HELD {_ibtHeld = BURSTRIFLE}"];
63 [shape=box
47 [shape=box
,label="HELD {_ibtHeld = MINIGUNX {_xNum = 3}}"];
66 [shape=box
50 [shape=box
,label="HELD {_ibtHeld = SNIPERRIFLE}"];
67 [shape=box
51 [shape=box
,label="HELD {_ibtHeld = AMR}"];
70 [shape=box
54 [shape=box
,label="HELD {_ibtHeld = AUTOAMR}"];
72 [shape=box
56 [shape=box
,label="HELD {_ibtHeld = LAUNCHER}"];
75 [shape=box
59 [shape=box
,label="HELD {_ibtHeld = LAUNCHERX {_xNum = 2}}"];
79 [shape=box
63 [shape=box
,label="HELD {_ibtHeld = FLAMESPITTER}"];
83 [shape=box
67 [shape=box
,label="HELD {_ibtHeld = BLOWTORCH}"];
85 [shape=box
69 [shape=box
,label="HELD {_ibtHeld = FLAMETHROWER}"];
87 [shape=box
71 [shape=box
,label="HELD {_ibtHeld = FLAMEWALL}"];
89 [shape=box
73 [shape=box
,label="HELD {_ibtHeld = FLAMETORRENT}"];
91 [shape=box
75 [shape=box
,label="HELD {_ibtHeld = LASGUN}"];
95 [shape=box
79 [shape=box
,label="HELD {_ibtHeld = SPARKGUN}"];
97 [shape=box
81 [shape=box
,label="HELD {_ibtHeld = TESLAGUN}"];
99 [shape=box
83 [shape=box
,label="LEFT {_ibtLeft = BLINKER}"];
102 [shape=box
,label="LEFT {_ibtLeft = BLINKERUNSAFE}"];
104 [shape=box
,label="EQUIP {_ibtEquip = MAGSHIELD}"];
86 [shape=box
,label="LEFT {_ibtLeft = BLINKERUNSAFE}"];
88 [shape=box
,label="EQUIP {_ibtEquip = MAGSHIELD}"];
91 [shape=box
,label="EQUIP {_ibtEquip = POWERLEGS}"];
97 [shape=box
,label="HELD {_ibtHeld = FLATSHIELD}"];
107 [shape=box
,label="EQUIP {_ibtEquip = POWERLEGS}"];
113 [shape=box
,label="HELD {_ibtHeld = FLATSHIELD}"];
123 [shape=box
,label="EQUIP {_ibtEquip = AUTODETECTOR ITEMDETECTOR}"];
126 [shape=box
110 [shape=box
,label="EQUIP {_ibtEquip = AUTODETECTOR WALLDETECTOR}"];
128 [shape=box
112 [shape=box
,label="EQUIP {_ibtEquip = AUTODETECTOR CREATUREDETECTOR}"];
130 [shape=box
114 [shape=box
,label="HELD {_ibtHeld = TORCH}"];
131 [shape=box
115 [shape=box
,label="AMMOMAG {_ibtAmmoMag = BATTERY}"];
134 [shape=box
118 [shape=box
,label="EQUIP {_ibtEquip = HEADLAMP}"];
140 [shape=box
119 [shape=box
,label="EQUIP {_ibtEquip = HAT}"];
121 [shape=box
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 2}}"];
}
subgraph 2 {
@@ -107,60 +97,53 @@ digraph {
10 [shape=point];
14 [shape=point];
18 [shape=point];
21 [shape=point];
22 [shape=point];
24 [shape=point];
27 [shape=point];
30 [shape=point];
26 [shape=point];
29 [shape=point];
31 [shape=point];
34 [shape=point];
36 [shape=point];
38 [shape=point];
40 [shape=point];
42 [shape=point];
45 [shape=point];
47 [shape=point];
50 [shape=point];
44 [shape=point];
46 [shape=point];
49 [shape=point];
52 [shape=point];
54 [shape=point];
56 [shape=point];
53 [shape=point];
55 [shape=point];
58 [shape=point];
60 [shape=point];
62 [shape=point];
65 [shape=point];
66 [shape=point];
68 [shape=point];
69 [shape=point];
71 [shape=point];
70 [shape=point];
72 [shape=point];
74 [shape=point];
76 [shape=point];
78 [shape=point];
80 [shape=point];
82 [shape=point];
84 [shape=point];
86 [shape=point];
88 [shape=point];
85 [shape=point];
87 [shape=point];
90 [shape=point];
93 [shape=point];
94 [shape=point];
95 [shape=point];
96 [shape=point];
98 [shape=point];
101 [shape=point];
100 [shape=point];
103 [shape=point];
106 [shape=point];
109 [shape=point];
110 [shape=point];
111 [shape=point];
112 [shape=point];
114 [shape=point];
116 [shape=point];
119 [shape=point];
113 [shape=point];
117 [shape=point];
120 [shape=point];
122 [shape=point];
125 [shape=point];
127 [shape=point];
129 [shape=point];
133 [shape=point];
135 [shape=point];
137 [shape=point];
139 [shape=point];
141 [shape=point];
143 [shape=point];
145 [shape=point];
147 [shape=point];
124 [shape=point];
126 [shape=point];
128 [shape=point];
}
0 -> 1 [xlabel="",tailport=e];
2 -> 0 [xlabel=1
@@ -173,176 +156,149 @@ digraph {
8 -> 1 [xlabel="",tailport=e];
10 -> 11 [xlabel="",tailport=e];
14 -> 15 [xlabel="",tailport=e];
16 -> 14 [xlabel=1
,arrowhead=onone
,headport=w];
16 -> 18 [xlabel=1
,arrowhead=onone
,headport=w];
16 -> 21 [xlabel=1
,arrowhead=onone
,headport=w];
16 -> 24 [xlabel=1
,arrowhead=onone
,headport=w];
16 -> 27 [xlabel=1
,arrowhead=onone
,headport=w];
16 -> 133 [xlabel=1
,arrowhead=onone
,headport=w];
18 -> 19 [xlabel="",tailport=e];
21 -> 22 [xlabel="",tailport=e];
19 -> 22 [xlabel=1
,arrowhead=onone
,headport=w];
19 -> 38 [xlabel=1
,arrowhead=onone
,headport=w];
19 -> 40 [xlabel=1
,arrowhead=onone
,headport=w];
19 -> 40 [xlabel=1
,arrowhead=onone
,headport=w];
19 -> 40 [xlabel=1
,arrowhead=onone
,headport=w];
19 -> 120 [xlabel=1
,arrowhead=onone
,headport=w];
19 -> 124 [xlabel=1
,arrowhead=onone
,headport=w];
19 -> 126 [xlabel=1
,arrowhead=onone
,headport=w];
22 -> 23 [xlabel="",tailport=e];
23 -> 24 [xlabel=1
,arrowhead=onone
,headport=w];
24 -> 25 [xlabel="",tailport=e];
27 -> 28 [xlabel="",tailport=e];
30 -> 31 [xlabel="",tailport=e];
25 -> 26 [xlabel=1
,arrowhead=onone
,headport=w];
25 -> 29 [xlabel=1
,arrowhead=onone
,headport=w];
26 -> 27 [xlabel="",tailport=e];
29 -> 30 [xlabel="",tailport=e];
31 -> 32 [xlabel="",tailport=e];
32 -> 34 [xlabel=1
,arrowhead=onone
,headport=w];
34 -> 35 [xlabel="",tailport=e];
35 -> 38 [xlabel=1
35 -> 36 [xlabel=1
,arrowhead=onone
,headport=w];
35 -> 54 [xlabel=1
,arrowhead=onone
,headport=w];
35 -> 56 [xlabel=1
,arrowhead=onone
,headport=w];
35 -> 56 [xlabel=1
,arrowhead=onone
,headport=w];
35 -> 56 [xlabel=1
,arrowhead=onone
,headport=w];
35 -> 139 [xlabel=1
,arrowhead=onone
,headport=w];
35 -> 143 [xlabel=1
,arrowhead=onone
,headport=w];
35 -> 145 [xlabel=1
36 -> 37 [xlabel="",tailport=e];
37 -> 128 [xlabel=1
,arrowhead=onone
,headport=w];
38 -> 39 [xlabel="",tailport=e];
39 -> 40 [xlabel=1
39 -> 42 [xlabel=1
,arrowhead=onone
,headport=w];
39 -> 44 [xlabel=1
,arrowhead=onone
,headport=w];
39 -> 52 [xlabel=1
,arrowhead=onone
,headport=w];
40 -> 41 [xlabel="",tailport=e];
41 -> 42 [xlabel=1
,arrowhead=onone
,headport=w];
41 -> 45 [xlabel=1
41 -> 46 [xlabel=1
,arrowhead=onone
,headport=w];
41 -> 124 [xlabel=1
,arrowhead=onone
,headport=w];
42 -> 43 [xlabel="",tailport=e];
45 -> 46 [xlabel="",tailport=e];
47 -> 48 [xlabel="",tailport=e];
48 -> 50 [xlabel=1
,arrowhead=onone
,headport=w];
50 -> 51 [xlabel="",tailport=e];
51 -> 52 [xlabel=1
,arrowhead=onone
,headport=w];
52 -> 53 [xlabel="",tailport=e];
53 -> 147 [xlabel=1
44 -> 45 [xlabel="",tailport=e];
46 -> 47 [xlabel="",tailport=e];
47 -> 126 [xlabel=1
,arrowhead=onone
,headport=w];
54 -> 55 [xlabel="",tailport=e];
55 -> 58 [xlabel=1
49 -> 50 [xlabel="",tailport=e];
51 -> 49 [xlabel=1
,arrowhead=onone
,headport=w];
55 -> 60 [xlabel=1
51 -> 53 [xlabel=1
,arrowhead=onone
,headport=w];
55 -> 68 [xlabel=1
52 -> 51 [xlabel="",tailport=e];
53 -> 54 [xlabel="",tailport=e];
55 -> 56 [xlabel="",tailport=e];
56 -> 58 [xlabel=1
,arrowhead=onone
,headport=w];
56 -> 57 [xlabel="",tailport=e];
57 -> 62 [xlabel=1
,arrowhead=onone
,headport=w];
57 -> 143 [xlabel=1
,arrowhead=onone
,headport=w];
58 -> 59 [xlabel="",tailport=e];
60 -> 61 [xlabel="",tailport=e];
59 -> 60 [xlabel=1
,arrowhead=onone
,headport=w];
62 -> 63 [xlabel="",tailport=e];
63 -> 145 [xlabel=1
,arrowhead=onone
,headport=w];
65 -> 66 [xlabel="",tailport=e];
67 -> 65 [xlabel=1
63 -> 66 [xlabel=1
,arrowhead=onone
,headport=w];
67 -> 69 [xlabel=1
63 -> 68 [xlabel=1
,arrowhead=onone
,headport=w];
68 -> 67 [xlabel="",tailport=e];
69 -> 70 [xlabel="",tailport=e];
71 -> 72 [xlabel="",tailport=e];
72 -> 74 [xlabel=1
66 -> 67 [xlabel="",tailport=e];
68 -> 69 [xlabel="",tailport=e];
69 -> 70 [xlabel=1
,arrowhead=onone
,headport=w];
69 -> 72 [xlabel=1
,arrowhead=onone
,headport=w];
70 -> 71 [xlabel="",tailport=e];
72 -> 73 [xlabel="",tailport=e];
74 -> 75 [xlabel="",tailport=e];
75 -> 76 [xlabel=1
,arrowhead=onone
,headport=w];
78 -> 79 [xlabel="",tailport=e];
79 -> 82 [xlabel=1
,arrowhead=onone
,headport=w];
79 -> 84 [xlabel=1
79 -> 80 [xlabel=1
,arrowhead=onone
,headport=w];
80 -> 81 [xlabel="",tailport=e];
82 -> 83 [xlabel="",tailport=e];
84 -> 85 [xlabel="",tailport=e];
85 -> 86 [xlabel=1
83 -> 85 [xlabel=1
,arrowhead=onone
,headport=w];
85 -> 88 [xlabel=1
,arrowhead=onone
,headport=w];
86 -> 87 [xlabel="",tailport=e];
88 -> 89 [xlabel="",tailport=e];
85 -> 86 [xlabel="",tailport=e];
87 -> 88 [xlabel="",tailport=e];
90 -> 91 [xlabel="",tailport=e];
94 -> 95 [xlabel="",tailport=e];
95 -> 96 [xlabel=1
,arrowhead=onone
,headport=w];
96 -> 97 [xlabel="",tailport=e];
98 -> 99 [xlabel="",tailport=e];
99 -> 101 [xlabel=1
,arrowhead=onone
,headport=w];
101 -> 102 [xlabel=""
,tailport=e];
103 -> 104 [xlabel=""
,tailport=e];
106 -> 107 [xlabel=""
,tailport=e];
112 -> 113 [xlabel=""
109 -> 110 [xlabel=""
,tailport=e];
122 -> 123 [xlabel=""
111 -> 112 [xlabel=""
,tailport=e];
125 -> 126 [xlabel=""
113 -> 114 [xlabel=""
,tailport=e];
127 -> 128 [xlabel=""
,tailport=e];
129 -> 130 [xlabel=""
,tailport=e];
130 -> 133 [xlabel=1
114 -> 117 [xlabel=1
,arrowhead=onone
,headport=w];
131 -> 129 [xlabel=1
115 -> 113 [xlabel=1
,arrowhead=onone
,headport=w];
131 -> 137 [xlabel=1
117 -> 118 [xlabel=""
,tailport=e];
119 -> 117 [xlabel=1
,arrowhead=onone
,headport=w];
133 -> 134 [xlabel=""
120 -> 121 [xlabel=""
,tailport=e];
139 -> 140 [xlabel=""
,tailport=e];
140 -> 141 [xlabel=1
121 -> 122 [xlabel=1
,arrowhead=onone
,headport=w];
}
+10 -8
View File
@@ -91,7 +91,7 @@ ELECautoRect-6
| | |
| | autoDoor-45
| | |
| | autoRect-46
| | rect-46
| | |
| | +- autoDoor-47
| | | |
@@ -127,17 +127,19 @@ ELECautoRect-6
| | | |
| | | defaultRoom-63
| | |
| | autoDoor-64
| | Corridor-64
| | |
| | autoDoor-65
| |
| autoDoor-65
| autoDoor-66
| |
| Corridor-66
| Corridor-67
| |
| autoRect-67
| autoRect-68
|
autoDoor-68
autoDoor-69
|
Corridor-69
Corridor-70
|
autoRect-70
autoRect-71
+1 -1
View File
@@ -1,4 +1,4 @@
Generating level with seed 7114951007332849727
After 1 attempt(s), Successful generation of level with seed 7114951007332849727
71 rooms in total
72 rooms in total
+9 -7
View File
@@ -35,7 +35,7 @@ Seed: 7114951007332849727
|
17:corDoor
|
18:PassthroughLockKeyLists-HELD {_ibtHeld = MINIGUNX {_xNum = 3}}
18:PassthroughLockKeyLists-HELD {_ibtHeld = SNIPERRIFLE}
|
19:corDoor
|
@@ -203,23 +203,25 @@ Seed: 7114951007332849727
|
17:0:1:Corridor
18:0:PassthroughLockKeyLists-HELD {_ibtHeld = MINIGUNX {_xNum = 3}}
18:0:PassthroughLockKeyLists-HELD {_ibtHeld = SNIPERRIFLE}
18:0:0:RassThroughLockKeyLists
|
18:0:1:roomsContaining chaseCritchaseCritchaseCritMOTORHARDWAREPIPEPIPEPIPEPIPEPIPEPIPE
18:0:1:roomsContaining chaseCritchaseCritSNIPERRIFLE
18:0:0:0:slowDoorRoomRunPast
18:0:0:0:longRoomRunPast
18:0:0:0:0:autoDoor
|
18:0:0:0:1:autoRect
18:0:0:0:1:rect
|
+- 18:0:0:0:2:autoDoor
|
18:0:0:0:3:autoDoor
18:0:0:0:3:Corridor
|
18:0:0:0:4:autoDoor
18:0:1:0:autoRect
18:0:1:0:rectPillars
19:0:corDoor
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -17,8 +17,8 @@ data Annotation
| AnRoom (State StdGen Room)
| AnTree (State StdGen (MetaTree Room String))
| PassthroughLockKeyLists
[(Int -> State StdGen (MetaTree Room String), State StdGen ItemBaseType)]
[(ItemBaseType, State StdGen (MetaTree Room String))]
[(Int -> State StdGen (MetaTree Room String), State StdGen ItemType)]
[(ItemType, State StdGen (MetaTree Room String))]
Int
makeLenses ''Annotation
+4 -10
View File
@@ -3,32 +3,26 @@ module Dodge.Combine (
combineList,
) where
--import Control.Lens
--import Control.Monad
import Data.Bifunctor
--import qualified Data.IntSet as IS
import Data.List (sortOn)
--import Data.Map.Merge.Strict
import qualified Data.Map.Strict as M
--import Data.Maybe
import Dodge.Base.You
import Dodge.Combine.Trie
import Dodge.Data.Combine
import Dodge.Data.Universe
import Dodge.Item.Display
import Dodge.Item.InventoryColor
import Dodge.Item.SlotsTaken
--import Dodge.Module
import qualified IntMapHelp as IM
import SimpleTrie
invertInventoryToMap :: IM.IntMap Item -> M.Map ItemBaseType [Int]
invertInventoryToMap :: IM.IntMap Item -> M.Map ItemType [Int]
invertInventoryToMap =
IM.foldrWithKey
(\k it -> M.insertWith (++) (_iyBase $ _itType it) [k])
(\k it -> M.insertWith (++) (_itType it) [k])
mempty
groupSplitItemAmounts :: M.Map ItemBaseType [Int] -> [((ItAmount, ItemBaseType), [Int])]
groupSplitItemAmounts :: M.Map ItemType [Int] -> [((ItAmount, ItemType), [Int])]
groupSplitItemAmounts = M.foldrWithKey f []
where
f ibt is = (++) [((fromIntegral i, ibt), take i is) | i <- [1 .. length is]]
@@ -47,7 +41,7 @@ combineList = map f . combineListInfo
f (is, (strs, itm)) =
SelectionItem
{ _siPictures = basicItemDisplay itm
, _siHeight = itSlotsTaken itm
, _siHeight = _itInvSize itm
, _siIsSelectable = True
, _siColor = itemInvColor itm
, _siOffX = 0
+5 -5
View File
@@ -12,7 +12,7 @@ import Dodge.Data.Item
import Dodge.Item
import LensHelp
watchCombinations :: [([(ItAmount, ItemBaseType)], Item)]
watchCombinations :: [([(ItAmount, ItemType)], Item)]
watchCombinations =
[ po [LEFT STOPWATCH, LEFT REWINDWATCH] scrollWatch
, po [CRAFT TIMEMODULE, CRAFT MICROCHIP, CRAFT HARDDRIVE] scrollWatch
@@ -22,7 +22,7 @@ watchCombinations =
po xs it = (map o xs, it)
o = (1,)
backpackCombinations :: [([(ItAmount,ItemBaseType)],Item)]
backpackCombinations :: [([(ItAmount,ItemType)],Item)]
backpackCombinations =
[ po [CRAFT HOSE, CRAFT STEELDRUM] fuelPack
]
@@ -38,7 +38,7 @@ backpackCombinations =
-- po xs it = (map o xs, it)
-- o = (1,)
magazineCombinations :: [([(ItAmount,ItemBaseType)],Item)]
magazineCombinations :: [([(ItAmount,ItemType)],Item)]
magazineCombinations =
[ po [CRAFT TIN, CRAFT SPRING] tinMag
]
@@ -46,12 +46,12 @@ magazineCombinations =
po xs it = (map o xs, it)
o = (1,)
flatItemCombinations :: [([ItemBaseType], Item)]
flatItemCombinations :: [([ItemType], Item)]
flatItemCombinations = map (over _1 (concatMap f)) itemCombinations
where
f (x,it) = replicate (_getItAmount x) it
itemCombinations :: [([(ItAmount, ItemBaseType)], Item)]
itemCombinations :: [([(ItAmount, ItemType)], Item)]
itemCombinations =
watchCombinations ++
backpackCombinations ++
+8 -9
View File
@@ -1,5 +1,4 @@
--{-# LANGUAGE TypeSynonymInstances #-}
--{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
module Dodge.Combine.Graph where
import Dodge.Data.Item
import Dodge.Combine.Combinations
@@ -19,7 +18,7 @@ data CombClust
| JoinClust
deriving (Eq,Ord,Show,Enum,Bounded)
newtype CombNode = CombNode {_unCombNode :: Either ItemBaseType [(ItAmount,ItemBaseType)]}
newtype CombNode = CombNode {_unCombNode :: Either ItemType [(ItAmount,ItemType)]}
deriving (Eq,Ord,Show)
instance Labellable CombNode where
@@ -32,17 +31,17 @@ instance Labellable CombEdge where
toLabelValue (CombEdge 0) = StrLabel (pack "")
toLabelValue (CombEdge x) = StrLabel (pack $ show x)
bulletCombinations :: [([(ItAmount,ItemBaseType)],Item)]
bulletCombinations :: [([(ItAmount,ItemType)],Item)]
bulletCombinations = filter
( (`elem` map totype bulletWeapons)
. totype
. snd
) itemCombinations
where
totype = _iyBase . _itType
totype = _itType
maxShowX :: ItemBaseType -> Maybe Int
maxShowX bt = case bt of
maxShowX :: ItemType -> Maybe Int
maxShowX = \case
HELD (BANGSTICK _) -> Just 2
HELD (VOLLEYGUN _) -> Just 3
HELD (MINIGUNX _) -> Just 3
@@ -53,7 +52,7 @@ maxShowX bt = case bt of
_ -> Nothing
itemCombinationsEdges :: [(CombNode,CombNode,Int)]
itemCombinationsEdges = concatMap (f . over _2 (_iyBase . _itType)) itemCombinations
itemCombinationsEdges = concatMap (f . over _2 (_itType)) itemCombinations
--itemCombinationsEdges = concatMap (f . over _2 (_iyBase . _itType)) bulletCombinations
where
f (abts,bt)
@@ -74,7 +73,7 @@ combinationsGraph = FGL.labnfilter (f . _unCombNode . snd)
Nothing -> True
Just i -> _xNum (_ibtHeld bt) <= i
belowNumX :: ItemBaseType -> Bool
belowNumX :: ItemType -> Bool
belowNumX bt = case maxShowX bt of
Nothing -> True
Just i -> _xNum (_ibtHeld bt) <= i
-53
View File
@@ -1,53 +0,0 @@
module Dodge.Combine.Module where
import Data.Foldable
import Dodge.Data.Beam
import Dodge.Data.Item
import Dodge.Tesla
import Geometry
import LensHelp
--moduleModification :: ItemModuleType -> Item -> Item
--moduleModification imt = case imt of
-- EMPTYMODULE -> id
---- BELTMAG -> itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 150
-- MAGNETMAG -> itUse . heldDelay . rateMax .~ 4
-- BULPAY BulFlak -> (itUse . amagParams . ampBullet . buPayload .~ BulFlak)
-- . (itUse . amagParams . ampBullet . buTimer .~ 3)
-- BULPAY thepayload -> itUse . amagParams . ampBullet . buPayload .~ thepayload
-- BULBODY thebody -> itUse . amagParams . ampBullet . buEffect .~ thebody
-- TARGET {} -> id -- itUse . useTargeting ?~ t
-- BULTRAJ BasicBulletTrajectoryType -> id
-- BULTRAJ MagnetTrajectoryType ->
-- (itUse . amagParams . ampBullet . buTrajectory .~ MagnetTrajectory 0)
-- . (itUse . amagParams . ampBullet . buVel .~ V2 10 0)
-- BULTRAJ FlechetteTrajectoryType ->
-- itUse . amagParams . ampBullet . buTrajectory .~ FlechetteTrajectory 0
-- BULTRAJ BezierTrajectoryType ->
-- itUse . amagParams . ampBullet . buTrajectory .~ BezierTrajectory 0 0 0
-- INCENDLAS -> itParams . lasBeam .~ BeamCombine FlameBeamCombine
-- SPLITLAS -> itParams . lasBeam .~ BeamCombine SplitBeamCombine
-- STATICLAS ->
-- (itParams . lasBeam .~ BeamCombine TeslaBeamCombine)
-- . (itParams . subParams ?~ teslaParams)
---- WEPTELE -> makeDirectedTele
-- --LAUNCHHOME -> itUse . heldConsumption . laAmmoType . amPjCreation .~ CreateTrackingShell
-- LAUNCHHOME -> id
-- ATTACHTORCH -> id
---- where
---- makeDirectedTele it =
---- it
---- & itUse . heldMods %~ ModWithDirectedTeleport -- .:~ withPosDirWallCheck directedTelPos
---- -- for the camera: the simplest option is to remove all zoom/offset
---- & itUse . heldAim . aimZoom . izFac .~ 1
---- & itUse . heldAim . aimRange .~ 0
-- a better option would be to involve a "scope" centered on the firing
-- position
-- directedTelPos it cr w = (p,a)
-- where
-- p = fromMaybe (_crPos cr) $ it ^? itTargeting . tgPos . _Just
-- a = argV (mouseWorldPos w -.- p)
--applyModules :: Item -> Item
--applyModules it = foldl' (flip moduleModification) it (it ^. itType . iyModules)
+10 -8
View File
@@ -1,4 +1,6 @@
module Dodge.Combine.Trie where
module Dodge.Combine.Trie
( combinationsTrie
) where
import Data.Bifunctor
import Data.List (sort)
@@ -7,14 +9,14 @@ import Dodge.Data.Item
import SimpleTrie
import Data.Foldable
flatCombinationsTrie :: Trie ItemBaseType Item
{-# INLINE flatCombinationsTrie #-}
flatCombinationsTrie = foldl'
(flip $ uncurry insertInTrie . first sort)
emptyTrie
flatItemCombinations
--flatCombinationsTrie :: Trie ItemType Item
--{-# INLINE flatCombinationsTrie #-}
--flatCombinationsTrie = foldl'
-- (flip $ uncurry insertInTrie . first sort)
-- emptyTrie
-- flatItemCombinations
combinationsTrie :: Trie (ItAmount, ItemBaseType) Item
combinationsTrie :: Trie (ItAmount, ItemType) Item
{-# INLINE combinationsTrie #-}
combinationsTrie =
foldl'
-6
View File
@@ -209,7 +209,6 @@ inventoryX c = case c of
'K' ->
[ autoRifle
, tinMag
, targetingHat TargetRBPress
] <> fold
[ makeTypeCraftNum 7 MICROCHIP
, makeTypeCraftNum 4 HARDWARE
@@ -219,11 +218,6 @@ inventoryX c = case c of
, makeTypeCraftNum 1 LIGHTSENSOR
, makeTypeCraftNum 1 SOUNDSENSOR
, makeTypeCraftNum 1 HEATSENSOR
-- , makeTypeCraftNum 1 (BULBODYCRAFT BounceBullet)
-- , makeTypeCraftNum 1 (BULBODYCRAFT PenetrateBullet)
-- , makeTypeCraftNum 1 (ENERGYBALLCRAFT IncBall)
-- , makeTypeCraftNum 1 (ENERGYBALLCRAFT TeslaBall)
-- , makeTypeCraftNum 1 (ENERGYBALLCRAFT ConcBall)
]
'L' -> [scrollWatch]
'M' -> stackedInventory
+2 -2
View File
@@ -207,7 +207,7 @@ movementSideEff cr w
_ -> w
| otherwise = footstepSideEffect cr w
where
hasJetPack = any (\it -> it ^? itType . iyBase == Just (EQUIP JETPACK)) $ _crInv cr
hasJetPack = any (\it -> it ^? itType == Just (EQUIP JETPACK)) $ _crInv cr
oldPos = _crOldPos cr
momentum' = 0.97 *.* (_crPos cr -.- _crOldPos cr)
momentum''
@@ -252,7 +252,7 @@ invSideEff cr w =
w' & maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
itemInvSideEffect :: Creature -> Item -> World -> World
itemInvSideEffect cr itm = case _iyBase $ _itType itm of
itemInvSideEffect cr itm = case _itType itm of
TARGETING tt -> updateItemTargeting tt cr itm
_ -> id
--itemInvSideEffect cr it
+1 -1
View File
@@ -20,7 +20,7 @@ strFromEquipment :: Creature -> Int
strFromEquipment = sum . fmap equipmentStrValue . crCurrentEquipment
equipmentStrValue :: Item -> Int
equipmentStrValue itm = case _iyBase $ _itType itm of
equipmentStrValue itm = case _itType itm of
EQUIP FRONTARMOUR -> negate 3
EQUIP POWERLEGS -> 3
_ -> 0
+1 -1
View File
@@ -112,7 +112,7 @@ crIsArmouredFrom = hasFrontArmour
hasFrontArmour :: Point2 -> Creature -> Bool
hasFrontArmour p cr = fromMaybe False $ do
invid <- cr ^? crEquipment . ix OnChest
ittype <- cr ^? crInv . ix invid . itType . iyBase
ittype <- cr ^? crInv . ix invid . itType
return $
EQUIP FRONTARMOUR == ittype
&& p /= _crOldPos cr
+10 -13
View File
@@ -1,5 +1,3 @@
--{-# LANGUAGE DeriveGeneric #-}
--{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
@@ -16,23 +14,23 @@ module Dodge.Data.Item (
module Dodge.Data.Item.Location,
) where
import NewInt
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Data.Set (Set)
import Dodge.Data.Item.Combine
import Dodge.Data.Item.Effect
import Dodge.Data.Item.Scope
import Dodge.Data.Item.CurseStatus
import Dodge.Data.Item.Effect
import Dodge.Data.Item.Location
import Dodge.Data.Item.Misc
import Dodge.Data.Item.Params
import Dodge.Data.Item.Scope
import Dodge.Data.Item.Tweak
import Dodge.Data.Item.Use
import Dodge.Data.Item.Location
import Data.Set (Set)
import NewInt
data ItID = ItID
deriving (Eq,Ord,Show,Read)
deriving (Eq, Ord, Show, Read)
data Item = Item
{ _itUse :: ItemUse
@@ -40,22 +38,21 @@ data Item = Item
, _itID :: NewInt ItmInt
, _itLocation :: ItemLocation
, _itEffect :: ItEffect
, _itInvSize :: Float
, _itInvSize :: Int
, _itDimension :: ItemDimension
, _itCurseStatus :: CurseStatus
, _itTweaks :: ItemTweaks
-- , _itScope :: Scope
, _itParams :: ItemParams
, _itAttachments :: Set ItemAttachment
}
--deriving (Eq, Show, Read) --Generic, Flat)
data ItemAttachment = ScopeAttachment
data ItemAttachment
= ScopeAttachment
| BulletClipAttachment
| BulletBeltAttachment
| StandAttachment
| PowerSourceAttachment
deriving (Eq,Ord)
deriving (Eq, Ord)
_itUseAimStance :: Item -> AimStance
_itUseAimStance = _aimStance . _heldAim . _itUse
+16 -28
View File
@@ -5,18 +5,23 @@
module Dodge.Data.Item.Combine where
import Dodge.Data.Item.BulletMod
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import qualified Data.Map.Strict as M
import Dodge.Data.Equipment.Misc
import Dodge.Data.Item.BulletMod
import Dodge.Data.Item.Targeting
import Dodge.Data.Item.Use.Consumption
data ItemType = ItemType
{ _iyBase :: ItemBaseType
}
data ItemType
= HELD {_ibtHeld :: HeldItemType}
| LEFT {_ibtLeft :: LeftItemType}
| EQUIP {_ibtEquip :: EquipItemType}
| CONSUMABLE {_ibtConsumable :: ConsumableItemType}
| CRAFT {_ibtCraft :: CraftType}
| ATTACH {_ibtAttach :: AttachType}
| AMMOMAG {_ibtAmmoMag :: AmmoMagType}
| TARGETING {_ibtTargeting :: TargetingType}
| BULLETMOD {_ibtBulletMod :: BulletMod}
deriving (Eq, Ord, Show, Read)
data CraftType
@@ -64,25 +69,13 @@ data CraftType
| GASINJECTOR
| FLAKCRAFT
| FRAGCRAFT
-- | ENERGYBALLCRAFT EnergyBallType
-- | BULBODYCRAFT BulletEffect
| TELEPORTMODULE
| -- | ENERGYBALLCRAFT EnergyBallType
-- | BULBODYCRAFT BulletEffect
TELEPORTMODULE
| TIMEMODULE
| SIZEMODULE
| GRAVITYMODULE
-- | TARGETMODULE TargetingType
deriving (Eq, Ord, Show, Read)
data ItemBaseType
= HELD {_ibtHeld :: HeldItemType}
| LEFT {_ibtLeft :: LeftItemType}
| EQUIP {_ibtEquip :: EquipItemType}
| CONSUMABLE {_ibtConsumable :: ConsumableItemType}
| CRAFT CraftType
| ATTACH {_ibtAttach :: AttachType}
| AMMOMAG {_ibtAmmoMag :: AmmoMagType}
| TARGETING {_ibtTargeting :: TargetingType}
| BULLETMOD {_ibtBulletMod :: BulletMod}
-- | TARGETMODULE TargetingType
deriving (Eq, Ord, Show, Read)
data AttachType
@@ -94,8 +87,7 @@ data AttachType
deriving (Eq, Ord, Show, Read)
data AmmoMagType
= REVOLVEMAG
| TINMAG
= TINMAG
| DRUMMAG
| BELTMAG
| SHELLMAG
@@ -103,7 +95,6 @@ data AmmoMagType
| CHEMFUELPOUCH
deriving (Eq, Ord, Show, Read)
data ConsumableItemType
= MEDKIT Int
| EXPLOSIVES
@@ -117,7 +108,6 @@ data EquipItemType
| INVISIBILITYEQUIPMENT EquipSite
| BRAINHAT
| HAT
| TARGETINGHAT TargetingType
| HEADLAMP
| POWERLEGS
| SPEEDLEGS
@@ -188,7 +178,6 @@ data Detector
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''ItemType
makeLenses ''ItemBaseType
makeLenses ''HeldItemType
makeLenses ''AttachType
deriveJSON defaultOptions ''CraftType
@@ -199,7 +188,6 @@ deriveJSON defaultOptions ''Detector
deriveJSON defaultOptions ''EquipItemType
deriveJSON defaultOptions ''LeftItemType
deriveJSON defaultOptions ''HeldItemType
deriveJSON defaultOptions ''ItemBaseType
deriveJSON defaultOptions ''ItemType
--instance ToJSONKey ModuleSlot
-1
View File
@@ -20,7 +20,6 @@ import Dodge.Data.Item.Use.Consumption.LoadAction
data ReloadStatus = ReloadStatus
{ _iaMax :: Int
, _iaLoaded :: Int
-- , _iaPrimed :: Bool
}
deriving (Eq, Show, Read) --Generic, Flat)
+1 -1
View File
@@ -31,7 +31,7 @@ data Sensor
data ProximityRequirement
= RequireHealth {_proxReqMinHealth :: Int}
| RequireEquipment {_proxReqEquipment :: ItemBaseType}
| RequireEquipment {_proxReqEquipment :: ItemType}
| RequireImpossible
deriving (Show)
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
+1 -1
View File
@@ -54,7 +54,7 @@ applyTerminalCommandArguments command args u = case command of
where
ypoint = uvWorld . cWorld . lWorld . creatures . ix 0
parseItem :: [String] -> Maybe (ItemBaseType, Int)
parseItem :: [String] -> Maybe (ItemType, Int)
parseItem (x : xs) =
(readMaybe (x ++ " {_xNum=" ++ show (parseNum xs) ++ "}") <&> (,1))
<|> (readMaybe x <&> (,parseNum xs))
+1 -1
View File
@@ -22,7 +22,7 @@ defaultItemDimension = ItemDimension
defaultHeldItem :: Item
defaultHeldItem = Item
{ _itCurseStatus = Uncursed
, _itType = ItemType (HELD PISTOL) -- mempty
, _itType = HELD PISTOL
, _itEffect = defaultItEffect
, _itID = 0
, _itInvSize = 1
+1 -1
View File
@@ -9,6 +9,7 @@ module Dodge.DisplayInventory (
updateCombinePositioning,
) where
import Dodge.Inventory.SelectionList
import Control.Monad
import qualified Data.IntMap.Strict as IM
--import qualified Data.IntMap.Merge.Strict as MIM
@@ -20,7 +21,6 @@ import Dodge.Data.Config
import Dodge.Data.SelectionList
import Dodge.Data.Universe
import Dodge.Inventory.CheckSlots
import Dodge.Inventory.SelectionList
import Dodge.ListDisplayParams
import Dodge.SelectionList
import Dodge.Item.Grammar
+1 -1
View File
@@ -201,7 +201,7 @@ useLoadedAmmo itmtree cr (cme,w) (mzid,Just (mz,x,magtree)) = (,) (cme & cmeSoun
itemDetectorEffect :: Item -> Creature -> World -> World
itemDetectorEffect itm cr w = fromMaybe w $ do
HELDDETECTOR dt <- itm ^? itType . iyBase . ibtHeld
HELDDETECTOR dt <- itm ^? itType . ibtHeld
return $ detectorEffect dt itm cr w
walkNozzle :: Int -> Muzzle -> Item -> Creature -> World -> World
+5 -3
View File
@@ -4,9 +4,10 @@ module Dodge.Inventory.CheckSlots (
crInvSize,
) where
import Control.Lens
import Data.Monoid
import Dodge.Base.You
import Dodge.Data.World
import Dodge.Item.SlotsTaken
import qualified IntMapHelp as IM
{- | checks whether or not an item will fit in your inventory
@@ -14,7 +15,7 @@ import qualified IntMapHelp as IM
-}
checkInvSlotsYou :: Item -> World -> Maybe Int
checkInvSlotsYou it w
| crNumFreeSlots ycr >= ceiling (_itInvSize it) =
| crNumFreeSlots ycr >= _itInvSize it =
Just $ findItemSlot (_crInv ycr)
| otherwise = Nothing
where
@@ -38,4 +39,5 @@ crInvSize :: Creature -> Int
crInvSize = invSize . _crInv
invSize :: IM.IntMap Item -> Int
invSize = sum . fmap itSlotsTaken
invSize = alaf Sum foldMap _itInvSize
--invSize = sum . fmap _itInvSize
+2 -3
View File
@@ -8,7 +8,6 @@ import Padding
import Dodge.Equipment.Text
import Dodge.Data.SelectionList
import Dodge.Data.World
import Dodge.Item.SlotsTaken
import Dodge.Item.Display
import Dodge.Item.InventoryColor
import LensHelp
@@ -18,7 +17,7 @@ invSelectionItem' :: Creature -> Int -> Item -> SelectionItem ()
invSelectionItem' cr i it =
SelectionItem
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
, _siHeight = itSlotsTaken it
, _siHeight = _itInvSize it
, _siIsSelectable = True
, _siColor = col
, _siOffX = 0
@@ -36,7 +35,7 @@ invSelectionItem :: Creature -> Int -> (Item,Int,a) -> SelectionItem ()
invSelectionItem cr i (it,indent,_) =
SelectionItem
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
, _siHeight = itSlotsTaken it
, _siHeight = _itInvSize it
, _siIsSelectable = True
, _siColor = col
, _siOffX = indent
+7 -9
View File
@@ -1,3 +1,5 @@
{-# LANGUAGE LambdaCase #-}
module Dodge.Item (
module Dodge.Item.Weapon,
module Dodge.Item.Held,
@@ -7,17 +9,17 @@ module Dodge.Item (
itemFromBase,
) where
import Dodge.Item.Ammo
import Dodge.Data.Item
import Dodge.Item.Ammo
import Dodge.Item.Consumable
import Dodge.Item.Craftable
import Dodge.Item.Equipment
import Dodge.Item.Held
import Dodge.Item.Weapon
import Dodge.Item.Scope
import Dodge.Item.Weapon
itemFromBase :: ItemBaseType -> Item
itemFromBase ibt = case ibt of
itemFromBase :: ItemType -> Item
itemFromBase = \case
HELD ht -> itemFromHeldType ht
LEFT lt -> itemFromLeftType lt
EQUIP et -> itemFromEquipType et
@@ -32,7 +34,6 @@ itemFromAmmoMag :: AmmoMagType -> Item
itemFromAmmoMag at = case at of
DRUMMAG -> drumMag
TINMAG -> tinMag
REVOLVEMAG -> revolveMag
BELTMAG -> beltMag
SHELLMAG -> shellMag
BATTERY -> battery
@@ -43,11 +44,10 @@ itemFromAttachType at = case at of
ZOOMSCOPE -> zoomScope
BULLETSYNTHESIZER -> bulletSynthesizer
REMOTESCREEN -> remoteScreen
-- ROCKETHOMER -> rocketHomer
-- ROCKETHOMER -> rocketHomer
HOMINGMODULE -> homingModule
AUGMENTEDHUD -> augmentedHUD
itemFromConsumableType :: ConsumableItemType -> Item
itemFromConsumableType ct = case ct of
MEDKIT i -> medkit i
@@ -63,7 +63,6 @@ itemFromEquipType et = case et of
INVISIBILITYEQUIPMENT _ -> error "need to define invisibility for more than wrist"
BRAINHAT -> brainHat
HAT -> hat
TARGETINGHAT tt -> targetingHat tt
HEADLAMP -> headLamp
POWERLEGS -> powerLegs
SPEEDLEGS -> speedLegs
@@ -85,4 +84,3 @@ itemFromLeftType lt = case lt of
BLINKERUNSAFE -> unsafeBlinkGun
SHRINKER -> shrinkGun
SPAWNER -> error "need to datify creatures first"
+13 -16
View File
@@ -12,9 +12,7 @@ megaTinMag x = tinMag
tinMag :: Item
tinMag =
defaultHeldItem & itType . iyBase .~ AMMOMAG TINMAG
-- & itType . iyModules . at ModBulletPayload ?~ EMPTYMODULE
-- & itType . iyModules . at ModBulletTrajectory ?~ EMPTYMODULE
defaultHeldItem & itType .~ AMMOMAG TINMAG
& itUse
.~ AmmoMagUse
{ _amagParams = BulletParams defaultBullet
@@ -26,22 +24,22 @@ tinMag =
}
}
revolveMag :: Item
revolveMag =
tinMag
& itType . iyBase .~ AMMOMAG REVOLVEMAG
& itUse . amagLoadStatus . iaMax .~ 6
& itUse . amagLoadStatus . iaLoaded .~ 6
--revolveMag :: Item
--revolveMag =
-- tinMag
-- & itType .~ AMMOMAG REVOLVEMAG
-- & itUse . amagLoadStatus . iaMax .~ 6
-- & itUse . amagLoadStatus . iaLoaded .~ 6
drumMag :: Item
drumMag =
tinMag & itType . iyBase . ibtAmmoMag .~ DRUMMAG
tinMag & itType . ibtAmmoMag .~ DRUMMAG
& itUse . amagLoadStatus . iaLoaded .~ 30
& itUse . amagLoadStatus . iaMax .~ 30
beltMag :: Item
beltMag =
tinMag & itType . iyBase . ibtAmmoMag .~ BELTMAG
tinMag & itType . ibtAmmoMag .~ BELTMAG
& itUse . amagLoadStatus . iaLoaded .~ 10000
& itUse . amagLoadStatus . iaMax .~ 20000
& itUse . amagType .~ BeltBulletAmmo
@@ -53,12 +51,11 @@ megaShellMag = shellMag
shellMag :: Item
shellMag =
defaultHeldItem & itType . iyBase .~ AMMOMAG SHELLMAG
defaultHeldItem & itType .~ AMMOMAG SHELLMAG
& itUse
.~ AmmoMagUse
{ _amagParams = ProjectileParams
{ _ampPayload = ExplosionPayload
-- , _ampPjDraw = DrawShell
}
, _amagLoadStatus =
ReloadStatus
@@ -74,7 +71,7 @@ megaBattery = battery
battery :: Item
battery =
defaultHeldItem & itType . iyBase .~ AMMOMAG BATTERY
defaultHeldItem & itType .~ AMMOMAG BATTERY
& itUse
.~ AmmoMagUse
{ _amagParams = BulletParams defaultBullet
@@ -88,7 +85,7 @@ battery =
chemFuelPouch :: Item
chemFuelPouch =
defaultHeldItem & itType . iyBase .~ AMMOMAG CHEMFUELPOUCH
defaultHeldItem & itType .~ AMMOMAG CHEMFUELPOUCH
& itUse
.~ AmmoMagUse
{ _amagParams = GasParams ChemFuel
@@ -102,5 +99,5 @@ chemFuelPouch =
bulletSynthesizer :: Item
bulletSynthesizer = defaultHeldItem
& itType . iyBase .~ ATTACH BULLETSYNTHESIZER
& itType .~ ATTACH BULLETSYNTHESIZER
& itUse .~ AttachUse Nothing
+1 -1
View File
@@ -9,7 +9,7 @@ medkit :: Int -> Item
medkit i =
defaultConsumable
& itUse . cUse .~ CHeal i
& itType . iyBase .~ CONSUMABLE (MEDKIT i)
& itType .~ CONSUMABLE (MEDKIT i)
heal25 :: Int -> World -> Maybe World
heal25 = heal 25
+2 -3
View File
@@ -7,10 +7,9 @@ import Dodge.Data.Item
makeTypeCraftNum :: Int -> CraftType -> [Item]
makeTypeCraftNum i ct = replicate i $
defaultCraftItem
& itInvSize .~ 0.5
& itInvSize .~ 1
& itCurseStatus .~ Uncursed
-- & itUse . useAmount .~ fromIntegral i
& itType . iyBase .~ CRAFT ct
& itType .~ CRAFT ct
makeTypeCraft :: CraftType -> Item
makeTypeCraft = head . makeTypeCraftNum 1
+2 -6
View File
@@ -11,9 +11,6 @@ module Dodge.Item.Display (
import ShortShow
import Data.Maybe
import Dodge.Data.Creature
--import Dodge.Item.Info
import Dodge.Item.SlotsTaken
import Dodge.Module
import LensHelp
import Padding
@@ -50,7 +47,7 @@ itemDisplayPad ls rs
basicItemDisplay :: Item -> [String]
basicItemDisplay itm =
Prelude.take (itSlotsTaken itm) $
Prelude.take (_itInvSize itm) $
itemBaseName itm :
--catMaybes [maybeWarmupStatus itm, maybeRateStatus itm]
catMaybes [maybeWarmupStatus itm]
@@ -61,7 +58,7 @@ itemString :: Item -> String
itemString = head . basicItemDisplay
itemBaseName :: Item -> String
itemBaseName itm = case _iyBase $ _itType itm of
itemBaseName itm = case _itType itm of
CRAFT str -> show str
HELD hit -> case hit ^? xNum of
Just i -> takeWhile (/= ' ') (show hit) ++ show i
@@ -87,7 +84,6 @@ showAttachItem t itm = case t of
showEquipItem :: EquipItemType -> String
showEquipItem eit = case eit of
TARGETINGHAT _ -> "TARG.HAT"
_ -> show eit
showAutoRechargeProgress :: LeftConsumption -> String
+11 -14
View File
@@ -5,7 +5,7 @@ module Dodge.Item.Draw.SPic (
import Dodge.Data.ComposedItem
import Dodge.Data.DoubleTree
import Color
import qualified Data.Map.Strict as M
--import qualified Data.Map.Strict as M
--import Data.Maybe
import Dodge.Data.Item
--import Dodge.Item.AmmoPosition
@@ -27,18 +27,16 @@ import ShapePicture
-- return mempty
itemSPic :: LabelDoubleTree ComposeLinkType PartiallyComposedItem -> SPic
itemSPic itmtree =
--M.foldMapWithKey (modulesSPic it) (_iyModules $ _itType it) <> case it ^. itType . iyBase of
case it ^. itType . iyBase of
CRAFT _ -> defSPic
HELD ht -> heldItemSPic ht it
LEFT lt -> leftItemSPic lt it
EQUIP et -> equipItemSPic et it
CONSUMABLE{} -> defSPic
ATTACH {} -> defSPic
AMMOMAG {} -> defSPic
TARGETING {} -> defSPic
BULLETMOD {} -> defSPic
itemSPic itmtree = case it ^. itType of
CRAFT _ -> defSPic
HELD ht -> heldItemSPic ht it
LEFT lt -> leftItemSPic lt it
EQUIP et -> equipItemSPic et it
CONSUMABLE{} -> defSPic
ATTACH {} -> defSPic
AMMOMAG {} -> defSPic
TARGETING {} -> defSPic
BULLETMOD {} -> defSPic
where
it = itmtree ^. ldtValue . _1
@@ -58,7 +56,6 @@ equipItemSPic et _ = case et of
INVISIBILITYEQUIPMENT _ -> noPic (colorSH chartreuse $ upperPrismPolySI 3 $ rectWH 2 2)
BRAINHAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
HAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
TARGETINGHAT _ -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
HEADLAMP -> noPic headLampShape
POWERLEGS -> legsSPic yellow
SPEEDLEGS -> legsSPic green
+22 -23
View File
@@ -4,7 +4,6 @@ module Dodge.Item.Equipment (
powerLegs,
wristInvisibility,
wristArmour,
targetingHat,
hat,
brainHat,
frontArmour,
@@ -32,19 +31,19 @@ magShield =
& itParams .~ MagShieldParams Nothing
& itUse . equipEffect . eeUse .~ EMagShield
& itUse . equipEffect . eeSite .~ GoesOnWrist
& itType . iyBase .~ EQUIP MAGSHIELD
& itType .~ EQUIP MAGSHIELD
flameShield :: Item
flameShield =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnChest
& itType . iyBase .~ EQUIP FLAMESHIELD
& itType .~ EQUIP FLAMESHIELD
frontArmour :: Item
frontArmour =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnChest
& itType . iyBase .~ EQUIP FRONTARMOUR
& itType .~ EQUIP FRONTARMOUR
wristArmour :: Item
wristArmour =
@@ -53,13 +52,13 @@ wristArmour =
& itUse . equipEffect . eeOnEquip .~ EonWristShield
& itUse . equipEffect . eeUse .~ EWristShield
& itUse . equipEffect . eeOnRemove .~ EoffWristShield
& itType . iyBase .~ EQUIP WRISTARMOUR
& itType .~ EQUIP WRISTARMOUR
batteryPack :: Item
batteryPack =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnBack
& itType . iyBase .~ EQUIP BATTERYPACK
& itType .~ EQUIP BATTERYPACK
& itUse . equipEffect . eeAttachPos .~ V3 (-8) 0 10
& itUse . equipEffect . eeUse .~ EBatterySource 10000 10000
@@ -67,7 +66,7 @@ fuelPack :: Item
fuelPack =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnBack
& itType . iyBase .~ EQUIP FUELPACK
& itType .~ EQUIP FUELPACK
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
& itUse . equipEffect . eeUse .~ EFuelSource 10000 10000
@@ -75,7 +74,7 @@ bulletBeltPack :: Item
bulletBeltPack =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnBack
& itType . iyBase .~ EQUIP BULLETBELTPACK
& itType .~ EQUIP BULLETBELTPACK
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
& itUse . equipEffect . eeUse .~ EAmmoSource 2000 2000 --BulletSource
Nothing
@@ -84,7 +83,7 @@ bulletBeltBracer :: Item
bulletBeltBracer =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnWrist
& itType . iyBase .~ EQUIP BULLETBELTBRACER
& itType .~ EQUIP BULLETBELTBRACER
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
& itUse . equipEffect . eeUse .~ EAmmoSource 100 100 --BulletSource
Nothing
@@ -93,46 +92,46 @@ jetPack :: Item
jetPack =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnBack
& itType . iyBase .~ EQUIP JETPACK
& itType .~ EQUIP JETPACK
& itUse . equipEffect . eeAttachPos .~ V3 (-8) 0 10
brainHat :: Item
brainHat =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnHead
& itType . iyBase .~ EQUIP BRAINHAT
& itType .~ EQUIP BRAINHAT
hat :: Item
hat =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnHead
& itType . iyBase .~ EQUIP HAT
& itType .~ EQUIP HAT
targetingHat :: TargetingType -> Item
targetingHat tt =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnHead
& itType . iyBase .~ EQUIP (TARGETINGHAT tt)
& itUse . equipTargeting ?~ tt
--targetingHat :: TargetingType -> Item
--targetingHat tt =
-- defaultEquipment
-- & itUse . equipEffect . eeSite .~ GoesOnHead
-- & itType .~ EQUIP (TARGETINGHAT tt)
-- & itUse . equipTargeting ?~ tt
headLamp :: Item
headLamp =
defaultEquipment
& itUse . equipEffect . eeUse .~ EHeadLamp
& itUse . equipEffect . eeSite .~ GoesOnHead
& itType . iyBase .~ EQUIP HEADLAMP
& itType .~ EQUIP HEADLAMP
powerLegs :: Item
powerLegs =
defaultEquipment
& itUse . equipEffect . eeSite .~ GoesOnLegs
& itType . iyBase .~ EQUIP POWERLEGS
& itType .~ EQUIP POWERLEGS
speedLegs :: Item
speedLegs = powerLegs & itType . iyBase .~ EQUIP SPEEDLEGS
speedLegs = powerLegs & itType .~ EQUIP SPEEDLEGS
jumpLegs :: Item
jumpLegs = powerLegs & itType . iyBase .~ EQUIP JUMPLEGS
jumpLegs = powerLegs & itType .~ EQUIP JUMPLEGS
wristInvisibility :: Item
wristInvisibility =
@@ -140,4 +139,4 @@ wristInvisibility =
& itUse . equipEffect . eeSite .~ GoesOnWrist
& itUse . equipEffect . eeOnEquip .~ ECamouflage Invisible --overCID (crCamouflage .~ Invisible)
& itUse . equipEffect . eeOnRemove .~ ECamouflage FullyVisible --overCID (crCamouflage .~ FullyVisible)
& itType . iyBase .~ EQUIP (INVISIBILITYEQUIPMENT GoesOnWrist)
& itType .~ EQUIP (INVISIBILITYEQUIPMENT GoesOnWrist)
+1 -1
View File
@@ -11,4 +11,4 @@ boosterGun =
defaultLeftItem
& itUse . leftUse .~ LBoost
& itUse . leftDelay .~ NoDelay
& itType . iyBase .~ LEFT BOOSTER
& itType .~ LEFT BOOSTER
+1 -1
View File
@@ -33,7 +33,7 @@ useBreakListsLinkTest llist rlist = LinkTest ltest rtest
return $ LinkUpdate linktype (set _3 (useBreakListsLinkTest llist (tail xs))) id
basePartiallyComposedItem :: Item -> PartiallyComposedItem
basePartiallyComposedItem itm = case itm ^. itType . iyBase of
basePartiallyComposedItem itm = case itm ^. itType of
HELD _ -> (itm, WeaponPlatformSF, useBreakListsLinkTest
(map (\(i,a) -> (AmmoMagSF a,AmmoInLink i a)) (IM.toList $ itm ^. itUse . heldAmmoTypes))
[(WeaponTargetingSF,WeaponTargetingLink), (WeaponScopeSF,WeaponScopeLink)]
+11 -15
View File
@@ -1,4 +1,9 @@
module Dodge.Item.Held.BatteryGuns where
module Dodge.Item.Held.BatteryGuns
( sparkGun
, teslaGun
, lasGun
, tractorGun
) where
import Dodge.SoundLogic.ExternallyGeneratedSounds
import Dodge.Default.Item
@@ -6,7 +11,7 @@ import Dodge.Default.Item
--import Dodge.Data.Beam
import Color
import Control.Lens
import qualified Data.Map.Strict as M
--import qualified Data.Map.Strict as M
import Dodge.Data.Item
--import Dodge.Reloading.Action
import Dodge.Tesla.ItemParams
@@ -16,36 +21,30 @@ import qualified IntMapHelp as IM
sparkGun :: Item
sparkGun =
teslaGun
& itType . iyBase .~ HELD SPARKGUN
& itType .~ HELD SPARKGUN
& itParams . arcSize .~ 10
teslaGun :: Item
teslaGun =
--defaultBatteryGun
defaultHeldItem
& itUse . heldParams .~ BeamShooterParams (Just (elecCrackleS,2))
& itDimension . dimRad .~ 9
& itDimension . dimCenter .~ V3 4 0 0
& itParams .~ teslaParams
-- & itUse . heldUse .~ HeldTeslaArc --shootTeslaArc
& itUse . heldDelay .~ NoDelay
-- & itUse . heldMods .~ PistolMod
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimStance .~ TwoHandFlat
-- & itUse . heldAim . aimMuzPos .~ 4
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 4 0
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTesla
& itType . iyBase .~ HELD TESLAGUN
& itType .~ HELD TESLAGUN
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
& itUse . heldTriggerType .~ AutoTrigger
lasGun :: Item
lasGun =
defaultHeldItem
-- & itType . iyModules .~ batteryModules
-- & itUse . heldMods .~ PistolMod
& itUse . heldParams .~ BeamShooterParams (Just (tone440sawtoothquietS,2))
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
& itUse . heldDelay .~ NoDelay
@@ -74,7 +73,7 @@ lasGun =
& itUse . heldAim . aimStance .~ TwoHandUnder
-- & itUse . heldAim . aimHandlePos .~ 5
-- & itUse . heldAim . aimMuzPos .~ 30
& itType . iyBase .~ HELD LASGUN
& itType .~ HELD LASGUN
lasGunTweak :: TweakParam
lasGunTweak =
@@ -92,15 +91,12 @@ tractorGun =
.~ Tweakable
{ _tweakParams = IM.fromList [(0, tractorGunTweak)]
}
-- & itUse . heldUse .~ HeldTractor --aTractorBeam
& itUse . heldDelay .~ NoDelay
-- & itUse . heldMods .~ AmmoCheckMod
-- & itUse . heldMods .~ TractorMod
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ DefaultFlareType
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor
& itType . iyBase .~ HELD TRACTORGUN
& itType .~ HELD TRACTORGUN
tractorGunTweak :: TweakParam
tractorGunTweak =
+6 -11
View File
@@ -45,14 +45,14 @@ volleyGun i =
)
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
& itUse . heldParams . recoil .~ 20 + 10 * fromIntegral i
& itType . iyBase .~ HELD (VOLLEYGUN i)
& itType .~ HELD (VOLLEYGUN i)
& itUse . heldAmmoTypes .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
rifle :: Item
rifle =
defaultBangCane
& itUse . heldAim . aimStance .~ TwoHandUnder
& itType . iyBase .~ HELD RIFLE
& itType .~ HELD RIFLE
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
@@ -68,20 +68,15 @@ rifle =
autoRifle :: Item
autoRifle =
rifle
& itType . iyBase .~ HELD AUTORIFLE
& itType .~ HELD AUTORIFLE
& itUse . heldTriggerType .~ AutoTrigger
-- & itUse . heldMods .~ AutoRifleMod
-- & itType . iyModules . at ModAutoMag ?~ EMPTYMODULE
-- & itUse . useDelay . rateMax .~ 6
burstRifle :: Item
burstRifle =
rifle
& itType . iyBase .~ HELD BURSTRIFLE
& itType .~ HELD BURSTRIFLE
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
-- & itUse . heldDelay . rateMax .~ 18
& itUse . heldDelay . rateMax .~ 6
-- & itUse . heldMods .~ BurstRifleMod
& itUse . heldParams . weaponInvLock .~ 7
& itUse . heldParams . weaponRepeat .~ [3,6]
@@ -102,8 +97,8 @@ miniGunX i =
& itUse . heldParams . sidePush .~ 10 * fromIntegral i
& itUse . heldParams . randomOffset .~ 10
& itUse . heldParams . rifling .~ UniRandFloat 0.8 0.9
& itInvSize .~ fromIntegral i + 1
& itInvSize .~ (i + 3) `div` 2
& itDimension . dimRad .~ 20
& itDimension . dimCenter .~ V3 5 0 0
& itDimension . dimAttachPos .~ V3 5 (-5) 0
& itType . iyBase .~ HELD (MINIGUNX i)
& itType .~ HELD (MINIGUNX i)
+3 -3
View File
@@ -24,7 +24,7 @@ bangCone =
& itUse . heldParams . torqueAfter .~ 0.1
& itUse . heldParams . randomOffset .~ 12
& itUse . heldParams . bulGunSound ?~ (bangEchoS,0)
& itType . iyBase .~ HELD BANGCONE
& itType .~ HELD BANGCONE
blunderbuss :: Item
blunderbuss =
@@ -33,12 +33,12 @@ blunderbuss =
& itUse . heldAim . aimWeight .~ 6
-- & itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 30
& itType . iyBase .~ HELD BLUNDERBUSS
& itType .~ HELD BLUNDERBUSS
grapeCannon :: Int -> Item
grapeCannon i =
blunderbuss
& itType . iyBase .~ HELD (GRAPECANNON i)
& itType .~ HELD (GRAPECANNON i)
& itUse . heldParams . recoil .~ (150 + fromIntegral i * 50)
& itUse . heldParams . torqueAfter .~ (0.1 + 0.2 * fromIntegral i)
& itUse . heldParams . randomOffset .~ (12 + 4 * fromIntegral i)
+2 -10
View File
@@ -26,19 +26,13 @@ launcher =
& itDimension . dimRad .~ 9
& itDimension . dimCenter .~ V3 10 0 0
& itUse . heldDelay . rateMax .~ 20
-- & itUse . heldUse .~ HeldPJCreation --usePjCreation
-- & itUse . heldMods .~ LauncherMod
-- & itUse . heldMods .~ PistolMod
& itUse . heldAim . aimWeight .~ 8
& itUse . heldAim . aimRange .~ 0.5
& itUse . heldAim . aimStance .~ TwoHandOver
-- & itUse . heldAim . aimHandlePos .~ V2 3 0
-- & itUse . heldAim . aimMuzPos .~ 20
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleLauncher
& itUse . heldAmmoTypes .~ singleAmmo ProjectileAmmo
& itType . iyBase .~ HELD LAUNCHER
-- & itType . iyModules . at ModLauncherHoming ?~ EMPTYMODULE
& itType .~ HELD LAUNCHER
& itUse . heldParams . muzVel .~ ConstFloat 0
& itUse . heldParams . rifling .~ ConstFloat 0
& itUse . heldParams . recoil .~ 0
@@ -48,9 +42,7 @@ launcher =
launcherX :: Int -> Item
launcherX i =
launcher
& itType . iyBase .~ HELD (LAUNCHERX i)
-- & itUse . heldUse .~ HeldPJCreationX i
-- & itUse . heldMods .~ LauncherXMod i
& itType .~ HELD (LAUNCHERX i)
& itUse . heldAim . aimMuzzles .~ getZipList
(ZipList [Muzzle (V2 20 0) a 0 | a <- angles]
<*> ZipList [0..]
+5 -5
View File
@@ -25,7 +25,7 @@ bangRod =
& itUse . heldDelay . rateMax .~ 12
& itDimension . dimRad .~ 12
& itDimension . dimCenter .~ V3 5 0 0
& itType . iyBase .~ HELD BANGROD
& itType .~ HELD BANGROD
& itUse . heldAim . aimWeight .~ 8
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimStance .~ OneHand
@@ -38,7 +38,7 @@ bangRod =
elephantGun :: Item
elephantGun =
bangRod
& itType . iyBase .~ HELD ELEPHANTGUN
& itType .~ HELD ELEPHANTGUN
& itUse . heldAim . aimStance .~ TwoHandUnder
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
& itUse . heldParams . recoil .~ 50
@@ -46,17 +46,17 @@ elephantGun =
amr :: Item
amr =
elephantGun
& itType . iyBase .~ HELD AMR
& itType .~ HELD AMR
autoAmr :: Item
autoAmr =
amr
& itType . iyBase .~ HELD AUTOAMR
& itType .~ HELD AUTOAMR
sniperRifle :: Item
sniperRifle =
elephantGun
& itType . iyBase .~ HELD SNIPERRIFLE
& itType .~ HELD SNIPERRIFLE
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
+6 -9
View File
@@ -17,9 +17,8 @@ import LensHelp
poisonSprayer :: Item
poisonSprayer =
flameThrower
& itType . iyBase .~ HELD POISONSPRAYER
& itType .~ HELD POISONSPRAYER
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
-- & itUse . heldMods .~ PoisonSprayerMod
& itUse . heldParams . gasCreation .~ CreatePoisonGas --aGasCloud
& itUse . heldParams . recoil .~ 0
& itUse . heldParams . torqueAfter .~ 0
@@ -30,11 +29,9 @@ poisonSprayer =
flameSpitter :: Item
flameSpitter =
flameThrower
& itType . iyBase .~ HELD FLAMESPITTER
-- & itParams . sprayNozzles . ix 0 . nzPressure .~ 4
& itType .~ HELD FLAMESPITTER
& itUse . heldAim . aimStance .~ OneHand
& itUse . heldDelay .~ FixedRate{_rateMax = 3, _rateTime = 0}
-- & itUse . heldMods .~ FlameSpitterMod
& itUse . heldParams . weaponInvLock .~ 10
& itUse . heldParams . weaponRepeat .~ [1..9]
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect . nzPressure .~ UniRandFloat 3 4
@@ -43,7 +40,7 @@ flameSpitter =
flameTorrent :: Item
flameTorrent =
flameThrower
& itType . iyBase .~ HELD FLAMETORRENT
& itType .~ HELD FLAMETORRENT
& itUse . heldAim . aimZoom .~ defaultItZoom
-- & itParams . sprayNozzles . ix 0
-- %~ ( (nzPressure .~ 10)
@@ -54,12 +51,12 @@ flameTorrent =
blowTorch :: Item
blowTorch =
flameThrower
& itType . iyBase .~ HELD BLOWTORCH
& itType .~ HELD BLOWTORCH
flameWall :: Item
flameWall =
flameThrower
& itType . iyBase .~ HELD FLAMEWALL
& itType .~ HELD FLAMEWALL
-- & itParams . sprayNozzles .~ zipWith makeNozzle [0, 0.6, -0.6] [2, 2.5, 2.5]
-- where
-- makeNozzle dir pres =
@@ -94,7 +91,7 @@ flameThrower =
}
]
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
& itType . iyBase .~ HELD FLAMETHROWER
& itType .~ HELD FLAMETHROWER
& itUse . heldParams .~ GasSprayParams
{_gasCreation = CreateFlame
, _recoil = 0
+6 -15
View File
@@ -19,8 +19,8 @@ bangStick i =
defaultBulletWeapon
& itUse . heldParams . recoil .~ 25
& itUse . heldParams . torqueAfter .~ 0.18 + 0.02 * fromIntegral i
& itType . iyBase .~ HELD (BANGSTICK i)
& itInvSize .~ fromIntegral i / 3
& itType .~ HELD (BANGSTICK i)
& itInvSize .~ max 1 (i `div` 2)
& itDimension . dimRad .~ 5
& itDimension . dimCenter .~ V3 5 0 0
& itUse . heldDelay . rateMax .~ 8
@@ -35,9 +35,7 @@ baseStickSpread = 0.2
pistol :: Item
pistol =
bangStick 1
-- & itUse . heldAmmoTypes .~ [BulletAmmo]
& itUse . heldDelay . rateMax .~ 6
-- & itUse . heldMods .~ PistolMod
& itUse . heldAim . aimMuzzles . ix 0 . mzPos %~ const (V2 10 0)
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy %~ const 0.05
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType %~ const PistolFlare
@@ -48,35 +46,28 @@ pistol =
. (torqueAfter .~ 0.2)
. (sidePush .~ 50)
)
& itType . iyBase .~ HELD PISTOL
& itType .~ HELD PISTOL
autoPistol :: Item
autoPistol =
pistol
-- & itUse . heldMods .~ PistolMod
& itUse . heldTriggerType .~ AutoTrigger
& itUse . heldParams . bulGunSound ?~ (tap1S,0)
& itType . iyBase .~ HELD AUTOPISTOL
-- & itType . iyModules . at ModAutoMag ?~ EMPTYMODULE
& itType .~ HELD AUTOPISTOL
machinePistol :: Item
machinePistol =
autoPistol
& itUse . heldDelay .~ WarmUpNoDelay {_warmTime = 0, _warmMax = 50, _warmSound = crankSlowS}
--rateMax .~ 2
-- & itUse . heldMods .~ PistolMod -- (ammoCheckI : machinePistolAfterHamMods)
& itType . iyBase .~ HELD MACHINEPISTOL
-- & itType . iyModules . at ModAutoMag .~ Nothing
& itType .~ HELD MACHINEPISTOL
& itUse . heldParams . recoil .~ 20
smg :: Item
smg =
autoPistol -- & some parameter affecting stability
-- & itUse . heldMods .~ PistolMod --(ammoCheckI : smgAfterHamMods)
& itType . iyBase .~ HELD SMG
& itType .~ HELD SMG
& itUse . heldAim . aimStance .~ TwoHandUnder
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
-- & itUse . heldAim . aimHandlePos .~ 2
& itUse . heldParams . torqueAfter .~ 0.05
& itUse . heldParams . sidePush .~ 30
+5 -8
View File
@@ -15,10 +15,10 @@ flatShield =
& itUse . heldAim . aimStance .~ TwoHandFlat
-- & itUse . heldAim . aimHandlePos .~ 0
& itInvSize .~ 3
& itType . iyBase .~ HELD FLATSHIELD
& itType .~ HELD FLATSHIELD
keyCard :: Int -> Item
keyCard n = defaultHeldItem & itType . iyBase .~ HELD (KEYCARD n)
keyCard n = defaultHeldItem & itType .~ HELD (KEYCARD n)
latchkey :: Int -> Item
latchkey _ = defaultHeldItem
@@ -27,7 +27,7 @@ torch :: Item
torch =
defaultHeldItem
& itEffect . ieInv .~ EffectWhileRoot CreateHeldLight
& itType . iyBase .~ HELD TORCH
& itType .~ HELD TORCH
-- & itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 10
@@ -43,7 +43,7 @@ forceFieldGun =
-- & itUse . heldMods .~ ForceFieldMod -- this is slightly different
-- than the list below
--[ hammerCheckI , ammoCheckI , useAmmoAmount 1]
& itType . iyBase .~ HELD FORCEFIELDGUN
& itType .~ HELD FORCEFIELDGUN
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleForceField
@@ -54,10 +54,7 @@ clickDetector :: Detector -> Item
clickDetector dt =
defaultHeldItem
& itUse . heldDelay . rateMax .~ 20
-- & itUse . heldUse .~ HeldDetectorEffect dt --detectorEffect dt
-- & itUse . heldMods .~ AmmoUseCheckMod
-- & itUse . heldMods .~ DetectorMod dt --detectorEffect dt
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
& itType . iyBase .~ HELD (HELDDETECTOR dt)
& itType .~ HELD (HELDDETECTOR dt)
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleDetector
+1 -3
View File
@@ -8,12 +8,10 @@ import Linear.V2
shatterGun :: Item
shatterGun =
defaultHeldItem
& itType . iyBase .~ HELD SHATTERGUN
& itType .~ HELD SHATTERGUN
& itUse . heldDelay . rateMax .~ 10
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleShatter
-- & itUse . heldUse .~ HeldShatter --shootShatter
-- & itUse . heldMods .~ ShatterMod
& itUse . heldAim . aimStance .~ TwoHandFlat
+21 -54
View File
@@ -1,25 +1,26 @@
module Dodge.Item.Info where
module Dodge.Item.Info
( itemInfo
) where
import Data.Char
import qualified Data.Map.Strict as M
--import qualified Data.Map.Strict as M
import Dodge.Data.Item
import Dodge.Module.Info
--import Dodge.Module.Info
import LensHelp
import StringHelp
--import StringHelp
itemInfo :: Item -> String
itemInfo itm =
itmBaseInfo itm ++ " " ++ itmUsageInfo itm
++ itmSpaceInfo itm
-- ++ itmModuleInfo (itm ^. itType . iyModules)
itmSpaceInfo :: Item -> String
itmSpaceInfo itm = case ceiling $ _itInvSize itm of
itmSpaceInfo itm = case _itInvSize itm of
1 -> " It takes up one inventory slot. "
x -> " It takes up " ++ showInt x ++ " inventory slots. "
itmBaseInfo :: Item -> String
itmBaseInfo itm = case itm ^. itType . iyBase of
itmBaseInfo itm = case itm ^. itType of
HELD hit -> heldInfo hit
LEFT lit -> leftInfo lit
EQUIP eit -> equipInfo eit
@@ -112,7 +113,6 @@ equipInfo eit = case eit of
INVISIBILITYEQUIPMENT _ -> "A device that bends light around its user."
BRAINHAT -> "An iq enhancer. Useless."
HAT -> "A hat."
TARGETINGHAT tt -> "Headwear that " ++ targetingInfo tt
HEADLAMP -> "A torch strapped to a hat."
POWERLEGS -> "Strength enhancing legs."
SPEEDLEGS -> "Speed enhancing legs."
@@ -124,13 +124,13 @@ equipInfo eit = case eit of
BATTERYPACK -> "A collection of batteries with a universal adapter."
AUTODETECTOR d -> "A device that detects " ++ detectorInfo d ++ " in an expanding radius. Pulses automatically. "
targetingInfo :: TargetingType -> String
targetingInfo tt = case tt of
TARGETLASER -> "creates a laser, the end of which becomes the target."
TargetRBPress -> "creates a fixed target."
TargetRBLine -> "creates a line target."
TargetRBCreature -> "targets a creature."
TargetCursor -> "creates a moving target."
--targetingInfo :: TargetingType -> String
--targetingInfo tt = case tt of
-- TARGETLASER -> "creates a laser, the end of which becomes the target."
-- TargetRBPress -> "creates a fixed target."
-- TargetRBLine -> "creates a line target."
-- TargetRBCreature -> "targets a creature."
-- TargetCursor -> "creates a moving target."
consumableInfo :: ConsumableItemType -> String
consumableInfo cit = case cit of
@@ -199,7 +199,7 @@ detectorInfo d = case d of
WALLDETECTOR -> "walls"
itmUsageInfo :: Item -> String
itmUsageInfo itm = case itm ^. itType . iyBase of
itmUsageInfo itm = case itm ^. itType of
HELD _ -> heldPositionInfo itm
LEFT _ ->
"This item can be equipped" ++ itmEquipSiteInfo itm
@@ -219,8 +219,6 @@ aimStanceInfo as = case as of
TwoHandFlat -> "It is held in two hands at its sides."
OneHand -> "It is held in one hand."
-- LeaveHolstered -> "It is to be left holstered."
itmEquipSiteInfo :: Item -> String
itmEquipSiteInfo = maybe "" equipSiteInfo . (^? itUse . equipEffect . eeSite)
@@ -232,39 +230,8 @@ equipSiteInfo es = case es of
GoesOnWrist -> " on a wrist"
GoesOnLegs -> " on both legs"
--itmModuleInfo :: M.Map ModuleSlot ItemModuleType -> String
--itmModuleInfo m
-- | m == mempty = ""
-- | otherwise = mms ++ ems
-- where
-- (mademods, emptymods) = M.partition (/= EMPTYMODULE) m
-- mms
-- | mademods == mempty = ""
-- | otherwise =
-- " Modifications have been made "
-- ++ makeCommaList (map moduleInfo $ M.keys mademods)
-- ems
-- | emptymods == mempty = ""
-- | otherwise =
-- " Modifications can be made "
-- ++ makeCommaList (map moduleInfo $ M.keys emptymods)
makeCommaList :: [String] -> String
makeCommaList [] = ""
makeCommaList [x] = x ++ "."
makeCommaList [x, y] = x ++ " and " ++ y ++ "."
makeCommaList (x : xs) = x ++ ", " ++ makeCommaList xs
--moduleInfo :: ModuleSlot -> String
--moduleInfo imt = case imt of
-- ModBulletCollision -> "to affect how fired bullets collide with objects"
-- ModBulletPayload -> "to bullet payloads"
-- ModRifleMag -> "to the magazine"
-- ModAutoMag -> "to the magazine"
-- ModTarget -> "to add a targeting system or scope"
-- ModBulletTrajectory -> "to utilize any installed targeting system to affect the trajectory of fired bullets"
-- ModLauncherHoming -> "to add a homing system"
-- ModBattery -> "to its battery system"
-- ModTeleport -> "to add a teleporation system"
-- ModDualBeam -> "to the dual beams"
-- ModHeldAttach -> "to add an attachment that may have any number of effects"
--makeCommaList :: [String] -> String
--makeCommaList [] = ""
--makeCommaList [x] = x ++ "."
--makeCommaList [x, y] = x ++ " and " ++ y ++ "."
--makeCommaList (x : xs) = x ++ ", " ++ makeCommaList xs
+4 -2
View File
@@ -1,11 +1,13 @@
module Dodge.Item.InventoryColor where
module Dodge.Item.InventoryColor
( itemInvColor
) where
import Color
import Dodge.Data.Item
import Control.Lens
itemInvColor :: Item -> Color
itemInvColor itm = case itm ^. itType . iyBase of
itemInvColor itm = case itm ^. itType of
HELD {} -> white
LEFT {} -> cyan
EQUIP {} -> yellow
+12 -16
View File
@@ -15,23 +15,19 @@ import Dodge.Data.Item
import Dodge.Default.Item
zoomScope :: Item
zoomScope =
defaultHeldItem
& itType . iyBase .~ ATTACH ZOOMSCOPE
-- & itUse .~ AttachUse (ScrollAttachParams (ZoomScrollParams{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}))
& itUse .~ ScopeUse OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
zoomScope = defaultHeldItem
& itType .~ ATTACH ZOOMSCOPE
& itUse .~ ScopeUse OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
targetingScope :: TargetingType -> Item
targetingScope tt =
defaultHeldItem
& itType . iyBase .~ TARGETING tt
& itUse .~ TargetingUse Nothing Nothing False
targetingScope tt = defaultHeldItem
& itType .~ TARGETING tt
& itUse .~ TargetingUse Nothing Nothing False
homingModule :: Item
homingModule =
defaultHeldItem
& itType . iyBase .~ ATTACH HOMINGMODULE
& itUse .~ AttachUse Nothing
homingModule = defaultHeldItem
& itType .~ ATTACH HOMINGMODULE
& itUse .~ AttachUse Nothing
fletchingModule :: Item
fletchingModule = bulletTargetingModule FlechetteTrajectoryType
@@ -39,7 +35,7 @@ fletchingModule = bulletTargetingModule FlechetteTrajectoryType
bulletModule :: BulletMod -> Item
bulletModule bm =
defaultHeldItem
& itType . iyBase .~ BULLETMOD bm
& itType .~ BULLETMOD bm
& itUse .~ BulletModUse bm
bulletTargetingModule :: BulletTrajectoryType -> Item
@@ -50,11 +46,11 @@ bulletPayloadModule = bulletModule . BulletModPayload
augmentedHUD :: Item
augmentedHUD = defaultHeldItem
& itType . iyBase .~ ATTACH AUGMENTEDHUD
& itType .~ ATTACH AUGMENTEDHUD
& itUse .~ AttachUse Nothing
remoteScreen :: Item
remoteScreen =
defaultHeldItem
& itType . iyBase .~ ATTACH REMOTESCREEN
& itType .~ ATTACH REMOTESCREEN
& itUse .~ AttachUse Nothing
-16
View File
@@ -1,16 +0,0 @@
module Dodge.Item.SlotsTaken (
itSlotsTaken,
) where
--import Control.Lens
import Dodge.Data.Item
import Dodge.Module
itSlotsTaken :: Item -> Int
itSlotsTaken it = ceiling (_itInvSize it)
--itSlotsTaken it = moduleSizes it + ceiling (_itInvSize it)
--itSlotsTaken :: Item -> Int
--itSlotsTaken it = case it ^? itUse . useAmount of
-- Nothing -> moduleSizes it + ceiling (_itInvSize it)
-- Just i -> moduleSizes it + ceiling (_itInvSize it * fromIntegral i)
+1 -1
View File
@@ -17,7 +17,7 @@ droneLauncher =
& itUse . heldAim . aimRange .~ 0.5
& itUse . heldAim . aimStance .~ TwoHandOver
& itUse . heldAmmoTypes .~ singleAmmo DroneAmmo
& itType . iyBase .~ HELD DRONELAUNCHER
& itType .~ HELD DRONELAUNCHER
lasDronesPic :: Item -> SPic
lasDronesPic _ =
+1 -1
View File
@@ -12,7 +12,7 @@ autoDetector dt =
& itUse . equipEffect . eeUse .~ EDetector dt --autoEffect (detectorEffect dt) 100 click1S
& itUse . equipEffect . eeParams .~ EquipCounter 0
& itUse . equipEffect . eeViewDist ?~ 350
& itType . iyBase .~ EQUIP (AUTODETECTOR dt)
& itType .~ EQUIP (AUTODETECTOR dt)
-- , _itEffect = autoRadarEffect
+1 -1
View File
@@ -15,7 +15,7 @@ spawnGun _ =
& itUse . heldDelay . rateMax .~ 100
-- & itUse . heldUse .~ HeldDoNothing --(\_ -> spawnCrNextTo cr)
-- & itUse . heldMods .~ DoNothingMod
& itType . iyBase .~ LEFT SPAWNER
& itType .~ LEFT SPAWNER
spawnCrNextTo ::
-- | Creature to spawn
+6 -6
View File
@@ -21,7 +21,7 @@ stopWatch =
)
& itEffect . ieInv .~ ChargeIfEquipped
& itEffect . ieOnDrop .~ SetCharge 0
& itType . iyBase .~ LEFT STOPWATCH
& itType .~ LEFT STOPWATCH
& itUse . leftConsumption
.~ ChargeableAmmo
{ _wpMaxCharge = 100
@@ -32,13 +32,13 @@ scrollWatch :: Item
scrollWatch =
stopWatch
& itUse . leftUse .~ LTimeScroll
& itType . iyBase .~ LEFT SCROLLWATCH
& itType .~ LEFT SCROLLWATCH
rewindWatch :: Item
rewindWatch =
stopWatch
& itUse . leftUse .~ LRewind --useRewindGun
& itType . iyBase .~ LEFT REWINDWATCH
& itType .~ LEFT REWINDWATCH
-- needs to shift this item to the current inventory slot
shrinkGun :: Item
@@ -46,7 +46,7 @@ shrinkGun =
defaultLeftItem
& itUse .~ (defaultLeftUse & leftUse .~ LShrink)
& itParams .~ ShrinkGunParams FullSize
& itType . iyBase .~ LEFT SHRINKER
& itType .~ LEFT SHRINKER
blinkGun :: Item
blinkGun =
@@ -57,12 +57,12 @@ blinkGun =
& equipEffect . eeSite .~ GoesOnWrist
-- , _itFloorPict = const . noPic . colorSH chartreuse $ upperPrismPoly 2 $ square 2
}
& itType . iyBase .~ LEFT BLINKER
& itType .~ LEFT BLINKER
unsafeBlinkGun :: Item
unsafeBlinkGun =
blinkGun
& itType . iyBase .~ LEFT BLINKERUNSAFE
& itType .~ LEFT BLINKERUNSAFE
& itUse . leftUse .~ LUnsafeBlink --hammerCheckL (shootL $ const unsafeBlinkAction)
& itUse . equipEffect . eeViewDist ?~ 400
+5 -5
View File
@@ -8,10 +8,10 @@ import Dodge.Room
import Dodge.Tree
import RandomHelp
bossKeyItems :: RandomGen g => [(State g (Tree Room), State g ItemBaseType)]
bossKeyItems :: RandomGen g => [(State g (Tree Room), State g ItemType)]
bossKeyItems = [(return . cleatOnward <$> bossRoom autoCrit, takeOne [HELD PISTOL])]
lockRoomMultiItems :: RandomGen g => [(State g (MetaTree Room String), State g [ItemBaseType])]
lockRoomMultiItems :: RandomGen g => [(State g (MetaTree Room String), State g [ItemType])]
lockRoomMultiItems =
[
( blinkAcrossChallenge
@@ -22,7 +22,7 @@ lockRoomMultiItems =
)
]
lockRoomKeyItems :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemBaseType)]
lockRoomKeyItems :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemType)]
lockRoomKeyItems =
[ (lasCenSensEdge, takeOne [HELD LAUNCHER, HELD LASGUN, HELD SPARKGUN, HELD FLATSHIELD, HELD FORCEFIELDGUN])
-- , (sensorRoomRunPast ELECTRICAL, takeOne [CRAFT (ENERGYBALLCRAFT TeslaBall), HELD SPARKGUN])
@@ -35,10 +35,10 @@ lockRoomKeyItems =
, (keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))
]
keyCardRunPastRand :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemBaseType)]
keyCardRunPastRand :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemType)]
keyCardRunPastRand = [(keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))]
itemRooms :: RandomGen g => [(ItemBaseType, State g (MetaTree Room String))]
itemRooms :: RandomGen g => [(ItemType, State g (MetaTree Room String))]
itemRooms =
[
( HELD LAUNCHER
+2 -2
View File
@@ -62,7 +62,7 @@ mcUseItem :: Machine -> World -> World
mcUseItem mc = fromMaybe id $ do
tu <- mc ^? mcType . _McTurret
let it = tu ^. tuWeapon
hit <- it ^? itType . iyBase . ibtHeld
hit <- it ^? itType . ibtHeld
guard (_tuFireTime tu > 0)
return $ mcUseHeld hit it mc
@@ -126,7 +126,7 @@ mcProximitySensorUpdate mc w = case ( _proxStatus sens
mcProxTest :: Machine -> World -> Bool
mcProxTest mc w = case mc ^? mcType . _McSensor . proxRequirement of
Just (RequireHealth x) -> _crHP cr >= x
Just (RequireEquipment ct) -> any (\itm -> _iyBase (_itType itm) == ct) (_crInv cr)
Just (RequireEquipment ct) -> any (\itm -> _itType itm == ct) (_crInv cr)
_ -> False
where
cr = you w
-47
View File
@@ -1,47 +0,0 @@
module Dodge.Module (
-- moduleSizes,
-- moduleStrings,
-- moduleName,
) where
import qualified Data.Map.Strict as M
import Dodge.Data.Item
import Dodge.Module.Info
--moduleSizes :: Item -> Int
--moduleSizes = sum . fmap moduleSize . _iyModules . _itType
--
--moduleSize :: ItemModuleType -> Int
--moduleSize imt = case imt of
-- EMPTYMODULE -> 0
-- _ -> 1
--moduleStrings :: Item -> [String]
--moduleStrings = M.elems . M.mapMaybe moduleName . _iyModules . _itType
--moduleName :: ItemModuleType -> Maybe String
--moduleName imt = case imt of
-- EMPTYMODULE -> Nothing
---- BELTMAG -> Just "+BELT FEED"
-- MAGNETMAG -> Just "+MAGNET FEED"
-- BULPAY thepayload -> Just $ "+" ++ displayBulletPayload thepayload
-- BULBODY thebody -> Just $ "+" ++ displayBulletBody thebody
-- BULTRAJ thetraj -> Just $ "+" ++ displayBulletTraj thetraj
-- TARGET TargetRBCreature -> Just "+CREATURETARGETING"
-- TARGET TARGETLASER -> Just "+LASERTARGETING"
-- TARGET TargetRBPress -> Just "+POSTIONALTARGETING"
-- TARGET TargetCursor -> Just "+CURSORTARGETING"
-- TARGET TargetRBLine -> Just "+LINETARGETING"
-- INCENDLAS -> Just "+INCENDIARY"
-- SPLITLAS -> Just "+SPLIT"
-- STATICLAS -> Just "+STATIC"
---- WEPTELE -> Just "+DIRECTEDTELE"
-- LAUNCHHOME -> Just "+TARGET HOMING"
-- ATTACHTORCH -> Just "+TORCH"
--moduleFold :: (m -> m -> m) -> (ItemModule -> Maybe m) -> m -> Item -> m
--moduleFold g f e = foldr (g . fromMaybe e . f) e
-- . fmap fromModuleType
-- . _iyModules
-- . _itType
-33
View File
@@ -1,33 +0,0 @@
module Dodge.Module.Info
()
where
--import qualified Data.Map.Strict as M
import Dodge.Data.Item
displayBulletBody :: BulletEffect -> String
displayBulletBody be = case be of
DestroyBullet -> "DESBUL-shouldn't display"
BounceBullet -> "bouncing"
PenetrateBullet -> "penetrating"
displayBulletPayload :: BulletPayload -> String
displayBulletPayload x = case x of
BulSpark -> ""
BulFrag -> "fragmentation"
BulFlak -> "flak"
BulGas -> "gaseous"
BulBall y -> displayEnergyBallType y
displayEnergyBallType :: EnergyBallType -> String
displayEnergyBallType ebt = case ebt of
IncBall -> "incendiary"
TeslaBall -> "static"
ConcBall -> "concussive"
FlashBall -> "blinding"
displayBulletTraj :: BulletTrajectoryType -> String
displayBulletTraj x = case x of
BasicBulletTrajectoryType-> "BTRAJ-shouldn't display"
BezierTrajectoryType -> "magnet"
FlechetteTrajectoryType -> "flechette"
MagnetTrajectoryType -> "bezier curve"
+1 -1
View File
@@ -118,7 +118,7 @@ closeObjectInfo n x = case x of
floorItemPickupInfo :: Int -> Item -> String
floorItemPickupInfo n itm
| n >= ceiling (_itInvSize itm) = ", but you have space to pick it up."
| n >= _itInvSize itm = ", but you have space to pick it up."
| otherwise = ", and you don't have space to pick it up."
-- note the use of ^?!
+390 -436
View File
File diff suppressed because it is too large Load Diff