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

Landmine does almost no damage #60

Closed
Firestorm01X2 opened this issue Sep 17, 2020 · 2 comments · Fixed by #62
Closed

Landmine does almost no damage #60

Firestorm01X2 opened this issue Sep 17, 2020 · 2 comments · Fixed by #62

Comments

@Firestorm01X2
Copy link
Collaborator

Firestorm01X2 commented Sep 17, 2020

Describe the bug

Landmines does almost no damage

Steps To Reproduce

  1. Spawn a mine
  2. Steop on a mine
  3. Get very low damage

Connected issue:
CleverRaven/Cataclysm-DDA#37724

I believe you should check function trapfunc::landmine() at src/trapfunc.cpp:L605
It clearly uses same explosion() function but uses preset values so I think that landmine probably does not use JSON set values at all.

Confirmed. Landmine triggers:

bool trapfunc::landmine( const tripoint &p, Creature *c, item * )
{
    // tiny animals are too light to trigger land mines
    if( c != nullptr && c->get_size() == MS_TINY ) {
        return false;
    }
    if( c != nullptr ) {
        c->add_msg_player_or_npc( m_bad, _( "You trigger a land mine!" ),
                                  _( "<npcname> triggers a land mine!" ) );
    }
    explosion_handler::explosion( p, 18, 0.5, false, 8 );
    g->m.remove_trap( p );
    return true;
}

Explosive triggers with hardcoded values

Screenshots

Versions and configuration

Additional context

@Firestorm01X2 Firestorm01X2 changed the title Landmine does almos no damage Landmine does almost no damage Sep 17, 2020
@Firestorm01X2
Copy link
Collaborator Author

Firestorm01X2 commented Sep 17, 2020

@Coolthulhu Could we at least temporarily set hard coded values to adequate values?

@Coolthulhu
Copy link
Member

Yeah.
Don't make it too insta-killy though. Shouldn't be stronger than a grenade.
Use the explosion_data variant of the explosion_handler::explosion function, it's much easier to control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants