CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.26k stars 4.11k forks source link

Human Purification from Purifier Primer lasts way too long #75732

Open bird-ee opened 1 month ago

bird-ee commented 1 month ago

Describe the bug

The "Human Purification" status effect lasts far longer than any other primer. It requires many doses of mutagenic catalyst to get out of the system.

Attach save file

N/A, happens across save files, installations and several recent versions

Steps to reproduce

  1. Inject Purifier Primer
  2. Inject Mutagenic Catalyst
  3. Observe as Human Purification status effect long outlasts 3 or more mutagenic catalyst periods

Expected behavior

  1. Inject Purifier Primer
  2. Inject Mutagenic Catalyst
  3. Human Purification Primer lasts approximately 2 fewer mutations than 1 single mutagenic catalyst injection

Screenshots

No response

Versions and configuration

Windows 10, 2d4e043

Additional context

No response

fairyarmadillo commented 4 weeks ago

I may be wrong but this could be because the "Human X" dummy mutations don't have vitamin costs.

Maleclypse commented 4 weeks ago

I may be wrong but this could be because the "Human X" dummy mutations don't have vitamin costs.

Do you mean someone set the vitamin costs at zero or that they lack the field "vitamin_cost"? Because the field has a default value of 100 or something like that for when there is no field set.

fairyarmadillo commented 3 weeks ago

Do you mean someone set the vitamin costs at zero or that they lack the field "vitamin_cost"? Because the field has a default value of 100 or something like that for when there is no field set.

Is that cost being applied when the mutation is not actually acquired?

Maleclypse commented 3 weeks ago

Do you mean someone set the vitamin costs at zero or that they lack the field "vitamin_cost"? Because the field has a default value of 100 or something like that for when there is no field set.

Is that cost being applied when the mutation is not actually acquired?

// Attempt to mutate towards any dummy traits
        // We shuffle the list here, and try to find the first dummy trait that would be blocked by existing mutations
        // If we find one, we mutate towards it and stop there
        if( !dummies.empty() ) {
            std::shuffle( dummies.begin(), dummies.end(), rng_get_engine() );
            for( trait_id &tid : dummies ) {
                add_msg_debug( debugmode::DF_MUTATION, "mutate: tried mutating dummy traits" );
                if( has_conflicting_trait( tid ) && mutate_towards( tid, cat, nullptr, use_vitamins ) ) {
                    add_msg_if_player( m_mixed, mutation_category_trait::get_category( cat ).mutagen_message() );
                    return;
                }

C++ says use_vitamins so I'd assume it does.