Olib 0.1.2 → 2.0.0.pre.rc.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.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  2. data/Olib.gemspec +1 -1
  3. data/README.md +0 -0
  4. data/TODOS.md +0 -0
  5. data/lib/Olib.rb +6 -79
  6. data/lib/Olib/actor/actor.rb +0 -0
  7. data/lib/Olib/area.rb +22 -37
  8. data/lib/Olib/bounty.rb +8 -10
  9. data/lib/Olib/character/char.rb +64 -68
  10. data/lib/Olib/character/disk.rb +31 -9
  11. data/lib/Olib/character/group.rb +122 -40
  12. data/lib/Olib/character/inventory.rb +0 -0
  13. data/lib/Olib/character/mind.rb +0 -0
  14. data/lib/Olib/character/stance.rb +0 -0
  15. data/lib/Olib/combat/creature.rb +77 -128
  16. data/lib/Olib/combat/creatures.rb +52 -36
  17. data/lib/Olib/core/action.rb +8 -0
  18. data/lib/Olib/core/container.rb +32 -236
  19. data/lib/Olib/core/containers.rb +42 -0
  20. data/lib/Olib/core/errors.rb +69 -71
  21. data/lib/Olib/core/exist.rb +88 -0
  22. data/lib/Olib/core/item.rb +43 -598
  23. data/lib/Olib/core/kinds.rb +6 -0
  24. data/lib/Olib/core/rummage.rb +42 -0
  25. data/lib/Olib/core/transaction.rb +53 -0
  26. data/lib/Olib/core/use.rb +2 -5
  27. data/lib/Olib/core/utils.rb +25 -123
  28. data/lib/Olib/core/verbs.rb +304 -0
  29. data/lib/Olib/dictionary/dictionary.rb +150 -150
  30. data/lib/Olib/ext/hash.rb +7 -0
  31. data/lib/Olib/ext/matchdata.rb +14 -0
  32. data/lib/Olib/ext/string.rb +9 -0
  33. data/lib/Olib/ext/symbol.rb +13 -0
  34. data/lib/Olib/go2.rb +48 -112
  35. data/lib/Olib/loot.rb +44 -0
  36. data/lib/Olib/npcs/npc.rb +4 -0
  37. data/lib/Olib/npcs/npcs.rb +45 -0
  38. data/lib/Olib/objects/box.rb +1 -1
  39. data/lib/Olib/objects/clothing.rb +1 -1
  40. data/lib/Olib/objects/herb.rb +1 -1
  41. data/lib/Olib/objects/jar.rb +0 -0
  42. data/lib/Olib/objects/jewel.rb +7 -7
  43. data/lib/Olib/objects/jewelry.rb +1 -1
  44. data/lib/Olib/objects/scroll.rb +1 -1
  45. data/lib/Olib/objects/uncommon.rb +1 -1
  46. data/lib/Olib/objects/wand.rb +1 -1
  47. data/lib/Olib/pattern_matching/any.rb +11 -0
  48. data/lib/Olib/pattern_matching/err.rb +4 -0
  49. data/lib/Olib/pattern_matching/ok.rb +4 -0
  50. data/lib/Olib/pattern_matching/outcome.rb +35 -0
  51. data/lib/Olib/pattern_matching/pattern_matching.rb +5 -0
  52. data/lib/Olib/pattern_matching/result.rb +80 -0
  53. data/lib/Olib/pattern_matching/rill.rb +43 -0
  54. data/lib/Olib/pattern_matching/where.rb +4 -0
  55. data/lib/Olib/shops.rb +147 -155
  56. data/lib/Olib/supervisor/supervisor.rb +0 -0
  57. data/lib/Olib/version.rb +1 -1
  58. data/lib/Olib/xml.rb +43 -0
  59. metadata +28 -15
  60. data/lib/Olib/core/extender.rb +0 -29
  61. data/lib/Olib/interface/queryable.rb +0 -50
  62. data/lib/Olib/npcs.rb +0 -5
  63. data/lib/Olib/pattern.rb +0 -34
  64. data/lib/Olib/storage/app_data.rb +0 -32
  65. data/lib/Olib/try/try.rb +0 -58
  66. data/lib/Olib/utils/cli.rb +0 -81
  67. data/lib/Olib/utils/help_menu.rb +0 -166
  68. data/lib/Olib/utils/monsterbold.rb +0 -5
  69. data/lib/Olib/utils/vbulletin.rb +0 -101
@@ -1,5 +0,0 @@
1
- module Olib
2
- def Olib.monsterbold(str)
3
- "<pushBold/>#{str}<popBold/>"
4
- end
5
- end
@@ -1,101 +0,0 @@
1
- class VBulletin
2
- attr_accessor :post
3
- def initialize
4
- @post = String.new
5
- self
6
- end
7
- def open_bold
8
- @post.concat "[B]"
9
- self
10
- end
11
- def open_underline
12
- @post.concat '[U]'
13
- self
14
- end
15
- def close_underline
16
- @post.concat '[/U]'
17
- self
18
- end
19
- def close_bold
20
- @post.concat '[/B]'
21
- self
22
- end
23
- def open_color(hexcode)
24
- @post.concat "[COLOR=\"#{hexcode}\"]"
25
- self
26
- end
27
- def open_table(width=500)
28
- @post.contat "[TABLE=\"width: #{width}\""
29
- self
30
- end
31
- def close_table
32
- @post.concat "[/TABLE]"
33
- self
34
- end
35
- def open_tr
36
- @post.contact "[TR]"
37
- self
38
- end
39
- def close_tr
40
- @post.contact "[/TR]"
41
- self
42
- end
43
- def open_cell
44
- @post.concat "[TD]"
45
- self
46
- end
47
- def close_cell
48
- @post.concat '[/TD]'
49
- self
50
- end
51
- def close_color
52
- @post.concat '[/COLOR]'
53
- self
54
- end
55
- def add(str)
56
- @post.concat str
57
- self
58
- end
59
- def add_line(str)
60
- @post.concat "#{str}\n"
61
- self
62
- end
63
- def open_size(sz)
64
- @post.concat "[SIZE=#{sz}]"
65
- self
66
- end
67
- def close_size
68
- @post.concat "[/SIZE]"
69
- self
70
- end
71
- def open_italics
72
- @post.concat"[I]"
73
- self
74
- end
75
- def close_italics
76
- @post.concat "[/I]"
77
- self
78
- end
79
- def open_indent
80
- @post.concat "[INDENT]"
81
- self
82
- end
83
- def close_indent
84
- @post.concat "[/INDENT]"
85
- self
86
- end
87
- def tab
88
- @post.concat "\t"
89
- self
90
- end
91
- def enter
92
- @post.concat "\n"
93
- self
94
- end
95
- def VBulletin.commafy(n)
96
- n.to_s.chars.to_a.reverse.each_slice(3).map(&:join).join(",").reverse
97
- end
98
- def to_s
99
- @post
100
- end
101
- end