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

Adds weighting description for martial arts techniques #34308

Merged
merged 1 commit into from
Sep 29, 2019
Merged

Adds weighting description for martial arts techniques #34308

merged 1 commit into from
Sep 29, 2019

Conversation

Hymore246
Copy link
Contributor

Summary

SUMMARY: Content "Adds weighting description for martial arts techniques"

Purpose of change

Martial arts help menu now has a description for the technique weighting attribute.

Describe the solution

Techniques with the weighting attribute ( > 1 or < -1) now have descriptions. There is a separate description for positive and negative weighting. By default, a technique has a weighting of 1 and will not have a weighting description.

In case anyone is wondering why 0 weighting and -1 weighting do not have weighting description text, it's because they do not have any effect on technique frequency. See below:

From Melee.cpp pick_technique()


        // If we have negative weighting then roll to see if it's valid this time
        if( tec.weighting < 0 && !one_in( abs( tec.weighting ) ) ) {
            continue;
        }

        if( tec.is_valid_player( *this ) ) {
            possible.push_back( tec.id );

            //add weighted options into the list extra times, to increase their chance of being selected
            if( tec.weighting > 1 ) {
                for( int i = 1; i < tec.weighting; i++ ) {
                    possible.push_back( tec.id );
                }
            }
        }

@kevingranade kevingranade merged commit 8e3040d into CleverRaven:master Sep 29, 2019
@Hymore246 Hymore246 deleted the ma-weighting-description branch September 29, 2019 12:55
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 this pull request may close these issues.

2 participants