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

More ways that can negate the check for painkillers when installing CBMs #21433

Conversation

Projects
None yet
4 participants
@Night-Pryanik
Copy link
Member

commented Jul 17, 2017

No description provided.

Added two more traits and one cbm that can negate the check for paink…
…illers.

Also, removed two unused const traits.
@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2017

Regular masochist is a 1 point trait that gives minor (up to 20 or so) morale. It would be unlikely to negate even a single point of the intelligence loss from pain.

if( !has_trait( trait_id( "NOPAIN" ) ) && !has_trait( trait_id( "CENOBITE" ) ) ) {
if( !has_trait( trait_id( "NOPAIN" ) ) && !has_trait( trait_id( "CENOBITE" ) ) &&
!has_trait( trait_id( "MASOCHIST" ) ) && !has_trait( trait_id( "MASOCHIST_MED" ) ) &&
!has_active_bionic( "bio_painkiller" ) ) {

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Jul 17, 2017

Contributor

Since you don't actually trigger any pain effect, it shouldn't need to be active. Activating a bio_painkiller is not an action and costs nothing so it should be treated as if done automatically.

This comment has been minimized.

Copy link
@kevingranade

kevingranade Jul 17, 2017

Member

That's a good point, it should trigger a pain effect.

@@ -971,13 +975,14 @@ bool player::install_bionics( const itype &type, int skill_level )

const int pk = get_painkiller();
int pain_cap = 100;
if( has_trait( trait_id( "PAINRESIST_TROGLO" ) ) ) {
if( has_trait( "PAINRESIST_TROGLO" ) ) {

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Jul 17, 2017

Contributor

You want to use the constants above, like this:
has_trait( trait_PAINRESIST_TROGLO )

Night-Pryanik added some commits Jul 17, 2017

@@ -66,9 +66,13 @@ const efftype_id effect_took_xanax( "took_xanax" );
const efftype_id effect_visuals( "visuals" );
const efftype_id effect_weed_high( "weed_high" );

static const trait_id trait_HYPEROPIC( "HYPEROPIC" );
static const trait_id trait_MYOPIC( "MYOPIC" );
static const trait_id trait_PROF_MED( "PROF_MED" );

This comment has been minimized.

Copy link
@BorkBorkGoesTheCode

BorkBorkGoesTheCode Jul 18, 2017

Contributor

Will this break near/farsightedness?

This comment has been minimized.

Copy link
@Night-Pryanik

Night-Pryanik Jul 18, 2017

Author Member

These constants aren't used anywhere in bionics.cpp, so removing them shouldn't do any harm.

@kevingranade kevingranade merged commit 5d48512 into CleverRaven:master Jul 22, 2017

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
gorgon-ghprb Build finished.
Details

@Night-Pryanik Night-Pryanik deleted the Night-Pryanik:more-ways-to-ignore-check-for-pks branch Jul 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.