botemon 0.5.8 → 0.5.8.1
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 +4 -4
- data/bin/botemon +2 -4
- data/lib/botemon/smogon/pokemon.rb +14 -18
- data/lib/botemon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0c1cd0cc4799071ae94736411e2ecf68cf309b
|
4
|
+
data.tar.gz: 45bf8f209938b9833e35a1e08ac427c7ab665251
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f313ff5f245aeb735738911ded0db8b4645d1d50c230c91ab1baceb3f378a36effef0e13f1f0eaa708f4af3300dc5df6abf42d23a62e897727caada826ba288d
|
7
|
+
data.tar.gz: 54f6f7200e8702a344537e861b2aa7633ccb0828842fb19d3115ff22d05b2ff5804c215bd30531487b47e822cc2b916e870b242d8eb7c0012cac1ff5836b716a
|
data/bin/botemon
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#encoding: utf-8
|
3
2
|
#--
|
4
3
|
# Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
|
5
4
|
#
|
@@ -25,7 +24,7 @@ require 'cinch/colorize'
|
|
25
24
|
|
26
25
|
abort 'Usage: botemon <bot_name> <bot_password> <server> <channels>' if ARGV.length < 4
|
27
26
|
|
28
|
-
|
27
|
+
Cinch::Bot.new {
|
29
28
|
configure do |c|
|
30
29
|
c.nick = ARGV[0]
|
31
30
|
c.realname = ARGV[0]
|
@@ -204,5 +203,4 @@ bot = Cinch::Bot.new {
|
|
204
203
|
m.reply "- pstats Scizor 70 Adamant 0/252/0/0/6/252 ".colorize
|
205
204
|
m.reply "- pkrandom, pktrivia, pkdebug, pkstop, pkcache, pkversion ".colorize
|
206
205
|
end
|
207
|
-
}
|
208
|
-
bot.start
|
206
|
+
}.start
|
@@ -21,35 +21,31 @@ module Smogon
|
|
21
21
|
class Pokemon
|
22
22
|
attr_accessor :name, :_name, :types, :tier, :abilities, :base_stats, :moves
|
23
23
|
|
24
|
-
def to_s
|
25
|
-
"Name: #{@name}\nAbility: #{@abilities.join(', ')}\nType: #{@types.join(?/)}\nTier: #{@tier}\nBase stats: #{@base_stats.join(?/)}\nMoves: #{@moves.join(', ')}"
|
26
|
-
end
|
27
|
-
|
28
24
|
def clues
|
29
25
|
"Ability: #{@abilities.join(', ')}\nType: #{@types.join(?/)}\nTier: #{@tier}\nBase stats: #{@base_stats.join(?/)}"
|
30
26
|
end
|
31
27
|
|
32
28
|
def self.to_pokemon(ary)
|
33
29
|
return Pokemon.new.tap { |pokemon|
|
34
|
-
pokemon.name = ary['name']
|
35
|
-
pokemon._name = ary['_name']
|
36
|
-
pokemon.types = ary['types']
|
37
|
-
pokemon.tier = ary['tier']
|
38
|
-
pokemon.abilities = ary['abilities']
|
39
|
-
pokemon.base_stats = ary['base_stats']
|
40
|
-
pokemon.moves = ary['moves']
|
30
|
+
pokemon.name = ary['name' ]
|
31
|
+
pokemon._name = ary['_name' ]
|
32
|
+
pokemon.types = ary['types' ]
|
33
|
+
pokemon.tier = ary['tier' ]
|
34
|
+
pokemon.abilities = ary['abilities' ]
|
35
|
+
pokemon.base_stats = ary['base_stats']
|
36
|
+
pokemon.moves = ary['moves' ]
|
41
37
|
}
|
42
38
|
end
|
43
39
|
|
44
40
|
def to_ary
|
45
41
|
{
|
46
|
-
'name' => name,
|
47
|
-
'_name' => _name,
|
48
|
-
'types' => types,
|
49
|
-
'tier' => tier,
|
50
|
-
'abilities' => abilities,
|
51
|
-
'base_stats' => base_stats,
|
52
|
-
'moves' => moves
|
42
|
+
'name' => @name,
|
43
|
+
'_name' => @_name,
|
44
|
+
'types' => @types,
|
45
|
+
'tier' => @tier,
|
46
|
+
'abilities' => @abilities,
|
47
|
+
'base_stats' => @base_stats,
|
48
|
+
'moves' => @moves
|
53
49
|
}
|
54
50
|
end
|
55
51
|
|
data/lib/botemon/version.rb
CHANGED