Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balance bionic power use for realistic values #34456

Merged
merged 7 commits into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 66 additions & 66 deletions data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Adrenaline Pump",
"description": "A stimulator system has been surgically implanted alongside your adrenal glands, allowing you to trigger your body's adrenaline response at the cost of some bionic power.",
"occupied_bodyparts": [ [ "TORSO", 6 ] ],
"act_cost": 50
"act_cost": "5 J"
},
{
"id": "bio_ads",
Expand All @@ -25,9 +25,9 @@
"description": "A motion-detecting alarm system will notice almost all movement within a fifteen-foot radius, and will silently alert you. This is very useful during sleep, or if you suspect a cloaked pursuer.",
"occupied_bodyparts": [ [ "TORSO", 2 ], [ "HEAD", 1 ] ],
"flags": [ "BIONIC_TOGGLED", "BIONIC_SLEEP_FRIENDLY" ],
"act_cost": 1,
"react_cost": 1,
"time": 600
"act_cost": "1 J",
"react_cost": "1 J",
"time": 1
},
{
"id": "bio_ankles",
Expand Down Expand Up @@ -93,7 +93,7 @@
"name": "Monomolecular Blade",
"description": "A deadly foot-long blade made of advanced material now resides inside your forearm, capable of being extended through the back of your wrist at the cost of a small amount of power. Though exceptionally sharp, it will prevent you from holding anything else while extended.",
"occupied_bodyparts": [ [ "ARM_R", 5 ], [ "HAND_R", 2 ] ],
"act_cost": 200,
"act_cost": "50 J",
"fake_item": "bio_blade_weapon",
"flags": [ "BIONIC_TOGGLED", "BIONIC_WEAPON", "BIONIC_NPC_USABLE" ]
},
Expand All @@ -104,7 +104,7 @@
"description": "Concealed in your left arm is a single shot 12 gauge shotgun. Activate the bionic to fire and reload the shotgun.",
"occupied_bodyparts": [ [ "ARM_L", 15 ] ],
"encumbrance": [ [ "ARM_L", 5 ] ],
"act_cost": 5,
"act_cost": "50 J",
"fake_item": "bio_shotgun_gun",
"flags": [ "BIONIC_TOGGLED", "BIONIC_WEAPON", "NO_UNWIELD" ]
},
Expand All @@ -122,15 +122,15 @@
"name": "Blood Analysis",
"description": "Small sensors have been surgically implanted in your heart, allowing you to analyze your blood. This will detect many illnesses, drugs, and other conditions.",
"occupied_bodyparts": [ [ "TORSO", 5 ] ],
"act_cost": 25
"act_cost": "100 J"
},
{
"id": "bio_blood_filter",
"type": "bionic",
"name": "Blood Filter",
"description": "A filtration system in your heart allows you to actively filter out chemical impurities, primarily drugs. It will have limited impact on viruses. Note that it is not a targeted filter; ALL drugs in your system will be affected.",
"occupied_bodyparts": [ [ "TORSO", 10 ] ],
"act_cost": 75
"act_cost": "600 J"
},
{
"id": "bio_cable",
Expand Down Expand Up @@ -166,7 +166,7 @@
"name": "Chain Lightning",
"description": "Your body is equipped with a chain lightning generator, allowing you to emit a blast of lightning at a target, leaving a trail of lightning in its wake, jumping to additional targets within 4 tiles of the previous target.",
"occupied_bodyparts": [ [ "TORSO", 16 ], [ "ARM_L", 4 ], [ "ARM_R", 4 ] ],
"act_cost": 125,
"act_cost": "100 kJ",
"fake_item": "bio_lightning",
"flags": [ "BIONIC_GUN", "BIONIC_NPC_USABLE" ]
},
Expand All @@ -176,7 +176,7 @@
"name": "Bionic Claws",
"description": "Vicious claws have been surgically installed inside your fingers, allowing you to extend and retract them at the cost of a small amount of power. These do considerable cutting damage, but prevent you from holding anything else while extended.",
"occupied_bodyparts": [ [ "HAND_L", 5 ], [ "HAND_R", 5 ] ],
"act_cost": 100,
"act_cost": "25 J",
"fake_item": "bio_claws_weapon",
"flags": [ "BIONIC_TOGGLED", "BIONIC_WEAPON", "BIONIC_NPC_USABLE" ]
},
Expand All @@ -197,9 +197,9 @@
[ "FOOT_L", 1 ],
[ "FOOT_R", 1 ]
],
"act_cost": 1,
"react_cost": 1,
"time": 24,
"act_cost": "100 J",
"react_cost": "100 J",
"time": 1,
"flags": [ "BIONIC_TOGGLED" ]
},
{
Expand All @@ -219,8 +219,8 @@
[ "FOOT_L", 1 ],
[ "FOOT_R", 1 ]
],
"act_cost": 50,
"react_cost": 50,
"act_cost": "30 kJ",
"react_cost": "30 kJ",
"time": 1,
"flags": [ "BIONIC_TOGGLED" ]
},
Expand All @@ -230,8 +230,8 @@
"name": "Close Quarters Battle",
"description": "Bionic processors and databanks, loaded with martial arts combat programs, are surgically integrated into your nervous system. Whilst active, the CQB module will improve your hand to hand combat skills, but prevents you from improving them through combat experience.",
"occupied_bodyparts": [ [ "HEAD", 4 ] ],
"act_cost": 1,
"react_cost": 1,
"act_cost": "20 J",
"react_cost": "20 J",
"time": 1,
"flags": [ "BIONIC_TOGGLED" ]
},
Expand Down Expand Up @@ -307,15 +307,15 @@
"name": "Directional EMP",
"description": "Surgically mounted in the palm of your hand are small parabolic EMP field generators. You may use power to fire a wide, but short-ranged blast which will disable electronics and robots.",
"occupied_bodyparts": [ [ "ARM_R", 1 ], [ "HAND_R", 2 ] ],
"act_cost": 100
"act_cost": "50 kJ"
},
{
"type": "bionic",
"id": "bio_emp_armgun",
"name": "EMP Projector",
"description": "A ranged EMP generator system is implanted on the palm of your right hand and arm. The system fires precise, single-target pulses that require time to aim. Extremely effective against electronic targets but mostly useless otherwise.",
"occupied_bodyparts": [ [ "ARM_R", 10 ], [ "HAND_R", 5 ] ],
"act_cost": 20,
"act_cost": "50 kJ",
"fake_item": "bio_emp_gun",
"flags": [ "BIONIC_GUN" ]
},
Expand All @@ -333,7 +333,7 @@
"name": "Aero-Evaporator",
"description": "This unit draws moisture from the surrounding air, which then is poured from a fingertip in the form of water. It may fail in very dry environments.",
"occupied_bodyparts": [ [ "TORSO", 5 ], [ "HAND_R", 1 ] ],
"act_cost": 200
"act_cost": "720 kJ"
},
{
"id": "bio_eye_enhancer",
Expand Down Expand Up @@ -377,9 +377,9 @@
[ "FOOT_R", 1 ]
],
"flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF" ],
"act_cost": 1,
"react_cost": 1,
"time": 2
"act_cost": "5 J",
"react_cost": "5 J",
"time": 1
},
{
"id": "bio_fingerhack",
Expand All @@ -394,27 +394,27 @@
"name": "Flashbang Generator",
"description": "Light emitting diodes surgically integrated into your skin can release a flash comparable to a flashbang grenade, blinding nearby enemies. Speakers integrated into your body mimic the loud sound, deafening those nearby.",
"occupied_bodyparts": [ [ "TORSO", 20 ], [ "ARM_L", 2 ], [ "ARM_R", 2 ], [ "LEG_L", 3 ], [ "LEG_R", 3 ] ],
"act_cost": 125
"act_cost": "10 kJ"
},
{
"id": "bio_flashlight",
"type": "bionic",
"name": "Cranial Flashlight",
"description": "Surgically mounted between your eyes is a small but powerful LED flashlight.",
"occupied_bodyparts": [ [ "EYES", 1 ] ],
"act_cost": 1,
"react_cost": 1,
"time": 150,
"act_cost": "3 J",
"react_cost": "3 J",
"time": 1,
"flags": [ "BIONIC_TOGGLED" ]
},
{
"id": "bio_tattoo_led",
"type": "bionic",
"name": "LED Tattoo",
"description": "A small LED display just beneath your dermal layer can be illuminated on command to show patterns of your choice at dim or bright luminosity. It doesn't provide enough light to comfortably read or craft, but it can suffice if you have nothing else.",
"act_cost": 1,
"react_cost": 1,
"time": 300,
"act_cost": "1 J",
"react_cost": "1 J",
"time": 1,
"flags": [ "BIONIC_TOGGLED" ]
},
{
Expand All @@ -430,7 +430,7 @@
"name": "Integrated Dosimeter",
"description": "Small radiation sensors have been surgically implanted throughout your body, allowing you to analyze your level of absorbed radiation. They will also alert you whenever exposed to environmental radiation.",
"occupied_bodyparts": [ [ "TORSO", 2 ], [ "HEAD", 1 ], [ "ARM_L", 1 ], [ "ARM_R", 1 ], [ "LEG_L", 1 ], [ "LEG_R", 1 ] ],
"act_cost": 25
"act_cost": "100 J"
},
{
"id": "bio_gills",
Expand All @@ -447,8 +447,8 @@
"description": "Your feet are equipped with precision sonar equipment, allowing you to detect the movements of creatures below the ground, buried traps, and unstable terrain.",
"occupied_bodyparts": [ [ "FOOT_L", 3 ], [ "FOOT_R", 3 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"act_cost": 5,
"react_cost": 1,
"act_cost": "200 J",
"react_cost": "200 J",
"time": 1
},
{
Expand Down Expand Up @@ -488,8 +488,8 @@
[ "FOOT_R", 1 ]
],
"flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ],
"act_cost": 4,
"react_cost": 4,
"act_cost": "1 kJ",
"react_cost": "1 kJ",
"time": 1
},
{
Expand All @@ -499,8 +499,8 @@
"description": "While activated, your muscles will be greatly enhanced, increasing your strength by 20.",
"occupied_bodyparts": [ [ "TORSO", 4 ], [ "ARM_L", 8 ], [ "ARM_R", 8 ], [ "LEG_L", 14 ], [ "LEG_R", 14 ] ],
"flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ],
"act_cost": 17,
"react_cost": 17,
"act_cost": "10 kJ",
"react_cost": "10 kJ",
"time": 1
},
{
Expand All @@ -510,8 +510,8 @@
"description": "Your range of vision extends into the infrared, allowing you to see warm-blooded creatures in the dark or through smoke.",
"occupied_bodyparts": [ [ "EYES", 1 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"act_cost": 5,
"react_cost": 1,
"act_cost": "5 J",
"react_cost": "5 J",
"time": 1
},
{
Expand All @@ -537,7 +537,7 @@
"name": "Finger-Mounted Laser",
"description": "One of your fingers has a small high-powered laser surgically embedded in it. This long range weapon is not incredibly damaging, but is very accurate, and has the potential to start fires.",
"occupied_bodyparts": [ [ "HAND_R", 1 ] ],
"act_cost": 50,
"act_cost": "30 kJ",
"fake_item": "bio_laser_gun",
"flags": [ "BIONIC_GUN", "BIONIC_NPC_USABLE" ]
},
Expand All @@ -556,9 +556,9 @@
"description": "You are equipped with bionic stimulators which augment your haematopoiesis system, allowing you to accelerate white blood cell production using bionic power. It is supposed to run continuously and may cause unpleasant side effects when turned off.",
"occupied_bodyparts": [ [ "TORSO", 10 ] ],
"flags": [ "BIONIC_TOGGLED", "BIONIC_SLEEP_FRIENDLY", "BIONIC_NPC_USABLE" ],
"act_cost": 10,
"react_cost": 1,
"time": 3600
"act_cost": "5 J",
"react_cost": "5 J",
"time": 1
},
{
"id": "bio_lighter",
Expand All @@ -575,15 +575,15 @@
"name": "Fingerpick",
"description": "One of your fingers has an electronic lockpick surgically embedded in it. This automatic system will quickly unlock all but the most advanced key locks without any skill required on the part of the user.",
"occupied_bodyparts": [ [ "HAND_R", 2 ] ],
"act_cost": 25
"act_cost": "50 J"
},
{
"id": "bio_magnet",
"type": "bionic",
"name": "Electromagnetic Unit",
"description": "Surgically embedded in your right hand is a powerful electromagnet, allowing you to indiscriminately pull all nearby magnetic objects towards you. Unlucky bystanders might be injured or killed by flying objects.",
"occupied_bodyparts": [ [ "HAND_R", 3 ] ],
"act_cost": 50
"act_cost": "10 kJ"
},
{
"id": "bio_membrane",
Expand All @@ -600,9 +600,9 @@
"description": "Your memory has been enhanced with small quantum storage drives. While active, you learn - both through reading and practice - more quickly. Additionally, you can't forget skills you've already learned, and the layout of terrain you've explored will remain in your memory for an incredibly long time.",
"occupied_bodyparts": [ [ "HEAD", 3 ] ],
"flags": [ "BIONIC_TOGGLED", "BIONIC_SLEEP_FRIENDLY" ],
"act_cost": 10,
"react_cost": 1,
"time": 600
"act_cost": "2 J",
"react_cost": "2 J",
"time": 1
},
{
"id": "bio_metabolics",
Expand All @@ -618,7 +618,7 @@
"name": "Weather Reader",
"description": "A multitude of scientific instruments and sensors collect environmental data. The data is compiled and presented as a simple readout of the current weather. It also passively tells you the local air temperature.",
"occupied_bodyparts": [ [ "TORSO", 1 ], [ "HEAD", 1 ] ],
"act_cost": 10
"act_cost": "10 J"
},
{
"id": "bio_nanobots",
Expand All @@ -635,8 +635,8 @@
"description": "When active, this bionic eliminates all light within a 15 tile radius through destructive interference.",
"occupied_bodyparts": [ [ "TORSO", 16 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"act_cost": 15,
"react_cost": 15,
"act_cost": "9 kJ",
"react_cost": "9 kJ",
"time": 1
},
{
Expand All @@ -646,9 +646,9 @@
"description": "When active, this bionic will amplify existing light, allowing you to see in the dark.",
"occupied_bodyparts": [ [ "EYES", 1 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"act_cost": 1,
"react_cost": 1,
"time": 10000
"act_cost": "10 J",
"react_cost": "10 J",
"time": 1
},
{
"id": "bio_noise",
Expand All @@ -674,8 +674,8 @@
"description": "A thin forcefield surrounds your body, continually draining power. This field does not deflect attacks, but rather delivers a strong shock, damaging unarmed attackers and those with a conductive weapon.",
"occupied_bodyparts": [ [ "TORSO", 10 ], [ "HEAD", 1 ], [ "ARM_L", 1 ], [ "ARM_R", 1 ], [ "LEG_L", 2 ], [ "LEG_R", 2 ] ],
"flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ],
"act_cost": 10,
"react_cost": 10,
"act_cost": "10 kJ",
"react_cost": "10 kJ",
"time": 1
},
{
Expand Down Expand Up @@ -746,8 +746,8 @@
"description": "Increases your body's wavelength, allowing you to quantum tunnel through walls, reappearing on the other side. Power drain in standby is minimal, but each tile tunneled through costs 250 bionic power.",
"occupied_bodyparts": [ [ "TORSO", 20 ], [ "ARM_L", 2 ], [ "ARM_R", 2 ], [ "LEG_L", 3 ], [ "LEG_R", 3 ], [ "FOOT_L", 1 ], [ "FOOT_R", 1 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"act_cost": 1,
"react_cost": 1,
"act_cost": "3 J",
"react_cost": "3 J",
"time": 1
},
{
Expand All @@ -766,7 +766,7 @@
"description": "A system of advanced piezomechanical blood filters have been surgically implanted throughout your body, allowing you to purge yourself of absorbed radiation at the cost of some bionic power.",
"occupied_bodyparts": [ [ "TORSO", 5 ], [ "ARM_L", 1 ], [ "ARM_R", 1 ], [ "LEG_L", 2 ], [ "LEG_R", 2 ] ],
"flags": [ "BIONIC_NPC_USABLE" ],
"act_cost": 50
"act_cost": "4500 J"
},
{
"id": "bio_railgun",
Expand Down Expand Up @@ -832,9 +832,9 @@
"description": "While this system is powered, you're able to visually sense your own scent, making it possible for you to recognize your surroundings even in complete darkness.",
"occupied_bodyparts": [ [ "HEAD", 3 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"act_cost": 1,
"react_cost": 1,
"time": 6
"act_cost": "2 J",
"react_cost": "2 J",
"time": 1
},
{
"id": "bio_shakes",
Expand Down Expand Up @@ -1041,9 +1041,9 @@
"description": "Your nervous system has been augmented with bionic processors, allowing you to dodge attacks beyond normal human capability, including bullets.",
"occupied_bodyparts": [ [ "TORSO", 12 ], [ "ARM_L", 3 ], [ "ARM_R", 3 ], [ "LEG_L", 5 ], [ "LEG_R", 5 ], [ "FOOT_L", 1 ], [ "FOOT_R", 1 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"act_cost": 1,
"react_cost": 1,
"time": 10
"act_cost": "6 J",
"react_cost": "6 J",
"time": 1
},
{
"id": "bio_ups",
Expand Down Expand Up @@ -1074,7 +1074,7 @@
"name": "Water Extraction Unit",
"description": "Nanotubes surgically embedded in the palm of your hand will pump any available fluid out of a dead body, cleanse it of impurities and convert it into drinkable water. You must, however, have a container to store the water in.",
"occupied_bodyparts": [ [ "ARM_R", 1 ], [ "HAND_R", 2 ] ],
"act_cost": 50
"act_cost": "20 kJ"
},
{
"id": "bio_fuel_cell_gasoline",
Expand Down
2 changes: 1 addition & 1 deletion src/lightmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ void map::generate_lightmap( const int zlev )

if( g->u.has_active_bionic( bionic_id( "bio_night" ) ) ) {
for( const tripoint &p : points_in_rectangle( cache_start, cache_end ) ) {
if( rl_dist( p, g->u.pos() ) < 15 ) {
if( rl_dist( p, g->u.pos() ) < 2 ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read about Artificial Night Generator in PR's description

Copy link
Contributor

@Fris0uman Fris0uman Oct 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I missed your explanation sorry.

Looking at your math couldn't you make the power draw 841 kJ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have only a little over 2000 kJ available. What would be the point of that bionic if it's unusable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also power draw that high is unrealistic for any normal device.

lm[p.x][p.y].fill( LIGHT_AMBIENT_MINIMAL );
}
}
Expand Down