natural_20 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +13 -0
  4. data/README.md +1 -0
  5. data/bin/nat20 +2 -1
  6. data/bin/nat20.cmd +0 -0
  7. data/char_classes/wizard.yml +89 -0
  8. data/characters/high_elf_mage.yml +27 -0
  9. data/fixtures/battle_sim_objects.yml +2 -2
  10. data/fixtures/high_elf_mage.yml +28 -0
  11. data/fixtures/large_map.yml +63 -0
  12. data/game.yml +2 -2
  13. data/items/equipment.yml +30 -0
  14. data/items/objects.yml +33 -29
  15. data/items/spells.yml +58 -0
  16. data/items/weapons.yml +78 -18
  17. data/lib/CHANGELOG.md +0 -0
  18. data/lib/natural_20.rb +9 -0
  19. data/lib/natural_20/actions/action.rb +2 -2
  20. data/lib/natural_20/actions/attack_action.rb +76 -67
  21. data/lib/natural_20/actions/concerns/action_damage.rb +3 -1
  22. data/lib/natural_20/actions/dash_action.rb +7 -10
  23. data/lib/natural_20/actions/disengage_action.rb +11 -12
  24. data/lib/natural_20/actions/dodge_action.rb +7 -8
  25. data/lib/natural_20/actions/escape_grapple_action.rb +16 -18
  26. data/lib/natural_20/actions/first_aid_action.rb +14 -16
  27. data/lib/natural_20/actions/grapple_action.rb +24 -28
  28. data/lib/natural_20/actions/ground_interact_action.rb +1 -3
  29. data/lib/natural_20/actions/help_action.rb +13 -16
  30. data/lib/natural_20/actions/hide_action.rb +7 -9
  31. data/lib/natural_20/actions/interact_action.rb +12 -14
  32. data/lib/natural_20/actions/look_action.rb +14 -15
  33. data/lib/natural_20/actions/move_action.rb +9 -9
  34. data/lib/natural_20/actions/multiattack_action.rb +8 -9
  35. data/lib/natural_20/actions/prone_action.rb +4 -6
  36. data/lib/natural_20/actions/short_rest_action.rb +7 -8
  37. data/lib/natural_20/actions/shove_action.rb +20 -24
  38. data/lib/natural_20/actions/spell_action.rb +89 -0
  39. data/lib/natural_20/actions/stand_action.rb +5 -7
  40. data/lib/natural_20/actions/use_item_action.rb +7 -9
  41. data/lib/natural_20/ai_controller/standard.rb +1 -1
  42. data/lib/natural_20/battle.rb +8 -3
  43. data/lib/natural_20/cli/action_ui.rb +180 -0
  44. data/lib/natural_20/cli/builder/fighter_builder.rb +1 -1
  45. data/lib/natural_20/cli/builder/rogue_builder.rb +10 -10
  46. data/lib/natural_20/cli/builder/wizard_builder.rb +77 -0
  47. data/lib/natural_20/cli/character_builder.rb +9 -4
  48. data/lib/natural_20/cli/commandline_ui.rb +55 -162
  49. data/lib/natural_20/cli/inventory_ui.rb +4 -0
  50. data/lib/natural_20/cli/map_renderer.rb +7 -1
  51. data/lib/natural_20/concerns/attack_helper.rb +53 -0
  52. data/lib/natural_20/concerns/entity.rb +170 -11
  53. data/lib/natural_20/concerns/fighter_actions/second_wind_action.rb +7 -9
  54. data/lib/natural_20/concerns/fighter_class.rb +2 -2
  55. data/lib/natural_20/concerns/spell_attack_helper.rb +33 -0
  56. data/lib/natural_20/concerns/wizard_class.rb +86 -0
  57. data/lib/natural_20/die_roll.rb +2 -2
  58. data/lib/natural_20/event_manager.rb +50 -44
  59. data/lib/natural_20/item_library/base_item.rb +1 -1
  60. data/lib/natural_20/npc.rb +4 -0
  61. data/lib/natural_20/player_character.rb +75 -12
  62. data/lib/natural_20/session.rb +14 -1
  63. data/lib/natural_20/spell_library/firebolt.rb +72 -0
  64. data/lib/natural_20/spell_library/mage_armor.rb +67 -0
  65. data/lib/natural_20/spell_library/mage_hand.rb +2 -0
  66. data/lib/natural_20/spell_library/magic_missile.rb +67 -0
  67. data/lib/natural_20/spell_library/shield.rb +69 -0
  68. data/lib/natural_20/spell_library/spell.rb +31 -0
  69. data/lib/natural_20/utils/weapons.rb +8 -6
  70. data/lib/natural_20/version.rb +1 -1
  71. data/locales/en.yml +44 -8
  72. data/maps/game_map.yml +12 -2
  73. metadata +22 -3
data/maps/game_map.yml CHANGED
@@ -9,10 +9,20 @@ map:
9
9
  - HHH..HHHHd
10
10
  - ..d..Hwwww
11
11
  - .HHHHHwwwt
12
- - ..T..dwwow
12
+ - .....dwwww
13
13
  - HHHH=HHHHH
14
14
  - ..H...wYw.
15
15
  - ..d...www.
16
+ base_1:
17
+ - ..........
18
+ - ..........
19
+ - ..........
20
+ - ..........
21
+ - ..........
22
+ - ..T.....o.
23
+ - '????.?????'
24
+ - ..........
25
+ - ..........
16
26
  light:
17
27
  - ..........
18
28
  - ..........
@@ -32,7 +42,7 @@ map:
32
42
  - .........e
33
43
  - ??????????
34
44
  - AB?.g....W
35
- - ..?......W
45
+ - CD?......W
36
46
  notes:
37
47
  - type: point
38
48
  positions:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: natural_20
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Dayo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-08 00:00:00.000000000 Z
11
+ date: 2021-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -234,6 +234,7 @@ files:
234
234
  - ".gitignore"
235
235
  - ".rspec"
236
236
  - ".travis.yml"
237
+ - CHANGELOG.md
237
238
  - CODE_OF_CONDUCT.md
238
239
  - Gemfile
239
240
  - LICENSE.txt
@@ -247,8 +248,10 @@ files:
247
248
  - bin/setup
248
249
  - char_classes/fighter.yml
249
250
  - char_classes/rogue.yml
251
+ - char_classes/wizard.yml
250
252
  - characters/halfling_rogue.yml
251
253
  - characters/high_elf_fighter.yml
254
+ - characters/high_elf_mage.yml
252
255
  - fixtures/battle_sim.yml
253
256
  - fixtures/battle_sim_2.yml
254
257
  - fixtures/battle_sim_3.yml
@@ -259,7 +262,9 @@ files:
259
262
  - fixtures/halfling_rogue.yml
260
263
  - fixtures/hide_test.yml
261
264
  - fixtures/high_elf_fighter.yml
265
+ - fixtures/high_elf_mage.yml
262
266
  - fixtures/human_fighter.yml
267
+ - fixtures/large_map.yml
263
268
  - fixtures/path_finding_test.yml
264
269
  - fixtures/path_finding_test_2.yml
265
270
  - fixtures/path_finding_test_3.yml
@@ -268,7 +273,9 @@ files:
268
273
  - game.yml
269
274
  - items/equipment.yml
270
275
  - items/objects.yml
276
+ - items/spells.yml
271
277
  - items/weapons.yml
278
+ - lib/CHANGELOG.md
272
279
  - lib/natural_20.rb
273
280
  - lib/natural_20/actions/action.rb
274
281
  - lib/natural_20/actions/attack_action.rb
@@ -290,18 +297,22 @@ files:
290
297
  - lib/natural_20/actions/prone_action.rb
291
298
  - lib/natural_20/actions/short_rest_action.rb
292
299
  - lib/natural_20/actions/shove_action.rb
300
+ - lib/natural_20/actions/spell_action.rb
293
301
  - lib/natural_20/actions/stand_action.rb
294
302
  - lib/natural_20/actions/use_item_action.rb
295
303
  - lib/natural_20/ai_controller/path_compute.rb
296
304
  - lib/natural_20/ai_controller/standard.rb
297
305
  - lib/natural_20/battle.rb
298
306
  - lib/natural_20/battle_map.rb
307
+ - lib/natural_20/cli/action_ui.rb
299
308
  - lib/natural_20/cli/builder/fighter_builder.rb
300
309
  - lib/natural_20/cli/builder/rogue_builder.rb
310
+ - lib/natural_20/cli/builder/wizard_builder.rb
301
311
  - lib/natural_20/cli/character_builder.rb
302
312
  - lib/natural_20/cli/commandline_ui.rb
303
313
  - lib/natural_20/cli/inventory_ui.rb
304
314
  - lib/natural_20/cli/map_renderer.rb
315
+ - lib/natural_20/concerns/attack_helper.rb
305
316
  - lib/natural_20/concerns/container.rb
306
317
  - lib/natural_20/concerns/entity.rb
307
318
  - lib/natural_20/concerns/evaluator/entity_state_evaluator.rb
@@ -314,6 +325,8 @@ files:
314
325
  - lib/natural_20/concerns/navigation.rb
315
326
  - lib/natural_20/concerns/notable.rb
316
327
  - lib/natural_20/concerns/rogue_class.rb
328
+ - lib/natural_20/concerns/spell_attack_helper.rb
329
+ - lib/natural_20/concerns/wizard_class.rb
317
330
  - lib/natural_20/controller.rb
318
331
  - lib/natural_20/die_roll.rb
319
332
  - lib/natural_20/event_manager.rb
@@ -328,6 +341,12 @@ files:
328
341
  - lib/natural_20/npc.rb
329
342
  - lib/natural_20/player_character.rb
330
343
  - lib/natural_20/session.rb
344
+ - lib/natural_20/spell_library/firebolt.rb
345
+ - lib/natural_20/spell_library/mage_armor.rb
346
+ - lib/natural_20/spell_library/mage_hand.rb
347
+ - lib/natural_20/spell_library/magic_missile.rb
348
+ - lib/natural_20/spell_library/shield.rb
349
+ - lib/natural_20/spell_library/spell.rb
331
350
  - lib/natural_20/utils/cover.rb
332
351
  - lib/natural_20/utils/ray_tracer.rb
333
352
  - lib/natural_20/utils/static_light_builder.rb
@@ -368,7 +387,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
368
387
  - !ruby/object:Gem::Version
369
388
  version: '0'
370
389
  requirements: []
371
- rubygems_version: 3.0.8
390
+ rubygems_version: 3.2.3
372
391
  signing_key:
373
392
  specification_version: 4
374
393
  summary: A ruby based engine for building text based RPGs based on DnD 5th Edition