-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSelectionBrad.pl
executable file
·98 lines (85 loc) · 1.57 KB
/
SelectionBrad.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#! /usr/bin/env perl
use strict;
use warnings;
$func = sub {
my %hash = @_;
my $name = $hash{name};
my $vi = $hash{vi};
my $twitter = $hash{twitter};
my $timeuntil = $hash{timeuntil};
$name =~ y/A-Z/a-z/;
$twitter =~ y/A-Z/a-z/;
return unless (defined $name);
my %name_always = BradMap(qw(
mewtwo
ho-oh
Lugia
Suicune
Entei
Raikou
Zapdos
Moltres
Celebi
Mew
Articuno
Venusaur
NINETALES
FARFETCHD
POLIWRATH
MUK
KANGASKHAN
ELECTRODE
HITMONLEE
POLIWRATH
KOFFING
WEEZING
STARMIE
MR-MIME
JYNX
FLAAFFY
BELLOSSOM
POLITOED
JUMPLUFF
SUNFLORA
UNOWN
GIRAFARIG
Steelix
SCIZOR
HERACROSS
Corsola
Delibird
Kingdra
Smeargle
Tyrogue
Blissey
Snorlax
Rhydon
Alakazam
Gyarados
Vaporeon Espeon
Tyranitar
Heracross
Exeggutor
Golem
Flareon
meganium
));
# my %name_ignore = map { $_ => 1 } qw(Arcanine Bellsprout Cubone Diglett Doduo Exeggcute Makey Nidoqueen NidoranFemale NidoranMale Nidorino♂ Nidoran♀ Parasect Pidgeot Ponyta Primeape Sandshrew);
my %name_ignore = BradMap(qw( Machop Magikarp Pidgeo parasect ));
my %twitter = BradMap(qw(PoGoUTC PoGoLaJolla PoGoGaslamp SeaportDowntown Laprasnado));
return 1 if ($vi >= 100 && $name_always{$name});
return unless ($twitter{$twitter});
return 1 if ($name_always{$name});
return if (defined $name_ignore{$name});
return 1 if ($vi >= 97 or $vi == 0);
return;
};
sub BradMap {
my @keys = @_;
my %hash;
foreach my $key (@keys) {
$key =~ y/A-Z/a-z/;
$hash{$key} = 1;
}
return %hash;
}