botemon 0.4.5 → 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca70889d1c021cb29414dd0c71ea217164e01048
4
- data.tar.gz: da7b3a60ef216c4b546e29ea66f9bd482438891f
3
+ metadata.gz: d3b56c95f333103edb8be7d5cc68226beca1eba3
4
+ data.tar.gz: c8c3751315617756ba6b2f707c634ec773cf3b4b
5
5
  SHA512:
6
- metadata.gz: 81bbb7e1e4a8d510fae255191cc1da7b4a996fd911275169ba6dae4e3c98c1648502482b9833f38467b04edff74be8961f7a48e6789bb56ba73b8a4a258b483b
7
- data.tar.gz: 6efb2d247631a0bf7520ae7c9868462f74e9c1b66a5b6d9a0ab50309e311684c6906fcbd193f4fe7066b3c9d56fa09ae7fc298aa0d03a72d7493e1a605d8faf1
6
+ metadata.gz: 4496312bdd718b5c6456ddfcc9a79aaac8a2bee2c023138d8feb018bf3b40e073da73cddc49d993ecb1bfa19eb0fefc9fc2239cc1732906d650f4428cc579d0b
7
+ data.tar.gz: daf9da00f449e4266b8ad481c53df1f61509a7d4405ba469230bd3793be30d28abd8128eb0b0d13165412bbe4323c1d1afb948514ea82db2dd48be5e599d34b2
data/bin/botemon CHANGED
@@ -57,6 +57,12 @@ Cinch::Bot.new {
57
57
  m.reply ability ? "#{ability.to_s}\n#{ability.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Ability not found.')
58
58
  end
59
59
 
60
+ on :message, /^item (.+)/ do |m, name|
61
+ item = Itemdex.get name
62
+
63
+ m.reply item ? "#{item.to_s}\n#{item.url}".split("\n").map { |l| Format(:red, l) }.join("\n") : Format(:red, 'Item not found.')
64
+ end
65
+
60
66
  on :message, /^move (.+)/ do |m, name|
61
67
  name = Smogon::Pokemon.id2name(name) if name.numeric?
62
68
 
@@ -0,0 +1,24 @@
1
+ #--
2
+ # Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
3
+ #
4
+ # This file is part of Botémon.
5
+ #
6
+ # Botémon is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # Botémon is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with Botémon. If not, see <http://www.gnu.org/licenses/>.
18
+ #++
19
+
20
+ class Itemdex
21
+ def self.get(name)
22
+ return name ? Smogon::Itemdex.get(name) : nil
23
+ end
24
+ end
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Botemon
21
21
  def self.version
22
- '0.4.5'
22
+ '0.5'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
@@ -89,6 +89,7 @@ extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
91
  - lib/botemon/abilitydex.rb
92
+ - lib/botemon/itemdex.rb
92
93
  - lib/botemon/movedex.rb
93
94
  - lib/botemon/movesetdex.rb
94
95
  - lib/botemon/pokedex.rb