botemon 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/botemon +9 -2
- data/lib/botemon/movesetdex.rb +2 -2
- data/lib/botemon/smogon/moveset.rb +7 -0
- data/lib/botemon/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca70889d1c021cb29414dd0c71ea217164e01048
|
4
|
+
data.tar.gz: da7b3a60ef216c4b546e29ea66f9bd482438891f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81bbb7e1e4a8d510fae255191cc1da7b4a996fd911275169ba6dae4e3c98c1648502482b9833f38467b04edff74be8961f7a48e6789bb56ba73b8a4a258b483b
|
7
|
+
data.tar.gz: 6efb2d247631a0bf7520ae7c9868462f74e9c1b66a5b6d9a0ab50309e311684c6906fcbd193f4fe7066b3c9d56fa09ae7fc298aa0d03a72d7493e1a605d8faf1
|
data/bin/botemon
CHANGED
@@ -68,10 +68,10 @@ Cinch::Bot.new {
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
on :message, /^moveset (.+) (.+)/ do |m, name, tier|
|
71
|
+
on :message, /^moveset (.+) (.+) (.+)/ do |m, name, tier, metagame|
|
72
72
|
name = Smogon::Pokemon.id2name(name) if name.numeric?
|
73
73
|
|
74
|
-
movesets = Movesetdex.get name, tier
|
74
|
+
movesets = Movesetdex.get name, tier, (metagame.empty? ? 'bw' : metagame)
|
75
75
|
if movesets != nil || movesets.any?
|
76
76
|
m.reply Format(:red, "--- #{movesets.first.pokemon} (#{movesets.first.tier}) ---")
|
77
77
|
movesets.each { |moveset| m.reply Format(:red, " -- #{moveset.name} --\n#{moveset.to_s.split("\n").map { |l| Format(:red, l) }.join("\n")}\n") }
|
@@ -80,6 +80,13 @@ Cinch::Bot.new {
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
on :message, /^pkrandom$/ do |m|
|
84
|
+
@storage = Storage.new('./cache.db') unless @storage
|
85
|
+
|
86
|
+
pokemon = Pokedex.get Smogon::Pokemon.id2name(Random.new.rand(1..649)), @storage
|
87
|
+
m.reply pokemon ? "#{pokemon.to_s}\n#{pokemon.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Pokémon not found.')
|
88
|
+
end
|
89
|
+
|
83
90
|
on :message, /^pktrivia$/ do |m|
|
84
91
|
@storage = Storage.new('./cache.db') unless @storage
|
85
92
|
|
data/lib/botemon/movesetdex.rb
CHANGED
@@ -20,6 +20,13 @@
|
|
20
20
|
module Smogon
|
21
21
|
class Moveset
|
22
22
|
attr_accessor :pokemon, :name, :tier, :item, :ability, :nature, :moves, :evs
|
23
|
+
|
24
|
+
def initialize
|
25
|
+
@item = []
|
26
|
+
@ability = []
|
27
|
+
@nature = []
|
28
|
+
@moves = []
|
29
|
+
end
|
23
30
|
|
24
31
|
def to_s
|
25
32
|
"Item: #{item.join(' / ')}\nAbility: #{ability.join(' / ')}\nNature: #{nature.join(' / ')}\nMoves: #{''.tap { |s| moves.each { |move| s << move.join(' / ') + ', '}}[0..-3]}\nEVs: #{evs}"
|
data/lib/botemon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: botemon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giovanni Capuano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description: IRC bot for
|
83
|
+
description: IRC bot for Pokéfags with (Poké|Ability|Item|Move|Moveset)dex and a trivia
|
84
84
|
game.
|
85
85
|
email: webmaster@giovannicapuano.net
|
86
86
|
executables:
|
@@ -122,5 +122,5 @@ rubyforge_project:
|
|
122
122
|
rubygems_version: 2.0.3
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
|
-
summary: IRC bot for
|
125
|
+
summary: IRC bot for Pokéfags.
|
126
126
|
test_files: []
|