google-code-export / game-golem

Automatically exported from code.google.com/p/game-golem
0 stars 0 forks source link

Battle mode won't parse targets in Don't Care mode #290

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
        for (i=0; i<$list.length; i++) {
            $el = $list[i];
            uid = $('img[uid!==""]', $el).attr('uid');
            info = $('td.bluelink', $el).text().replace(/[ \t\n]+/g, ' ');
            rank2 = {
                battle: info.regex(/Battle:[^(]+\(Rank (\d+)\)/i),
                war: info.regex(/War:[^(]+\(Rank (\d+)\)/i)
            }

--->        if (uid && info && ((Battle.option.bp === 'Always' && rank2[mode] - 
rank[mode] > 5) || (Battle.option.bp === 'Never' && rank2[mode] - rank[mode] <= 
5) || Battle.option.bp === "Don't Care")) {
                this.set(['data','user',uid,'name'], $('a', $el).text().trim());
                this.set(['data','user',uid,'level'], info.regex(/\(Level (\d+)\)/i));
                this.set(['data','user',uid,'battle','rank'], rank2.battle);
                this.set(['data','user',uid,'war','rank'], rank2.war);
                this.set(['data','user',uid,'army'], $('td.bluelink', $el).next().text().regex(/(\d+)/));
                this.set(['data','user',uid,'align'], $('img[src*="graphics/symbol_"]', $el).attr('src').regex(/symbol_(\d)/i));
            }

It's already patched. In Don't Care mode, the latest term in the && chain was 
undefined, so the if won't kick in. Also i noticed that the "info" variable is 
global, not sure if by design.

As i only use Don't Care mode, the list never filled up and no battle did 
happen.

Original issue reported on code.google.com by anarel...@gmail.com on 10 Apr 2011 at 6:10

GoogleCodeExporter commented 9 years ago
Oops, missed that one.

Interested in joining the coding team? ;-)

Original comment by RycochetTM on 10 Apr 2011 at 7:05

GoogleCodeExporter commented 9 years ago
I have no targets for days in several updates. i've tried invade, duel, etc. no 
difference.

Original comment by blm...@gmail.com on 15 Apr 2011 at 6:07

GoogleCodeExporter commented 9 years ago
1087 still no targets, no matter what settings, invade or duel or whatever.
Battle seems totally locked up.

Original comment by blm...@gmail.com on 18 Apr 2011 at 4:23