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

I found *another* glitch #331

Open
ghost opened this issue May 25, 2015 · 6 comments
Open

I found *another* glitch #331

ghost opened this issue May 25, 2015 · 6 comments

Comments

@ghost
Copy link

ghost commented May 25, 2015

Level 19, documentObjectMadness.jsx. adversary can walk off the DOM, and Dr. Eval is the one that dies. This could probably be fixed with a simple if: (75-86)
OLD:

function moveToParent(className) {
        var currentPosition = $dom.find('.' + className);
        if (currentPosition.parent().length > 0) {
            if (currentPosition.parent().hasClass('container')) {
                map.getPlayer().killedBy('moving off the edge of the DOM');
            } else {
                currentPosition.parent().addClass(className);
                currentPosition.removeClass(className);
                map.updateDOM($dom);
            }
        }
    }

NEW:

function moveToParent(className) {
        var currentPosition = $dom.find('.' + className);
        if (currentPosition.parent().length > 0) {
            if (currentPosition.parent().hasClass('container')) {
                if (className == "drEval") map.getPlayer().killedBy('moving off the edge of the DOM');
                else return false;
            } else {
                currentPosition.parent().addClass(className);
                currentPosition.removeClass(className);
                map.updateDOM($dom);
            }
        }
    }

Basically, it's going to disable letting adversary even get there.

@AlexNisnevich
Copy link
Owner

Good catch! Submit a PR and I'll accept it.

@ghost
Copy link
Author

ghost commented May 27, 2015

Problem with doing a pull request is that I think I've goofed up my fork destroying old bonus levels so I could create my own.

AlexNisnevich added a commit that referenced this issue Aug 3, 2015
@AlexNisnevich
Copy link
Owner

Closed by #348

@jkufner
Copy link

jkufner commented Aug 3, 2015

@mathdude314 That's why Git has branches ;)

@ghost
Copy link
Author

ghost commented Oct 28, 2015

Oh strange, this bug seems to have been reinstated — check again.

@AlexNisnevich AlexNisnevich reopened this Nov 11, 2015
@AlexNisnevich
Copy link
Owner

Weird, I'll fix it.

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

No branches or pull requests

2 participants