Tweak info

This commit is contained in:
2023-01-11 22:35:35 +00:00
parent 994496e964
commit f2f414cee6
3 changed files with 72 additions and 65 deletions
+7
View File
@@ -0,0 +1,7 @@
module Dodge.Creature.Info where
import Dodge.Data.Creature
import LensHelp
yourInfo :: Creature -> String
yourInfo cr = "You can carry a maximum of " ++ show (cr ^. crInvCapacity) ++ " individual items. "
+63 -63
View File
@@ -12,7 +12,7 @@ itemInfo itm = itmBaseInfo itm ++ " " ++ itmUsageInfo itm
itmSpaceInfo :: Item -> String
itmSpaceInfo itm = case (ceiling $ _itInvSize itm) of
1 -> "It takes up one inventory slot. "
x -> "It takes up " ++ map toLower (showInt x) ++ " inventory slots. "
x -> "It takes up " ++ showInt x ++ " inventory slots. "
itmBaseInfo :: Item -> String
itmBaseInfo itm = case itm ^. itType . iyBase of
@@ -25,71 +25,71 @@ itmBaseInfo itm = case itm ^. itType . iyBase of
showInt :: Int -> String
showInt i = case i of
0 -> "ZERO"
1 -> "ONE"
2 -> "TWO"
3 -> "THREE"
4 -> "FOUR"
5 -> "FIVE"
6 -> "SIX"
7 -> "SEVEN"
8 -> "EIGHT"
9 -> "NINE"
10 -> "TEN"
11 -> "ELEVEN"
12 -> "A DOZEN"
_ -> "MANY"
0 -> "zero"
1 -> "one"
2 -> "two"
3 -> "three"
4 -> "four"
5 -> "five"
6 -> "six"
7 -> "seven"
8 -> "eight"
9 -> "nine"
10 -> "ten"
11 -> "eleven"
12 -> "a dozen"
_ -> "more than a dozen"
heldInfo :: HeldItemType -> String
heldInfo hit = case hit of
BANGSTICK 1 -> "A FIREARM WITH A SHORT BARREL THAT REQUIRES RELOADING AFTER EACH SHOT."
BANGSTICK i -> showInt i++" SMALL GUN BARRELS STRAPPED TOGETHER. EACH BARREL MUST BE INDIVIDUALLY LOADED, BUT NOT ALL NEED BE LOADED FOR THE WEAPON TO FIRE. ALL LOADED BARRELS DISCHARGE SIMULATNEOUSLY, WITH SIGNIFICANT SPREAD."
PISTOL -> "A SMALL FIREARM FED BY A MAGAZINE. THE ENTIRE MAGAZINE MUST BE REPLACED WHEN RELOADING THE WEAPON."
REVOLVER -> "A SMALL FIREARM FED BY A REVOLVING CYLINDER. SINGLE SHOT AND LOAD."
REVOLVERX i -> "A SMALL FIREARM FED BY "++ showInt i++ "REVOLVING CYLINDERS."
MACHINEPISTOL -> "A SMALL FIREARM AUTOMATICALLY, AND EXTREMELY RAPIDLY, FED BY A MAGAZINE. THE ENTIRE MAGAZINE MUST BE REPLACED WHEN RELOADING THE WEAPON."
AUTOPISTOL -> "A SMALL FIREARM AUTOMATICALLY FED BY A MAGAZINE. THE ENTIRE MAGAZINE MUST BE REPLACED WHEN RELOADING THE WEAPON."
SMG -> "A SMALL FIREARM WITH AN ATTACHED STOCK FOR STABILITY."
BANGCONE -> "A CONTAINER FOR DEBRIS. EXPOSIVE ACTION PROPELS THE DEBRIS AWAY FROM THE USER. QUITE UNWEILDY."
BLUNDERBUSS -> "A CONTAINER FOR DEBRIS ON THE END OF A STICK. EXPLOSIVE ACTION PROPELS THE DEBRIS AWAY FROM THE USER."
GRAPECANNON 1 -> "A LARGE CONTAINER FOR DEBRIS ON THE END OF A STICK. EXPLOSIVE ACTION PROPELS THE DEBRIS AWAY FROM THE USER."
GRAPECANNON i -> "AN "++ replicate (i-1) 'X' ++"L CONTAINER FOR DEBRIS ON THE END OF A STICK. EXPLOSIVE ACTION PROPELS THE DEBRIS AWAY FROM THE USER."
MINIGUNX i -> showInt i ++ " GUN BARRELS THAT REVOLVE RAPIDLY AROUND A CENTRAL STICK. REQUIRES CONSIDERABLE TIME TO WARM UP, BUT HAS AN EXTREMELY RAPID RATE OF FIRE. IT IS ALSO EXTREMELY DIFFICULT TO STABILISE."
VOLLEYGUN i -> showInt i ++ " GUN BARRELS LINED UP TO BE ROUGHLY PARALLEL. EACH BARREL MUST BE INDIVIDUALLY LOADED, BUT NOT ALL NEED BE LOADED FOR THE WEAPON TO FIRE. ALL LOADED BARRELS DISCHARGE SIMULTANEOUSLY."
RIFLE -> "A FIREARM WITH A MID LENGTH BARREL THAT REQUIRES RELOADING AFTER EACH SHOT."
REPEATER -> "A FIREARM FED BY A MAGAZINE. THE ENTIRE MAGAZINE MUST BE REPLACED WHEN RELOADING THE WEAPON."
AUTORIFLE -> "A FIREARM AUTOMATICALLY FED BY A MAGAZINE. THE ENTIRE MAGAZINE MUST BE REPLACED WHEN RELOADING THE WEAPON."
BURSTRIFLE -> "A FIREARM THAT RAPIDLY FIRES THREE PROJECTILES FROM ITS MAGAZINE. THE ENTIRE MAGAZINE MUST BE REPLACED WHEN RELOADING THE WEAPON."
BANGROD -> "A FIREARM WITH A LONG BARREL THAT REQUIRES RELOADING AFTER EACH SHOT."
ELEPHANTGUN -> "A FIREARM WITH A LONG BARREL THAT REQUIRES RELOADING AFTER EACH SHOT. ITS STOPPING POWER IS ONLY NOMINAL."
AMR -> "AN ANTIMATERIEL RIFLE, DESIGNED TO DISABLE MILITARY EQUIPMENT. ITS LONG BARREL IS FED BY A MAGAZINE THAT MUST BE REPLACED WHEN RELOADING THE WEAPON."
AUTOAMR -> "AN AUTOMATIC ANTIMATERIEL RIFLE, DESIGNED TO DISABLE MILITARY EQUIPMENT. ITS LONG BARREL IS FED BY A MAGAZINE THAT MUST BE REPLACED WHEN RELOADING THE WEAPON."
SNIPERRIFLE -> "A FIREARM DESIGNED WITH LONG RANGE CAPABILITY IN MIND. ITS LONG BARREL REQUIRES RELOADING AFTER EACH SHOT."
MACHINEGUN -> "A HEAVY FIREARM WHOSE RATE OF FIRE INCREASES DURING A BARRAGE."
FLAMESPITTER -> "A WEAPON THAT GLOBS OUT BURNING FUEL."
FLAMETHROWER -> "A WEAPON THAT SQUIRTS OUT BURNING FUEL."
FLAMETORRENT -> "A WEAPON THAT STREAMS OUT BURNING FUEL IN A TORRENT."
FLAMEWALL -> "A WEAPON THAT SQUIRTS OUT BURNING FUEL ALL AROUND THE USER."
BLOWTORCH -> "A WEAPON THAT PRODUCES A CONCENTRATED FLAME."
SPARKGUN -> "A WEAPON THAT PRODUCES AN ARC OF ELECTRICITY. THE ARC WILL ATTEMPT TO DISCHARGE AT A NEARBY OBJECT."
TESLAGUN -> "A WEAPON THAT DISCHARGES A SUSTAINED ARC OF ELECTRICITY. THE ARC WILL ATTEMPT TO DISCHARGE AT A NEARBY OBJECT."
LASGUN -> "A WEAPON THAT CONTINUOUSLY EMITS PHOTONS IN A NARROW BEAM."
LASCIRCLE -> "A EXTENSIVE CONFIGURATION OF PRISMS AND MIRRORS THAT PRODUCES MULTIPLE LASER BEAMS AROUND ITS USER."
DUALBEAM -> "A WEAPON THAT EMITS TWO BEAMS THAT CONVERGE AT A SELECTABLE POINT IN FRONT OF THE USER."
LASWIDE _ -> "A WEAPON THAT CONTINUOUSLY EMITS PHOTONS IN A NARROW BEAM. THE BEAM EXPANDS AS THE WEAPON HEATS UP."
TRACTORGUN -> "AN ITEM THAT PRODUCES A BEAM OF GRAVITONS."
LAUNCHER -> "A LARGE TUBE THAT CAN LAUNCH SELF PROPELLED PROJECTILES. MOVING THE TUBE AFTER LAUNCH WILL CAUSE THE PROJECTILE TO SPIN."
LAUNCHERX i -> showInt i++" TUBES THAT CAN LAUNCH SELF PROPELLED PROJECTILES. TUBES THAT DO NOT FACE FORWARD LAUNCH THEIR PROJECITLES AT AN ANGLE."
REMOTELAUNCHER -> "A LARGE TUBE THAT CAN LAUNCH SELF PROPELLED PROJECTILES. CONTAINS A TRANSMITTER ALLOWING FOR REMOTE CONTROL OF LAUNCHED PROJECTILES."
POISONSPRAYER -> "A WEAPON THAT RELEASES NOXIOUS GASES."
DRONELAUNCHER -> "A DEVICE FOR LAUNCHING DRONES."
SHATTERGUN -> "A SEISMIC DEVICE THAT SHATTERS HARD ITEMS IN ITS LINE OF FIRE."
FORCEFIELDGUN -> "A DEVICE THAT PRODUCES A DURABLE FORCEFIELD."
HELDDETECTOR d -> "A DEVICE THAT DETECTS "++detectorInfo d ++" IN AN EXPANDING RADIUS."
TORCH -> "A STICK WITH A LIGHT ON THE END."
BINOCULARS -> "TWO CYLINDERS WITH LENSES. SCROLL TO ZOOM."
FLATSHIELD -> "A PANEL OF METAL THAT BLOCKS UNWANTED OBJECTS FROM THE FRONT OF THE USER."
KEYCARD i -> "A KEYCARD. IT IS LABELLED " ++ show i++ "."
BANGSTICK 1 -> "A firearm with a short barrel that requires reloading after each shot."
BANGSTICK i -> over _head toUpper (showInt i)++" small gun barrels strapped together. Each barrel must be individually loaded, but not all need be loaded for the weapon to fire. All loaded barrels discharge simultaneously, with significant spread."
PISTOL -> "A small firearm fed by a magazine. The entire magazine must be replaced when reloading the weapon."
REVOLVER -> "A small firearm fed by a revolving cylinder. Single shot and load."
REVOLVERX i -> "A small firearm fed by "++ showInt i++ "revolving cylinders."
MACHINEPISTOL -> "A small firearm automatically, and extremely rapidly, fed by a magazine. The entire magazine must be replaced when reloading the weapon."
AUTOPISTOL -> "A small firearm automatically fed by a magazine. The entire magazine must be replaced when reloading the weapon."
SMG -> "A small firearm with an attached stock for stability."
BANGCONE -> "A container for debris. Exposive action propels the debris away from the user. Quite unweildy."
BLUNDERBUSS -> "A container for debris on the end of a stick. Explosive action propels the debris away from the user."
GRAPECANNON 1 -> "A large container for debris on the end of a stick. Explosive action propels the debris away from the user."
GRAPECANNON i -> "An "++ replicate (i-1) 'X' ++"L container for debris on the end of a stick. Explosive action propels the debris away from the user."
MINIGUNX i -> over _head toUpper (showInt i) ++ " gun barrels that revolve rapidly around a central stick. Requires considerable time to warm up, but has an extremely rapid rate of fire. It is also extremely difficult to stabilise."
VOLLEYGUN i -> over _head toUpper (showInt i) ++ " gun barrels lined up to be roughly parallel. Each barrel must be individually loaded, but not all need be loaded for the weapon to fire. All loaded barrels discharge simultaneously."
RIFLE -> "A firearm with a mid length barrel that requires reloading after each shot."
REPEATER -> "A firearm fed by a magazine. The entire magazine must be replaced when reloading the weapon."
AUTORIFLE -> "A firearm automatically fed by a magazine. The entire magazine must be replaced when reloading the weapon."
BURSTRIFLE -> "A firearm that rapidly fires three projectiles from its magazine. The entire magazine must be replaced when reloading the weapon."
BANGROD -> "A firearm with a long barrel that requires reloading after each shot."
ELEPHANTGUN -> "A firearm with a long barrel that requires reloading after each shot. Its stopping power is only nominal."
AMR -> "An antimateriel rifle, designed to disable military equipment. Its long barrel is fed by a magazine that must be replaced when reloading the weapon."
AUTOAMR -> "An automatic antimateriel rifle, designed to disable military equipment. Its long barrel is fed by a magazine that must be replaced when reloading the weapon."
SNIPERRIFLE -> "A firearm designed with long range capability in mind. Its long barrel requires reloading after each shot."
MACHINEGUN -> "A heavy firearm whose rate of fire increases during a barrage."
FLAMESPITTER -> "A weapon that globs out burning fuel."
FLAMETHROWER -> "A weapon that squirts out burning fuel."
FLAMETORRENT -> "A weapon that streams out burning fuel in a torrent."
FLAMEWALL -> "A weapon that squirts out burning fuel all around the user."
BLOWTORCH -> "A weapon that produces a concentrated flame."
SPARKGUN -> "A weapon that produces an arc of electricity. The arc will attempt to discharge at a nearby object."
TESLAGUN -> "A weapon that discharges a sustained arc of electricity. The arc will attempt to discharge at a nearby object."
LASGUN -> "A weapon that continuously emits photons in a narrow beam."
LASCIRCLE -> "A extensive configuration of prisms and mirrors that produces multiple laser beams around its user."
DUALBEAM -> "A weapon that emits two beams that converge at a selectable point in front of the user."
LASWIDE _ -> "A weapon that continuously emits photons in a narrow beam. The beam expands as the weapon heats up."
TRACTORGUN -> "An item that produces a beam of gravitons."
LAUNCHER -> "A large tube that can launch self propelled projectiles. Moving the tube after launch will cause the projectile to spin."
LAUNCHERX i -> over _head toUpper (showInt i)++" tubes that can launch self propelled projectiles. Tubes that do not face forward launch their projecitles at an angle."
REMOTELAUNCHER -> "A large tube that can launch self propelled projectiles. Contains a transmitter allowing for remote control of launched projectiles."
POISONSPRAYER -> "A weapon that releases noxious gases."
DRONELAUNCHER -> "A device for launching drones."
SHATTERGUN -> "A seismic device that shatters hard items in its line of fire."
FORCEFIELDGUN -> "A device that produces a durable forcefield."
HELDDETECTOR d -> "A device that detects "++detectorInfo d ++" in an expanding radius."
TORCH -> "A stick with a light on the end."
BINOCULARS -> "Two cylinders with lenses. Scroll to zoom."
FLATSHIELD -> "A panel of metal that blocks unwanted objects from the front of the user."
KEYCARD i -> "A keycard. It is labelled " ++ show i++ "."
leftInfo :: LeftItemType -> String
leftInfo lit = case lit of
+2 -2
View File
@@ -126,8 +126,8 @@ drawExamineInventory cfig mtweaki w =
closeObjectInfo :: Int -> Either FloorItem Button -> String
closeObjectInfo n x = case x of
Left (FlIt {_flIt = itm}) -> "This item is on the floor " ++ floorItemPickupInfo n itm ++ itemInfo itm
Right _ -> "This is some sort of switch or button."
Left (FlIt {_flIt = itm}) -> "It is on the floor " ++ floorItemPickupInfo n itm ++ itemInfo itm
Right _ -> "It is some sort of switch or button."
floorItemPickupInfo :: Int -> Item -> String
floorItemPickupInfo n itm