Ver código fonte

Merge branch 'gui' into dev

Ivan Arkhipov 6 anos atrás
pai
commit
7a12b6a16a
84 arquivos alterados com 1204 adições e 194 exclusões
  1. BIN
      assets/pvp_intro/picture.jpg
  2. 1 1
      assets/units/human/atraty-rider/nextgrades.txt
  3. BIN
      assets/units/human/human-archer/icon.png
  4. 1 1
      assets/units/human/human-demolisher/nextgrades.txt
  5. 1 1
      assets/units/human/human-mage/nextgrades.txt
  6. BIN
      assets/units/human/human-rogue/icon.png
  7. 1 1
      assets/units/races.txt
  8. 1 0
      assets/units/warcraft/blademaster/baseclass.txt
  9. 1 0
      assets/units/warcraft/blademaster/descr.txt
  10. 1 0
      assets/units/warcraft/blademaster/nextgrades.txt
  11. 0 0
      assets/units/warcraft/blademaster/prevgrades.txt
  12. 1 0
      assets/units/warcraft/blademaster/skills.txt
  13. 1 0
      assets/units/warcraft/blademaster/traits.txt
  14. 1 0
      assets/units/warcraft/blademaster/unitname.txt
  15. 1 0
      assets/units/warcraft/chaosorc/baseclass.txt
  16. 1 0
      assets/units/warcraft/chaosorc/descr.txt
  17. 2 0
      assets/units/warcraft/chaosorc/nextgrades.txt
  18. 2 0
      assets/units/warcraft/chaosorc/prevgrades.txt
  19. 1 0
      assets/units/warcraft/chaosorc/skills.txt
  20. 1 0
      assets/units/warcraft/chaosorc/traits.txt
  21. 1 0
      assets/units/warcraft/chaosorc/unitname.txt
  22. 6 0
      assets/units/warcraft/descr.txt
  23. 1 0
      assets/units/warcraft/nagasummoner/baseclass.txt
  24. 1 0
      assets/units/warcraft/nagasummoner/descr.txt
  25. 1 0
      assets/units/warcraft/nagasummoner/nextgrades.txt
  26. 0 0
      assets/units/warcraft/nagasummoner/prevgrades.txt
  27. 1 0
      assets/units/warcraft/nagasummoner/skills.txt
  28. 1 0
      assets/units/warcraft/nagasummoner/traits.txt
  29. 1 0
      assets/units/warcraft/nagasummoner/unitname.txt
  30. 1 0
      assets/units/warcraft/necromancer/baseclass.txt
  31. 1 0
      assets/units/warcraft/necromancer/descr.txt
  32. 0 0
      assets/units/warcraft/necromancer/nextgrades.txt
  33. 1 0
      assets/units/warcraft/necromancer/prevgrades.txt
  34. 1 0
      assets/units/warcraft/necromancer/skills.txt
  35. 1 0
      assets/units/warcraft/necromancer/traits.txt
  36. 1 0
      assets/units/warcraft/necromancer/unitname.txt
  37. 1 0
      assets/units/warcraft/ogremagi/baseclass.txt
  38. 1 0
      assets/units/warcraft/ogremagi/descr.txt
  39. 0 0
      assets/units/warcraft/ogremagi/nextgrades.txt
  40. 1 0
      assets/units/warcraft/ogremagi/prevgrades.txt
  41. 1 0
      assets/units/warcraft/ogremagi/skills.txt
  42. 1 0
      assets/units/warcraft/ogremagi/traits.txt
  43. 1 0
      assets/units/warcraft/ogremagi/unitname.txt
  44. 1 1
      assets/units/warcraft/racename.txt
  45. 1 0
      assets/units/warcraft/rogue/baseclass.txt
  46. 1 0
      assets/units/warcraft/rogue/descr.txt
  47. 0 0
      assets/units/warcraft/rogue/nextgrades.txt
  48. 1 0
      assets/units/warcraft/rogue/prevgrades.txt
  49. 1 0
      assets/units/warcraft/rogue/skills.txt
  50. 1 0
      assets/units/warcraft/rogue/traits.txt
  51. 1 0
      assets/units/warcraft/rogue/unitname.txt
  52. 4 0
      assets/units/warcraft/units.txt
  53. 1 0
      assets/units/warcraft/wargraider/baseclass.txt
  54. 1 0
      assets/units/warcraft/wargraider/descr.txt
  55. 0 0
      assets/units/warcraft/wargraider/nextgrades.txt
  56. 0 0
      assets/units/warcraft/wargraider/prevgrades.txt
  57. 1 0
      assets/units/warcraft/wargraider/skills.txt
  58. 1 0
      assets/units/warcraft/wargraider/traits.txt
  59. 1 0
      assets/units/warcraft/wargraider/unitname.txt
  60. 1 0
      assets/units/warcraft/wyvern/baseclass.txt
  61. 1 0
      assets/units/warcraft/wyvern/descr.txt
  62. 0 0
      assets/units/warcraft/wyvern/nextgrades.txt
  63. 0 0
      assets/units/warcraft/wyvern/prevgrades.txt
  64. 1 0
      assets/units/warcraft/wyvern/skills.txt
  65. 1 0
      assets/units/warcraft/wyvern/traits.txt
  66. 1 0
      assets/units/warcraft/wyvern/unitname.txt
  67. 483 1
      gui.qrc
  68. 1 1
      include/gui/playervsplayerintro.ui
  69. 15 12
      include/gui/raceicon.h
  70. 37 1
      include/gui/recruitmentscene.h
  71. 74 78
      include/gui/recruitmentscene.ui
  72. 1 1
      include/gui/scene.h
  73. 10 4
      include/gui/uniticon.h
  74. 43 4
      include/player.h
  75. 8 4
      include/units/unit.h
  76. 1 1
      source/gui/gui.cpp
  77. 1 1
      source/gui/guiscenemanager.cpp
  78. 1 1
      source/gui/playervsplayerintro.cpp
  79. 38 22
      source/gui/raceicon.cpp
  80. 342 26
      source/gui/recruitmentscene.cpp
  81. 34 16
      source/gui/uniticon.cpp
  82. 20 8
      source/race.cpp
  83. 13 1
      source/racemanager.cpp
  84. 18 7
      source/units/unit.cpp

BIN
assets/pvp_intro/picture.jpg


+ 1 - 1
assets/units/human/atraty-rider/nextgrades.txt

@@ -1 +1 @@
-warlord
+human-warlord

BIN
assets/units/human/human-archer/icon.png


+ 1 - 1
assets/units/human/human-demolisher/nextgrades.txt

@@ -1 +1 @@
-warlord
+human-warlord

+ 1 - 1
assets/units/human/human-mage/nextgrades.txt

@@ -1,3 +1,3 @@
-human-attack-mage
+human-battle-mage
 human-healer
 human-support-mage

BIN
assets/units/human/human-rogue/icon.png


+ 1 - 1
assets/units/races.txt

@@ -1,2 +1,2 @@
-warcraft
 human
+warcraft

+ 1 - 0
assets/units/warcraft/blademaster/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/blademaster/descr.txt

@@ -0,0 +1 @@
+Мастер клинка, мать его!!!

+ 1 - 0
assets/units/warcraft/blademaster/nextgrades.txt

@@ -0,0 +1 @@
+chaosorc

+ 0 - 0
assets/units/warcraft/blademaster/prevgrades.txt


+ 1 - 0
assets/units/warcraft/blademaster/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/blademaster/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/blademaster/unitname.txt

@@ -0,0 +1 @@
+锑耱屦 孰桧赅

+ 1 - 0
assets/units/warcraft/chaosorc/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/chaosorc/descr.txt

@@ -0,0 +1 @@
+ЭТО ОРК!!!!!!!!!!!!!!

+ 2 - 0
assets/units/warcraft/chaosorc/nextgrades.txt

@@ -0,0 +1,2 @@
+ogremagi
+rogue

+ 2 - 0
assets/units/warcraft/chaosorc/prevgrades.txt

@@ -0,0 +1,2 @@
+blademaster
+wargraider

+ 1 - 0
assets/units/warcraft/chaosorc/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/chaosorc/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/chaosorc/unitname.txt

@@ -0,0 +1 @@
+腻祛龛麇耜栝 铕�

+ 6 - 0
assets/units/warcraft/descr.txt

@@ -0,0 +1,6 @@
+ЛОК-ТАР-ОГАР ВОИНЫ!
+ЗА ЧЕСТЬ!
+Я ВОЖДЬ!
+ЗА ЛОРДЕРОН!
+ЗА МОЕГО ОТЦА!!
+Ну и прочие прелести мира Warcraft

+ 1 - 0
assets/units/warcraft/nagasummoner/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/nagasummoner/descr.txt

@@ -0,0 +1 @@
+Самая клёвая рыбка на всём Средиземноморье

+ 1 - 0
assets/units/warcraft/nagasummoner/nextgrades.txt

@@ -0,0 +1 @@
+necromancer

+ 0 - 0
assets/units/warcraft/nagasummoner/prevgrades.txt


+ 1 - 0
assets/units/warcraft/nagasummoner/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/nagasummoner/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/nagasummoner/unitname.txt

@@ -0,0 +1 @@
+Нага-призывательница

+ 1 - 0
assets/units/warcraft/necromancer/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/necromancer/descr.txt

@@ -0,0 +1 @@
+Оживит любого мертвеца бесплатно и без регистрации

+ 0 - 0
assets/units/warcraft/necromancer/nextgrades.txt


+ 1 - 0
assets/units/warcraft/necromancer/prevgrades.txt

@@ -0,0 +1 @@
+nagasummoner

+ 1 - 0
assets/units/warcraft/necromancer/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/necromancer/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/necromancer/unitname.txt

@@ -0,0 +1 @@
+Некромант

+ 1 - 0
assets/units/warcraft/ogremagi/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/ogremagi/descr.txt

@@ -0,0 +1 @@
+А Я ЕЩЁ ЖИВОЙ! Я СИНИЙ ОГР-МАГ И РАСКИДЫВАЮ СТАНЫ!

+ 0 - 0
assets/units/warcraft/ogremagi/nextgrades.txt


+ 1 - 0
assets/units/warcraft/ogremagi/prevgrades.txt

@@ -0,0 +1 @@
+chaosorc

+ 1 - 0
assets/units/warcraft/ogremagi/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/ogremagi/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/ogremagi/unitname.txt

@@ -0,0 +1 @@
+�דנ-לאד

+ 1 - 1
assets/units/warcraft/racename.txt

@@ -1 +1 @@
-锣痍疣趄
+Warcraft

+ 1 - 0
assets/units/warcraft/rogue/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/rogue/descr.txt

@@ -0,0 +1 @@
+Хз, почему наследуется от Орка. Просто клёвый харизматичный чувак

+ 0 - 0
assets/units/warcraft/rogue/nextgrades.txt


+ 1 - 0
assets/units/warcraft/rogue/prevgrades.txt

@@ -0,0 +1 @@
+chaosorc

+ 1 - 0
assets/units/warcraft/rogue/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/rogue/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/rogue/unitname.txt

@@ -0,0 +1 @@
+�אחבמיםטך

+ 4 - 0
assets/units/warcraft/units.txt

@@ -0,0 +1,4 @@
+blademaster
+nagasummoner
+wargraider
+wyvern

+ 1 - 0
assets/units/warcraft/wargraider/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/wargraider/descr.txt

@@ -0,0 +1 @@
+Всадник. На волке. 

+ 0 - 0
assets/units/warcraft/wargraider/nextgrades.txt


+ 0 - 0
assets/units/warcraft/wargraider/prevgrades.txt


+ 1 - 0
assets/units/warcraft/wargraider/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/wargraider/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/wargraider/unitname.txt

@@ -0,0 +1 @@
+Волчий всадник

+ 1 - 0
assets/units/warcraft/wyvern/baseclass.txt

@@ -0,0 +1 @@
+Rider

+ 1 - 0
assets/units/warcraft/wyvern/descr.txt

@@ -0,0 +1 @@
+Самая высоко летающая виверна на Диком Западе.

+ 0 - 0
assets/units/warcraft/wyvern/nextgrades.txt


+ 0 - 0
assets/units/warcraft/wyvern/prevgrades.txt


+ 1 - 0
assets/units/warcraft/wyvern/skills.txt

@@ -0,0 +1 @@
+This unit can nothing :(

+ 1 - 0
assets/units/warcraft/wyvern/traits.txt

@@ -0,0 +1 @@
+This class is empty like ur soul!

+ 1 - 0
assets/units/warcraft/wyvern/unitname.txt

@@ -0,0 +1 @@
+Виверна

+ 483 - 1
gui.qrc

@@ -5,17 +5,500 @@
         <file>assets/common/unit_icon_active.png</file>
         <file>assets/common/unit_icon_default.png</file>
         <file>assets/common/unit_icon_hover.png</file>
+        <file>assets/pvp_intro/picture.jpg</file>
         <file>assets/recruitscene/divider.png</file>
+        <file>assets/units/human/atraty-rider/baseclass.txt</file>
+        <file>assets/units/human/atraty-rider/descr.txt</file>
+        <file>assets/units/human/atraty-rider/icon.png</file>
+        <file>assets/units/human/atraty-rider/nextgrades.txt</file>
+        <file>assets/units/human/atraty-rider/prevgrades.txt</file>
+        <file>assets/units/human/atraty-rider/skills.txt</file>
+        <file>assets/units/human/atraty-rider/traits.txt</file>
+        <file>assets/units/human/atraty-rider/unitname.txt</file>
+        <file>assets/units/human/holy-spirit/baseclass.txt</file>
+        <file>assets/units/human/holy-spirit/descr.txt</file>
+        <file>assets/units/human/holy-spirit/icon.png</file>
+        <file>assets/units/human/holy-spirit/nextgrades.txt</file>
+        <file>assets/units/human/holy-spirit/prevgrades.txt</file>
+        <file>assets/units/human/holy-spirit/skills.txt</file>
+        <file>assets/units/human/holy-spirit/traits.txt</file>
+        <file>assets/units/human/holy-spirit/unitname.txt</file>
+        <file>assets/units/human/human-aerotheurger/baseclass.txt</file>
+        <file>assets/units/human/human-aerotheurger/descr.txt</file>
+        <file>assets/units/human/human-aerotheurger/icon.png</file>
+        <file>assets/units/human/human-aerotheurger/nextgrades.txt</file>
+        <file>assets/units/human/human-aerotheurger/prevgrades.txt</file>
+        <file>assets/units/human/human-aerotheurger/skills.txt</file>
+        <file>assets/units/human/human-aerotheurger/traits.txt</file>
+        <file>assets/units/human/human-aerotheurger/unitname.txt</file>
+        <file>assets/units/human/human-alchemist/baseclass.txt</file>
+        <file>assets/units/human/human-alchemist/descr.txt</file>
+        <file>assets/units/human/human-alchemist/icon.png</file>
+        <file>assets/units/human/human-alchemist/nextgrades.txt</file>
+        <file>assets/units/human/human-alchemist/prevgrades.txt</file>
+        <file>assets/units/human/human-alchemist/skills.txt</file>
+        <file>assets/units/human/human-alchemist/traits.txt</file>
+        <file>assets/units/human/human-alchemist/unitname.txt</file>
+        <file>assets/units/human/human-archer/baseclass.txt</file>
+        <file>assets/units/human/human-archer/descr.txt</file>
+        <file>assets/units/human/human-archer/icon.png</file>
+        <file>assets/units/human/human-archer/nextgrades.txt</file>
+        <file>assets/units/human/human-archer/prevgrades.txt</file>
+        <file>assets/units/human/human-archer/skills.txt</file>
+        <file>assets/units/human/human-archer/traits.txt</file>
+        <file>assets/units/human/human-archer/unitname.txt</file>
+        <file>assets/units/human/human-arsonist/baseclass.txt</file>
+        <file>assets/units/human/human-arsonist/descr.txt</file>
+        <file>assets/units/human/human-arsonist/icon.png</file>
+        <file>assets/units/human/human-arsonist/nextgrades.txt</file>
+        <file>assets/units/human/human-arsonist/prevgrades.txt</file>
+        <file>assets/units/human/human-arsonist/skills.txt</file>
+        <file>assets/units/human/human-arsonist/traits.txt</file>
+        <file>assets/units/human/human-arsonist/unitname.txt</file>
+        <file>assets/units/human/human-avenger/baseclass.txt</file>
+        <file>assets/units/human/human-avenger/descr.txt</file>
+        <file>assets/units/human/human-avenger/icon.png</file>
+        <file>assets/units/human/human-avenger/nextgrades.txt</file>
+        <file>assets/units/human/human-avenger/prevgrades.txt</file>
+        <file>assets/units/human/human-avenger/skills.txt</file>
+        <file>assets/units/human/human-avenger/traits.txt</file>
+        <file>assets/units/human/human-avenger/unitname.txt</file>
+        <file>assets/units/human/human-battle-mage/baseclass.txt</file>
+        <file>assets/units/human/human-battle-mage/descr.txt</file>
+        <file>assets/units/human/human-battle-mage/icon.png</file>
+        <file>assets/units/human/human-battle-mage/nextgrades.txt</file>
+        <file>assets/units/human/human-battle-mage/prevgrades.txt</file>
+        <file>assets/units/human/human-battle-mage/skills.txt</file>
+        <file>assets/units/human/human-battle-mage/traits.txt</file>
+        <file>assets/units/human/human-battle-mage/unitname.txt</file>
+        <file>assets/units/human/human-berserker/baseclass.txt</file>
+        <file>assets/units/human/human-berserker/descr.txt</file>
+        <file>assets/units/human/human-berserker/icon.png</file>
+        <file>assets/units/human/human-berserker/nextgrades.txt</file>
+        <file>assets/units/human/human-berserker/prevgrades.txt</file>
+        <file>assets/units/human/human-berserker/skills.txt</file>
+        <file>assets/units/human/human-berserker/traits.txt</file>
+        <file>assets/units/human/human-berserker/unitname.txt</file>
+        <file>assets/units/human/human-cataphract/baseclass.txt</file>
+        <file>assets/units/human/human-cataphract/descr.txt</file>
+        <file>assets/units/human/human-cataphract/icon.png</file>
+        <file>assets/units/human/human-cataphract/nextgrades.txt</file>
+        <file>assets/units/human/human-cataphract/prevgrades.txt</file>
+        <file>assets/units/human/human-cataphract/skills.txt</file>
+        <file>assets/units/human/human-cataphract/traits.txt</file>
+        <file>assets/units/human/human-cataphract/unitname.txt</file>
+        <file>assets/units/human/human-cavalryman/baseclass.txt</file>
+        <file>assets/units/human/human-cavalryman/descr.txt</file>
+        <file>assets/units/human/human-cavalryman/icon.png</file>
+        <file>assets/units/human/human-cavalryman/nextgrades.txt</file>
+        <file>assets/units/human/human-cavalryman/prevgrades.txt</file>
+        <file>assets/units/human/human-cavalryman/skills.txt</file>
+        <file>assets/units/human/human-cavalryman/traits.txt</file>
+        <file>assets/units/human/human-cavalryman/unitname.txt</file>
+        <file>assets/units/human/human-chastener/baseclass.txt</file>
+        <file>assets/units/human/human-chastener/descr.txt</file>
+        <file>assets/units/human/human-chastener/icon.png</file>
+        <file>assets/units/human/human-chastener/nextgrades.txt</file>
+        <file>assets/units/human/human-chastener/prevgrades.txt</file>
+        <file>assets/units/human/human-chastener/skills.txt</file>
+        <file>assets/units/human/human-chastener/traits.txt</file>
+        <file>assets/units/human/human-chastener/unitname.txt</file>
+        <file>assets/units/human/human-cleric/baseclass.txt</file>
+        <file>assets/units/human/human-cleric/descr.txt</file>
+        <file>assets/units/human/human-cleric/icon.png</file>
+        <file>assets/units/human/human-cleric/nextgrades.txt</file>
+        <file>assets/units/human/human-cleric/prevgrades.txt</file>
+        <file>assets/units/human/human-cleric/skills.txt</file>
+        <file>assets/units/human/human-cleric/traits.txt</file>
+        <file>assets/units/human/human-cleric/unitname.txt</file>
+        <file>assets/units/human/human-clinicaria/baseclass.txt</file>
+        <file>assets/units/human/human-clinicaria/descr.txt</file>
+        <file>assets/units/human/human-clinicaria/icon.png</file>
+        <file>assets/units/human/human-clinicaria/nextgrades.txt</file>
+        <file>assets/units/human/human-clinicaria/prevgrades.txt</file>
+        <file>assets/units/human/human-clinicaria/skills.txt</file>
+        <file>assets/units/human/human-clinicaria/traits.txt</file>
+        <file>assets/units/human/human-clinicaria/unitname.txt</file>
+        <file>assets/units/human/human-condottier/baseclass.txt</file>
+        <file>assets/units/human/human-condottier/descr.txt</file>
+        <file>assets/units/human/human-condottier/icon.png</file>
+        <file>assets/units/human/human-condottier/nextgrades.txt</file>
+        <file>assets/units/human/human-condottier/prevgrades.txt</file>
+        <file>assets/units/human/human-condottier/skills.txt</file>
+        <file>assets/units/human/human-condottier/traits.txt</file>
+        <file>assets/units/human/human-condottier/unitname.txt</file>
+        <file>assets/units/human/human-defender/baseclass.txt</file>
+        <file>assets/units/human/human-defender/descr.txt</file>
+        <file>assets/units/human/human-defender/icon.png</file>
+        <file>assets/units/human/human-defender/nextgrades.txt</file>
+        <file>assets/units/human/human-defender/prevgrades.txt</file>
+        <file>assets/units/human/human-defender/skills.txt</file>
+        <file>assets/units/human/human-defender/traits.txt</file>
+        <file>assets/units/human/human-defender/unitname.txt</file>
+        <file>assets/units/human/human-demolisher/baseclass.txt</file>
+        <file>assets/units/human/human-demolisher/descr.txt</file>
+        <file>assets/units/human/human-demolisher/icon.png</file>
+        <file>assets/units/human/human-demolisher/nextgrades.txt</file>
+        <file>assets/units/human/human-demolisher/prevgrades.txt</file>
+        <file>assets/units/human/human-demolisher/skills.txt</file>
+        <file>assets/units/human/human-demolisher/traits.txt</file>
+        <file>assets/units/human/human-demolisher/unitname.txt</file>
+        <file>assets/units/human/human-druid/baseclass.txt</file>
+        <file>assets/units/human/human-druid/descr.txt</file>
+        <file>assets/units/human/human-druid/icon.png</file>
+        <file>assets/units/human/human-druid/nextgrades.txt</file>
+        <file>assets/units/human/human-druid/prevgrades.txt</file>
+        <file>assets/units/human/human-druid/skills.txt</file>
+        <file>assets/units/human/human-druid/traits.txt</file>
+        <file>assets/units/human/human-druid/unitname.txt</file>
+        <file>assets/units/human/human-duelist/baseclass.txt</file>
+        <file>assets/units/human/human-duelist/descr.txt</file>
+        <file>assets/units/human/human-duelist/icon.png</file>
+        <file>assets/units/human/human-duelist/nextgrades.txt</file>
+        <file>assets/units/human/human-duelist/prevgrades.txt</file>
+        <file>assets/units/human/human-duelist/skills.txt</file>
+        <file>assets/units/human/human-duelist/traits.txt</file>
+        <file>assets/units/human/human-duelist/unitname.txt</file>
+        <file>assets/units/human/human-fencer/baseclass.txt</file>
+        <file>assets/units/human/human-fencer/descr.txt</file>
+        <file>assets/units/human/human-fencer/icon.png</file>
+        <file>assets/units/human/human-fencer/nextgrades.txt</file>
+        <file>assets/units/human/human-fencer/prevgrades.txt</file>
+        <file>assets/units/human/human-fencer/skills.txt</file>
+        <file>assets/units/human/human-fencer/traits.txt</file>
+        <file>assets/units/human/human-fencer/unitname.txt</file>
+        <file>assets/units/human/human-floromante/baseclass.txt</file>
+        <file>assets/units/human/human-floromante/descr.txt</file>
+        <file>assets/units/human/human-floromante/icon.png</file>
+        <file>assets/units/human/human-floromante/nextgrades.txt</file>
+        <file>assets/units/human/human-floromante/prevgrades.txt</file>
+        <file>assets/units/human/human-floromante/skills.txt</file>
+        <file>assets/units/human/human-floromante/traits.txt</file>
+        <file>assets/units/human/human-floromante/unitname.txt</file>
+        <file>assets/units/human/human-frost-mage/baseclass.txt</file>
+        <file>assets/units/human/human-frost-mage/descr.txt</file>
+        <file>assets/units/human/human-frost-mage/icon.png</file>
+        <file>assets/units/human/human-frost-mage/nextgrades.txt</file>
+        <file>assets/units/human/human-frost-mage/prevgrades.txt</file>
+        <file>assets/units/human/human-frost-mage/skills.txt</file>
+        <file>assets/units/human/human-frost-mage/traits.txt</file>
+        <file>assets/units/human/human-frost-mage/unitname.txt</file>
+        <file>assets/units/human/human-guardian/baseclass.txt</file>
+        <file>assets/units/human/human-guardian/descr.txt</file>
+        <file>assets/units/human/human-guardian/icon.png</file>
+        <file>assets/units/human/human-guardian/nextgrades.txt</file>
+        <file>assets/units/human/human-guardian/prevgrades.txt</file>
+        <file>assets/units/human/human-guardian/skills.txt</file>
+        <file>assets/units/human/human-guardian/traits.txt</file>
+        <file>assets/units/human/human-guardian/unitname.txt</file>
+        <file>assets/units/human/human-healer/baseclass.txt</file>
+        <file>assets/units/human/human-healer/descr.txt</file>
+        <file>assets/units/human/human-healer/icon.png</file>
+        <file>assets/units/human/human-healer/nextgrades.txt</file>
+        <file>assets/units/human/human-healer/prevgrades.txt</file>
+        <file>assets/units/human/human-healer/skills.txt</file>
+        <file>assets/units/human/human-healer/traits.txt</file>
+        <file>assets/units/human/human-healer/unitname.txt</file>
+        <file>assets/units/human/human-hoplite/baseclass.txt</file>
+        <file>assets/units/human/human-hoplite/descr.txt</file>
+        <file>assets/units/human/human-hoplite/icon.png</file>
+        <file>assets/units/human/human-hoplite/nextgrades.txt</file>
+        <file>assets/units/human/human-hoplite/prevgrades.txt</file>
+        <file>assets/units/human/human-hoplite/skills.txt</file>
+        <file>assets/units/human/human-hoplite/traits.txt</file>
+        <file>assets/units/human/human-hoplite/unitname.txt</file>
+        <file>assets/units/human/human-hydromante/baseclass.txt</file>
+        <file>assets/units/human/human-hydromante/descr.txt</file>
+        <file>assets/units/human/human-hydromante/icon.png</file>
+        <file>assets/units/human/human-hydromante/nextgrades.txt</file>
+        <file>assets/units/human/human-hydromante/prevgrades.txt</file>
+        <file>assets/units/human/human-hydromante/skills.txt</file>
+        <file>assets/units/human/human-hydromante/traits.txt</file>
+        <file>assets/units/human/human-hydromante/unitname.txt</file>
+        <file>assets/units/human/human-illusionist/baseclass.txt</file>
+        <file>assets/units/human/human-illusionist/descr.txt</file>
+        <file>assets/units/human/human-illusionist/icon.png</file>
+        <file>assets/units/human/human-illusionist/nextgrades.txt</file>
+        <file>assets/units/human/human-illusionist/prevgrades.txt</file>
+        <file>assets/units/human/human-illusionist/skills.txt</file>
+        <file>assets/units/human/human-illusionist/traits.txt</file>
+        <file>assets/units/human/human-illusionist/unitname.txt</file>
+        <file>assets/units/human/human-lightning-mage/baseclass.txt</file>
+        <file>assets/units/human/human-lightning-mage/descr.txt</file>
+        <file>assets/units/human/human-lightning-mage/icon.png</file>
+        <file>assets/units/human/human-lightning-mage/nextgrades.txt</file>
+        <file>assets/units/human/human-lightning-mage/prevgrades.txt</file>
+        <file>assets/units/human/human-lightning-mage/skills.txt</file>
+        <file>assets/units/human/human-lightning-mage/traits.txt</file>
+        <file>assets/units/human/human-lightning-mage/unitname.txt</file>
+        <file>assets/units/human/human-mage/baseclass.txt</file>
+        <file>assets/units/human/human-mage/descr.txt</file>
+        <file>assets/units/human/human-mage/icon.png</file>
+        <file>assets/units/human/human-mage/nextgrades.txt</file>
+        <file>assets/units/human/human-mage/prevgrades.txt</file>
+        <file>assets/units/human/human-mage/skills.txt</file>
+        <file>assets/units/human/human-mage/traits.txt</file>
+        <file>assets/units/human/human-mage/unitname.txt</file>
+        <file>assets/units/human/human-magus-mage/baseclass.txt</file>
+        <file>assets/units/human/human-magus-mage/descr.txt</file>
+        <file>assets/units/human/human-magus-mage/icon.png</file>
+        <file>assets/units/human/human-magus-mage/nextgrades.txt</file>
+        <file>assets/units/human/human-magus-mage/prevgrades.txt</file>
+        <file>assets/units/human/human-magus-mage/skills.txt</file>
+        <file>assets/units/human/human-magus-mage/traits.txt</file>
+        <file>assets/units/human/human-magus-mage/unitname.txt</file>
+        <file>assets/units/human/human-mistweaver/baseclass.txt</file>
+        <file>assets/units/human/human-mistweaver/descr.txt</file>
+        <file>assets/units/human/human-mistweaver/icon.png</file>
+        <file>assets/units/human/human-mistweaver/nextgrades.txt</file>
+        <file>assets/units/human/human-mistweaver/prevgrades.txt</file>
+        <file>assets/units/human/human-mistweaver/skills.txt</file>
+        <file>assets/units/human/human-mistweaver/traits.txt</file>
+        <file>assets/units/human/human-mistweaver/unitname.txt</file>
+        <file>assets/units/human/human-monk/baseclass.txt</file>
+        <file>assets/units/human/human-monk/descr.txt</file>
+        <file>assets/units/human/human-monk/icon.png</file>
+        <file>assets/units/human/human-monk/nextgrades.txt</file>
+        <file>assets/units/human/human-monk/prevgrades.txt</file>
+        <file>assets/units/human/human-monk/skills.txt</file>
+        <file>assets/units/human/human-monk/traits.txt</file>
+        <file>assets/units/human/human-monk/unitname.txt</file>
+        <file>assets/units/human/human-mystic/baseclass.txt</file>
+        <file>assets/units/human/human-mystic/descr.txt</file>
+        <file>assets/units/human/human-mystic/icon.png</file>
+        <file>assets/units/human/human-mystic/nextgrades.txt</file>
+        <file>assets/units/human/human-mystic/prevgrades.txt</file>
+        <file>assets/units/human/human-mystic/skills.txt</file>
+        <file>assets/units/human/human-mystic/traits.txt</file>
+        <file>assets/units/human/human-mystic/unitname.txt</file>
+        <file>assets/units/human/human-paladin/baseclass.txt</file>
+        <file>assets/units/human/human-paladin/descr.txt</file>
+        <file>assets/units/human/human-paladin/icon.png</file>
+        <file>assets/units/human/human-paladin/nextgrades.txt</file>
+        <file>assets/units/human/human-paladin/prevgrades.txt</file>
+        <file>assets/units/human/human-paladin/skills.txt</file>
+        <file>assets/units/human/human-paladin/traits.txt</file>
+        <file>assets/units/human/human-paladin/unitname.txt</file>
+        <file>assets/units/human/human-pikeman/baseclass.txt</file>
+        <file>assets/units/human/human-pikeman/descr.txt</file>
+        <file>assets/units/human/human-pikeman/icon.png</file>
+        <file>assets/units/human/human-pikeman/nextgrades.txt</file>
+        <file>assets/units/human/human-pikeman/prevgrades.txt</file>
+        <file>assets/units/human/human-pikeman/skills.txt</file>
+        <file>assets/units/human/human-pikeman/traits.txt</file>
+        <file>assets/units/human/human-pikeman/unitname.txt</file>
+        <file>assets/units/human/human-priest/baseclass.txt</file>
+        <file>assets/units/human/human-priest/descr.txt</file>
+        <file>assets/units/human/human-priest/icon.png</file>
+        <file>assets/units/human/human-priest/nextgrades.txt</file>
+        <file>assets/units/human/human-priest/prevgrades.txt</file>
+        <file>assets/units/human/human-priest/skills.txt</file>
+        <file>assets/units/human/human-priest/traits.txt</file>
+        <file>assets/units/human/human-priest/unitname.txt</file>
+        <file>assets/units/human/human-psyonic/baseclass.txt</file>
+        <file>assets/units/human/human-psyonic/descr.txt</file>
+        <file>assets/units/human/human-psyonic/icon.png</file>
+        <file>assets/units/human/human-psyonic/nextgrades.txt</file>
+        <file>assets/units/human/human-psyonic/prevgrades.txt</file>
+        <file>assets/units/human/human-psyonic/skills.txt</file>
+        <file>assets/units/human/human-psyonic/traits.txt</file>
+        <file>assets/units/human/human-psyonic/unitname.txt</file>
+        <file>assets/units/human/human-pyromante/baseclass.txt</file>
+        <file>assets/units/human/human-pyromante/descr.txt</file>
+        <file>assets/units/human/human-pyromante/icon.png</file>
+        <file>assets/units/human/human-pyromante/nextgrades.txt</file>
+        <file>assets/units/human/human-pyromante/prevgrades.txt</file>
+        <file>assets/units/human/human-pyromante/skills.txt</file>
+        <file>assets/units/human/human-pyromante/traits.txt</file>
+        <file>assets/units/human/human-pyromante/unitname.txt</file>
+        <file>assets/units/human/human-recruit/baseclass.txt</file>
+        <file>assets/units/human/human-recruit/descr.txt</file>
+        <file>assets/units/human/human-recruit/icon.png</file>
+        <file>assets/units/human/human-recruit/nextgrades.txt</file>
+        <file>assets/units/human/human-recruit/prevgrades.txt</file>
+        <file>assets/units/human/human-recruit/skills.txt</file>
+        <file>assets/units/human/human-recruit/traits.txt</file>
+        <file>assets/units/human/human-recruit/unitname.txt</file>
+        <file>assets/units/human/human-rider/baseclass.txt</file>
+        <file>assets/units/human/human-rider/descr.txt</file>
+        <file>assets/units/human/human-rider/icon.png</file>
+        <file>assets/units/human/human-rider/nextgrades.txt</file>
+        <file>assets/units/human/human-rider/prevgrades.txt</file>
+        <file>assets/units/human/human-rider/skills.txt</file>
+        <file>assets/units/human/human-rider/traits.txt</file>
+        <file>assets/units/human/human-rider/unitname.txt</file>
+        <file>assets/units/human/human-rogue/baseclass.txt</file>
+        <file>assets/units/human/human-rogue/descr.txt</file>
+        <file>assets/units/human/human-rogue/icon.png</file>
+        <file>assets/units/human/human-rogue/nextgrades.txt</file>
+        <file>assets/units/human/human-rogue/prevgrades.txt</file>
+        <file>assets/units/human/human-rogue/skills.txt</file>
+        <file>assets/units/human/human-rogue/traits.txt</file>
+        <file>assets/units/human/human-rogue/unitname.txt</file>
+        <file>assets/units/human/human-spearman/baseclass.txt</file>
+        <file>assets/units/human/human-spearman/descr.txt</file>
+        <file>assets/units/human/human-spearman/icon.png</file>
+        <file>assets/units/human/human-spearman/nextgrades.txt</file>
+        <file>assets/units/human/human-spearman/prevgrades.txt</file>
+        <file>assets/units/human/human-spearman/skills.txt</file>
+        <file>assets/units/human/human-spearman/traits.txt</file>
+        <file>assets/units/human/human-spearman/unitname.txt</file>
+        <file>assets/units/human/human-support-mage/baseclass.txt</file>
+        <file>assets/units/human/human-support-mage/descr.txt</file>
+        <file>assets/units/human/human-support-mage/icon.png</file>
+        <file>assets/units/human/human-support-mage/nextgrades.txt</file>
+        <file>assets/units/human/human-support-mage/prevgrades.txt</file>
+        <file>assets/units/human/human-support-mage/skills.txt</file>
+        <file>assets/units/human/human-support-mage/traits.txt</file>
+        <file>assets/units/human/human-support-mage/unitname.txt</file>
+        <file>assets/units/human/human-suppressor/baseclass.txt</file>
+        <file>assets/units/human/human-suppressor/descr.txt</file>
+        <file>assets/units/human/human-suppressor/icon.png</file>
+        <file>assets/units/human/human-suppressor/nextgrades.txt</file>
+        <file>assets/units/human/human-suppressor/prevgrades.txt</file>
+        <file>assets/units/human/human-suppressor/skills.txt</file>
+        <file>assets/units/human/human-suppressor/traits.txt</file>
+        <file>assets/units/human/human-suppressor/unitname.txt</file>
+        <file>assets/units/human/human-tormentor/baseclass.txt</file>
+        <file>assets/units/human/human-tormentor/descr.txt</file>
+        <file>assets/units/human/human-tormentor/icon.png</file>
+        <file>assets/units/human/human-tormentor/nextgrades.txt</file>
+        <file>assets/units/human/human-tormentor/prevgrades.txt</file>
+        <file>assets/units/human/human-tormentor/skills.txt</file>
+        <file>assets/units/human/human-tormentor/traits.txt</file>
+        <file>assets/units/human/human-tormentor/unitname.txt</file>
+        <file>assets/units/human/human-voodoo/baseclass.txt</file>
+        <file>assets/units/human/human-voodoo/descr.txt</file>
+        <file>assets/units/human/human-voodoo/icon.png</file>
+        <file>assets/units/human/human-voodoo/nextgrades.txt</file>
+        <file>assets/units/human/human-voodoo/prevgrades.txt</file>
+        <file>assets/units/human/human-voodoo/skills.txt</file>
+        <file>assets/units/human/human-voodoo/traits.txt</file>
+        <file>assets/units/human/human-voodoo/unitname.txt</file>
+        <file>assets/units/human/human-warden/baseclass.txt</file>
+        <file>assets/units/human/human-warden/descr.txt</file>
+        <file>assets/units/human/human-warden/icon.png</file>
+        <file>assets/units/human/human-warden/nextgrades.txt</file>
+        <file>assets/units/human/human-warden/prevgrades.txt</file>
+        <file>assets/units/human/human-warden/skills.txt</file>
+        <file>assets/units/human/human-warden/traits.txt</file>
+        <file>assets/units/human/human-warden/unitname.txt</file>
+        <file>assets/units/human/human-warlord/baseclass.txt</file>
+        <file>assets/units/human/human-warlord/descr.txt</file>
+        <file>assets/units/human/human-warlord/icon.png</file>
+        <file>assets/units/human/human-warlord/nextgrades.txt</file>
+        <file>assets/units/human/human-warlord/prevgrades.txt</file>
+        <file>assets/units/human/human-warlord/skills.txt</file>
+        <file>assets/units/human/human-warlord/traits.txt</file>
+        <file>assets/units/human/human-warlord/unitname.txt</file>
+        <file>assets/units/human/human-warrior/baseclass.txt</file>
+        <file>assets/units/human/human-warrior/descr.txt</file>
+        <file>assets/units/human/human-warrior/icon.png</file>
+        <file>assets/units/human/human-warrior/nextgrades.txt</file>
+        <file>assets/units/human/human-warrior/prevgrades.txt</file>
+        <file>assets/units/human/human-warrior/skills.txt</file>
+        <file>assets/units/human/human-warrior/traits.txt</file>
+        <file>assets/units/human/human-warrior/unitname.txt</file>
+        <file>assets/units/human/human-wild-rider/baseclass.txt</file>
+        <file>assets/units/human/human-wild-rider/descr.txt</file>
+        <file>assets/units/human/human-wild-rider/icon.png</file>
+        <file>assets/units/human/human-wild-rider/nextgrades.txt</file>
+        <file>assets/units/human/human-wild-rider/prevgrades.txt</file>
+        <file>assets/units/human/human-wild-rider/skills.txt</file>
+        <file>assets/units/human/human-wild-rider/traits.txt</file>
+        <file>assets/units/human/human-wild-rider/unitname.txt</file>
+        <file>assets/units/human/human-witch-doctor/baseclass.txt</file>
+        <file>assets/units/human/human-witch-doctor/descr.txt</file>
+        <file>assets/units/human/human-witch-doctor/icon.png</file>
+        <file>assets/units/human/human-witch-doctor/nextgrades.txt</file>
+        <file>assets/units/human/human-witch-doctor/prevgrades.txt</file>
+        <file>assets/units/human/human-witch-doctor/skills.txt</file>
+        <file>assets/units/human/human-witch-doctor/traits.txt</file>
+        <file>assets/units/human/human-witch-doctor/unitname.txt</file>
+        <file>assets/units/human/treant/baseclass.txt</file>
+        <file>assets/units/human/treant/descr.txt</file>
+        <file>assets/units/human/treant/icon.png</file>
+        <file>assets/units/human/treant/nextgrades.txt</file>
+        <file>assets/units/human/treant/prevgrades.txt</file>
+        <file>assets/units/human/treant/skills.txt</file>
+        <file>assets/units/human/treant/traits.txt</file>
+        <file>assets/units/human/treant/unitname.txt</file>
+        <file>assets/units/human/descr.txt</file>
+        <file>assets/units/human/icon.png</file>
+        <file>assets/units/human/racename.txt</file>
+        <file>assets/units/human/second-icon.png</file>
+        <file>assets/units/human/units.txt</file>
         <file>assets/units/norace/nounit/icon.png</file>
+        <file>assets/units/warcraft/blademaster/baseclass.txt</file>
+        <file>assets/units/warcraft/blademaster/descr.txt</file>
         <file>assets/units/warcraft/blademaster/icon.png</file>
+        <file>assets/units/warcraft/blademaster/nextgrades.txt</file>
+        <file>assets/units/warcraft/blademaster/prevgrades.txt</file>
+        <file>assets/units/warcraft/blademaster/skills.txt</file>
+        <file>assets/units/warcraft/blademaster/traits.txt</file>
+        <file>assets/units/warcraft/blademaster/unitname.txt</file>
+        <file>assets/units/warcraft/chaosorc/baseclass.txt</file>
+        <file>assets/units/warcraft/chaosorc/descr.txt</file>
         <file>assets/units/warcraft/chaosorc/icon.png</file>
+        <file>assets/units/warcraft/chaosorc/nextgrades.txt</file>
+        <file>assets/units/warcraft/chaosorc/prevgrades.txt</file>
+        <file>assets/units/warcraft/chaosorc/skills.txt</file>
+        <file>assets/units/warcraft/chaosorc/traits.txt</file>
+        <file>assets/units/warcraft/chaosorc/unitname.txt</file>
+        <file>assets/units/warcraft/nagasummoner/baseclass.txt</file>
+        <file>assets/units/warcraft/nagasummoner/descr.txt</file>
         <file>assets/units/warcraft/nagasummoner/icon.png</file>
+        <file>assets/units/warcraft/nagasummoner/nextgrades.txt</file>
+        <file>assets/units/warcraft/nagasummoner/prevgrades.txt</file>
+        <file>assets/units/warcraft/nagasummoner/skills.txt</file>
+        <file>assets/units/warcraft/nagasummoner/traits.txt</file>
+        <file>assets/units/warcraft/nagasummoner/unitname.txt</file>
+        <file>assets/units/warcraft/necromancer/baseclass.txt</file>
+        <file>assets/units/warcraft/necromancer/descr.txt</file>
         <file>assets/units/warcraft/necromancer/icon.png</file>
+        <file>assets/units/warcraft/necromancer/nextgrades.txt</file>
+        <file>assets/units/warcraft/necromancer/prevgrades.txt</file>
+        <file>assets/units/warcraft/necromancer/skills.txt</file>
+        <file>assets/units/warcraft/necromancer/traits.txt</file>
+        <file>assets/units/warcraft/necromancer/unitname.txt</file>
+        <file>assets/units/warcraft/ogremagi/baseclass.txt</file>
+        <file>assets/units/warcraft/ogremagi/descr.txt</file>
         <file>assets/units/warcraft/ogremagi/icon.png</file>
+        <file>assets/units/warcraft/ogremagi/nextgrades.txt</file>
+        <file>assets/units/warcraft/ogremagi/prevgrades.txt</file>
+        <file>assets/units/warcraft/ogremagi/skills.txt</file>
+        <file>assets/units/warcraft/ogremagi/traits.txt</file>
+        <file>assets/units/warcraft/ogremagi/unitname.txt</file>
+        <file>assets/units/warcraft/rogue/baseclass.txt</file>
+        <file>assets/units/warcraft/rogue/descr.txt</file>
         <file>assets/units/warcraft/rogue/icon.png</file>
+        <file>assets/units/warcraft/rogue/nextgrades.txt</file>
+        <file>assets/units/warcraft/rogue/prevgrades.txt</file>
+        <file>assets/units/warcraft/rogue/skills.txt</file>
+        <file>assets/units/warcraft/rogue/traits.txt</file>
+        <file>assets/units/warcraft/rogue/unitname.txt</file>
+        <file>assets/units/warcraft/wargraider/baseclass.txt</file>
+        <file>assets/units/warcraft/wargraider/descr.txt</file>
         <file>assets/units/warcraft/wargraider/icon.png</file>
+        <file>assets/units/warcraft/wargraider/nextgrades.txt</file>
+        <file>assets/units/warcraft/wargraider/prevgrades.txt</file>
+        <file>assets/units/warcraft/wargraider/skills.txt</file>
+        <file>assets/units/warcraft/wargraider/traits.txt</file>
+        <file>assets/units/warcraft/wargraider/unitname.txt</file>
+        <file>assets/units/warcraft/wyvern/baseclass.txt</file>
+        <file>assets/units/warcraft/wyvern/descr.txt</file>
         <file>assets/units/warcraft/wyvern/icon.png</file>
+        <file>assets/units/warcraft/wyvern/nextgrades.txt</file>
+        <file>assets/units/warcraft/wyvern/prevgrades.txt</file>
+        <file>assets/units/warcraft/wyvern/skills.txt</file>
+        <file>assets/units/warcraft/wyvern/traits.txt</file>
+        <file>assets/units/warcraft/wyvern/unitname.txt</file>
+        <file>assets/units/warcraft/descr.txt</file>
+        <file>assets/units/warcraft/icon.png</file>
         <file>assets/units/warcraft/raceicon.png</file>
+        <file>assets/units/warcraft/racename.txt</file>
+        <file>assets/units/warcraft/units.txt</file>
+        <file>assets/units/races.txt</file>
         <file>assets/window/thick_opaque-background.png</file>
         <file>assets/window/thick_opaque-border-botleft.png</file>
         <file>assets/window/thick_opaque-border-botright.png</file>
@@ -25,6 +508,5 @@
         <file>assets/window/thick_opaque-border-top.png</file>
         <file>assets/window/thick_opaque-border-topleft.png</file>
         <file>assets/window/thick_opaque-border-topright.png</file>
-        <file>assets/pvp_intro/picture.jpg</file>
     </qresource>
 </RCC>

+ 1 - 1
include/gui/playervsplayerintro.ui

@@ -125,7 +125,7 @@
   <customwidget>
    <class>Scene</class>
    <extends>QWidget</extends>
-   <header location="global">gui/scene.h</header>
+   <header>gui/scene.h</header>
    <container>1</container>
   </customwidget>
  </customwidgets>

+ 15 - 12
include/gui/raceicon.h

@@ -1,7 +1,7 @@
 #ifndef RACEICON_H
 #define RACEICON_H
 
-#include "units/unit.h"
+#include "race.h"
 
 #include <QObject>
 #include <QWidget>
@@ -18,26 +18,29 @@ public:
     explicit RaceIcon(QWidget* parent = 0, int width = 64, int height = 64);
     ~RaceIcon();
 
-    void setRaceIcon(QString racename);
     void setRaceIcon(QImage icon);
     void resize(int w, int h);
     void unsetRaceIcon();
 
+    Race* getRace();
+    void setRace(Race* race);
+
+    int getState();
+    void setState(int state);
+
     void deactivate();
     void activate();
 
-
 protected:
-    void mousePressEvent(QMouseEvent* event);
-    void enterEvent(QEvent* event);
-    void leaveEvent(QEvent* event);
-
+    void mousePressEvent(QMouseEvent* event) override;
+    void enterEvent(QEvent* event) override;
+    void leaveEvent(QEvent* event) override;
 
 signals:
-    void clicked();
-    void doubleclicked();
-    void hovered();
-    void unhovered();
+    void clicked(RaceIcon*);
+    void doubleclicked(RaceIcon*);
+    void hovered(RaceIcon*);
+    void unhovered(RaceIcon*);
 
 private:
     void drawIcon();
@@ -58,7 +61,7 @@ private:
 
     QTime previous_click_time_;
 
-    Unit* unit_;
+    Race* race_;
 };
 
 #endif // RACEICON_H

+ 37 - 1
include/gui/recruitmentscene.h

@@ -10,6 +10,8 @@
 class UnitIcon;
 class RaceIcon;
 class Player;
+class Unit;
+class Race;
 
 namespace Ui {
 class RecruitmentScene;
@@ -26,14 +28,45 @@ public:
     void parseArgs(QString args) override;
     void init() override;
 
+public slots:
+    void onUnitIconHovered(UnitIcon*);
+    void onUnitIconUnHovered(UnitIcon*);
+    void onUnitIconClicked(UnitIcon*);
+    void onUnitIconDoubleClicked(UnitIcon*);
+
+    void onChosenUnitIconHovered(UnitIcon*);
+    void onChosenUnitIconUnHovered(UnitIcon*);
+    void onChosenUnitIconClicked(UnitIcon*);
+    void onChosenUnitIconDoubleClicked(UnitIcon*);
+
+    void onRaceIconHovered(RaceIcon*);
+    void onRaceIconUnHovered(RaceIcon*);
+    void onRaceIconClicked(RaceIcon*);
+    void onRaceIconDoubleClicked(RaceIcon*);
+
+    void onGradeUnitIconHovered(UnitIcon*);
+    void onGradeUnitIconUnHovered(UnitIcon*);
+    void onGradeUnitIconClicked(UnitIcon*);
+    void onGradeUnitIconDoubleClicked(UnitIcon*);
+
 private:
     void initAvailableRaces();
     void initAvailableUnits();
-    void initChosenUnits();
+    void showChosenUnits();
+
+    void setDescriptionTitle(QString title);
+    void setDescriptionText(QString text);
+    void setDescriptionIcon(QImage icon);
+
+    void updateSpecsWidget(Unit* unit);
+    void changeRace(Race* race);
+    void setMoney(int money_);
 
 private slots:
     void on_back_button_clicked();
 
+    void on_apply_clicked();
+
 private:
     int available_money_;
     int current_money_;
@@ -46,6 +79,9 @@ private:
     UnitIcon* chosen_units_icons_[10];
 
     RaceIcon* available_races_icons_[3];
+
+    UnitIcon* prev_grade_units_icons[4];
+    UnitIcon* next_grade_units_icons[4];
 };
 
 #endif // RECRUITMENTSCENE_H

+ 74 - 78
include/gui/recruitmentscene.ui

@@ -26,7 +26,7 @@
     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:14pt; color:#FDEAA8;&quot;&gt;Выбранная раса:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
    </property>
   </widget>
-  <widget class="QLabel" name="chosen_race_image_">
+  <widget class="RaceIcon" name="chosen_race_image_">
    <property name="geometry">
     <rect>
      <x>200</x>
@@ -42,8 +42,8 @@
   <widget class="QLabel" name="available_races_text_">
    <property name="geometry">
     <rect>
-     <x>550</x>
-     <y>110</y>
+     <x>450</x>
+     <y>150</y>
      <width>201</width>
      <height>31</height>
     </rect>
@@ -55,24 +55,27 @@
   <widget class="QWidget" name="available_races_list_" native="true">
    <property name="geometry">
     <rect>
-     <x>380</x>
-     <y>150</y>
-     <width>521</width>
+     <x>660</x>
+     <y>130</y>
+     <width>144</width>
      <height>72</height>
     </rect>
    </property>
    <layout class="QHBoxLayout" name="availableRacesLayout_">
+    <property name="spacing">
+     <number>0</number>
+    </property>
     <property name="leftMargin">
-     <number>5</number>
+     <number>0</number>
     </property>
     <property name="topMargin">
-     <number>5</number>
+     <number>0</number>
     </property>
     <property name="rightMargin">
-     <number>5</number>
+     <number>0</number>
     </property>
     <property name="bottomMargin">
-     <number>5</number>
+     <number>0</number>
     </property>
    </layout>
   </widget>
@@ -217,31 +220,50 @@
      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/common/Scroll.png&quot; width=&quot;321&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
     </property>
    </widget>
-   <widget class="QLabel" name="name_text_">
+   <widget class="QLabel" name="desctiption_title_">
     <property name="geometry">
      <rect>
-      <x>80</x>
-      <y>60</y>
+      <x>100</x>
+      <y>70</y>
       <width>161</width>
-      <height>21</height>
+      <height>41</height>
      </rect>
     </property>
     <property name="text">
-     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600; color:#000080;&quot;&gt;Название юнита&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600; font-size:16px; color:#000080;&quot;&gt;Название юнита&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+    </property>
+    <property name="wordWrap">
+     <bool>true</bool>
     </property>
    </widget>
    <widget class="QLabel" name="description_text_">
     <property name="geometry">
      <rect>
       <x>40</x>
-      <y>90</y>
-      <width>171</width>
-      <height>161</height>
+      <y>120</y>
+      <width>231</width>
+      <height>191</height>
      </rect>
     </property>
     <property name="text">
      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#000080;&quot;&gt;Здоровье:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#000080;&quot;&gt;Сила:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#000080;&quot;&gt;Урон:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#000080;&quot;&gt;Удар:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#000080;&quot;&gt;Удача:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#000080;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
     </property>
+    <property name="alignment">
+     <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+    </property>
+   </widget>
+   <widget class="UnitIcon" name="description_icon_">
+    <property name="geometry">
+     <rect>
+      <x>50</x>
+      <y>70</y>
+      <width>45</width>
+      <height>45</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/units/warcraft/blademaster/icon.png&quot; width=&quot;45&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+    </property>
    </widget>
   </widget>
   <widget class="QPushButton" name="back_button">
@@ -292,19 +314,6 @@
      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:10pt; color:#fdeaa8;&quot;&gt;Специализация&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
     </property>
    </widget>
-   <widget class="UnitIcon" name="parent_spec_unit_">
-    <property name="geometry">
-     <rect>
-      <x>70</x>
-      <y>40</y>
-      <width>45</width>
-      <height>45</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/units/warcraft/blademaster/icon.png&quot; width=&quot;45&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-    </property>
-   </widget>
    <widget class="QLabel" name="arrow_down_1_">
     <property name="geometry">
      <rect>
@@ -340,7 +349,7 @@
       <height>45</height>
      </rect>
     </property>
-    <layout class="QHBoxLayout" name="horizontalLayout">
+    <layout class="QHBoxLayout" name="next_gen_units_layout_">
      <property name="spacing">
       <number>0</number>
      </property>
@@ -356,34 +365,6 @@
      <property name="bottomMargin">
       <number>0</number>
      </property>
-     <item>
-      <widget class="UnitIcon" name="next_spec_unit_1_">
-       <property name="text">
-        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/units/warcraft/rogue/icon.png&quot; width=&quot;45&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="UnitIcon" name="next_spec_unit_2_">
-       <property name="text">
-        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/units/warcraft/ogremagi/icon.png&quot; width=&quot;45&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="UnitIcon" name="next_spec_unit_3_">
-       <property name="text">
-        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/units/warcraft/wargraider/icon.png&quot; width=&quot;45&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="UnitIcon" name="next_spec_unit_4_">
-       <property name="text">
-        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/units/warcraft/wyvern/icon.png&quot; width=&quot;45&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-       </property>
-      </widget>
-     </item>
     </layout>
    </widget>
    <widget class="QLabel" name="arrow_down_2_">
@@ -399,22 +380,33 @@
      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/common/strelka.png&quot; width=&quot;25&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
     </property>
    </widget>
-   <zorder>spec_title_</zorder>
-   <zorder>arrow_down_1_</zorder>
-   <zorder>parent_spec_unit_</zorder>
-   <zorder>current_spec_unit_</zorder>
-   <zorder>next_gen_units_list_</zorder>
-   <zorder>arrow_down_2_</zorder>
-  </widget>
-  <widget class="QWidget" name="widget" native="true">
-   <property name="geometry">
-    <rect>
-     <x>30</x>
-     <y>430</y>
-     <width>320</width>
-     <height>128</height>
-    </rect>
-   </property>
+   <widget class="QWidget" name="prev_gen_units_list_" native="true">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>40</y>
+      <width>180</width>
+      <height>45</height>
+     </rect>
+    </property>
+    <layout class="QHBoxLayout" name="prev_gen_units_layout">
+     <property name="spacing">
+      <number>0</number>
+     </property>
+     <property name="leftMargin">
+      <number>0</number>
+     </property>
+     <property name="topMargin">
+      <number>0</number>
+     </property>
+     <property name="rightMargin">
+      <number>0</number>
+     </property>
+     <property name="bottomMargin">
+      <number>0</number>
+     </property>
+    </layout>
+   </widget>
   </widget>
   <zorder>divider_</zorder>
   <zorder>chosen_race_text_</zorder>
@@ -431,13 +423,12 @@
   <zorder>available_money_text_</zorder>
   <zorder>apply</zorder>
   <zorder>unit_spec_widget_</zorder>
-  <zorder>widget</zorder>
  </widget>
  <customwidgets>
   <customwidget>
    <class>Scene</class>
    <extends>QWidget</extends>
-   <header location="global">gui/scene.h</header>
+   <header>gui/scene.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
@@ -451,6 +442,11 @@
     <signal>unhovered()</signal>
    </slots>
   </customwidget>
+  <customwidget>
+   <class>RaceIcon</class>
+   <extends>QLabel</extends>
+   <header>gui/raceicon.h</header>
+  </customwidget>
  </customwidgets>
  <resources/>
  <connections/>

+ 1 - 1
include/gui/scene.h

@@ -11,7 +11,7 @@ public:
 
     virtual ~Scene() {}
 
-    virtual void parseArgs(QString args) {}
+    virtual void parseArgs(QString) {}
 
     virtual void init() {}
 

+ 10 - 4
include/gui/uniticon.h

@@ -23,9 +23,13 @@ public:
     void resize(int w, int h);
     void unsetUnitIcon();
 
+    Unit* getUnit();
+    void setUnit(Unit* unit);
+
     void deactivate();
     void activate();
 
+    void setState(int state);
 
 protected:
     void mousePressEvent(QMouseEvent* event);
@@ -34,10 +38,10 @@ protected:
 
 
 signals:
-    void clicked();
-    void doubleclicked();
-    void hovered();
-    void unhovered();
+    void clicked(UnitIcon*);
+    void doubleclicked(UnitIcon*);
+    void hovered(UnitIcon*);
+    void unhovered(UnitIcon*);
 
 private:
     void drawIcon();
@@ -58,6 +62,8 @@ private:
 
     QTime previous_click_time_;
 
+    QImage result_;
+
     Unit* unit_;
 };
 

+ 43 - 4
include/player.h

@@ -5,6 +5,7 @@
 #include "racemanager.h"
 
 #include <QObject>
+#include <QDebug>
 
 #include <set>
 
@@ -14,13 +15,23 @@ template<class Obj, class Identifier>
 class ObjectFactory;
 
 class Player {
+    struct unit_comparator {
+        bool operator() (const Unit* lhs, const Unit* rhs) const {
+            if (rhs == nullptr)
+                return true;
+            if (lhs->getUnitBaseClassId() != rhs->getUnitBaseClassId())
+                return lhs->getUnitBaseClassId() < rhs->getUnitBaseClassId();
+            return lhs->getUnitId() < rhs->getUnitId();
+        }
+    };
+
 public:
     Player() {
-
+        init(1);
     }
 
     void init(int id) {
-        player_name_ = "Игрок " + QString::number(id);
+        player_name_ = "Игрок " + QString::number(id + 1);
         race_ = RaceManager::getInstance().getRace(
                     RaceManager::getInstance().getAvailableRacesList()[0]
                 );
@@ -31,21 +42,49 @@ public:
         return player_name_;
     }
 
-    const std::set<Unit>& getUnits() {
+    const std::multiset<Unit*, unit_comparator>& getUnits() {
         return units_;
     }
 
+    std::vector<Unit*> getUnitsAsVector() {
+        std::vector<Unit*> result;
+        for (auto unit: units_)
+            result.push_back(unit);
+        return result;
+    }
+
+    void addUnit(Unit *a) {
+        if (units_.size() >= 10)
+            return;
+        units_.insert(a);
+    }
+
+    void deleteUnit(Unit *a) {
+        qDebug() << "deleting unit " << a->getUnitName();
+        auto unit = units_.find(a);
+        if (unit != units_.end())
+            units_.erase(unit);
+    }
+
+    void clearUnits() {
+        units_.clear();
+    }
+
     Race* getRace() {
         return race_;
     }
 
+    void setRace(Race* race) {
+        race_ = race;
+    }
+
 signals:
 
 public slots:
 
 private:
     QString player_name_;
-    std::set<Unit> units_;
+    std::multiset<Unit*, unit_comparator> units_;
     Race* race_;
 };
 

+ 8 - 4
include/units/unit.h

@@ -21,7 +21,7 @@ public:
 	bool isEmpty() { 
 		return true;
 	}
-	std::vector <Cell*> actualPath(Cell* destination) { //the shortest existing path from (*this) to (*destination)
+    std::vector <Cell*> actualPath(Cell*) { //the shortest existing path from (*this) to (*destination)
 		std::vector <Cell*> path;
 		return path;
 	}
@@ -53,6 +53,7 @@ public:
     int    getAttackPoints();
     int    getAttackCost();
     double getAttackRange();
+    int    getStartingActivityPoints();
 
     double getHealthPoints();
 
@@ -87,11 +88,11 @@ public:
 
     virtual double reduceIncomingDamage(std::string damageType, int value);
 
-    virtual	bool canAttackForDistance(int distance) {}
+    virtual	bool canAttackForDistance(int ) {return false;}
 
-    virtual bool canAttackToCell(Cell* destination) {}
+    virtual bool canAttackToCell(Cell* ) {return false;}
 
-    virtual bool canAttackUnit(Unit* target) {}
+    virtual bool canAttackUnit(Unit* ) {return false;}
 
     //---------------------------------------------//
     //-------Movement checkers & calculators-------//
@@ -106,10 +107,12 @@ public:
 
     virtual void moveToCell(Cell* destination);
 
+
     //---------------------------------------------//
     //----------------GUI section------------------//
     //---------------------------------------------//
 
+    QString getUnitId() const;
     QString getUnitName() const;
     QString getUnitDescr() const;
     QString getUnitBaseClassId() const;
@@ -166,6 +169,7 @@ protected:
     double intelligence_;
     double strength_;
     int attack_cost_;     //how many activity points does attack cost
+    int starting_activity_points_;
 
     //durability
     double health_points_;

+ 1 - 1
source/gui/gui.cpp

@@ -33,7 +33,7 @@ void GUI::mouseMoveEvent( QMouseEvent* e ) {
             return;
         }
         QString cname = child->metaObject()->className();
-        if (cname != "QPushButton" && cname != "QComboBox"){ // отключаем перетягивание при наведение на активные элементы
+        if (cname != "QPushButton" && cname != "QComboBox" && cname != "RaceIcon" && cname != "UnitIcon"){ // отключаем перетягивание при наведение на активные элементы
             setGeometry(pos().x() + ( pt.x() - dx_ ), pos().y() + ( pt.y() - dy_ ), width(), height());
         } else {
             dx_ = pt.x();

+ 1 - 1
source/gui/guiscenemanager.cpp

@@ -33,7 +33,7 @@ bool GuiSceneManager::registerScene(QString scene_name, Scene* name) {
 }
 
 bool GuiSceneManager::changeScene(QString scene_name, QString args) {
-    if (scene_name == current_scene_ || scene_name == "main_window") {
+    if (scene_name == "main_window") {
         return false;
     }
 

+ 1 - 1
source/gui/playervsplayerintro.cpp

@@ -26,5 +26,5 @@ void PlayerVsPlayerIntro::on_go_next_clicked()
 {
     PlayerManager::getInstance().setPlayersNum(2);
     /// TODO - Check if money input correct
-    GuiSceneManager::getInstance().changeScene("recruit_army", "1|" + ui->money_->text());
+    GuiSceneManager::getInstance().changeScene("recruit_army", "0|" + ui->money_->text());
 }

+ 38 - 22
source/gui/raceicon.cpp

@@ -1,6 +1,8 @@
 #include <gui/raceicon.h>.h>
 #include <QDebug>
 #include <QTime>
+#include <QEvent>
+#include <QMouseEvent>
 
 RaceIcon::RaceIcon(QWidget* parent, int width, int height)
     : QLabel(parent)
@@ -9,12 +11,13 @@ RaceIcon::RaceIcon(QWidget* parent, int width, int height)
     width_ = width;
     height_ = height;
 
-    setAttribute(Qt::WA_Hover, true);
+    setAttribute(Qt::WA_Hover, false);
     installEventFilter(this);
 
     default_border_.load(":/assets/common/unit_icon_default.png");
     hover_border_.load(":/assets/common/unit_icon_hover.png");
     active_border_.load(":/assets/common/unit_icon_active.png");
+    icon_.load(":/assets/units/norace/nounit/icon.png");
 
     drawIcon();
 }
@@ -24,14 +27,16 @@ RaceIcon::~RaceIcon()
 
 void RaceIcon::drawIcon() {
     QPixmap combined(width_, height_);
+    combined.fill(Qt::black);
+
+    if (state_ >= 5) {
+        combined.fill(QColor(0, 0, 0, 0));
+    }
+
     QPainter p(&combined);
 
-    if (state_ == 0) {
-        p.setBrush(Qt::NoBrush);
-        p.setPen(Qt::black);
-        p.drawRect(0, 0, width_, height_);
-    } else {
-        p.drawImage(QPoint(0, 0), icon_.scaled(width_, height_, Qt::KeepAspectRatio));
+    if (state_ != 0) {
+        p.drawImage(QPoint(4, 4), icon_.scaled(width_ - 8, height_ - 8, Qt::KeepAspectRatio));
     }
 
     if (state_ == 0 || state_ == 1)
@@ -47,10 +52,20 @@ void RaceIcon::drawIcon() {
     setPixmap(combined);
 }
 
-void RaceIcon::setRaceIcon(QString racename) {
-    icon_.load(":/assets/units/" + racename + "/icon.png");
-    if (state_ == 0)
-        state_ = 1;
+Race* RaceIcon::getRace() {
+    return race_;
+}
+
+void RaceIcon::setRace(Race* race) {
+    race_ = race;
+}
+
+int RaceIcon::getState() {
+    return state_;
+}
+
+void RaceIcon::setState(int state) {
+    state_ = state;
     drawIcon();
 }
 
@@ -84,39 +99,40 @@ void RaceIcon::activate() {
     drawIcon();
 }
 
-void RaceIcon::mousePressEvent(QMouseEvent*)
+void RaceIcon::mousePressEvent(QMouseEvent* event)
 {
-    if (state_ == 0)
+    if (state_ == 0 || state_ >= 5)
         return;
 
     activate();
 
     QTime current_time = QTime::currentTime();
-    if (current_time.msecsSinceStartOfDay() - previous_click_time_.msecsSinceStartOfDay() < 200) {
+    if (current_time.msecsSinceStartOfDay() - previous_click_time_.msecsSinceStartOfDay() < 350) {
         deactivate();
-        emit doubleclicked();
+        emit doubleclicked(this);
     } else {
         previous_click_time_ = current_time;
-        emit clicked();
+        emit clicked(this);
     }
 }
 
-void RaceIcon::enterEvent(QEvent*)
+void RaceIcon::enterEvent(QEvent* event)
 {
-    if (state_ == 0 || state_ == 3)
+
+    if (state_ == 0 || state_ == 3 || state_ >= 5)
         return;
 
     state_ = 2;
     drawIcon();
-    emit hovered();
+    emit hovered(this);
 }
 
-void RaceIcon::leaveEvent(QEvent*)
+void RaceIcon::leaveEvent(QEvent* event)
 {
-    if (state_ == 0 || state_ == 3)
+    if (state_ == 0 || state_ == 3 || state_ >= 5)
         return;
 
     state_ = 1;
     drawIcon();
-    emit unhovered();
+    emit unhovered(this);
 }

+ 342 - 26
source/gui/recruitmentscene.cpp

@@ -14,6 +14,7 @@
 #include <QStringList>
 
 #include <cassert>
+#include <vector>
 
 RecruitmentScene::RecruitmentScene(QWidget *parent)
     : Scene(parent)
@@ -22,44 +23,64 @@ RecruitmentScene::RecruitmentScene(QWidget *parent)
     ui->setupUi(this);
 
     for (int i = 0; i < 5; i++) {
-        available_units_icons_[i] = new UnitIcon(ui->available_units_list_);
+        available_units_icons_[i] = new UnitIcon();
         ui->available_units_layout_->addWidget(available_units_icons_[i], 0, i);
-        available_units_icons_[i]->setUnitIcon("norace", "nounit");
+
+        connect(available_units_icons_[i], SIGNAL(clicked(UnitIcon*)), this, SLOT(onUnitIconClicked(UnitIcon*)));
+        connect(available_units_icons_[i], SIGNAL(hovered(UnitIcon*)), this, SLOT(onUnitIconHovered(UnitIcon*)));
+        connect(available_units_icons_[i], SIGNAL(unhovered(UnitIcon*)), this, SLOT(onUnitIconUnHovered(UnitIcon*)));
+        connect(available_units_icons_[i], SIGNAL(doubleclicked(UnitIcon*)), this, SLOT(onUnitIconDoubleClicked(UnitIcon*)));
+    }
+
+    for (int i = 0; i < 2; i++) {
+        available_races_icons_[i] = new RaceIcon();
+        ui->availableRacesLayout_->addWidget(available_races_icons_[i], i);
+
+        connect(available_races_icons_[i], SIGNAL(clicked(RaceIcon*)), this, SLOT(onRaceIconClicked(RaceIcon*)));
+        connect(available_races_icons_[i], SIGNAL(hovered(RaceIcon*)), this, SLOT(onRaceIconHovered(RaceIcon*)));
+        connect(available_races_icons_[i], SIGNAL(unhovered(RaceIcon*)), this, SLOT(onRaceIconUnHovered(RaceIcon*)));
+        connect(available_races_icons_[i], SIGNAL(doubleclicked(RaceIcon*)), this, SLOT(onRaceIconDoubleClicked(RaceIcon*)));
+
     }
 
     for (int i = 0; i < 10; i++) {
-        chosen_units_icons_[i] = new UnitIcon(ui->chosen_units_grid_);
-        chosen_units_icons_[i]->setUnitIcon("warcraft", "rogue");
+        chosen_units_icons_[i] = new UnitIcon();
         ui->chosen_units_layout_->addWidget(chosen_units_icons_[i], i / 5, i % 5);
+
+        connect(chosen_units_icons_[i], SIGNAL(clicked(UnitIcon*)), this, SLOT(onChosenUnitIconClicked(UnitIcon*)));
+        connect(chosen_units_icons_[i], SIGNAL(hovered(UnitIcon*)), this, SLOT(onChosenUnitIconHovered(UnitIcon*)));
+        connect(chosen_units_icons_[i], SIGNAL(unhovered(UnitIcon*)), this, SLOT(onChosenUnitIconUnHovered(UnitIcon*)));
+        connect(chosen_units_icons_[i], SIGNAL(doubleclicked(UnitIcon*)), this, SLOT(onChosenUnitIconDoubleClicked(UnitIcon*)));
     }
 
-    ui->parent_spec_unit_->resize(45, 45);
-    ui->parent_spec_unit_->setUnitIcon("warcraft", "chaosorc");
+    for (int i = 0; i < 4; i++) {
+        prev_grade_units_icons[i] = new UnitIcon();
+        ui->prev_gen_units_layout->addWidget(prev_grade_units_icons[i]);
 
-    ui->current_spec_unit_->resize(45, 45);
-    ui->current_spec_unit_->setUnitIcon("warcraft", "chaosorc");
+        connect(prev_grade_units_icons[i], SIGNAL(clicked(UnitIcon*)), this, SLOT(onGradeUnitIconClicked(UnitIcon*)));
+        connect(prev_grade_units_icons[i], SIGNAL(hovered(UnitIcon*)), this, SLOT(onGradeUnitIconHovered(UnitIcon*)));
+        connect(prev_grade_units_icons[i], SIGNAL(unhovered(UnitIcon*)), this, SLOT(onGradeUnitIconUnHovered(UnitIcon*)));
+        connect(prev_grade_units_icons[i], SIGNAL(doubleclicked(UnitIcon*)), this, SLOT(onGradeUnitIconDoubleClicked(UnitIcon*)));
 
-    ui->next_spec_unit_1_->resize(45, 45);
-    ui->next_spec_unit_2_->resize(45, 45);
-    ui->next_spec_unit_3_->resize(45, 45);
-    ui->next_spec_unit_4_->resize(45, 45);
 
-    ui->next_spec_unit_1_->setUnitIcon("warcraft", "chaosorc");
-    ui->next_spec_unit_2_->setUnitIcon("warcraft", "chaosorc");
-    ui->next_spec_unit_3_->setUnitIcon("warcraft", "chaosorc");
-    ui->next_spec_unit_4_->setUnitIcon("warcraft", "chaosorc");
+        next_grade_units_icons[i] = new UnitIcon();
+        ui->next_gen_units_layout_->addWidget(next_grade_units_icons[i]);
 
+        connect(next_grade_units_icons[i], SIGNAL(clicked(UnitIcon*)), this, SLOT(onGradeUnitIconClicked(UnitIcon*)));
+        connect(next_grade_units_icons[i], SIGNAL(hovered(UnitIcon*)), this, SLOT(onGradeUnitIconHovered(UnitIcon*)));
+        connect(next_grade_units_icons[i], SIGNAL(unhovered(UnitIcon*)), this, SLOT(onGradeUnitIconUnHovered(UnitIcon*)));
+        connect(next_grade_units_icons[i], SIGNAL(doubleclicked(UnitIcon*)), this, SLOT(onGradeUnitIconDoubleClicked(UnitIcon*)));
+    }
+
+    ui->description_icon_->resize(45, 45);
+    ui->description_text_->setWordWrap(true);
 
-    available_units_icons_[0]->setUnitIcon("warcraft", "blademaster");
-    available_units_icons_[1]->setUnitIcon("warcraft", "chaosorc");
-    available_units_icons_[2]->setUnitIcon("warcraft", "nagasummoner");
-    available_units_icons_[3]->setUnitIcon("warcraft", "rogue");
-    available_units_icons_[4]->setUnitIcon("norace", "nounit");
+    ui->current_spec_unit_->resize(45, 45);
+    ui->current_spec_unit_->setUnitIcon("warcraft", "chaosorc");
 }
 
 RecruitmentScene::~RecruitmentScene()
 {
-    delete ui;
 }
 
 void RecruitmentScene::parseArgs(QString args) {
@@ -69,13 +90,33 @@ void RecruitmentScene::parseArgs(QString args) {
     current_player_id_ = list[0].toInt();
     current_player_ = PlayerManager::getInstance().getPlayer(current_player_id_);
     available_money_ = list[1].toInt();
+
+    init();
 }
 
 void RecruitmentScene::init() {
     current_money_ = available_money_;
     initAvailableRaces();
     initAvailableUnits();
-    initChosenUnits();
+    showChosenUnits();
+
+    ui->title_->setText(
+        "<html><head/><body><p align=\"center\"><span style=\"font-size:24pt; color:#b12d2d;\">Набор юнитов - "
+        + current_player_->getPlayerName()
+        + "</span></p></body></html>"
+    );
+
+    setDescriptionIcon(current_player_->getRace()->getRaceIcon());
+    setDescriptionText(current_player_->getRace()->getRaceDescr());
+    setDescriptionTitle(current_player_->getRace()->getRaceName());
+
+    ui->chosen_race_image_->resize(100, 100);
+    ui->chosen_race_image_->setRaceIcon(current_player_->getRace()->getRaceIcon());
+    ui->chosen_race_image_->setState(5);
+
+    ui->unit_spec_widget_->hide();
+
+    setMoney(current_money_);
 }
 
 void RecruitmentScene::initAvailableRaces() {
@@ -83,9 +124,10 @@ void RecruitmentScene::initAvailableRaces() {
 
     int race_id = 0;
     for (QString race_name : races) {
-        assert(race_id < 5);
+        assert(race_id < 2);
         auto race = RaceManager::getInstance().getRace(race_name);
-        available_races_icons_[race_id]->setRaceIcon(race_name);
+        available_races_icons_[race_id]->setRaceIcon(race->getRaceIcon());
+        available_races_icons_[race_id]->setRace(race);
         race_id++;
     }
 
@@ -94,18 +136,292 @@ void RecruitmentScene::initAvailableRaces() {
 
 void RecruitmentScene::initAvailableUnits() {
     int unit_id = 0;
+    for (int i = 0; i < 5; i++) {
+        available_units_icons_[i]->setUnitIcon("norace", "nounit");
+        available_units_icons_[i]->setState(5);
+    }
+
     for (Unit* unit : current_player_->getRace()->getAllUnitsList()) {
+        available_units_icons_[unit_id]->setState(0);
         available_units_icons_[unit_id]->setUnitIcon(unit->getUnitIcon());
+        available_units_icons_[unit_id]->setUnit(unit);
         unit_id++;
     }
 }
 
-void RecruitmentScene::initChosenUnits() {
+void RecruitmentScene::showChosenUnits() {
+    for (int i = 0; i < 10; i++) {
+        chosen_units_icons_[i]->unsetUnitIcon();
+        chosen_units_icons_[i]->setUnit(nullptr);
+    }
 
+    int counter = 0;
+    for (auto unit : current_player_->getUnits()) {
+        chosen_units_icons_[counter]->setUnitIcon(unit->getUnitIcon());
+        chosen_units_icons_[counter]->setUnit(unit);
+        counter++;
+    }
 }
 
+void RecruitmentScene::updateSpecsWidget(Unit *unit) {
+    auto next_specs = unit->getUpgradeSpecs();
+    auto prev_specs = unit->getParentSpecs();
+
+    ui->prev_gen_units_list_->resize(45 * prev_specs.size(), 45);
+    ui->next_gen_units_list_->resize(45 * next_specs.size(), 45);
+
+    ui->prev_gen_units_list_->move((180 - 45 * prev_specs.size()) / 2, 40);
+    ui->next_gen_units_list_->move((180 - 45 * next_specs.size()) / 2, 240);
+
+    for (int i = 0; i < 4; i++) {
+        prev_grade_units_icons[i]->hide();
+        next_grade_units_icons[i]->hide();
+    }
+
+    int prev_specs_num = 0;
+    for (unsigned i = 0; i < prev_specs.size(); i++) {
+        if (prev_specs[i].length() <= 2)
+            continue;
+
+        delete prev_grade_units_icons[i]->getUnit();
+
+        prev_grade_units_icons[i]->resize(45, 45);
+        prev_grade_units_icons[i]->unsetUnitIcon();
+        prev_grade_units_icons[i]->setUnit(current_player_->getRace()->createUnit(prev_specs[i]));
+        prev_grade_units_icons[i]->show();
+
+        prev_specs_num++;
+    }
+
+    if (prev_specs_num == 0) {
+        ui->spec_title_->move(0, 110);
+        ui->prev_gen_units_list_->hide();
+        ui->arrow_down_1_->hide();
+    } else {
+        ui->spec_title_->move(0, 10);
+        ui->prev_gen_units_list_->show();
+        ui->arrow_down_1_->show();
+    }
+
+    int next_specs_num = 0;
+    for (unsigned i = 0; i < next_specs.size(); i++) {
+        if (next_specs[i].length() <= 2)
+            continue;
+
+        delete next_grade_units_icons[i]->getUnit();
+
+        next_grade_units_icons[i]->resize(45, 45);
+        next_grade_units_icons[i]->unsetUnitIcon();
+        next_grade_units_icons[i]->setUnit(current_player_->getRace()->createUnit(next_specs[i]));
+        next_grade_units_icons[i]->show();
+
+        next_specs_num++;
+    }
+
+    if (next_specs_num == 0) {
+        ui->next_gen_units_list_->hide();
+        ui->arrow_down_2_->hide();
+    } else {
+        ui->next_gen_units_list_->show();
+        ui->arrow_down_2_->show();
+    }
+
+    ui->current_spec_unit_->setUnit(unit);
+    ui->current_spec_unit_->setState(5);
+}
+
+void RecruitmentScene::changeRace(Race *race) {
+    current_player_->clearUnits();
+    current_player_->setRace(race);
+    init();
+}
+
+void RecruitmentScene::setMoney(int money_) {
+   ui->available_money_text_->setText("<html><head/><body><p>"
+                                      "<span style=\"font-size:10pt; color:#ff0000;\">Ресурсы: "
+                                      + QString::number(money_) +
+                                      "</span></p></body></html>");
+}
+
+
 
 void RecruitmentScene::on_back_button_clicked()
 {
     GuiSceneManager::getInstance().changeScene("main_menu");
 }
+
+
+
+void RecruitmentScene::setDescriptionTitle(QString title) {
+    ui->desctiption_title_->setText("<html><head/><body><p align=\"center\">"
+                                    "<span style=\" font-weight:600; font-size:16px; color:#000080;\">"
+                                    + title +
+                                    "</span></p></body></html>");
+}
+
+void RecruitmentScene::setDescriptionText(QString text) {
+    ui->description_text_->setText("<html><head/><body><p><span style=\"color:#000080;\">"
+                                   + text
+                                   + "</span></p></body></html>");
+}
+
+void RecruitmentScene::setDescriptionIcon(QImage icon) {
+    ui->description_icon_->setUnitIcon(icon);
+    ui->description_icon_->setState(0);
+}
+
+
+
+
+void RecruitmentScene::onUnitIconHovered(UnitIcon*) {
+
+}
+
+void RecruitmentScene::onUnitIconUnHovered(UnitIcon*) {
+
+}
+
+void RecruitmentScene::onUnitIconClicked(UnitIcon* icon) {
+    setDescriptionIcon(icon->getUnit()->getUnitIcon());
+    setDescriptionText(icon->getUnit()->getUnitDescr());
+    setDescriptionTitle(icon->getUnit()->getUnitName());
+
+    for (int i = 0; i < 5; i++) {
+        if (available_units_icons_[i] != icon)
+            available_units_icons_[i]->deactivate();
+    }
+
+    for (int i = 0; i < 10; i++) {
+        chosen_units_icons_[i]->deactivate();
+    }
+
+    for (int i = 0; i < 2; i++) {
+        available_races_icons_[i]->deactivate();
+    }
+
+    ui->unit_spec_widget_->hide();
+}
+
+void RecruitmentScene::onUnitIconDoubleClicked(UnitIcon* icon) {
+    if (current_player_->getUnits().size() >= 10)
+        return;
+
+    current_player_->addUnit(current_player_->getRace()->createUnit(icon->getUnit()->getUnitId()));
+    showChosenUnits();
+}
+
+
+
+void RecruitmentScene::onChosenUnitIconHovered(UnitIcon*) {}
+
+void RecruitmentScene::onChosenUnitIconUnHovered(UnitIcon*) {}
+
+void RecruitmentScene::onChosenUnitIconClicked(UnitIcon* icon) {
+    setDescriptionIcon(icon->getUnit()->getUnitIcon());
+    setDescriptionText(icon->getUnit()->getUnitDescr());
+    setDescriptionTitle(icon->getUnit()->getUnitName());
+
+    for (int i = 0; i < 5; i++) {
+        available_units_icons_[i]->deactivate();
+    }
+
+    for (int i = 0; i < 10; i++) {
+        if (chosen_units_icons_[i] != icon)
+            chosen_units_icons_[i]->deactivate();
+    }
+
+    for (int i = 0; i < 2; i++) {
+        available_races_icons_[i]->deactivate();
+    }
+
+    updateSpecsWidget(icon->getUnit());
+    ui->unit_spec_widget_->show();
+}
+
+void RecruitmentScene::onChosenUnitIconDoubleClicked(UnitIcon* icon) {
+    current_player_->deleteUnit(icon->getUnit());
+    showChosenUnits();
+    ui->unit_spec_widget_->hide();
+}
+
+
+
+void RecruitmentScene::onRaceIconHovered(RaceIcon*) {
+
+}
+
+void RecruitmentScene::onRaceIconUnHovered(RaceIcon*) {
+
+}
+
+void RecruitmentScene::onRaceIconClicked(RaceIcon* icon) {
+    setDescriptionIcon(icon->getRace()->getRaceIcon());
+    setDescriptionText(icon->getRace()->getRaceDescr());
+    setDescriptionTitle(icon->getRace()->getRaceName());
+
+    for (int i = 0; i < 5; i++) {
+        available_units_icons_[i]->deactivate();
+    }
+
+    for (int i = 0; i < 10; i++) {
+        chosen_units_icons_[i]->deactivate();
+    }
+
+    for (int i = 0; i < 2; i++) {
+        if (available_races_icons_[i] != icon)
+            available_races_icons_[i]->deactivate();
+    }
+
+    ui->unit_spec_widget_->hide();
+}
+
+void RecruitmentScene::onRaceIconDoubleClicked(RaceIcon* icon) {
+    if (icon->getRace() != current_player_->getRace())
+        changeRace(icon->getRace());
+}
+
+
+void RecruitmentScene::onGradeUnitIconHovered(UnitIcon*) {}
+
+void RecruitmentScene::onGradeUnitIconUnHovered(UnitIcon*) {}
+
+void RecruitmentScene::onGradeUnitIconClicked(UnitIcon* icon) {
+    setDescriptionIcon(icon->getUnit()->getUnitIcon());
+    setDescriptionText(icon->getUnit()->getUnitDescr());
+    setDescriptionTitle(icon->getUnit()->getUnitName());
+
+    for (int i = 0; i < 4; i++) {
+        if (prev_grade_units_icons[i] != icon)
+            prev_grade_units_icons[i]->deactivate();
+        if (next_grade_units_icons[i] != icon)
+            next_grade_units_icons[i]->deactivate();
+    }
+}
+
+void RecruitmentScene::onGradeUnitIconDoubleClicked(UnitIcon* icon) {
+    current_player_->deleteUnit(ui->current_spec_unit_->getUnit());
+
+    auto new_unit = current_player_->getRace()->createUnit(icon->getUnit()->getUnitId());
+
+    current_player_->addUnit(new_unit);
+
+    updateSpecsWidget(new_unit);
+    showChosenUnits();
+
+    for (int i = 0; i < 10; i++) {
+        if (chosen_units_icons_[i]->getUnit() == new_unit)
+            chosen_units_icons_[i]->activate();
+    }
+    current_money_ -= 100;
+    setMoney(current_money_);
+}
+
+
+void RecruitmentScene::on_apply_clicked()
+{
+    qDebug() << "Exiting recruit army scene with player_id =" << current_player_id_;
+    if (current_player_id_ == 0) {
+        qDebug() << "Changing to 1";
+        GuiSceneManager::getInstance().changeScene("recruit_army", "1|" + QString::number(available_money_));
+    }
+}

+ 34 - 16
source/gui/uniticon.cpp

@@ -1,6 +1,7 @@
 #include <gui/uniticon.h>
 #include <QDebug>
 #include <QTime>
+#include <QBitmap>
 
 UnitIcon::UnitIcon(QWidget* parent, int width, int height)
     : QLabel(parent)
@@ -8,6 +9,7 @@ UnitIcon::UnitIcon(QWidget* parent, int width, int height)
     state_ = 0;
     width_ = width;
     height_ = height;
+    unit_ = nullptr;
 
     setAttribute(Qt::WA_Hover, true);
     installEventFilter(this);
@@ -23,19 +25,34 @@ UnitIcon::~UnitIcon()
 {
 }
 
+Unit* UnitIcon::getUnit() {
+    if (!unit_)
+        return nullptr;
+
+    return unit_;
+}
+
+void UnitIcon::setUnit(Unit* unit) {
+    unit_ = unit;
+    if (unit_ != nullptr)
+        setUnitIcon(unit_->getUnitIcon());
+    return;
+}
+
+void UnitIcon::setState(int state) {
+    state_ = state;
+}
+
+
 void UnitIcon::drawIcon() {
     QPixmap combined(width_, height_);
+    combined.fill(QColor(253, 234, 168));
     QPainter p(&combined);
 
-    if (state_ == 0) {
-        p.setBrush(Qt::NoBrush);
-        p.setPen(Qt::black);
-        p.drawRect(0, 0, width_, height_);
-    } else {
-        p.drawImage(QPoint(0, 0), icon_.scaled(width_, height_, Qt::KeepAspectRatio));
-    }
+    if (state_ != 0)
+        p.drawImage(QPoint(4, 4), icon_.scaled(width_ - 8, height_ - 8, Qt::KeepAspectRatio));
 
-    if (state_ == 0 || state_ == 1)
+    if (state_ != 2 && state_ != 3)
         p.drawImage(QPoint(0, 0), default_border_.scaled(width_, height_, Qt::KeepAspectRatio));
 
     if (state_ == 2)
@@ -45,6 +62,7 @@ void UnitIcon::drawIcon() {
         p.drawImage(QPoint(0, 0), active_border_.scaled(width_, height_, Qt::KeepAspectRatio));
 
     p.end();
+
     setPixmap(combined);
 }
 
@@ -86,37 +104,37 @@ void UnitIcon::activate() {
 
 void UnitIcon::mousePressEvent(QMouseEvent*)
 {
-    if (state_ == 0)
+    if (state_ == 0 || unit_ == nullptr || state_ >= 5)
         return;
 
     activate();
 
     QTime current_time = QTime::currentTime();
-    if (current_time.msecsSinceStartOfDay() - previous_click_time_.msecsSinceStartOfDay() < 200) {
+    if (current_time.msecsSinceStartOfDay() - previous_click_time_.msecsSinceStartOfDay() < 350) {
         deactivate();
-        emit doubleclicked();
+        emit doubleclicked(this);
     } else {
         previous_click_time_ = current_time;
-        emit clicked();
+        emit clicked(this);
     }
 }
 
 void UnitIcon::enterEvent(QEvent*)
 {
-    if (state_ == 0 || state_ == 3)
+    if (state_ == 0 || state_ == 3 || unit_ == nullptr || state_ >= 5)
         return;
 
     state_ = 2;
     drawIcon();
-    emit hovered();
+    emit hovered(this);
 }
 
 void UnitIcon::leaveEvent(QEvent*)
 {
-    if (state_ == 0 || state_ == 3)
+    if (state_ == 0 || state_ == 3 || unit_ == nullptr || state_ >= 5)
         return;
 
     state_ = 1;
     drawIcon();
-    emit unhovered();
+    emit unhovered(this);
 }

+ 20 - 8
source/race.cpp

@@ -6,6 +6,7 @@
 #include <QFile>
 #include <QTextStream>
 #include <QString>
+#include <QDebug>
 
 #include <cassert>
 #include <vector>
@@ -17,26 +18,37 @@ Race::Race(QString race_name, QObject *parent) : QObject(parent)
 
     units_factory_.addClass<Warrior, QString>("Warrior");
     units_factory_.addClass<Warrior, QString>("Mage");
+    units_factory_.addClass<Warrior, QString>("Rider");
+    units_factory_.addClass<Warrior, QString>("Rogue");
+    units_factory_.addClass<Warrior, QString>("Archer");
 
     QFile file(":/assets/units/" + race_name + "/units.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     QString unit_name = in.readLine();
 
     while (!in.atEnd()) {
-        all_units_list_.push_back(createUnit(unit_name));
         available_units_list_.push_back(unit_name);
+        all_units_list_.push_back(createUnit(unit_name));
         unit_name = in.readLine();
     }
 
+    if (unit_name.length() > 2) {
+        available_units_list_.push_back(unit_name);
+        all_units_list_.push_back(createUnit(unit_name));
+    }
+
     QFile file0(":/assets/units/" + race_name + "/racename.txt");
-    QTextStream in0(&file);
+    file0.open(QIODevice::ReadOnly);
+    QTextStream in0(&file0);
     race_name_ = in0.readLine();
 
     QFile file1(":/assets/units/" + race_name + "/descr.txt");
-    QTextStream in1(&file);
+    file1.open(QIODevice::ReadOnly);
+    QTextStream in1(&file1);
     race_descr_ = in1.readAll();
 
-    race_icon_.load(":/assets/units/" + race_name + "/descr.txt");
+    race_icon_.load(":/assets/units/" + race_name + "/icon.png");
 }
 
 QString Race::getRaceId() {
@@ -56,12 +68,12 @@ QString Race::getRaceDescr() {
 }
 
 Unit* Race::createUnit(QString unit_name) {
-    assert(std::count(available_units_list_.begin(), available_units_list_.end(), unit_name) != 0);
-
-    QFile file(":/asserts/units/" + race_id_ + "/" + unit_name + "/baseclass.txt");
+    qDebug() << unit_name;
+    QFile file(":/assets/units/" + race_id_ + "/" + unit_name + "/baseclass.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     QString class_id = in.readLine();
-
+    qDebug() << "Creating unit of base class " << class_id << " and major class" <<  race_id_ + "|" + unit_name;
     return units_factory_.createObject<QString>(class_id, race_id_ + "|" + unit_name);
 }
 

+ 13 - 1
source/racemanager.cpp

@@ -2,12 +2,14 @@
 #include "race.h"
 
 #include <QFile>
+#include <QDebug>
 #include <QTextStream>
 #include <QDebug>
 
 RaceManager::RaceManager(QObject *parent) : QObject(parent)
 {
-    QFile file(":/assets/units/raceslist.txt");
+    QFile file(":/assets/units/races.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     QString race_name = in.readLine();
 
@@ -16,11 +18,21 @@ RaceManager::RaceManager(QObject *parent) : QObject(parent)
             qWarning() << "Warning! found double occurences of races in raceslist.txt";
             continue;
         }
+        if (race_name.length() < 2)
+            continue;
+        qDebug() << available_races_;
+        available_races_.push_back(race_name);
+        races_[race_name] = new Race(race_name);
+        race_name = in.readLine();
+    }
 
+    if (race_name.length() >= 2) {
+        qDebug() << available_races_;
         available_races_.push_back(race_name);
         races_[race_name] = new Race(race_name);
         race_name = in.readLine();
     }
+
 }
 
 Race* RaceManager::getRace(QString race_name) {

+ 18 - 7
source/units/unit.cpp

@@ -15,8 +15,8 @@ Unit::Unit(QString parameters) {
 
     assert(params.size() >= 2);
 
-    unit_id_ = params[0];
-    race_id_ = params[1];
+    race_id_ = params[0];
+    unit_id_ = params[1];
 
     QString unit_folder = ":/assets/units/" + race_id_ + "/" + unit_id_ + "/";
 
@@ -31,18 +31,21 @@ Unit::Unit(QString parameters) {
 
 void Unit::loadUnitName(QString unit_folder) {
     QFile file(unit_folder + "unitname.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     unit_name_ = in.readLine();
 }
 
 void Unit::loadUnitDescr(QString unit_folder) {
     QFile file(unit_folder + "descr.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     unit_descr_ = in.readAll();
 }
 
 void Unit::loadUnitBaseClass(QString unit_folder) {
     QFile file(unit_folder + "baseclass.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     base_class_id_ = in.readLine();
 }
@@ -61,22 +64,29 @@ void Unit::loadUnitIcon(QString unit_folder) {
 
 void Unit::loadUnitPrevSpecs(QString unit_folder) {
     QFile file(unit_folder + "prevgrades.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     QString line = in.readLine();
-    while (in.atEnd()) {
+    while (!in.atEnd()) {
         parent_specs_.push_back(line);
         line = in.readLine();
     }
+    parent_specs_.push_back(line);
+    line = in.readLine();
+
 }
 
 void Unit::loadUnitUpgradeSpecs(QString unit_folder) {
     QFile file(unit_folder + "nextgrades.txt");
+    file.open(QIODevice::ReadOnly);
     QTextStream in(&file);
     QString line = in.readLine();
-    while (in.atEnd()) {
+    while (!in.atEnd()) {
         upgrade_specs_.push_back(line);
         line = in.readLine();
     }
+    upgrade_specs_.push_back(line);
+    line = in.readLine();
 }
 
 int Unit::getCost(){
@@ -114,9 +124,6 @@ int Unit::getActivityPoints(){
 int Unit::getStartingActivityPoints() {
 	return starting_activity_points_;
 }
-void Unit::setStartingActivityPoints(int value) {
-	starting_activity_points_ = value;
-}
 
 Cell* Unit::getLocation() {
 	return location_;
@@ -220,6 +227,10 @@ void Unit::moveToCell(Cell* destination) {
 	}
 }
 
+QString Unit::getUnitId() const {
+    return unit_id_;
+}
+
 QString Unit::getUnitName() const {
     return unit_name_;
 }