Browse Source

Merge pull request 'shops' (#219) from shops into master

pbs
jake 4 years ago
parent
commit
355c3e9c1b
  1. 3
      README.md
  2. 56
      data/item_stats/tech_stats.toml
  3. 92
      data/item_stats/tool_stats.toml
  4. 2165
      data/item_stats/weapon_stats.toml
  5. 30
      data/shops/alt_grind.toml
  6. 99
      data/shops/attribute1.toml
  7. 99
      data/shops/attribute2.toml
  8. 219
      data/shops/barrier.toml
  9. 251
      data/shops/frame.toml
  10. 30
      data/shops/grind.toml
  11. 107
      data/shops/hard/bluefull/weapon.toml
  12. 111
      data/shops/hard/greenill/weapon.toml
  13. 103
      data/shops/hard/oran/weapon.toml
  14. 103
      data/shops/hard/pinkal/weapon.toml
  15. 111
      data/shops/hard/purplenum/weapon.toml
  16. 107
      data/shops/hard/redria/weapon.toml
  17. 103
      data/shops/hard/skyly/weapon.toml
  18. 103
      data/shops/hard/viridia/weapon.toml
  19. 107
      data/shops/hard/whitill/weapon.toml
  20. 111
      data/shops/hard/yellowboze/weapon.toml
  21. 115
      data/shops/normal/bluefull/weapon.toml
  22. 111
      data/shops/normal/greenill/weapon.toml
  23. 115
      data/shops/normal/oran/weapon.toml
  24. 107
      data/shops/normal/pinkal/weapon.toml
  25. 115
      data/shops/normal/purplenum/weapon.toml
  26. 107
      data/shops/normal/redria/weapon.toml
  27. 99
      data/shops/normal/skyly/weapon.toml
  28. 103
      data/shops/normal/viridia/weapon.toml
  29. 103
      data/shops/normal/whitill/weapon.toml
  30. 111
      data/shops/normal/yellowboze/weapon.toml
  31. 120
      data/shops/special.toml
  32. 299
      data/shops/techniques.toml
  33. 1
      data/shops/tools.toml
  34. 149
      data/shops/ultimate/bluefull/weapon.toml
  35. 157
      data/shops/ultimate/greenill/weapon.toml
  36. 145
      data/shops/ultimate/oran/weapon.toml
  37. 129
      data/shops/ultimate/pinkal/weapon.toml
  38. 157
      data/shops/ultimate/purplenum/weapon.toml
  39. 153
      data/shops/ultimate/redria/weapon.toml
  40. 125
      data/shops/ultimate/skyly/weapon.toml
  41. 141
      data/shops/ultimate/viridia/weapon.toml
  42. 157
      data/shops/ultimate/whitill/weapon.toml
  43. 129
      data/shops/ultimate/yellowboze/weapon.toml
  44. 300
      data/shops/unit.toml
  45. 111
      data/shops/veryhard/bluefull/weapon.toml
  46. 111
      data/shops/veryhard/greenill/weapon.toml
  47. 107
      data/shops/veryhard/oran/weapon.toml
  48. 99
      data/shops/veryhard/pinkal/weapon.toml
  49. 111
      data/shops/veryhard/purplenum/weapon.toml
  50. 107
      data/shops/veryhard/redria/weapon.toml
  51. 95
      data/shops/veryhard/skyly/weapon.toml
  52. 103
      data/shops/veryhard/viridia/weapon.toml
  53. 111
      data/shops/veryhard/whitill/weapon.toml
  54. 99
      data/shops/veryhard/yellowboze/weapon.toml
  55. 3
      src/entity/item/mod.rs
  56. 73
      src/ship/item_stats.rs
  57. 4
      src/ship/items/inventory.rs
  58. 107
      src/ship/items/manager.rs
  59. 1
      src/ship/mod.rs
  60. 23
      src/ship/packet/builder/message.rs
  61. 118
      src/ship/packet/handler/direct_message.rs
  62. 2
      src/ship/room.rs
  63. 46
      src/ship/ship.rs
  64. 334
      src/ship/shops/armor.rs
  65. 21
      src/ship/shops/mod.rs
  66. 328
      src/ship/shops/tool.rs
  67. 526
      src/ship/shops/weapon.rs
  68. 7
      tests/common.rs
  69. 564
      tests/test_shops.rs

3
README.md

@ -1,6 +1,7 @@
# setup
* get http://rustup.rs
* get a specific nightly version `rustup override set nightly-2020-02-27`. for some reason newer versions give internal compiler errors and I'm not sure if it is my fault or the compilers.
* get nightly version `rustup install nightly`.
* set nightly `rustup override set nightly`.
* grab elseware
* `cargo test` to run tests

56
data/item_stats/tech_stats.toml

@ -0,0 +1,56 @@
[Foie]
price = 100
[Gifoie]
price = 300
[Rafoie]
price = 450
[Zonde]
price = 100
[Gizonde]
price = 300
[Razonde]
price = 450
[Barta]
price = 100
[Gibarta]
price = 300
[Rabarta]
price = 450
[Grants]
price = 500
[Deband]
price = 100
[Jellen]
price = 100
[Zalure]
price = 100
[Shifta]
price = 100
[Ryuker]
price = 5000
[Resta]
price = 300
[Anti]
price = 100
[Reverser]
price = 5000
[Megid]
price = 500

92
data/item_stats/tool_stats.toml

@ -0,0 +1,92 @@
[Monomate]
price = 50
[Dimate]
price = 300
[Trimate]
price = 2000
[Monofluid]
price = 100
[Difluid]
price = 500
[Trifluid]
price = 3600
[SolAtomizer]
price = 300
[MoonAtomizer]
price = 500
[StarAtomizer]
price = 5000
[Antidote]
price = 60
[Antiparalysis]
price = 60
[Telepipe]
price = 350
[TrapVision]
price = 100
[ScapeDoll]
price = 10000
[Monogrinder]
price = 5000
[Digrinder]
price = 10000
[Trigrinder]
price = 15000
[PowerMaterial]
price = 2400
[MindMaterial]
price = 2400
[EvadeMaterial]
price = 2400
[HpMaterial]
price = 2400
[TpMaterial]
price = 2400
[DefMaterial]
price = 2400
[LuckMaterial]
price = 2400
[PhotonDrop]
price = 8000
[PhotonSphere]
price = 16000
[PhotonCrystal]
price = 24000
[TeamPoints500]
price = 500
[TeamPoints1000]
price = 1000
[TeamPoints5000]
price = 5000
[TeamPoints10000]
price = 10000

2165
data/item_stats/weapon_stats.toml
File diff suppressed because it is too large
View File

30
data/shops/alt_grind.toml

@ -0,0 +1,30 @@
[[grind]]
level = 0
min = 0
max = 1
[[grind]]
level = 3
min = 0
max = 3
[[grind]]
level = 10
min = 1
max = 5
[[grind]]
level = 25
min = 2
max = 8
[[grind]]
level = 40
min = 3
max = 11
[[grind]]
level = 55
min = 3
max = 16

99
data/shops/attribute1.toml

@ -0,0 +1,99 @@
[[attributes]]
level = 0
percent_min = 5
percent_max = 25
none = 60
native = 20
abeast = 20
machine = 0
dark = 0
hit = 0
[[attributes]]
level = 3
percent_min = 5
percent_max = 25
none = 50
native = 15
abeast = 20
machine = 15
dark = 0
hit = 0
[[attributes]]
level = 10
percent_min = 5
percent_max = 30
none = 30
native = 10
abeast = 15
machine = 25
dark = 20
hit = 0
[[attributes]]
level = 17
percent_min = 5
percent_max = 30
none = 10
native = 25
abeast = 15
machine = 20
dark = 30
hit = 0
[[attributes]]
level = 25
percent_min = 5
percent_max = 35
none = 10
native = 25
abeast = 25
machine = 20
dark = 20
hit = 0
[[attributes]]
level = 35
percent_min = 5
percent_max = 35
none = 10
native = 20
abeast = 20
machine = 30
dark = 20
hit = 0
[[attributes]]
level = 45
percent_min = 5
percent_max = 35
none = 10
native = 25
abeast = 20
machine = 20
dark = 25
hit = 0
[[attributes]]
level = 60
percent_min = 5
percent_max = 40
none = 10
native = 20
abeast = 20
machine = 20
dark = 25
hit = 5
[[attributes]]
level = 75
percent_min = 5
percent_max = 50
none = 10
native = 20
abeast = 20
machine = 20
dark = 20
hit = 10

99
data/shops/attribute2.toml

@ -0,0 +1,99 @@
[[attributes]]
level = 0
percent_min = 5
percent_max = 20
none = 100
native = 0
abeast = 0
machine = 0
dark = 0
hit = 0
[[attributes]]
level = 5
percent_min = 5
percent_max = 25
none = 100
native = 0
abeast = 0
machine = 0
dark = 0
hit = 0
[[attributes]]
level = 10
percent_min = 5
percent_max = 25
none = 65
native = 5
abeast = 10
machine = 10
dark = 10
hit = 0
[[attributes]]
level = 17
percent_min = 5
percent_max = 25
none = 45
native = 10
abeast = 10
machine = 15
dark = 20
hit = 0
[[attributes]]
level = 25
percent_min = 5
percent_max = 30
none = 30
native = 25
abeast = 20
machine = 10
dark = 10
hit = 5
[[attributes]]
level = 35
percent_min = 5
percent_max = 30
none = 15
native = 15
abeast = 20
machine = 25
dark = 20
hit = 5
[[attributes]]
level = 45
percent_min = 5
percent_max = 35
none = 15
native = 15
abeast = 20
machine = 25
dark = 15
hit = 10
[[attributes]]
level = 60
percent_min = 5
percent_max = 35
none = 10
native = 15
abeast = 20
machine = 20
dark = 20
hit = 15
[[attributes]]
level = 75
percent_min = 5
percent_max = 50
none = 10
native = 20
abeast = 15
machine = 15
dark = 20
hit = 20

219
data/shops/barrier.toml

@ -0,0 +1,219 @@
[[barrier]]
level = 0
[[barrier.item]]
item = "Barrier"
probability = 34
[[barrier.item]]
item = "Shield"
probability = 34
[[barrier.item]]
item = "CoreShield"
probability = 15
[[barrier.item]]
item = "GigaShield"
probability = 15
[[barrier.item]]
item = "BraveBarrier"
probability = 2
[[barrier]]
level = 10
[[barrier.item]]
item = "Barrier"
probability = 5
[[barrier.item]]
item = "Shield"
probability = 10
[[barrier.item]]
item = "CoreShield"
probability = 14
[[barrier.item]]
item = "GigaShield"
probability = 18
[[barrier.item]]
item = "SoulBarrier"
probability = 18
[[barrier.item]]
item = "HardShield"
probability = 14
[[barrier.item]]
item = "BraveBarrier"
probability = 10
[[barrier.item]]
item = "SolidShield"
probability = 5
[[barrier.item]]
item = "FlameBarrier"
probability = 2
[[barrier.item]]
item = "PlasmaBarrier"
probability = 2
[[barrier.item]]
item = "FreezeBarrier"
probability = 2
[[barrier]]
level = 25
[[barrier.item]]
item = "GigaShield"
probability = 6
[[barrier.item]]
item = "SoulBarrier"
probability = 10
[[barrier.item]]
item = "HardShield"
probability = 15
[[barrier.item]]
item = "BraveBarrier"
probability = 19
[[barrier.item]]
item = "SolidShield"
probability = 18
[[barrier.item]]
item = "FlameBarrier"
probability = 14
[[barrier.item]]
item = "PlasmaBarrier"
probability = 9
[[barrier.item]]
item = "FreezeBarrier"
probability = 4
[[barrier.item]]
item = "PsychicBarrier"
probability = 3
[[barrier.item]]
item = "ProtectBarrier"
probability = 2
[[barrier]]
level = 42
[[barrier.item]]
item = "SoulBarrier"
probability = 5
[[barrier.item]]
item = "HardShield"
probability = 5
[[barrier.item]]
item = "BraveBarrier"
probability = 5
[[barrier.item]]
item = "SolidShield"
probability = 10
[[barrier.item]]
item = "FlameBarrier"
probability = 14
[[barrier.item]]
item = "PlasmaBarrier"
probability = 15
[[barrier.item]]
item = "FreezeBarrier"
probability = 14
[[barrier.item]]
item = "PsychicBarrier"
probability = 11
[[barrier.item]]
item = "GeneralShield"
probability = 9
[[barrier.item]]
item = "ProtectBarrier"
probability = 6
[[barrier.item]]
item = "GloriousShield"
probability = 4
[[barrier.item]]
item = "GuardianShield"
probability = 2
[[barrier]]
level = 60
[[barrier.item]]
item = "HardShield"
probability = 4
[[barrier.item]]
item = "BraveBarrier"
probability = 5
[[barrier.item]]
item = "SolidShield"
probability = 5
[[barrier.item]]
item = "FlameBarrier"
probability = 8
[[barrier.item]]
item = "PlasmaBarrier"
probability = 11
[[barrier.item]]
item = "FreezeBarrier"
probability = 13
[[barrier.item]]
item = "PsychicBarrier"
probability = 13
[[barrier.item]]
item = "GeneralShield"
probability = 14
[[barrier.item]]
item = "ProtectBarrier"
probability = 14
[[barrier.item]]
item = "GloriousShield"
probability = 9
[[barrier.item]]
item = "ImperialBarrier"
probability = 2
[[barrier.item]]
item = "GuardianShield"
probability = 1
[[barrier.item]]
item = "DivinityBarrier"
probability = 1

251
data/shops/frame.toml

@ -0,0 +1,251 @@
[[frame]]
level = 0
[[frame.item]]
item = "Frame"
probability = 33
[[frame.item]]
item = "Armor"
probability = 33
[[frame.item]]
item = "PsyArmor"
probability = 15
[[frame.item]]
item = "GigaFrame"
probability = 10
[[frame.item]]
item = "SoulFrame"
probability = 5
[[frame.item]]
item = "SolidFrame"
probability = 4
[[frame]]
level = 10
[[frame.item]]
item = "Frame"
probability = 5
[[frame.item]]
item = "Armor"
probability = 5
[[frame.item]]
item = "PsyArmor"
probability = 10
[[frame.item]]
item = "GigaFrame"
probability = 15
[[frame.item]]
item = "SoulFrame"
probability = 19
[[frame.item]]
item = "CrossArmor"
probability = 19
[[frame.item]]
item = "SolidFrame"
probability = 10
[[frame.item]]
item = "BraveArmor"
probability = 10
[[frame.item]]
item = "HyperFrame"
probability = 5
[[frame.item]]
item = "KingsFrame"
probability = 2
[[frame]]
level = 25
[[frame.item]]
item = "SoulFrame"
probability = 5
[[frame.item]]
item = "CrossArmor"
probability = 5
[[frame.item]]
item = "SolidFrame"
probability = 10
[[frame.item]]
item = "BraveArmor"
probability = 15
[[frame.item]]
item = "HyperFrame"
probability = 19
[[frame.item]]
item = "GrandArmor"
probability = 19
[[frame.item]]
item = "ShockFrame"
probability = 10
[[frame.item]]
item = "KingsFrame"
probability = 10
[[frame.item]]
item = "DragonFrame"
probability = 5
[[frame.item]]
item = "GeneralArmor"
probability = 2
[[frame]]
level = 42
[[frame.item]]
item = "SolidFrame"
probability = 2
[[frame.item]]
item = "BraveArmor"
probability = 4
[[frame.item]]
item = "HyperFrame"
probability = 5
[[frame.item]]
item = "GrandArmor"
probability = 5
[[frame.item]]
item = "ShockFrame"
probability = 10
[[frame.item]]
item = "KingsFrame"
probability = 12
[[frame.item]]
item = "DragonFrame"
probability = 14
[[frame.item]]
item = "AbsorbArmor"
probability = 14
[[frame.item]]
item = "ProtectFrame"
probability = 10
[[frame.item]]
item = "GeneralArmor"
probability = 9
[[frame.item]]
item = "PerfectFrame"
probability = 5
[[frame.item]]
item = "ValiantFrame"
probability = 5
[[frame.item]]
item = "ImperialArmor"
probability = 3
[[frame.item]]
item = "HolinessArmor"
probability = 2
[[frame]]
level = 60
[[frame.item]]
item = "BraveArmor"
probability = 2
[[frame.item]]
item = "HyperFrame"
probability = 5
[[frame.item]]
item = "GrandArmor"
probability = 5
[[frame.item]]
item = "ShockFrame"
probability = 5
[[frame.item]]
item = "KingsFrame"
probability = 6
[[frame.item]]
item = "DragonFrame"
probability = 10
[[frame.item]]
item = "AbsorbArmor"
probability = 13
[[frame.item]]
item = "ProtectFrame"
probability = 14
[[frame.item]]
item = "GeneralArmor"
probability = 14
[[frame.item]]
item = "PerfectFrame"
probability = 14
[[frame.item]]
item = "ValiantFrame"
probability = 7
[[frame.item]]
item = "ImperialArmor"
probability = 3
[[frame.item]]
item = "HolinessArmor"
probability = 1
[[frame.item]]
item = "GuardianArmor"
probability = 1
[[slot_rate]]
slot = 0
probability = 75
[[slot_rate]]
slot = 1
probability = 18
[[slot_rate]]
slot = 2
probability = 6
[[slot_rate]]
slot = 3
probability = 1
[[slot_rate]]
slot = 4
probability = 0

30
data/shops/grind.toml

@ -0,0 +1,30 @@
[[grind]]
level = 0
min = 0
max = 2
[[grind]]
level = 3
min = 0
max = 3
[[grind]]
level = 10
min = 0
max = 4
[[grind]]
level = 25
min = 0
max = 6
[[grind]]
level = 40
min = 0
max = 8
[[grind]]
level = 55
min = 0
max = 10

107
data/shops/hard/bluefull/weapon.toml

@ -0,0 +1,107 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 3
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 6
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 5
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 7
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 3
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 9
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 7
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 7
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 7

111
data/shops/hard/greenill/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 15
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 25
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 16
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 6
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 8
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 4
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 4
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 5
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 9
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 15
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 11

103
data/shops/hard/oran/weapon.toml

@ -0,0 +1,103 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 25
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 12
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 16
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 8
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 4
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 4
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 5
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 5
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 11
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 11
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10

103
data/shops/hard/pinkal/weapon.toml

@ -0,0 +1,103 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 5
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 30
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 16
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 16
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 5
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 6
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 5
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 4
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 4
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 9
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 15
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 7

111
data/shops/hard/purplenum/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 12
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 16
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 4
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 3
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 5
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 3
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 4
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 15
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 11
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 11

107
data/shops/hard/redria/weapon.toml

@ -0,0 +1,107 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 5
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 6
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 3
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 6
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 4
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 4
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 8
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 5
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 7
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 9

103
data/shops/hard/skyly/weapon.toml

@ -0,0 +1,103 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 16
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 5
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 3
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 3
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 4
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 5
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 3
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 3
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 11
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10

103
data/shops/hard/viridia/weapon.toml

@ -0,0 +1,103 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 4
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 4
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 4
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 6
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 4
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 4
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 5
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 9

107
data/shops/hard/whitill/weapon.toml

@ -0,0 +1,107 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 3
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 5
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 8
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 3
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 6
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 3
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 3
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 7
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10

111
data/shops/hard/yellowboze/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 12
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 12
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 3
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 3
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 3
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 3
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 7
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 15
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10

115
data/shops/normal/bluefull/weapon.toml

@ -0,0 +1,115 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 8
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 8
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 8
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 7

111
data/shops/normal/greenill/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 15
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 25
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 16
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 12
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 8
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 12
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 8
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 16
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 16
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 16
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10

115
data/shops/normal/oran/weapon.toml

@ -0,0 +1,115 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 25
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 8
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 8
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 18
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7

107
data/shops/normal/pinkal/weapon.toml

@ -0,0 +1,107 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 5
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 30
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 18
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 8
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 8
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 16
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 16
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 16
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10

115
data/shops/normal/purplenum/weapon.toml

@ -0,0 +1,115 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 8
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 8
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 8
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 12
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 16
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 16
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 16
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10

107
data/shops/normal/redria/weapon.toml

@ -0,0 +1,107 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 5
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 8
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 8
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 8
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 8
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 12
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 12
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 12
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7

99
data/shops/normal/skyly/weapon.toml

@ -0,0 +1,99 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 8
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 12
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 18
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 12
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 12
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 12
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 12

103
data/shops/normal/viridia/weapon.toml

@ -0,0 +1,103 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 8
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 8
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 12
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 8
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12

103
data/shops/normal/whitill/weapon.toml

@ -0,0 +1,103 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 8
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 3
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 8
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 3
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 3
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 12
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 3
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 12
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 10
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 3

111
data/shops/normal/yellowboze/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 8
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 12
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 13
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 12
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 16
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 16
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 16
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7

120
data/shops/special.toml

@ -0,0 +1,120 @@
[[specials]]
level = 0
[[specials.special]]
tier = 0
probability = 85
[[specials.special]]
tier = 1
probability = 15
[[specials.special]]
tier = 2
probability = 0
[[specials]]
level = 10
[[specials.special]]
tier = 0
probability = 70
[[specials.special]]
tier = 1
probability = 30
[[specials.special]]
tier = 2
probability = 0
[[specials]]
level = 17
[[specials.special]]
tier = 0
probability = 50
[[specials.special]]
tier = 1
probability = 50
[[specials.special]]
tier = 2
probability = 0
[[specials]]
level = 25
[[specials.special]]
tier = 0
probability = 20
[[specials.special]]
tier = 1
probability = 80
[[specials.special]]
tier = 2
probability = 0
[[specials]]
level = 35
[[specials.special]]
tier = 0
probability = 20
[[specials.special]]
tier = 1
probability = 60
[[specials.special]]
tier = 2
probability = 20
[[specials]]
level = 45
[[specials.special]]
tier = 0
probability = 20
[[specials.special]]
tier = 1
probability = 40
[[specials.special]]
tier = 2
probability = 40
[[specials]]
level = 60
[[specials.special]]
tier = 0
probability = 10
[[specials.special]]
tier = 1
probability = 30
[[specials.special]]
tier = 2
probability = 60
[[specials]]
level = 75
[[specials.special]]
tier = 0
probability = 10
[[specials.special]]
tier = 1
probability = 10
[[specials.special]]
tier = 2
probability = 80

299
data/shops/techniques.toml

@ -0,0 +1,299 @@
[[techniques]]
level = 0
[techniques.techs.Foie]
probability = 18
level_divisor = 3
[techniques.techs.Barta]
probability = 18
level_divisor = 4
[techniques.techs.Zonde]
probability = 18
level_divisor = 6
[techniques.techs.Resta]
probability = 18
level_divisor = 3
[techniques.techs.Anti]
probability = 18
level_divisor = 35
[techniques.techs.Shifta]
probability = 2
set_level = 1
[techniques.techs.Deband]
probability = 3
set_level = 1
[techniques.techs.Jellen]
probability = 3
set_level = 1
[techniques.techs.Zalure]
probability = 2
set_level = 1
[techniques.techs.Gifoie]
probability = 0
set_level = 1
[techniques.techs.Gibarta]
probability = 0
set_level = 1
[techniques.techs.Gizonde]
probability = 0
set_level = 1
[techniques.techs.Ryuker]
probability = 0
set_level = 1
[techniques.techs.Reverser]
probability = 0
set_level = 1
[techniques.techs.Rafoie]
probability = 0
set_level = 1
[techniques.techs.Rabarta]
probability = 0
set_level = 1
[techniques.techs.Razonde]
probability = 0
set_level = 1
[[techniques]]
level = 10
[techniques.techs.Foie]
probability = 7
level_divisor = 6
[techniques.techs.Barta]
probability = 7
level_divisor = 7
[techniques.techs.Zonde]
probability = 7
level_divisor = 8
[techniques.techs.Resta]
probability = 7
level_divisor = 6
[techniques.techs.Anti]
probability = 7
level_divisor = 35
[techniques.techs.Shifta]
probability = 6
level_divisor = 9
[techniques.techs.Deband]
probability = 6
level_divisor = 7
[techniques.techs.Jellen]
probability = 6
level_divisor = 6
[techniques.techs.Zalure]
probability = 7
level_divisor = 8
[techniques.techs.Gifoie]
probability = 8
level_divisor = 9
[techniques.techs.Gibarta]
probability = 8
level_divisor = 12
[techniques.techs.Gizonde]
probability = 8
level_divisor = 8
[techniques.techs.Ryuker]
probability = 5
set_level = 1
[techniques.techs.Reverser]
probability = 5
set_level = 1
[techniques.techs.Rafoie]
probability = 2
set_level = 1
[techniques.techs.Rabarta]
probability = 2
set_level = 1
[techniques.techs.Razonde]
probability = 2
set_level = 1
[[techniques]]
level = 25
[techniques.techs.Foie]
probability = 5
min = 3
max = 10
[techniques.techs.Barta]
probability = 5
min = 3
max = 10
[techniques.techs.Zonde]
probability = 5
min = 3
max = 10
[techniques.techs.Resta]
probability = 6
min = 3
max = 10
[techniques.techs.Anti]
probability = 5
level_divisor = 35
[techniques.techs.Shifta]
probability = 5
level_divisor = 8
[techniques.techs.Deband]
probability = 5
level_divisor = 7
[techniques.techs.Jellen]
probability = 5
level_divisor = 5
[techniques.techs.Zalure]
probability = 5
level_divisor = 6
[techniques.techs.Gifoie]
probability = 5
level_divisor = 8
[techniques.techs.Gibarta]
probability = 5
level_divisor = 9
[techniques.techs.Gizonde]
probability = 5
level_divisor = 10
[techniques.techs.Ryuker]
probability = 6
set_level = 1
[techniques.techs.Reverser]
probability = 6
set_level = 1
[techniques.techs.Rafoie]
probability = 9
level_divisor = 10
[techniques.techs.Rabarta]
probability = 9
level_divisor = 11
[techniques.techs.Razonde]
probability = 9
level_divisor = 12
[[techniques]]
level = 42
[techniques.techs.Foie]
probability = 6
min = 4
max = 12
[techniques.techs.Barta]
probability = 6
min = 4
max = 12
[techniques.techs.Zonde]
probability = 6
min = 4
max = 12
[techniques.techs.Resta]
probability = 5
min = 4
max = 12
[techniques.techs.Anti]
probability = 5
level_divisor = 35
[techniques.techs.Shifta]
probability = 6
min = 4
max = 12
[techniques.techs.Deband]
probability = 6
min = 4
max = 12
[techniques.techs.Jellen]
probability = 6
min = 4
max = 12
[techniques.techs.Zalure]
probability = 6
min = 4
max = 12
[techniques.techs.Gifoie]
probability = 6
min = 3
max = 10
[techniques.techs.Gibarta]
probability = 6
min = 3
max = 10
[techniques.techs.Gizonde]
probability = 6
min = 3
max = 10
[techniques.techs.Ryuker]
probability = 6
set_level = 1
[techniques.techs.Reverser]
probability = 6
set_level = 1
[techniques.techs.Rafoie]
probability = 6
level_divisor = 12
[techniques.techs.Rabarta]
probability = 6
level_divisor = 13
[techniques.techs.Razonde]
probability = 6
level_divisor = 11
[[techniques]]
level = 60
[techniques.techs.Foie]
probability = 6
min = 5
max = 14
[techniques.techs.Barta]
probability = 6
min = 5
max = 14
[techniques.techs.Zonde]
probability = 6
min = 5
max = 14
[techniques.techs.Resta]
probability = 5
min = 5
max = 14
[techniques.techs.Anti]
probability = 5
level_divisor = 35
[techniques.techs.Shifta]
probability = 6
min = 5
max = 14
[techniques.techs.Deband]
probability = 6
min = 5
max = 14
[techniques.techs.Jellen]
probability = 6
min = 5
max = 14
[techniques.techs.Zalure]
probability = 6
min = 5
max = 14
[techniques.techs.Gifoie]
probability = 6
min = 4
max = 13
[techniques.techs.Gibarta]
probability = 6
min = 4
max = 13
[techniques.techs.Gizonde]
probability = 6
min = 4
max = 13
[techniques.techs.Ryuker]
probability = 6
set_level = 1
[techniques.techs.Reverser]
probability = 6
set_level = 1
[techniques.techs.Rafoie]
probability = 6
min = 3
max = 13
[techniques.techs.Rabarta]
probability = 6
min = 3
max = 13
[techniques.techs.Razonde]
probability = 6
min = 3
max = 13

1
data/shops/tools.toml

@ -0,0 +1 @@
tools = [ "Monomate", "Dimate", "Trimate", "Monofluid", "Difluid", "Trifluid", "Antidote", "Antiparalysis", "SolAtomizer", "MoonAtomizer", "Telepipe",]

149
data/shops/ultimate/bluefull/weapon.toml

@ -0,0 +1,149 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 3
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 3
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 8
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 9
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 7
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 8
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 11
[[weapon_tier.weapons]]
weapon = "Cutter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 7
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sawcer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Berdys"
probability = 7
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Ripper"
probability = 10
[[weapon_tier.weapons]]
weapon = "Diska"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gungnir"
probability = 7
[[weapon_tier.weapons]]
weapon = "Raygun"
probability = 10

157
data/shops/ultimate/greenill/weapon.toml

@ -0,0 +1,157 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 15
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 25
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 8
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 18
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 8
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 17
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Launcher"
probability = 18
[[weapon_tier.weapons]]
weapon = "Gatling"
probability = 7
[[weapon_tier.weapons]]
weapon = "Beam"
probability = 7
[[weapon_tier.weapons]]
weapon = "Club"
probability = 10
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Raygun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Arms"
probability = 18
[[weapon_tier.weapons]]
weapon = "Vulcan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Laser"
probability = 7
[[weapon_tier.weapons]]
weapon = "Club"
probability = 10

145
data/shops/ultimate/oran/weapon.toml

@ -0,0 +1,145 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 25
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 12
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 16
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 3
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 3
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 3
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 8
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 8
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 11
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Beam"
probability = 10
[[weapon_tier.weapons]]
weapon = "Club"
probability = 10
[[weapon_tier.weapons]]
weapon = "Baton"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pillar"
probability = 7
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Laser"
probability = 10
[[weapon_tier.weapons]]
weapon = "Club"
probability = 10
[[weapon_tier.weapons]]
weapon = "Scepter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Striker"
probability = 7

129
data/shops/ultimate/pinkal/weapon.toml

@ -0,0 +1,129 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 5
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 30
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 16
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 4
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 16
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 18
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 17
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Pillar"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10
[[weapon_tier.weapons]]
weapon = "Claymore"
probability = 18
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Striker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10
[[weapon_tier.weapons]]
weapon = "Calibur"
probability = 18

157
data/shops/ultimate/purplenum/weapon.toml

@ -0,0 +1,157 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 12
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 16
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 6
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 4
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 18
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 8
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 7
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 17
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Launcher"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gatling"
probability = 7
[[weapon_tier.weapons]]
weapon = "Beam"
probability = 18
[[weapon_tier.weapons]]
weapon = "Club"
probability = 10
[[weapon_tier.weapons]]
weapon = "Baton"
probability = 7
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Arms"
probability = 7
[[weapon_tier.weapons]]
weapon = "Vulcan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Laser"
probability = 18
[[weapon_tier.weapons]]
weapon = "Club"
probability = 10
[[weapon_tier.weapons]]
weapon = "Scepter"
probability = 7

153
data/shops/ultimate/redria/weapon.toml

@ -0,0 +1,153 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 5
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 5
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 6
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 7
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 8
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier.weapons]]
weapon = "Cutter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 7
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 7
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sawcer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Berdys"
probability = 7
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Launcher"
probability = 7
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Ripper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Diska"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gungnir"
probability = 7
[[weapon_tier.weapons]]
weapon = "Raygun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Arms"
probability = 7

125
data/shops/ultimate/skyly/weapon.toml

@ -0,0 +1,125 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 16
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 5
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 3
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 3
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Baton"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pillar"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Scepter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Striker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10

141
data/shops/ultimate/viridia/weapon.toml

@ -0,0 +1,141 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 4
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 4
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 4
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 8
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 11
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10
[[weapon_tier.weapons]]
weapon = "Claymore"
probability = 7
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier.weapons]]
weapon = "Berdys"
probability = 10
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10
[[weapon_tier.weapons]]
weapon = "Calibur"
probability = 7
[[weapon_tier.weapons]]
weapon = "Ripper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gungnir"
probability = 10

157
data/shops/ultimate/whitill/weapon.toml

@ -0,0 +1,157 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 3
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 12
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 8
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Cutter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 17
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 11
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 7
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Sawcer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Berdys"
probability = 18
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 11
[[weapon_tier.weapons]]
weapon = "Launcher"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gatling"
probability = 7
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Diska"
probability = 7
[[weapon_tier.weapons]]
weapon = "Gungnir"
probability = 18
[[weapon_tier.weapons]]
weapon = "Raygun"
probability = 11
[[weapon_tier.weapons]]
weapon = "Arms"
probability = 7
[[weapon_tier.weapons]]
weapon = "Vulcan"
probability = 7

129
data/shops/ultimate/yellowboze/weapon.toml

@ -0,0 +1,129 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 12
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 4
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 4
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 8
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 18
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier]]
level = 99
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10
[[weapon_tier.weapons]]
weapon = "Claymore"
probability = 7
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier]]
level = 150
[[weapon_tier.weapons]]
weapon = "Gladius"
probability = 10
[[weapon_tier.weapons]]
weapon = "Calibur"
probability = 7
[[weapon_tier.weapons]]
weapon = "Ripper"
probability = 7

300
data/shops/unit.toml

@ -0,0 +1,300 @@
[[unit]]
level = 10
[[unit.item]]
item = "KnightPower"
probability = 10
[[unit.item]]
item = "PriestMind"
probability = 10
[[unit.item]]
item = "MarksmanArm"
probability = 10
[[unit.item]]
item = "ThiefLegs"
probability = 10
[[unit.item]]
item = "DiggerHp"
probability = 10
[[unit.item]]
item = "WarriorBody"
probability = 10
[[unit.item]]
item = "ResistFire"
probability = 10
[[unit.item]]
item = "ResistCold"
probability = 10
[[unit.item]]
item = "ResistShock"
probability = 10
[[unit.item]]
item = "ResistLight"
probability = 5
[[unit.item]]
item = "ResistDark"
probability = 5
[[unit]]
level = 25
[[unit.item]]
item = "KnightPower"
probability = 10
[[unit.item]]
item = "PriestMind"
probability = 10
[[unit.item]]
item = "MarksmanArm"
probability = 10
[[unit.item]]
item = "ThiefLegs"
probability = 10
[[unit.item]]
item = "DiggerHp"
probability = 10
[[unit.item]]
item = "WarriorBody"
probability = 10
[[unit.item]]
item = "ResistFire"
probability = 10
[[unit.item]]
item = "ResistCold"
probability = 10
[[unit.item]]
item = "ResistShock"
probability = 10
[[unit.item]]
item = "ResistLight"
probability = 5
[[unit.item]]
item = "ResistDark"
probability = 5
[[unit]]
level = 42
[[unit.item]]
item = "KnightPower"
probability = 4
[[unit.item]]
item = "PriestMind"
probability = 4
[[unit.item]]
item = "MarksmanArm"
probability = 4
[[unit.item]]
item = "ThiefLegs"
probability = 4
[[unit.item]]
item = "DiggerHp"
probability = 4
[[unit.item]]
item = "WarriorBody"
probability = 4
[[unit.item]]
item = "ResistFire"
probability = 4
[[unit.item]]
item = "ResistCold"
probability = 4
[[unit.item]]
item = "ResistShock"
probability = 4
[[unit.item]]
item = "ResistLight"
probability = 5
[[unit.item]]
item = "ResistDark"
probability = 5
[[unit.item]]
item = "GeneralPower"
probability = 5
[[unit.item]]
item = "GeneralMind"
probability = 5
[[unit.item]]
item = "GeneralArm"
probability = 5
[[unit.item]]
item = "GeneralLegs"
probability = 5
[[unit.item]]
item = "GeneralHp"
probability = 5
[[unit.item]]
item = "GeneralBody"
probability = 5
[[unit.item]]
item = "ResistFlame"
probability = 5
[[unit.item]]
item = "ResistFreeze"
probability = 5
[[unit.item]]
item = "ResistThunder"
probability = 5
[[unit.item]]
item = "ResistSaint"
probability = 3
[[unit.item]]
item = "ResistEvil"
probability = 3
[[unit.item]]
item = "HpRestorate"
probability = 1
[[unit.item]]
item = "TpRestorate"
probability = 1
[[unit.item]]
item = "PbAmplifier"
probability = 1
[[unit]]
level = 60
[[unit.item]]
item = "KnightPower"
probability = 3
[[unit.item]]
item = "PriestMind"
probability = 3
[[unit.item]]
item = "MarksmanArm"
probability = 3
[[unit.item]]
item = "ThiefLegs"
probability = 3
[[unit.item]]
item = "DiggerHp"
probability = 3
[[unit.item]]
item = "WarriorBody"
probability = 3
[[unit.item]]
item = "ResistFire"
probability = 4
[[unit.item]]
item = "ResistCold"
probability = 4
[[unit.item]]
item = "ResistShock"
probability = 4
[[unit.item]]
item = "ResistLight"
probability = 4
[[unit.item]]
item = "ResistDark"
probability = 5
[[unit.item]]
item = "GeneralPower"
probability = 5
[[unit.item]]
item = "GeneralMind"
probability = 5
[[unit.item]]
item = "GeneralArm"
probability = 5
[[unit.item]]
item = "GeneralLegs"
probability = 5
[[unit.item]]
item = "GeneralHp"
probability = 5
[[unit.item]]
item = "GeneralBody"
probability = 5
[[unit.item]]
item = "ResistFlame"
probability = 5
[[unit.item]]
item = "ResistFreeze"
probability = 5
[[unit.item]]
item = "ResistThunder"
probability = 5
[[unit.item]]
item = "ResistSaint"
probability = 5
[[unit.item]]
item = "ResistEvil"
probability = 5
[[unit.item]]
item = "HpRestorate"
probability = 2
[[unit.item]]
item = "TpRestorate"
probability = 2
[[unit.item]]
item = "PbAmplifier"
probability = 2

111
data/shops/veryhard/bluefull/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 3
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 3
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 8
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 9
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 7
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 8
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 11
[[weapon_tier.weapons]]
weapon = "Cutter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 7
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10

111
data/shops/veryhard/greenill/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 15
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 25
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 8
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 18
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 8
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 17
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10

107
data/shops/veryhard/oran/weapon.toml

@ -0,0 +1,107 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 25
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 12
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 16
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Assault"
probability = 3
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 3
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 3
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 8
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 8
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 11
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7

99
data/shops/veryhard/pinkal/weapon.toml

@ -0,0 +1,99 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 5
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 30
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 16
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 4
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 16
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 18
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 7
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 17

111
data/shops/veryhard/purplenum/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 12
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 16
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 6
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 4
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 18
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 8
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 7
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 17
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7

107
data/shops/veryhard/redria/weapon.toml

@ -0,0 +1,107 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 5
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 25
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 7
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 5
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 6
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 5
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 7
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 8
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier.weapons]]
weapon = "Cutter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 7
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 7

95
data/shops/veryhard/skyly/weapon.toml

@ -0,0 +1,95 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 16
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 5
[[weapon_tier.weapons]]
weapon = "Gigush"
probability = 3
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 3
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Staff"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pole"
probability = 7
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10

103
data/shops/veryhard/viridia/weapon.toml

@ -0,0 +1,103 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 12
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 5
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 4
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 4
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 4
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Buster"
probability = 9
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 8
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 9
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 11

111
data/shops/veryhard/whitill/weapon.toml

@ -0,0 +1,111 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 25
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 15
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 25
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 15
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 7
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 7
[[weapon_tier.weapons]]
weapon = "Sniper"
probability = 7
[[weapon_tier.weapons]]
weapon = "Brand"
probability = 10
[[weapon_tier.weapons]]
weapon = "Sword"
probability = 3
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Slicer"
probability = 7
[[weapon_tier.weapons]]
weapon = "Partisan"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 12
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Wand"
probability = 7
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Spread"
probability = 8
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blaster"
probability = 7
[[weapon_tier.weapons]]
weapon = "Mace"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Cutter"
probability = 7
[[weapon_tier.weapons]]
weapon = "Glaive"
probability = 17
[[weapon_tier.weapons]]
weapon = "Railgun"
probability = 11
[[weapon_tier.weapons]]
weapon = "Cannon"
probability = 7
[[weapon_tier.weapons]]
weapon = "Repeater"
probability = 7

99
data/shops/veryhard/yellowboze/weapon.toml

@ -0,0 +1,99 @@
[[weapon_tier]]
level = 0
[[weapon_tier.weapons]]
weapon = "Saber"
probability = 20
[[weapon_tier.weapons]]
weapon = "Dagger"
probability = 20
[[weapon_tier.weapons]]
weapon = "Handgun"
probability = 20
[[weapon_tier.weapons]]
weapon = "Rifle"
probability = 20
[[weapon_tier.weapons]]
weapon = "Cane"
probability = 20
[[weapon_tier]]
level = 10
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 10
[[weapon_tier.weapons]]
weapon = "Mechgun"
probability = 7
[[weapon_tier.weapons]]
weapon = "Stick"
probability = 10
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 12
[[weapon_tier]]
level = 25
[[weapon_tier.weapons]]
weapon = "Knife"
probability = 4
[[weapon_tier.weapons]]
weapon = "Autogun"
probability = 5
[[weapon_tier.weapons]]
weapon = "Rod"
probability = 4
[[weapon_tier.weapons]]
weapon = "Shot"
probability = 4
[[weapon_tier]]
level = 42
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Blade"
probability = 7
[[weapon_tier.weapons]]
weapon = "Spinner"
probability = 8
[[weapon_tier.weapons]]
weapon = "Halbert"
probability = 18
[[weapon_tier.weapons]]
weapon = "Lockgun"
probability = 10
[[weapon_tier]]
level = 60
[[weapon_tier.weapons]]
weapon = "Pallasch"
probability = 10
[[weapon_tier.weapons]]
weapon = "Breaker"
probability = 7
[[weapon_tier.weapons]]
weapon = "Edge"
probability = 7

3
src/entity/item/mod.rs

@ -46,7 +46,8 @@ pub enum ItemLocation {
Consumed,
FedToMag {
mag: ItemEntityId,
}
},
Shop,
/*Destroyed {
// marks an item that has been consumed in some way
},

73
src/ship/item_stats.rs

@ -4,11 +4,23 @@ use serde::{Serialize, Deserialize};
use std::fs::File;
use std::io::Read;
use crate::entity::item::weapon::WeaponType;
use crate::entity::item::armor::ArmorType;
use crate::entity::item::shield::ShieldType;
use crate::entity::item::unit::UnitType;
use crate::entity::item::mag::MagType;
use crate::entity::item::tool::ToolType;
use crate::entity::item::tech::Technique;
lazy_static::lazy_static! {
pub static ref WEAPON_STATS: HashMap<WeaponType, WeaponStats> = weapon_stats();
pub static ref ARMOR_STATS: HashMap<ArmorType, ArmorStats> = armor_stats();
pub static ref SHIELD_STATS: HashMap<ShieldType, ShieldStats> = shield_stats();
pub static ref UNIT_STATS: BTreeMap<UnitType, UnitStats> = unit_stats();
pub static ref TOOL_STATS: HashMap<ToolType, ToolStats> = tool_stats();
pub static ref TECH_STATS: HashMap<Technique, TechStats> = tech_stats();
}
fn load_data_file<T: serde::de::DeserializeOwned>(path: &str) -> T {
@ -20,8 +32,12 @@ fn load_data_file<T: serde::de::DeserializeOwned>(path: &str) -> T {
}
struct WeaponStats {
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub struct WeaponStats {
pub grind: usize,
pub atp_min: usize,
pub atp_max: usize,
pub shop_multiplier: f32,
}
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
@ -65,6 +81,17 @@ pub struct UnitStats {
pub modifier: u32,
}
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub struct ToolStats {
pub price: usize,
}
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub struct TechStats {
pub price: usize,
}
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub struct MagStats {
pub feed_table: u32,
@ -86,6 +113,14 @@ pub struct MagFeedTable(HashMap<ToolType, MagFeedStats>);
#[derive(Debug)]
pub struct MagFeedTables(Vec<MagFeedTable>);
pub fn weapon_stats() -> HashMap<WeaponType, WeaponStats> {
let weapon_stats: HashMap<String, WeaponStats> = load_data_file("data/item_stats/weapon_stats.toml");
weapon_stats.iter()
.map(|(name, stats)| {
(name.parse().unwrap(), *stats)
}).collect()
}
pub fn armor_stats() -> HashMap<ArmorType, ArmorStats> {
let armor_stats: HashMap<String, ArmorStats> = load_data_file("data/item_stats/armor_stats.toml");
armor_stats.iter()
@ -110,6 +145,22 @@ pub fn unit_stats() -> BTreeMap<UnitType, UnitStats> {
}).collect()
}
pub fn tool_stats() -> HashMap<ToolType, ToolStats> {
let tool_stats: HashMap<String, ToolStats> = load_data_file("data/item_stats/tool_stats.toml");
tool_stats.iter()
.map(|(name, stats)| {
(name.parse().unwrap(), *stats)
}).collect()
}
pub fn tech_stats() -> HashMap<Technique, TechStats> {
let tech_stats: HashMap<String, TechStats> = load_data_file("data/item_stats/tech_stats.toml");
tech_stats.iter()
.map(|(name, stats)| {
(name.parse().unwrap(), *stats)
}).collect()
}
pub fn mag_stats() -> HashMap<MagType, MagStats> {
let mag_stats: BTreeMap<String, MagStats> = load_data_file("data/item_stats/mag_stats.toml");
mag_stats.iter()
@ -135,6 +186,12 @@ pub fn mag_feed_tables() -> MagFeedTables {
mod test {
use super::*;
#[test]
fn test_weapon_stats() {
let wstat = weapon_stats();
assert!(wstat.get(&WeaponType::MadamsUmbrella).unwrap().atp_max == 280);
}
#[test]
fn test_armor_stats() {
let astat = armor_stats();
@ -153,6 +210,18 @@ mod test {
assert!(ustat.get(&UnitType::ElfArm).unwrap().stars == 5);
}
#[test]
fn test_tool_stats() {
let tstat = tool_stats();
assert!(tstat.get(&ToolType::Monomate).unwrap().price == 50);
}
#[test]
fn test_tech_stats() {
let tstat = tech_stats();
assert!(tstat.get(&Technique::Reverser).unwrap().price == 5000);
}
#[test]
fn test_mag_stats() {
let mstats = mag_stats();

4
src/ship/items/inventory.rs

@ -452,7 +452,7 @@ impl CharacterInventory {
}));
if let Some(InventoryItem::Individual(new_item)) = self.items.last() {
Some((new_item, InventorySlot(self.count())))
Some((new_item, InventorySlot(self.count()-1)))
}
else {
None
@ -494,7 +494,7 @@ impl CharacterInventory {
self.items.push(new_stacked_item);
if let Some(InventoryItem::Stacked(new_item)) = self.items.last() {
Some((new_item, InventorySlot(self.count())))
Some((new_item, InventorySlot(self.count()-1)))
}
else {
None

107
src/ship/items/manager.rs

@ -10,6 +10,7 @@ use crate::ship::map::MapArea;
use crate::ship::ship::ItemDropLocation;
use crate::ship::drops::{ItemDrop, ItemDropType};
use crate::ship::location::{AreaClient, RoomId};
use crate::ship::shops::ShopItem;
use crate::ship::items::bank::*;
use crate::ship::items::floor::*;
@ -39,6 +40,9 @@ pub enum ItemManagerError {
BankFull,
WrongItemType(ClientItemId),
UseItemError(#[from] use_tool::UseItemError),
CouldNotBuyItem,
CouldNotAddBoughtItemToInventory,
ItemIdNotInInventory(ClientItemId)
}
pub struct ItemManager {
@ -752,4 +756,107 @@ impl ItemManager {
}
Ok(())
}
pub async fn player_buys_item<EG: EntityGateway>(&mut self,
entity_gateway: &mut EG,
character: &CharacterEntity,
shop_item: &(dyn ShopItem + Send + Sync),
item_id: ClientItemId,
amount: usize)
-> Result<&InventoryItem, ItemManagerError> {
let inventory = self.character_inventory.get_mut(&character.id).ok_or(ItemManagerError::NoCharacter(character.id))?;
let item_detail = shop_item.as_item();
let inventory_item = match item_detail {
ItemDetail::Tool(tool) => {
if tool.is_stackable() {
let mut item_entities = Vec::new();
for _ in 0..amount {
item_entities.push(entity_gateway.create_item(NewItemEntity {
location: ItemLocation::Shop,
item: ItemDetail::Tool(tool),
}).await.ok_or(ItemManagerError::EntityGatewayError)?);
}
let floor_item = StackedFloorItem {
entity_ids: item_entities.into_iter().map(|i| i.id).collect(),
item_id: item_id,
tool: tool,
// TODO: this is gonna choke if I ever require the item being near the player for pickup
map_area: MapArea::Pioneer2Ep1,
x: 0.0,
y: 0.0,
z: 0.0,
};
let item_id = {
let (picked_up_item, slot) = inventory.pick_up_stacked_floor_item(&floor_item).ok_or(ItemManagerError::CouldNotAddBoughtItemToInventory)?;
for entity_id in &picked_up_item.entity_ids {
entity_gateway.change_item_location(entity_id,
ItemLocation::Inventory {
character_id: character.id,
slot: slot.0,
equipped: false,
}).await;//.ok_or(ItemManagerError::EntityGatewayError)?;
}
picked_up_item.item_id
};
inventory.get_item_by_id(item_id).ok_or(ItemManagerError::ItemIdNotInInventory(item_id))?
}
else {
let item_entity = entity_gateway.create_item(NewItemEntity {
location: ItemLocation::Shop,
item: ItemDetail::Tool(tool),
}).await.ok_or(ItemManagerError::EntityGatewayError)?;
let floor_item = IndividualFloorItem {
entity_id: item_entity.id,
item_id: item_id,
item: ItemDetail::Tool(tool),
// TODO: this is gonna choke if I ever require the item being near the player for pickup
map_area: MapArea::Pioneer2Ep1,
x: 0.0,
y: 0.0,
z: 0.0,
};
let item_id = {
let (picked_up_item, slot) = inventory.pick_up_individual_floor_item(&floor_item).ok_or(ItemManagerError::CouldNotAddBoughtItemToInventory)?;
entity_gateway.change_item_location(&picked_up_item.entity_id,
ItemLocation::Inventory {
character_id: character.id,
slot: slot.0,
equipped: false,
}).await;//.ok_or(ItemManagerError::EntityGatewayError)?;
picked_up_item.item_id
};
inventory.get_item_by_id(item_id).ok_or(ItemManagerError::ItemIdNotInInventory(item_id))?
}
},
item_detail @ _ => {
let item_entity = entity_gateway.create_item(NewItemEntity {
location: ItemLocation::Shop,
item: item_detail.clone(),
}).await.ok_or(ItemManagerError::EntityGatewayError)?;
let floor_item = IndividualFloorItem {
entity_id: item_entity.id,
item_id: item_id,
item: item_detail,
// TODO: this is gonna choke if I ever require the item being near the player for pickup
map_area: MapArea::Pioneer2Ep1,
x: 0.0,
y: 0.0,
z: 0.0,
};
let item_id = {
let (picked_up_item, slot) = inventory.pick_up_individual_floor_item(&floor_item).ok_or(ItemManagerError::CouldNotAddBoughtItemToInventory)?;
entity_gateway.change_item_location(&picked_up_item.entity_id,
ItemLocation::Inventory {
character_id: character.id,
slot: slot.0,
equipped: false,
}).await;//.ok_or(ItemManagerError::EntityGatewayError)?;
picked_up_item.item_id
};
inventory.get_item_by_id(item_id).ok_or(ItemManagerError::ItemIdNotInInventory(item_id))?
},
};
Ok(inventory_item)
}
}

1
src/ship/mod.rs

@ -9,3 +9,4 @@ pub mod monster;
pub mod drops;
pub mod packet;
pub mod quests;
pub mod shops;

23
src/ship/packet/builder/message.rs

@ -5,6 +5,7 @@ use crate::ship::ship::{ShipError};
use crate::ship::items::{ClientItemId, InventoryItem, StackedFloorItem, FloorItem, CharacterBank};
use crate::ship::location::AreaClient;
use std::convert::TryInto;
use crate::ship::shops::ShopItem;
pub fn item_drop(client: u8, target: u8, item_drop: &FloorItem) -> Result<ItemDrop, ShipError> {
@ -139,3 +140,25 @@ pub fn player_no_longer_has_item(area_client: AreaClient, item_id: ClientItemId,
amount: amount,
}
}
pub fn shop_list<I: ShopItem>(shop_type: u8, items: &Vec<I>) -> ShopList {
let items = items.into_iter()
.enumerate()
.map(|(i, item)| {
ShopListItem {
item_bytes: item.as_bytes(),
unknown: i as u32 + 23,
price: item.price() as u32,
}
})
.collect();
ShopList {
client: 0,
target: 0,
shop_type: shop_type,
num_items: 0,
unused: 0,
items: items,
}
}

118
src/ship/packet/handler/direct_message.rs

@ -1,17 +1,24 @@
use log::warn;
use libpso::packet::ship::*;
use libpso::packet::messages::*;
use crate::common::leveltable::CharacterLevelTable;
use crate::common::serverstate::ClientId;
use crate::ship::ship::{SendShipPacket, ShipError, Clients, Rooms};
use crate::ship::ship::{SendShipPacket, ShipError, Clients, Rooms, ItemShops};
use crate::ship::location::{ClientLocation, ClientLocationError};
use crate::ship::drops::ItemDrop;
use crate::ship::items::{ItemManager, ClientItemId, TriggerCreateItem, FloorItem};
use crate::entity::gateway::EntityGateway;
use libpso::utf8_to_utf16_array;
use crate::ship::packet::builder;
use crate::ship::shops::{ShopItem, ToolShopItem, ArmorShopItem};
const BANK_ACTION_DEPOSIT: u8 = 0;
const BANK_ACTION_WITHDRAW: u8 = 1;
const SHOP_OPTION_TOOL: u8 = 0;
const SHOP_OPTION_WEAPON: u8 = 1;
const SHOP_OPTION_ARMOR: u8 = 2;
//const BANK_ACTION_: u8 = 1;
fn send_to_client(id: ClientId, target: u8, msg: DirectMessage, client_location: &ClientLocation)
@ -269,3 +276,112 @@ where
.flatten()
))
}
pub async fn shop_request(id: ClientId,
shop_request: &ShopRequest,
client_location: &ClientLocation,
clients: &mut Clients,
rooms: &Rooms,
level_table: &CharacterLevelTable,
shops: &mut ItemShops)
-> Result<Box<dyn Iterator<Item = (ClientId, SendShipPacket)> + Send>, ShipError>
{
let client = clients.get_mut(&id).ok_or(ShipError::ClientNotFound(id))?;
let room_id = client_location.get_room(id).map_err(|err| -> ClientLocationError { err.into() })?;
let room = rooms.get(room_id.0)
.ok_or_else(|| ShipError::InvalidRoom(room_id.0 as u32))?
.as_ref()
.ok_or_else(|| ShipError::InvalidRoom(room_id.0 as u32))?;
let level = level_table.get_level_from_exp(client.character.char_class, client.character.exp) as usize;
let shop_list = match shop_request.shop_type {
SHOP_OPTION_WEAPON => {
client.weapon_shop = shops.weapon_shop.get_mut(&(room.mode.difficulty(), client.character.section_id))
.ok_or(ShipError::ShopError)?
.generate_weapon_list(level);
builder::message::shop_list(shop_request.shop_type, &client.weapon_shop)
},
SHOP_OPTION_TOOL => {
client.tool_shop = shops.tool_shop.generate_tool_list(level);
builder::message::shop_list(shop_request.shop_type, &client.tool_shop)
},
SHOP_OPTION_ARMOR => {
client.armor_shop = shops.armor_shop.generate_armor_list(level);
builder::message::shop_list(shop_request.shop_type, &client.armor_shop)
},
_ => {
return Err(ShipError::ShopError)
}
};
Ok(Box::new(vec![(id, SendShipPacket::Message(Message::new(GameMessage::ShopList(shop_list))))].into_iter()))
}
pub async fn buy_item<EG>(id: ClientId,
buy_item: &BuyItem,
entity_gateway: &mut EG,
client_location: &ClientLocation,
clients: &mut Clients,
item_manager: &mut ItemManager)
-> Result<Box<dyn Iterator<Item = (ClientId, SendShipPacket)> + Send>, ShipError>
where
EG: EntityGateway
{
let client = clients.get_mut(&id).ok_or(ShipError::ClientNotFound(id))?;
let area_client = client_location.get_local_client(id).map_err(|err| -> ClientLocationError { err.into() })?;
let (item, remove): (&(dyn ShopItem + Send + Sync), bool) = match buy_item.shop_type {
SHOP_OPTION_WEAPON => {
(client.weapon_shop.get(buy_item.shop_index as usize).ok_or(ShipError::ShopError)?, false)
},
SHOP_OPTION_TOOL => {
let item = client.tool_shop.get(buy_item.shop_index as usize).ok_or(ShipError::ShopError)?;
let remove = match item {
ToolShopItem::Tech(_) => true,
_ => false,
};
(item, remove)
},
SHOP_OPTION_ARMOR => {
let item = client.armor_shop.get(buy_item.shop_index as usize).ok_or(ShipError::ShopError)?;
let remove = match item {
ArmorShopItem::Unit(_) => true,
_ => false,
};
(item, remove)
},
_ => {
return Err(ShipError::ShopError)
}
};
if client.character.meseta < item.price() as u32 {
return Err(ShipError::ShopError)
}
client.character.meseta -= item.price() as u32;
entity_gateway.save_character(&client.character).await;
let inventory_item = item_manager.player_buys_item(entity_gateway, &client.character, item, ClientItemId(buy_item.item_id), buy_item.amount as usize).await?;
let create = builder::message::create_withdrawn_inventory_item(area_client, inventory_item)?;
if remove {
match buy_item.shop_type {
SHOP_OPTION_TOOL => {
client.tool_shop.remove(buy_item.shop_index as usize);
},
SHOP_OPTION_ARMOR => {
client.armor_shop.remove(buy_item.shop_index as usize);
},
_ => {}
}
}
let other_clients_in_area = client_location.get_client_neighbors(id).map_err(|err| -> ClientLocationError { err.into() })?;
Ok(Box::new(other_clients_in_area.into_iter()
.map(move |c| {
(c.client, SendShipPacket::Message(Message::new(GameMessage::CreateItem(create.clone()))))
})))
}

2
src/ship/room.rs

@ -60,7 +60,7 @@ impl Episode {
}
}
#[derive(Debug, Copy, Clone, derive_more::Display)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, derive_more::Display)]
pub enum Difficulty {
Normal,
Hard,

46
src/ship/ship.rs

@ -20,7 +20,7 @@ use crate::common::interserver::{AuthToken, Ship, ServerId, InterserverActor, Lo
use crate::entity::gateway::EntityGateway;
use crate::entity::account::{UserAccountEntity, UserSettingsEntity};
use crate::entity::character::CharacterEntity;
use crate::entity::character::{CharacterEntity, SectionID};
use crate::ship::location::{ClientLocation, RoomLobby, MAX_ROOMS, ClientLocationError};
@ -29,6 +29,7 @@ use crate::ship::room;
use crate::ship::quests;
use crate::ship::map::{MapsError, MapAreaError, MapArea};
use crate::ship::packet::handler;
use crate::ship::shops::{ShopType, WeaponShop, ToolShop, ArmorShop, WeaponShopItem, ToolShopItem, ArmorShopItem};
pub const SHIP_PORT: u16 = 23423;
pub const QUEST_CATEGORY_MENU_ID: u32 = 0xA2;
@ -60,6 +61,7 @@ pub enum ShipError {
InvalidQuestFilename(String),
IoError(#[from] std::io::Error),
NotEnoughMeseta(ClientId, u32),
ShopError,
}
#[derive(Debug)]
@ -228,6 +230,9 @@ pub struct ClientState {
pub x: f32,
pub y: f32,
pub z: f32,
pub weapon_shop: Vec<WeaponShopItem>,
pub tool_shop: Vec<ToolShopItem>,
pub armor_shop: Vec<ArmorShopItem>,
}
impl ClientState {
@ -244,10 +249,41 @@ impl ClientState {
x: 0.0,
y: 0.0,
z: 0.0,
weapon_shop: Vec::new(),
tool_shop: Vec::new(),
armor_shop: Vec::new(),
}
}
}
pub struct ItemShops {
pub weapon_shop: HashMap<(room::Difficulty, SectionID), WeaponShop<rand_chacha::ChaCha20Rng>>,
pub tool_shop: ToolShop<rand_chacha::ChaCha20Rng>,
pub armor_shop: ArmorShop<rand_chacha::ChaCha20Rng>,
}
impl ItemShops {
pub fn new() -> ItemShops {
let difficulty = [room::Difficulty::Normal, room::Difficulty::Hard, room::Difficulty::VeryHard, room::Difficulty::Ultimate];
let section_id = [SectionID::Viridia, SectionID::Greenill, SectionID::Skyly, SectionID::Bluefull, SectionID::Purplenum,
SectionID::Pinkal, SectionID::Redria, SectionID::Oran, SectionID::Yellowboze, SectionID::Whitill];
let mut weapon_shop = HashMap::new();
for d in difficulty.iter() {
for id in section_id.iter() {
weapon_shop.insert((*d, *id), WeaponShop::new(*d, *id));
}
}
ItemShops {
weapon_shop: weapon_shop,
tool_shop: ToolShop::new(),
armor_shop: ArmorShop::new(),
}
}
}
pub struct ShipServerStateBuilder<EG: EntityGateway> {
entity_gateway: Option<EG>,
name: Option<String>,
@ -297,6 +333,7 @@ impl<EG: EntityGateway> ShipServerStateBuilder<EG> {
quests: quests::load_quests("data/quests.toml".into()).unwrap(),
ip: self.ip.unwrap_or(Ipv4Addr::new(127,0,0,1)),
port: self.port.unwrap_or(SHIP_PORT),
shops: Box::new(ItemShops::new()),
}
}
}
@ -312,6 +349,7 @@ pub struct ShipServerState<EG: EntityGateway> {
quests: quests::QuestList,
ip: Ipv4Addr,
port: u16,
shops: Box<ItemShops>,
}
impl<EG: EntityGateway> ShipServerState<EG> {
@ -382,6 +420,12 @@ impl<EG: EntityGateway> ShipServerState<EG> {
GameMessage::BankInteraction(bank_interaction) => {
handler::direct_message::bank_interaction(id, bank_interaction, &mut self.entity_gateway, &self.client_location, &mut self.clients, &mut self.item_manager).await
},
GameMessage::ShopRequest(shop_request) => {
handler::direct_message::shop_request(id, shop_request, &self.client_location, &mut self.clients, &self.rooms, &self.level_table, &mut self.shops).await
},
GameMessage::BuyItem(buy_item) => {
handler::direct_message::buy_item(id, buy_item, &mut self.entity_gateway, &self.client_location, &mut self.clients, &mut self.item_manager).await
},
_ => {
let cmsg = msg.clone();
Ok(Box::new(self.client_location.get_all_clients_by_client(id).unwrap().into_iter()

334
src/ship/shops/armor.rs

@ -0,0 +1,334 @@
use std::collections::HashMap;
use std::fs::File;
use std::io::Read;
use std::path::PathBuf;
use std::convert::TryInto;
use serde::Deserialize;
use rand::{Rng, SeedableRng};
use rand::distributions::{WeightedIndex, Distribution};
use rand::seq::{SliceRandom, IteratorRandom};
use crate::entity::character::SectionID;
use crate::ship::room::Difficulty;
use crate::entity::item::ItemDetail;
use crate::entity::item::armor::{Armor, ArmorType};
use crate::entity::item::shield::{Shield, ShieldType};
use crate::entity::item::unit::{Unit, UnitType};
use crate::ship::shops::ShopItem;
use crate::ship::item_stats::{ARMOR_STATS, SHIELD_STATS, UNIT_STATS};
#[derive(Debug)]
pub enum ArmorShopItem {
Frame(ArmorType, usize),
Barrier(ShieldType),
Unit(UnitType),
}
const ARMOR_MULTIPLIER: f32 = 0.799999952;
const SHIELD_MULTIPLIER: f32 = 1.5;
const UNIT_MULTIPLIER: f32 = 1000.0;
impl ShopItem for ArmorShopItem {
fn price(&self) -> usize {
match self {
ArmorShopItem::Frame(frame, slot) => {
ARMOR_STATS.get(&frame)
.map(|frame_stats| {
let mut price = (frame_stats.dfp + frame_stats.evp) as f32;
price *= price;
price /= ARMOR_MULTIPLIER;
price += 70.0 * frame_stats.level_req as f32;
price += 70.0 * frame_stats.level_req as f32 * *slot as f32;
price as usize
})
.unwrap_or(0xFFFF)
},
ArmorShopItem::Barrier(barrier) => {
SHIELD_STATS.get(&barrier)
.map(|barrier_stats| {
let mut price = (barrier_stats.dfp + barrier_stats.evp) as f32;
price *= price;
price /= SHIELD_MULTIPLIER;
price += 70.0 * barrier_stats.level_req as f32;
price as usize
})
.unwrap_or(0xFFFF)
},
ArmorShopItem::Unit(unit) => {
UNIT_STATS.get(&unit)
.map(|unit_stats| {
(unit_stats.stars as f32 * UNIT_MULTIPLIER) as usize
})
.unwrap_or(0xFFFF)
}
}
}
fn as_bytes(&self) -> [u8; 12] {
self.as_item().as_client_bytes()[0..12].try_into().unwrap()
}
fn as_item(&self) -> ItemDetail {
match self {
ArmorShopItem::Frame(frame, slot) => {
ItemDetail::Armor(Armor {
armor: *frame,
dfp: 0,
evp: 0,
slots: *slot as u8,
modifiers: Vec::new()
})
},
ArmorShopItem::Barrier(barrier) => {
ItemDetail::Shield(Shield {
shield: *barrier,
dfp: 0,
evp: 0,
})
},
ArmorShopItem::Unit(unit) => {
ItemDetail::Unit(Unit {
unit: *unit,
modifier: None,
})
},
}
}
}
#[derive(Debug, Deserialize, Clone)]
struct FrameTierItem {
item: ArmorType,
probability: usize,
}
#[derive(Debug, Deserialize, Clone)]
struct FrameTier {
level: usize,
item: Vec<FrameTierItem>,
}
#[derive(Debug, Deserialize)]
struct SlotRate {
slot: usize,
probability: usize,
}
#[derive(Debug, Deserialize)]
struct FrameTable {
frame: Vec<FrameTier>,
slot_rate: Vec<SlotRate>,
}
#[derive(Debug, Deserialize, Clone)]
struct BarrierTierItem {
item: ShieldType,
probability: usize,
}
#[derive(Debug, Deserialize, Clone)]
struct BarrierTier {
level: usize,
item: Vec<BarrierTierItem>,
}
#[derive(Debug, Deserialize)]
struct BarrierTable {
barrier: Vec<BarrierTier>,
}
#[derive(Debug, Deserialize, Clone)]
struct UnitTierItem {
item: UnitType,
probability: usize,
}
#[derive(Debug, Deserialize, Clone)]
struct UnitTier {
level: usize,
item: Vec<UnitTierItem>,
}
#[derive(Debug, Deserialize)]
struct UnitTable {
unit: Vec<UnitTier>,
}
fn load_frame_table() -> FrameTable {
let path = PathBuf::from("data/shops/frame.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let table: FrameTable = toml::from_str(s.as_str()).unwrap();
table
}
fn load_barrier_table() -> BarrierTable {
let path = PathBuf::from("data/shops/barrier.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let table: BarrierTable = toml::from_str(s.as_str()).unwrap();
table
}
fn load_unit_table() -> UnitTable {
let path = PathBuf::from("data/shops/unit.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let table: UnitTable = toml::from_str(s.as_str()).unwrap();
table
}
fn number_of_frames_to_generate(character_level: usize) -> usize {
if character_level <= 10 {
4
}
else if character_level <= 25 {
6
}
else if character_level <= 42 {
7
}
else {
8
}
}
fn number_of_barriers_to_generate(character_level: usize) -> usize {
if character_level <= 10 {
4
}
else if character_level <= 25 {
5
}
else if character_level <= 42 {
6
}
else {
7
}
}
fn number_of_units_to_generate(character_level: usize) -> usize {
if character_level <= 10 {
0
}
else if character_level <= 25 {
3
}
else if character_level <= 42 {
5
}
else {
6
}
}
#[derive(Debug)]
pub struct ArmorShop<R: Rng + SeedableRng> {
frame: FrameTable,
barrier: BarrierTable,
unit: UnitTable,
rng: R,
}
impl<R: Rng + SeedableRng> ArmorShop<R> {
pub fn new() -> ArmorShop<R> {
ArmorShop {
frame: load_frame_table(),
barrier: load_barrier_table(),
unit: load_unit_table(),
rng: R::from_entropy(),
}
}
fn generate_frame_list(&mut self, character_level: usize) -> Vec<ArmorShopItem> {
let tier = self.frame.frame.iter()
.filter(|t| t.level <= character_level)
.last()
.cloned()
.unwrap();
let frame_choice = WeightedIndex::new(tier.item.iter().map(|f| f.probability)).unwrap();
let slot_choice = WeightedIndex::new(self.frame.slot_rate.iter().map(|sr| sr.probability)).unwrap();
(0..number_of_frames_to_generate(character_level))
.map(|_| {
let frame_detail = tier.item.get(frame_choice.sample(&mut self.rng)).unwrap();
let slot = self.frame.slot_rate.get(slot_choice.sample(&mut self.rng)).unwrap();
ArmorShopItem::Frame(frame_detail.item, slot.slot)
})
.collect()
}
fn generate_barrier_list(&mut self, character_level: usize) -> Vec<ArmorShopItem> {
let tier = self.barrier.barrier.iter()
.filter(|t| t.level <= character_level)
.last()
.cloned()
.unwrap();
let barrier_choice = WeightedIndex::new(tier.item.iter().map(|b| b.probability)).unwrap();
(0..number_of_barriers_to_generate(character_level))
.map(|_| {
let barrier_detail = tier.item.get(barrier_choice.sample(&mut self.rng)).unwrap();
ArmorShopItem::Barrier(barrier_detail.item)
})
.collect()
}
fn generate_unit_list(&mut self, character_level: usize) -> Vec<ArmorShopItem> {
self.unit.unit.iter()
.filter(|t| t.level <= character_level)
.last()
.cloned()
.map(|tier| {
let unit_choice = WeightedIndex::new(tier.item.iter().map(|u| u.probability)).unwrap();
(0..number_of_units_to_generate(character_level))
.map(|_| {
let unit_detail = tier.item.get(unit_choice.sample(&mut self.rng)).unwrap();
ArmorShopItem::Unit(unit_detail.item)
})
.collect()
})
.unwrap_or(Vec::new())
}
pub fn generate_armor_list(&mut self, character_level: usize) -> Vec<ArmorShopItem> {
self.generate_frame_list(character_level).into_iter()
.chain(self.generate_barrier_list(character_level).into_iter())
.chain(self.generate_unit_list(character_level).into_iter())
.collect()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_loading_tool_shop() {
ArmorShop::<rand_chacha::ChaCha20Rng>::new();
}
#[test]
fn test_generating_some_armor() {
let mut fs = ArmorShop::<rand_chacha::ChaCha20Rng>::new();
for i in 0..200 {
fs.generate_armor_list(i);
}
}
}

21
src/ship/shops/mod.rs

@ -0,0 +1,21 @@
mod weapon;
mod tool;
mod armor;
use crate::entity::item::ItemDetail;
pub trait ShopItem {
fn price(&self) -> usize;
fn as_bytes(&self) -> [u8; 12];
fn as_item(&self) -> ItemDetail;
}
pub enum ShopType {
Weapon,
Tool,
Armor
}
pub use weapon::{WeaponShop, WeaponShopItem};
pub use tool::{ToolShop, ToolShopItem};
pub use armor::{ArmorShop, ArmorShopItem};

328
src/ship/shops/tool.rs

@ -0,0 +1,328 @@
use std::collections::HashMap;
use std::fs::File;
use std::io::Read;
use std::path::PathBuf;
use std::convert::TryInto;
use serde::Deserialize;
use rand::{Rng, SeedableRng};
use rand::distributions::{WeightedIndex, Distribution};
use rand::seq::{SliceRandom, IteratorRandom};
use crate::entity::character::SectionID;
use crate::ship::room::Difficulty;
use crate::entity::item::ItemDetail;
use crate::entity::item::tool::{Tool, ToolType};
use crate::entity::item::tech::{Technique, TechniqueDisk};
use crate::ship::shops::ShopItem;
use crate::ship::item_stats::{TOOL_STATS, TECH_STATS};
#[derive(Debug, PartialEq, Eq)]
pub enum ToolShopItem {
Tool(ToolType),
Tech(TechniqueDisk),
}
impl Ord for ToolShopItem {
fn cmp(&self, other: &ToolShopItem) -> std::cmp::Ordering {
let a = match self {
ToolShopItem::Tool(t) => Tool{tool : *t}.as_individual_bytes(),
ToolShopItem::Tech(t) => t.as_bytes(),
};
let b = match other {
ToolShopItem::Tool(t) => Tool{tool : *t}.as_individual_bytes(),
ToolShopItem::Tech(t) => t.as_bytes(),
};
a.cmp(&b)
}
}
impl PartialOrd for ToolShopItem {
fn partial_cmp(&self, other: &ToolShopItem) -> Option<std::cmp::Ordering> {
let a = match self {
ToolShopItem::Tool(t) => Tool{tool : *t}.as_individual_bytes(),
ToolShopItem::Tech(t) => t.as_bytes(),
};
let b = match other {
ToolShopItem::Tool(t) => Tool{tool : *t}.as_individual_bytes(),
ToolShopItem::Tech(t) => t.as_bytes(),
};
a.partial_cmp(&b)
}
}
impl ShopItem for ToolShopItem {
fn price(&self) -> usize {
match self {
ToolShopItem::Tool(tool) => {
TOOL_STATS.get(&tool)
.map(|tool_stats| {
tool_stats.price
})
.unwrap_or(0xFFFF)
},
ToolShopItem::Tech(tech) => {
TECH_STATS.get(&tech.tech)
.map(|tech_stats| {
tech_stats.price * tech.level as usize
})
.unwrap_or(0xFFFF)
}
}
}
fn as_bytes(&self) -> [u8; 12] {
match self {
ToolShopItem::Tool(tool) => {
Tool {
tool: *tool
}.as_individual_bytes()[0..12].try_into().unwrap()
},
ToolShopItem::Tech(tech) => {
tech.as_bytes()[0..12].try_into().unwrap()
},
}
}
fn as_item(&self) -> ItemDetail {
match self {
ToolShopItem::Tool(tool) => {
ItemDetail::Tool(Tool {
tool: *tool
})
},
ToolShopItem::Tech(tech) => {
ItemDetail::TechniqueDisk(*tech)
},
}
}
}
#[derive(Debug, Deserialize)]
struct ToolTable(Vec<ToolType>);
#[derive(Debug, Deserialize, Clone)]
#[serde(untagged)]
enum TechLevel {
Set {
set_level: usize,
},
Level {
level_divisor: usize,
},
Range {
min: usize,
max: usize,
}
}
#[derive(Debug, Deserialize, Clone)]
struct TechEntry {
probability: usize,
#[serde(flatten)]
level: TechLevel,
}
#[derive(Debug, Deserialize)]
struct TechTierDeserialize {
level: usize,
techs: HashMap<String, TechEntry>,
}
#[derive(Debug, Clone)]
struct TechTier {
level: usize,
techs: HashMap<Technique, TechEntry>,
}
#[derive(Debug)]
struct TechTable(Vec<TechTier>);
fn load_tool_table() -> ToolTable {
let path = PathBuf::from("data/shops/tools.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<ToolType>> = toml::from_str(s.as_str()).unwrap();
ToolTable(table.remove("tools".into()).unwrap())
}
fn load_tech_table() -> TechTable {
let path = PathBuf::from("data/shops/techniques.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<TechTierDeserialize>> = toml::from_str(s.as_str()).unwrap();
let techniques = table.remove("techniques".into()).unwrap();
let techniques = techniques.into_iter()
.map(|tech_tier| {
TechTier {
level: tech_tier.level,
techs: tech_tier.techs.into_iter()
.map(|(tech_name, tech_entry)| {
(tech_name.parse().unwrap(), tech_entry)
}).collect()
}
}).collect();
TechTable(techniques)
}
fn number_of_techs_to_generate(character_level: usize) -> usize {
if character_level <= 10 {
4
}
else if character_level <= 25 {
5
}
else if character_level <= 42 {
6
}
else {
7
}
}
#[derive(Debug)]
pub struct ToolShop<R: Rng + SeedableRng> {
tools: ToolTable,
techs: TechTable,
rng: R,
}
impl<R: Rng + SeedableRng> ToolShop<R> {
pub fn new() -> ToolShop<R> {
ToolShop {
tools: load_tool_table(),
techs: load_tech_table(),
rng: R::from_entropy(),
}
}
fn generate_tech(&mut self, character_level: usize) -> ToolShopItem {
let tier = self.techs.0.iter()
.filter(|t| t.level <= character_level)
.last()
.unwrap();
let mut tier = tier.techs.iter()
.map(|(tech, entry)| {
(tech, entry)
});
let tech_choice = WeightedIndex::new(tier.clone().map(|(_, e)| e.probability)).unwrap();
let tech_detail = tier.nth(tech_choice.sample(&mut self.rng)).unwrap();
let tech_level = match tech_detail.1.level {
TechLevel::Set{set_level} => set_level,
TechLevel::Level{level_divisor} => std::cmp::max(std::cmp::min(character_level, 99)/level_divisor, 1),
TechLevel::Range{min, max} => self.rng.gen_range(min, max+1),
};
ToolShopItem::Tech(
TechniqueDisk {
tech: *tech_detail.0,
level: tech_level as u32,
}
)
}
fn generate_tech_types(&mut self, character_level: usize) -> Vec<Technique> {
let tier = self.techs.0.iter()
.filter(|t| t.level <= character_level)
.last()
.unwrap();
let possible_techs = tier.techs.iter()
.filter(|(_, entry)| entry.probability > 0)
.collect::<Vec<_>>();
let number_of_techs = std::cmp::min(possible_techs.len(), number_of_techs_to_generate(character_level));
if number_of_techs == possible_techs.len() {
possible_techs.into_iter()
.map(|(tech, _entry)| {
tech
})
.cloned()
.collect()
}
else {
let mut techs = Vec::new();
let tier = tier.techs.iter()
.map(|(tech, entry)| {
(tech, entry)
})
.collect::<Vec<_>>();
let tech_choice = WeightedIndex::new(tier.iter().map(|(_, e)| e.probability)).unwrap();
while techs.len() < number_of_techs {
let tech_detail = tier.get(tech_choice.sample(&mut self.rng)).unwrap();
if techs.iter().find(|t| *t == tech_detail.0).is_none() {
techs.push(*tech_detail.0);
}
}
techs
}
}
fn generate_techs(&mut self, character_level: usize) -> Vec<ToolShopItem> {
let tier = self.techs.0.iter()
.filter(|t| t.level <= character_level)
.last()
.cloned()
.unwrap();
let tech_types = self.generate_tech_types(character_level);
tech_types.into_iter()
.map(|tech| {
let tech_detail = tier.techs.get(&tech).unwrap().clone();
let level = match tech_detail.level {
TechLevel::Set{set_level} => set_level,
TechLevel::Level{level_divisor} => std::cmp::max(std::cmp::min(character_level, 99)/level_divisor, 1),
TechLevel::Range{min, max} => self.rng.gen_range(min, max+1),
};
ToolShopItem::Tech(TechniqueDisk {
tech: tech,
level: level as u32,
})
})
.collect()
}
pub fn generate_tool_list(&mut self, character_level: usize) -> Vec<ToolShopItem> {
let mut tools = Vec::new().into_iter()
.chain(self.tools.0.clone().into_iter().map(|t| ToolShopItem::Tool(t)))
.chain(self.generate_techs(character_level).into_iter())
.collect::<Vec<_>>();
tools.sort();
tools
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_loading_tool_shop() {
ToolShop::<rand_chacha::ChaCha20Rng>::new();
}
#[test]
fn test_generating_some_tools() {
let mut ts = ToolShop::<rand_chacha::ChaCha20Rng>::new();
for i in 0..200 {
ts.generate_tool_list(i);
}
}
}

526
src/ship/shops/weapon.rs

@ -0,0 +1,526 @@
use std::collections::HashMap;
use std::fs::File;
use std::io::Read;
use std::path::PathBuf;
use std::convert::TryInto;
use serde::Deserialize;
use rand::{Rng, SeedableRng};
use rand::distributions::{WeightedIndex, Distribution};
use rand::seq::{SliceRandom, IteratorRandom};
use crate::entity::character::SectionID;
use crate::ship::room::Difficulty;
use crate::entity::item::ItemDetail;
use crate::entity::item::weapon::{Weapon, WeaponType, WeaponSpecial, Attribute, WeaponAttribute};
use crate::ship::shops::ShopItem;
use crate::ship::item_stats::WEAPON_STATS;
const TIER1_SPECIAL: [WeaponSpecial; 8] = [WeaponSpecial::Draw, WeaponSpecial::Heart, WeaponSpecial::Ice, WeaponSpecial::Bind,
WeaponSpecial::Heat, WeaponSpecial::Shock, WeaponSpecial::Dim, WeaponSpecial::Panic];
const TIER2_SPECIAL: [WeaponSpecial; 10] = [WeaponSpecial::Drain, WeaponSpecial::Mind, WeaponSpecial::Masters, WeaponSpecial::Charge, WeaponSpecial::Frost,
WeaponSpecial::Hold, WeaponSpecial::Fire, WeaponSpecial::Thunder, WeaponSpecial::Shadow, WeaponSpecial::Riot];
#[derive(Debug)]
pub struct WeaponShopItem {
weapon: WeaponType,
special: Option<WeaponSpecial>,
grind: usize,
attributes: [Option<WeaponAttribute>; 2],
}
fn special_stars(special: &WeaponSpecial) -> usize {
match special {
WeaponSpecial::Draw => 1,
WeaponSpecial::Drain => 2,
WeaponSpecial::Fill => 3,
WeaponSpecial::Gush => 4,
WeaponSpecial::Heart => 1,
WeaponSpecial::Mind => 2,
WeaponSpecial::Soul => 3,
WeaponSpecial::Geist => 4,
WeaponSpecial::Masters => 2,
WeaponSpecial::Lords => 3,
WeaponSpecial::Kings => 4,
WeaponSpecial::Charge => 2,
WeaponSpecial::Spirit => 3,
WeaponSpecial::Berserk => 4,
WeaponSpecial::Ice => 1,
WeaponSpecial::Frost => 2,
WeaponSpecial::Freeze => 3,
WeaponSpecial::Blizzard => 4,
WeaponSpecial::Bind => 1,
WeaponSpecial::Hold => 2,
WeaponSpecial::Seize => 3,
WeaponSpecial::Arrest => 4,
WeaponSpecial::Heat => 1,
WeaponSpecial::Fire => 2,
WeaponSpecial::Flame => 3,
WeaponSpecial::Burning => 4,
WeaponSpecial::Shock => 1,
WeaponSpecial::Thunder => 2,
WeaponSpecial::Storm => 3,
WeaponSpecial::Tempest => 4,
WeaponSpecial::Dim => 1,
WeaponSpecial::Shadow => 2,
WeaponSpecial::Dark => 3,
WeaponSpecial::Hell => 4,
WeaponSpecial::Panic => 1,
WeaponSpecial::Riot => 2,
WeaponSpecial::Havoc => 3,
WeaponSpecial::Chaos => 4,
WeaponSpecial::Devils => 3,
WeaponSpecial::Demons => 4,
}
}
impl ShopItem for WeaponShopItem {
fn price(&self) -> usize {
WEAPON_STATS.get(&self.weapon)
.map(|weapon_stat| {
let mut price = weapon_stat.atp_max as f32;
price += self.grind as f32;
price = (price * (price * 3.0)) / weapon_stat.shop_multiplier;
let percent = self.attributes.iter()
.fold(0.0, |acc, attr| {
acc + attr.map(|a| a.value).unwrap_or(0) as f32
});
price = price + ((price / 300.0) * percent);
let special = self.special.map(|special| {
special_stars(&special) as f32
}).unwrap_or(0.0);
price += special * special * 1000.0;
price as usize
})
.unwrap_or(0xFFFF)
}
fn as_bytes(&self) -> [u8; 12] {
self.as_item().as_client_bytes()[0..12].try_into().unwrap()
}
fn as_item(&self) -> ItemDetail {
ItemDetail::Weapon(
Weapon {
weapon: self.weapon,
special: self.special,
grind: self.grind as u8,
attrs: [self.attributes[0], self.attributes[1], None],
tekked: true,
modifiers: Vec::new(),
}
)
}
}
#[derive(Debug, Deserialize)]
struct WeaponTableTierEntry {
weapon: WeaponType,
probability: usize,
}
#[derive(Debug, Deserialize)]
struct WeaponTableTier {
level: usize,
weapons: Vec<WeaponTableTierEntry>,
}
#[derive(Debug)]
struct WeaponTable(Vec<WeaponTableTier>);
#[derive(Debug, Deserialize)]
struct GrindTier {
level: usize,
min: usize,
max: usize,
}
#[derive(Debug)]
struct GrindTable(Vec<GrindTier>);
#[derive(Debug, Deserialize)]
struct AttributeTier {
level: usize,
percent_min: isize,
percent_max: isize,
none: usize,
native: usize,
abeast: usize,
machine: usize,
dark: usize,
hit: usize,
}
#[derive(Debug)]
struct AttributeTable(Vec<AttributeTier>);
#[derive(Debug, Deserialize)]
struct SpecialTierEntry {
tier: usize,
probability: usize,
}
#[derive(Debug, Deserialize)]
struct SpecialTier {
level: usize,
special: Vec<SpecialTierEntry>,
}
#[derive(Debug)]
struct SpecialTable(Vec<SpecialTier>);
/*
trait WeaponTableLoader {
fn load(difficulty: Difficulty, section_id: SectionID) -> WeaponTable where Self::Sized;
}
struct WeaponTableLoaderImpl;
impl WeaponTableLoader for WeaponTableLoaderImpl {
fn load(difficulty: Difficulty, section_id: SectionID) -> WeaponTable {
let mut path = PathBuf::from("data/shops/");
path.push(difficulty.to_string().to_lowercase());
path.push(section_id.to_string().to_lowercase());
path.push("weapon.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s);
let table: Vec<WeaponTableTier> = toml::from_str(s.as_str()).unwrap();
println!("table {:?}", table);
WeaponTable {
}
}
}
*/
fn load_weapon_table(difficulty: Difficulty, section_id: SectionID) -> WeaponTable {
let mut path = PathBuf::from("data/shops/");
path.push(difficulty.to_string().to_lowercase());
path.push(section_id.to_string().to_lowercase());
path.push("weapon.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<WeaponTableTier>> = toml::from_str(s.as_str()).unwrap();
WeaponTable(table.remove("weapon_tier".into()).unwrap())
}
fn load_special_table() -> SpecialTable {
let path = PathBuf::from("data/shops/special.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<SpecialTier>> = toml::from_str(s.as_str()).unwrap();
SpecialTable(table.remove("specials".into()).unwrap())
}
fn load_grind_table() -> GrindTable {
let path = PathBuf::from("data/shops/grind.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<GrindTier>> = toml::from_str(s.as_str()).unwrap();
GrindTable(table.remove("grind".into()).unwrap())
}
fn load_alt_grind_table() -> GrindTable {
let path = PathBuf::from("data/shops/alt_grind.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<GrindTier>> = toml::from_str(s.as_str()).unwrap();
GrindTable(table.remove("grind".into()).unwrap())
}
fn load_attribute1_table() -> AttributeTable {
let path = PathBuf::from("data/shops/attribute1.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<AttributeTier>> = toml::from_str(s.as_str()).unwrap();
AttributeTable(table.remove("attributes".into()).unwrap())
}
fn load_attribute2_table() -> AttributeTable {
let path = PathBuf::from("data/shops/attribute2.toml");
let mut f = File::open(path).unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
let mut table: HashMap<String, Vec<AttributeTier>> = toml::from_str(s.as_str()).unwrap();
AttributeTable(table.remove("attributes".into()).unwrap())
}
fn number_of_weapons_to_generate(character_level: usize) -> usize {
if character_level <= 10 {
10
}
else if character_level <= 42 {
12
}
else {
16
}
}
#[derive(Debug)]
pub struct WeaponShop<R: Rng + SeedableRng> {
difficulty: Difficulty,
section_id: SectionID,
weapon: WeaponTable,
special: SpecialTable,
grind: GrindTable,
alt_grind: GrindTable,
attr1: AttributeTable,
attr2: AttributeTable,
rng: R,
}
impl<R: Rng + SeedableRng> WeaponShop<R> {
pub fn new(difficulty: Difficulty, section_id: SectionID) -> WeaponShop<R> {
WeaponShop {
difficulty: difficulty,
section_id: section_id,
weapon: load_weapon_table(difficulty, section_id),
special: load_special_table(),
grind: load_grind_table(),
alt_grind: load_alt_grind_table(),
attr1: load_attribute1_table(),
attr2: load_attribute2_table(),
rng: R::from_entropy(),
}
}
fn generate_type(&mut self, level: usize) -> WeaponType {
let tier = self.weapon.0.iter()
.filter(|t| t.level <= level)
.last()
.unwrap();
let weapon_choice = WeightedIndex::new(tier.weapons.iter().map(|t| t.probability)).unwrap();
tier.weapons.get(weapon_choice.sample(&mut self.rng)).unwrap().weapon
}
fn generate_special(&mut self, level: usize) -> Option<WeaponSpecial> {
let tier = self.special.0.iter()
.filter(|t| t.level <= level)
.last()
.unwrap();
let special_tier = WeightedIndex::new(tier.special.iter().map(|t| t.probability)).unwrap();
match special_tier.sample(&mut self.rng) {
1 => TIER1_SPECIAL.choose(&mut self.rng).cloned(),
2 => TIER2_SPECIAL.choose(&mut self.rng).cloned(),
_ => None
}
}
fn generate_grind(&mut self, level: usize) -> usize {
let tier = self.grind.0.iter()
.filter(|t| t.level <= level)
.last()
.unwrap();
self.rng.gen_range(tier.min, tier.max+1)
}
fn generate_alt_grind(&mut self, level: usize) -> usize {
let tier = self.alt_grind.0.iter()
.filter(|t| t.level <= level)
.nth(0)
.unwrap();
self.rng.gen_range(tier.min, tier.max+1)
}
fn generate_attribute1(&mut self, level: usize) -> Option<WeaponAttribute> {
let tier = self.attr1.0.iter()
.filter(|t| t.level <= level)
.last()
.unwrap();
let attr_choice = WeightedIndex::new(&[tier.none, tier.native, tier.abeast, tier.machine, tier.dark, tier.hit]).unwrap();
let attr = match attr_choice.sample(&mut self.rng) {
0 => return None,
1 => Attribute::Native,
2 => Attribute::ABeast,
3 => Attribute::Machine,
4 => Attribute::Dark,
5 => Attribute::Hit,
_ => panic!()
};
let percent = (tier.percent_min..tier.percent_max+1)
.filter(|p| p % 5 == 0)
.choose(&mut self.rng)?;
Some(WeaponAttribute {
attr: attr,
value: percent as i8,
})
}
fn generate_attribute2(&mut self, level: usize) -> Option<WeaponAttribute> {
let tier = self.attr2.0.iter()
.filter(|t| t.level <= level)
.last()
.unwrap();
let attr_choice = WeightedIndex::new(&[tier.none, tier.native, tier.abeast, tier.machine, tier.dark, tier.hit]).unwrap();
let attr = match attr_choice.sample(&mut self.rng) {
0 => return None,
1 => Attribute::Native,
2 => Attribute::ABeast,
3 => Attribute::Machine,
4 => Attribute::Dark,
5 => Attribute::Hit,
_ => panic!()
};
let percent = (tier.percent_min..tier.percent_max+1)
.filter(|p| p % 5 == 0)
.choose(&mut self.rng)?;
Some(WeaponAttribute {
attr: attr,
value: percent as i8,
})
}
fn is_alt_grind(&self, weapon: &WeaponType) -> bool {
match (self.section_id, weapon) {
(SectionID::Viridia, WeaponType::Shot) => true,
(SectionID::Viridia, WeaponType::Spread) => true,
(SectionID::Viridia, WeaponType::Cannon) => true,
(SectionID::Viridia, WeaponType::Launcher) => true,
(SectionID::Viridia, WeaponType::Arms) => true,
(SectionID::Greenill, WeaponType::Rifle) => true,
(SectionID::Greenill, WeaponType::Sniper) => true,
(SectionID::Greenill, WeaponType::Blaster) => true,
(SectionID::Greenill, WeaponType::Beam) => true,
(SectionID::Greenill, WeaponType::Laser) => true,
(SectionID::Skyly, WeaponType::Sword) => true,
(SectionID::Skyly, WeaponType::Gigush) => true,
(SectionID::Skyly, WeaponType::Breaker) => true,
(SectionID::Skyly, WeaponType::Claymore) => true,
(SectionID::Skyly, WeaponType::Calibur) => true,
(SectionID::Bluefull, WeaponType::Partisan) => true,
(SectionID::Bluefull, WeaponType::Halbert) => true,
(SectionID::Bluefull, WeaponType::Glaive) => true,
(SectionID::Bluefull, WeaponType::Berdys) => true,
(SectionID::Bluefull, WeaponType::Gungnir) => true,
(SectionID::Purplenum, WeaponType::Mechgun) => true,
(SectionID::Purplenum, WeaponType::Assault) => true,
(SectionID::Purplenum, WeaponType::Repeater) => true,
(SectionID::Purplenum, WeaponType::Gatling) => true,
(SectionID::Purplenum, WeaponType::Vulcan) => true,
(SectionID::Pinkal, WeaponType::Cane) => true,
(SectionID::Pinkal, WeaponType::Stick) => true,
(SectionID::Pinkal, WeaponType::Mace) => true,
(SectionID::Pinkal, WeaponType::Club) => true,
(SectionID::Oran, WeaponType::Dagger) => true,
(SectionID::Oran, WeaponType::Knife) => true,
(SectionID::Oran, WeaponType::Blade) => true,
(SectionID::Oran, WeaponType::Edge) => true,
(SectionID::Oran, WeaponType::Ripper) => true,
(SectionID::Whitill, WeaponType::Slicer) => true,
(SectionID::Whitill, WeaponType::Spinner) => true,
(SectionID::Whitill, WeaponType::Cutter) => true,
(SectionID::Whitill, WeaponType::Sawcer) => true,
(SectionID::Whitill, WeaponType::Diska) => true,
_ => false,
}
}
fn generate_weapon(&mut self, level: usize) -> WeaponShopItem {
let weapon = self.generate_type(level);
let grind = if self.is_alt_grind(&weapon) {
self.generate_alt_grind(level)
} else {
self.generate_grind(level)
};
let special = self.generate_special(level);
let (attr1, attr2) = {
match self.generate_attribute1(level) {
Some(a1) => {
let a2 = loop {
let attr = self.generate_attribute2(level);
match attr {
Some(a2) => {
if a2.attr != a1.attr {
break Some(a2);
}
},
None => break None,
}
};
(Some(a1), a2)
},
None => {
let a2 = self.generate_attribute2(level);
(a2, None)
}
}
};
WeaponShopItem {
weapon: weapon,
grind: grind,
special: special,
attributes: [attr1, attr2],
}
}
pub fn generate_weapon_list(&mut self, level: usize) -> Vec<WeaponShopItem> {
(0..number_of_weapons_to_generate(level))
.map(|_| {
self.generate_weapon(level)
})
.collect()
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_loading_weapon_shop() {
WeaponShop::<rand_chacha::ChaCha20Rng>::new(Difficulty::Ultimate, SectionID::Pinkal);
}
#[test]
fn test_generating_some_weapons() {
let mut ws = WeaponShop::<rand_chacha::ChaCha20Rng>::new(Difficulty::Ultimate, SectionID::Pinkal);
for i in 0..200 {
ws.generate_weapon_list(i);
}
}
}

7
tests/common.rs

@ -6,6 +6,7 @@ use elseware::entity::gateway::EntityGateway;
use elseware::entity::account::{UserAccountEntity, NewUserAccountEntity, NewUserSettingsEntity};
use elseware::entity::character::{CharacterEntity, NewCharacterEntity};
use elseware::ship::ship::{ShipServerState, RecvShipPacket};
use elseware::ship::room::Difficulty;
use libpso::packet::ship::*;
use libpso::packet::login::{Login, Session};
@ -58,11 +59,15 @@ pub async fn join_lobby<EG: EntityGateway>(ship: &mut ShipServerState<EG>, id: C
}
pub async fn create_room<EG: EntityGateway>(ship: &mut ShipServerState<EG>, id: ClientId, name: &str, password: &str) {
create_room_with_difficulty(ship, id, name, password, Difficulty::Normal).await;
}
pub async fn create_room_with_difficulty<EG: EntityGateway>(ship: &mut ShipServerState<EG>, id: ClientId, name: &str, password: &str, difficulty: Difficulty) {
ship.handle(id, &RecvShipPacket::CreateRoom(CreateRoom {
unknown: [0; 2],
name: utf8_to_utf16_array!(name, 16),
password: utf8_to_utf16_array!(password, 16),
difficulty: 0,
difficulty: difficulty.into(),
battle: 0,
challenge: 0,
episode: 1,

564
tests/test_shops.rs

@ -0,0 +1,564 @@
use elseware::common::serverstate::{ClientId, ServerState};
use elseware::entity::gateway::{EntityGateway, InMemoryGateway};
use elseware::entity::item;
use elseware::ship::ship::{ShipServerState, RecvShipPacket, SendShipPacket};
use elseware::ship::room::Difficulty;
use libpso::packet::ship::*;
use libpso::packet::messages::*;
#[path = "common.rs"]
mod common;
use common::*;
#[async_std::test]
async fn test_player_opens_weapon_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (_user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 1
})))).await.unwrap().collect::<Vec<_>>();
assert_eq!(packets.len(), 1);
match &packets[0].1 {
SendShipPacket::Message(Message {msg: GameMessage::ShopList(shop_list)}) => {
assert_eq!(shop_list.items.len(), 16)
}
_ => panic!("")
}
}
#[async_std::test]
async fn test_player_opens_tool_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (_user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 0
})))).await.unwrap().collect::<Vec<_>>();
assert_eq!(packets.len(), 1);
match &packets[0].1 {
SendShipPacket::Message(Message {msg: GameMessage::ShopList(shop_list)}) => {
assert_eq!(shop_list.items.len(), 18)
}
_ => panic!("")
}
}
#[async_std::test]
async fn test_player_opens_armor_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (_user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 2
})))).await.unwrap().collect::<Vec<_>>();
assert_eq!(packets.len(), 1);
match &packets[0].1 {
SendShipPacket::Message(Message {msg: GameMessage::ShopList(shop_list)}) => {
assert_eq!(shop_list.items.len(), 21)
}
_ => panic!("")
}
}
#[async_std::test]
async fn test_player_buys_from_weapon_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 1
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 1,
shop_index: 0,
amount: 1,
unknown1: 0,
})))).await.unwrap().for_each(drop);
let characters1 = entity_gateway.get_characters_by_user(&user1).await;
let c1 = characters1.get(0).as_ref().unwrap().as_ref().unwrap();
assert!(c1.meseta < 999999);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert_eq!(p1_items.len(), 1);
}
#[async_std::test]
async fn test_player_buys_from_tool_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 0,
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 0,
shop_index: 0,
amount: 1,
unknown1: 0,
})))).await.unwrap().for_each(drop);
let characters1 = entity_gateway.get_characters_by_user(&user1).await;
let c1 = characters1.get(0).as_ref().unwrap().as_ref().unwrap();
assert!(c1.meseta < 999999);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert_eq!(p1_items.len(), 1);
}
#[async_std::test]
async fn test_player_buys_multiple_from_tool_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 0,
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 0,
shop_index: 0,
amount: 5,
unknown1: 0,
})))).await.unwrap().for_each(drop);
let characters1 = entity_gateway.get_characters_by_user(&user1).await;
let c1 = characters1.get(0).as_ref().unwrap().as_ref().unwrap();
assert!(c1.meseta < 999999);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert_eq!(p1_items.len(), 5);
}
#[async_std::test]
async fn test_player_buys_from_armor_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 2
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 2,
shop_index: 0,
amount: 1,
unknown1: 0,
})))).await.unwrap().for_each(drop);
let characters1 = entity_gateway.get_characters_by_user(&user1).await;
let c1 = characters1.get(0).as_ref().unwrap().as_ref().unwrap();
assert!(c1.meseta < 999999);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert_eq!(p1_items.len(), 1);
}
#[async_std::test]
async fn test_player_sells_to_shop() {
}
#[async_std::test]
async fn test_other_clients_see_purchase() {
let mut entity_gateway = InMemoryGateway::new();
let (_user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
let (_user2, _char2) = new_user_character(&mut entity_gateway, "a2", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
log_in_char(&mut ship, ClientId(2), "a2", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
join_lobby(&mut ship, ClientId(2)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
join_room(&mut ship, ClientId(2), 0).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 1
})))).await.unwrap().for_each(drop);
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 1,
shop_index: 0,
amount: 1,
unknown1: 0,
})))).await.unwrap().collect::<Vec<_>>();
assert_eq!(packets.len(), 1);
assert_eq!(packets[0].0, ClientId(2));
match &packets[0].1 {
SendShipPacket::Message(Message{msg: GameMessage::CreateItem(_)}) => {},
_ => panic!(""),
}
}
#[async_std::test]
async fn test_other_clients_see_stacked_purchase() {
let mut entity_gateway = InMemoryGateway::new();
let (_user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
let (_user2, _char2) = new_user_character(&mut entity_gateway, "a2", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
entity_gateway.create_item(
item::NewItemEntity {
item: item::ItemDetail::Tool(
item::tool::Tool {
tool: item::tool::ToolType::Monomate
}
),
location: item::ItemLocation::Inventory {
character_id: char1.id,
slot: 0,
equipped: false,
}
}).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
log_in_char(&mut ship, ClientId(2), "a2", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
join_lobby(&mut ship, ClientId(2)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
join_room(&mut ship, ClientId(2), 0).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 1
})))).await.unwrap().for_each(drop);
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 1,
shop_index: 0,
amount: 1,
unknown1: 0,
})))).await.unwrap().collect::<Vec<_>>();
assert_eq!(packets.len(), 1);
assert_eq!(packets[0].0, ClientId(2));
match &packets[0].1 {
SendShipPacket::Message(Message{msg: GameMessage::CreateItem(_)}) => {},
_ => panic!(""),
}
}
#[async_std::test]
async fn test_buying_item_without_enough_mseseta() {
let mut entity_gateway = InMemoryGateway::new();
let (user1, char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 1
})))).await.unwrap().for_each(drop);
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 1,
shop_index: 0,
amount: 1,
unknown1: 0,
})))).await;
assert!(packets.is_err());
let characters1 = entity_gateway.get_characters_by_user(&user1).await;
let c1 = characters1.get(0).as_ref().unwrap().as_ref().unwrap();
assert_eq!(c1.meseta, 0);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert_eq!(p1_items.len(), 0);
}
#[async_std::test]
async fn test_player_double_buys_from_tool_shop() {
let mut entity_gateway = InMemoryGateway::new();
let (user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 0,
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 0,
shop_index: 0,
amount: 3,
unknown1: 0,
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10001,
shop_type: 0,
shop_index: 1,
amount: 2,
unknown1: 0,
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10002,
shop_type: 0,
shop_index: 0,
amount: 4,
unknown1: 0,
})))).await.unwrap().for_each(drop);
let characters1 = entity_gateway.get_characters_by_user(&user1).await;
let c1 = characters1.get(0).as_ref().unwrap().as_ref().unwrap();
assert!(c1.meseta < 999999);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert_eq!(p1_items.len(), 9);
}
#[async_std::test]
async fn test_techs_disappear_from_shop_when_bought() {
let mut entity_gateway = InMemoryGateway::new();
let (_user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 0,
})))).await.unwrap().collect::<Vec<_>>();
let first_tech = match &packets[0].1 {
SendShipPacket::Message(Message {msg: GameMessage::ShopList(shop_list)}) => {
shop_list.items.iter()
.enumerate()
.filter(|(_, item)| {
item.item_bytes[0] == 3 && item.item_bytes[1] == 2
})
.nth(0).unwrap().0
},
_ => panic!(""),
};
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 0,
shop_index: first_tech as u8,
amount: 1,
unknown1: 0,
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10001,
shop_type: 0,
shop_index: first_tech as u8,
amount: 1,
unknown1: 0,
})))).await.unwrap().for_each(drop);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert!(p1_items[0].item != p1_items[1].item);
}
#[async_std::test]
async fn test_units_disappear_from_shop_when_bought() {
let mut entity_gateway = InMemoryGateway::new();
let (_user1, mut char1) = new_user_character(&mut entity_gateway, "a1", "a").await;
char1.exp = 80000000;
char1.meseta = 999999;
entity_gateway.save_character(&char1).await;
let mut ship = ShipServerState::builder()
.gateway(entity_gateway.clone())
.build();
log_in_char(&mut ship, ClientId(1), "a1", "a").await;
join_lobby(&mut ship, ClientId(1)).await;
create_room_with_difficulty(&mut ship, ClientId(1), "room", "", Difficulty::Ultimate).await;
let packets = ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::ShopRequest(ShopRequest {
client: 255,
target: 255,
shop_type: 2,
})))).await.unwrap().collect::<Vec<_>>();
let first_unit = match &packets[0].1 {
SendShipPacket::Message(Message {msg: GameMessage::ShopList(shop_list)}) => {
shop_list.items.iter()
.enumerate()
.filter(|(_, item)| {
item.item_bytes[0] == 1 && item.item_bytes[1] == 3
})
.nth(0).unwrap().0
},
_ => panic!(""),
};
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10000,
shop_type: 2,
shop_index: first_unit as u8,
amount: 1,
unknown1: 0,
})))).await.unwrap().for_each(drop);
ship.handle(ClientId(1), &RecvShipPacket::DirectMessage(DirectMessage::new(0, GameMessage::BuyItem(BuyItem {
client: 255,
target: 255,
item_id: 0x10001,
shop_type: 2,
shop_index: first_unit as u8,
amount: 1,
unknown1: 0,
})))).await.unwrap().for_each(drop);
let p1_items = entity_gateway.get_items_by_character(&char1).await;
assert!(p1_items[0].item != p1_items[1].item);
}
Loading…
Cancel
Save