diff --git a/SimplexRPGEngine/Engine source/Configs/Default.config.gmx b/SimplexRPGEngine/Engine source/Configs/Default.config.gmx index 683cf368..2dbf2521 100644 --- a/SimplexRPGEngine/Engine source/Configs/Default.config.gmx +++ b/SimplexRPGEngine/Engine source/Configs/Default.config.gmx @@ -435,7 +435,7 @@ 1 True false - 2147483648 + 0 2 0 <none> @@ -485,7 +485,7 @@ True False 100 - 1 + 6 SimplexTeam 2015 Matěj Štágl @@ -561,7 +561,7 @@ Configs\Default\WindowsUAP\logos\WideLogo.scale-100.png clBlack False - 1 + 6 SimplexTeam 2015 Matěj Štágl True diff --git a/SimplexRPGEngine/Engine source/DragonRise3.project.gmx b/SimplexRPGEngine/Engine source/DragonRise3.project.gmx index c054d4c9..8c1dceb7 100644 --- a/SimplexRPGEngine/Engine source/DragonRise3.project.gmx +++ b/SimplexRPGEngine/Engine source/DragonRise3.project.gmx @@ -366,6 +366,9 @@ sprites\sButterfly sprites\sRat + + sprites\sCombatDummy + @@ -741,7 +744,6 @@ sprites\sBarrel sprites\sprite244 sprites\sEmoticons - sprites\sprite270 sprites\sprite272 sprites\sSpawner sprites\sArrow @@ -855,6 +857,7 @@ + @@ -974,6 +977,7 @@ + @@ -1203,6 +1207,10 @@ + + + + @@ -1268,9 +1276,13 @@ objects\oEnemySlime objects\oSlimePart - objects\oEnemyImp + + objects\oEnemyImp + + + objects\oCombatDummy + objects\parEnemy - objects\oEnemySpawner objects\oTestNPC @@ -1549,7 +1561,8 @@ - objects\oCollectible1Kvejk + objects\oCollectibleItem1Kvejk + objects\parCollectible @@ -1568,6 +1581,7 @@ objects\oTeleport objects\oFence objects\oAltar + objects\oEnemySpawner objects\oChest diff --git a/SimplexRPGEngine/Engine source/objects/oBarrelExplosive.object.gmx b/SimplexRPGEngine/Engine source/objects/oBarrelExplosive.object.gmx index 0b203b1b..0ac34215 100644 --- a/SimplexRPGEngine/Engine source/objects/oBarrelExplosive.object.gmx +++ b/SimplexRPGEngine/Engine source/objects/oBarrelExplosive.object.gmx @@ -56,6 +56,33 @@ saveTimerMax = saveTimer; /// Free memory part_system_destroy(Sname); + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + /// Explode + +hp = 0; +scrGoreExplodeDropShards(irandom_range(3, 5), 8); + diff --git a/SimplexRPGEngine/Engine source/objects/oCollectibleItem1Kvejk.object.gmx b/SimplexRPGEngine/Engine source/objects/oCollectibleItem1Kvejk.object.gmx new file mode 100644 index 00000000..52f7b503 --- /dev/null +++ b/SimplexRPGEngine/Engine source/objects/oCollectibleItem1Kvejk.object.gmx @@ -0,0 +1,49 @@ + + + sRelic1 + 0 + -1 + 0 + 0 + parCollectible + <undefined> + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + /// Set up + +scrItemCollectibleSetUp(itemEnum.itemCollectible1, 0, collectibleEnum.item); + + + + + + + 0 + 0 + 0 + 0.5 + 0.100000001490116 + 0 + 0.100000001490116 + 0.100000001490116 + 0.200000002980232 + -1 + 0 + + diff --git a/SimplexRPGEngine/Engine source/objects/oCombatDummy.object.gmx b/SimplexRPGEngine/Engine source/objects/oCombatDummy.object.gmx new file mode 100644 index 00000000..1a46ad2d --- /dev/null +++ b/SimplexRPGEngine/Engine source/objects/oCombatDummy.object.gmx @@ -0,0 +1,129 @@ + + + sCombatDummy + 0 + -1 + -20 + 0 + parSolid + <undefined> + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + /// Set up + +event_inherited(); +image_speed = 0; +hit = false; + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + /// Hit + +hit = true; + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + /// Stop animation + +hit = false; + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + /// Draw self + +if (hit) {image_speed = 0.3;} +else {image_speed = 0;} + +draw_self(); + + + + + + + 0 + 0 + 0 + 0.5 + 0.100000001490116 + 0 + 0.100000001490116 + 0.100000001490116 + 0.200000002980232 + -1 + 0 + + diff --git a/SimplexRPGEngine/Engine source/objects/oStatusMenu.object.gmx b/SimplexRPGEngine/Engine source/objects/oStatusMenu.object.gmx index 7873f431..66ac08f3 100644 --- a/SimplexRPGEngine/Engine source/objects/oStatusMenu.object.gmx +++ b/SimplexRPGEngine/Engine source/objects/oStatusMenu.object.gmx @@ -42,8 +42,10 @@ prevHit = 0; prevHit2 = 0; push = 0; pushValue = 0; - - +lastIndexOver = 0; +indexAlpha = 0; +textAlpha = 0; +drawMode = 0; skillIndexName[1] = "Řemesla"; skillIndexName[2] = "Výřečnost"; @@ -51,6 +53,14 @@ skillIndexName[3] = "Čarodějnictví"; skillIndexName[4] = "Zlodějina"; skillIndexName[5] = "Zbraně"; +cName[0] = "Předměty"; +cName[1] = "Knihy"; +cName[2] = "Fragmenty minulosti"; +cName[3] = "Ocenění"; + +cNameSelected = 0; + + xoffset = 10; yoffset = 0; @@ -63,7 +73,17 @@ for(i = 0; i < celkem_vlastnosti; i++) incHealth = 5; incMana = 3; -drawMode = 0; + +for (var j = 0; j < 4; j++) + { + for (var i = 0; i < 40; i++) + { + collectibleUnlocked[j, i] = false; + collectibleIndex[j, i] = 86; + collectibleCaption[j, i] = ""; + } + } +scrCollectibleDefine(collectibleEnum.item, 0, "Kvejkova soška", "Vzpomínka na všumělce, který stál u zrodu Simplexu. Kvejk je programátor, herní designer, hudební skladatel a bůh ví, co ještě.", "bonusové zlato +1%"); @@ -214,6 +234,9 @@ alg(); c1 = c_white; c2 = c_white; +c3 = c_white; +t = "[Sbírka]"; +if (drawMode == 1) {t = "[-> Sbírka]";} if (mouse_in(view_xview + 400 - (sW / 2) - string_width("< Magie") - 16, view_xview + 400 - (sW / 2) - 16, view_yview + 10, view_yview + 24)) { @@ -242,10 +265,24 @@ if (mouse_in(view_xview + 400 + (sW / 2) + 16, view_xview + 400 + (sW / 2) + 16 } } +if (mouse_in(view_xview + 730, view_xview + 730 + string_width(t), view_yview + 10, view_yview + 24)) + { + c3 = c_lime; + + if (mouse_check_button_pressed(mb_left)) + { + if (drawMode == 0) {drawMode = 1;} + else {drawMode = 0;} + } + } clr(c1, -1); draw_text(view_xview + 400 - (sW / 2) - string_width("< Magie") - 16, view_yview + 4, "< Magie"); clr(c2, -1); draw_text(view_xview + 400 + (sW / 2) + 16, view_yview + 4, "Talenty >"); +clr(c3, -1); +alg("center", fntPixelSmall); +draw_text(view_xview + 750, view_yview + 15, t); +alg(); clr(c_white, -1); fnt(); @@ -531,6 +568,87 @@ draw_text_colored(xx + xoffset, yy + yoffset + 96, "Šance na kritický úder: " fnt(fntPixelSmall); draw_text_colored(xx + xoffset + 16, yy + yoffset + 128, "- Kritické poškození: " + string(round(oPlayer.vlastnost[vlastnost_kriticka_nasobic] * 100)) + "%"); fnt(); } +if (drawMode == 1) + { + xx = view_xview + 160; + yy = view_yview + 128; + indexOver = -1; + + // Navigation + for (var i = 0; i < array_length_1d(cName); i++) + { + var text = cName[i]; + var color = c_white; + + if (cNameSelected == i) {text = "> " + cName[i]; color = c_yellow;} + + clr(color, -1); + draw_text(view_xview + 10, view_yview + 30 + (i * 20), text); + } + + if (keyboard_check_pressed(vk_down)) {if (cNameSelected < array_length_1d(cName) - 1) {cNameSelected++;} else {cNameSelected = 0;} indexAlpha = 0; textAlpha = 0;} + if (keyboard_check_pressed(vk_up)) {if (cNameSelected > 0) {cNameSelected--;} else {cNameSelected = array_length_1d(cName) - 1;} indexAlpha = 0; textAlpha = 0;} + + + // Collectibles + for (var i = 0; i < 4; i++) + { + for (var j = 0; j < 10; j++) + { + var index = scrArray2DTo1D(j, i, 10); + var color = c_yellow; + + if (mouse_in(xx, xx + 32, yy, yy + 32) && collectibleUnlocked[cNameSelected, index]) + { + color = c_lime; + lastIndexOver = index; + indexOver = index; + } + + if (!collectibleUnlocked[cNameSelected, index]) + { + clr(c_gray, activatedAlpha / 3); + draw_roundrect(xx, yy, xx + 32, yy + 32, false); + clr(c_gray, activatedAlpha / 2); + draw_roundrect(xx, yy, xx + 32, yy + 32, true); + + clr(c_white, activatedAlpha / 4 * 3); + draw_text(xx + 13, yy + 5, "?"); + } + else + { + clr(color, activatedAlpha / 3); + draw_roundrect(xx, yy, xx + 32, yy + 32, false); + clr(color, activatedAlpha / 2); + draw_roundrect(xx, yy, xx + 32, yy + 32, true); + + clr(c_white, activatedAlpha); + draw_sprite(sTestItem, collectibleIndex[cNameSelected, index], xx + 18, yy + 16); + } + + xx += 48; + } + xx = view_xview + 160; + yy += 48; + } + + if (indexOver != -1) {indexAlpha = lerp(indexAlpha, 1, 0.1); if (indexAlpha > 0.2) {textAlpha = lin(textAlpha, 1, 0.05);}} + else {indexAlpha = lerp(indexAlpha, 0, 0.1); textAlpha = lerp(indexAlpha, 0, 0.1);} + + if (indexAlpha > 0.02 || textAlpha > 0.02) + { + alg("center", fntPixelHuge); + clr(c_white, min(activatedAlpha, indexAlpha)); + draw_text(view_xview + 400, view_yview + 330, collectibleCaption[cNameSelected, lastIndexOver]); + alg(); + fnt(fntPixel); + clr(c_white, min(activatedAlpha, textAlpha)); + draw_text_colored(view_xview + 20, view_yview + 360, collectibleText[cNameSelected, lastIndexOver]); + h = string_height(collectibleText[cNameSelected, lastIndexOver]); + fnt(fntPixelSmall); + draw_text_colour(view_xview + 20, view_yview + 360 + h, "Odkaz: " + collectibleFooter[cNameSelected, lastIndexOver], c_yellow, c_yellow, c_yellow, c_yellow, min(activatedAlpha, textAlpha)); + } + } } diff --git a/SimplexRPGEngine/Engine source/objects/oCollectible1Kvejk.object.gmx b/SimplexRPGEngine/Engine source/objects/parCollectible.object.gmx similarity index 87% rename from SimplexRPGEngine/Engine source/objects/oCollectible1Kvejk.object.gmx rename to SimplexRPGEngine/Engine source/objects/parCollectible.object.gmx index 2beb1dc6..6f6def3a 100644 --- a/SimplexRPGEngine/Engine source/objects/oCollectible1Kvejk.object.gmx +++ b/SimplexRPGEngine/Engine source/objects/parCollectible.object.gmx @@ -1,6 +1,6 @@ - sRelic1 + <undefined> 0 -1 0 @@ -8,7 +8,7 @@ <undefined> <undefined> - + 1 603 @@ -25,16 +25,9 @@ 1 - idd = itemEnum.itemCollectible1; -tempSpr = sprite_index; -sprite_index = sTestItem; -image_index = idd - 1; -image_speed = 0; + /// Stupid GM -itm_info_head = "[Kvejkova soška]"; -itm_stackable = false; -itm_number = 1; -itm_effect = rarity_token; +itm_info_head = "[" + oStatusMenu.collectibleCaption[type, idd2] + "]"; @@ -61,8 +54,9 @@ itm_effect = rarity_token; audio_play_sound(sndRindPickup, 0, 0); scrLog(-1, -1, -1, 0, 0.2); +scrCollectibleUnlock(type, idd2); +if (type == 0) {stateAddEntry("Nový předmět byl přidán do sbírky!", c_yellow);} instance_destroy(); - diff --git a/SimplexRPGEngine/Engine source/rooms/mapTest.room.gmx b/SimplexRPGEngine/Engine source/rooms/mapTest.room.gmx index a4127bc1..42b2f6c4 100644 --- a/SimplexRPGEngine/Engine source/rooms/mapTest.room.gmx +++ b/SimplexRPGEngine/Engine source/rooms/mapTest.room.gmx @@ -88,7 +88,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -356,7 +356,7 @@ - + @@ -389,8 +389,8 @@ - - + + @@ -399,8 +399,8 @@ - - + + @@ -514,7 +514,6 @@ - @@ -523,7 +522,8 @@ - + + diff --git a/SimplexRPGEngine/Engine source/scripts/inventoryDraw.gml b/SimplexRPGEngine/Engine source/scripts/inventoryDraw.gml index 58e91167..3981ef37 100644 --- a/SimplexRPGEngine/Engine source/scripts/inventoryDraw.gml +++ b/SimplexRPGEngine/Engine source/scripts/inventoryDraw.gml @@ -17,7 +17,7 @@ else {c_a = 0;} // Draw header clr(); fnt(fntPixelHuge); -draw_sprite(sInventoryTitle, 0, x, y); +draw_sprite(sInventoryTitle, 4, x, y); alg("center"); draw_text(x + 144, y + 14, inventory_title); fnt(fntPixelSmall); diff --git a/SimplexRPGEngine/Engine source/scripts/plainInitEnums.gml b/SimplexRPGEngine/Engine source/scripts/plainInitEnums.gml index 719c6394..5346fb84 100644 --- a/SimplexRPGEngine/Engine source/scripts/plainInitEnums.gml +++ b/SimplexRPGEngine/Engine source/scripts/plainInitEnums.gml @@ -60,3 +60,8 @@ enum equipmentEnum { weapon }; + +enum collectibleEnum +{ +item, book, fragment, achievement +} diff --git a/SimplexRPGEngine/Engine source/scripts/scrArray2DTo1D.gml b/SimplexRPGEngine/Engine source/scripts/scrArray2DTo1D.gml new file mode 100644 index 00000000..2bf354a9 --- /dev/null +++ b/SimplexRPGEngine/Engine source/scripts/scrArray2DTo1D.gml @@ -0,0 +1,12 @@ +/// scrArray2DTo1D(x, y, ylenght) + +var xx, yy, yl; +xx = 0; +yy = 0; +yl = 1; + +if (argument_count > 0) {xx = argument[0];} +if (argument_count > 1) {yy = argument[1];} +if (argument_count > 2) {yl = argument[2];} + +return (xx + (yy * yl)); diff --git a/SimplexRPGEngine/Engine source/scripts/scrCollectibleDefine.gml b/SimplexRPGEngine/Engine source/scripts/scrCollectibleDefine.gml new file mode 100644 index 00000000..a9c81ec7 --- /dev/null +++ b/SimplexRPGEngine/Engine source/scripts/scrCollectibleDefine.gml @@ -0,0 +1,19 @@ +/// scrCollectibleDefine(type, index, caption, body, footer) + +var i, c, b, f, t; +i = 0; +c = ""; +b = ""; +f = ""; +t = collectibleEnum.item; + +if (argument_count > 0) {t = argument[0];} +if (argument_count > 1) {i = argument[1];} +if (argument_count > 2) {c = argument[2];} +if (argument_count > 3) {b = argument[3];} +if (argument_count > 4) {f = argument[4];} + +oStatusMenu.collectibleCaption[t, i] = c; +oStatusMenu.collectibleText[t, i] = scrWordwrap(b, 700, fntPixel); +oStatusMenu.collectibleFooter[t, i] = f; + diff --git a/SimplexRPGEngine/Engine source/scripts/scrCollectibleUnlock.gml b/SimplexRPGEngine/Engine source/scripts/scrCollectibleUnlock.gml new file mode 100644 index 00000000..4bf18f3b --- /dev/null +++ b/SimplexRPGEngine/Engine source/scripts/scrCollectibleUnlock.gml @@ -0,0 +1,10 @@ +/// scrCollectibleUnlock(type, index) + +var t, i; +i = 0; +t = 0; + +if (argument_count > 0) {i = argument[0];} +if (argument_count > 1) {t = argument[1];} + +oStatusMenu.collectibleUnlocked[t, i] = true; diff --git a/SimplexRPGEngine/Engine source/scripts/scrItemCollectibleSetUp.gml b/SimplexRPGEngine/Engine source/scripts/scrItemCollectibleSetUp.gml new file mode 100644 index 00000000..1a09c6ad --- /dev/null +++ b/SimplexRPGEngine/Engine source/scripts/scrItemCollectibleSetUp.gml @@ -0,0 +1,21 @@ +/// scrItemCollectibleSetUp(itemID, collectibleID, type) + +idd = itemEnum.itemCollectible1; +idd2 = 0; +tempSpr = sprite_index; +type = 0; + +if (argument_count > 0) {idd = argument[0];} +if (argument_count > 1) {idd2 = argument[1];} +if (argument_count > 2) {type = argument[2];} + +sprite_index = sTestItem; +image_index = idd - 1; +image_speed = 0; + +itm_info_head = "" +itm_stackable = false; +itm_number = 1; +itm_effect = rarity_legendary; +alarm[0] = 1; + diff --git a/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_0.png b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_0.png new file mode 100644 index 00000000..3e68a5ad Binary files /dev/null and b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_0.png differ diff --git a/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_1.png b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_1.png new file mode 100644 index 00000000..37971413 Binary files /dev/null and b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_1.png differ diff --git a/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_2.png b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_2.png new file mode 100644 index 00000000..ef0d3661 Binary files /dev/null and b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_2.png differ diff --git a/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_3.png b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_3.png new file mode 100644 index 00000000..f7cfd762 Binary files /dev/null and b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_3.png differ diff --git a/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_4.png b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_4.png new file mode 100644 index 00000000..63a65e0f Binary files /dev/null and b/SimplexRPGEngine/Engine source/sprites/images/sCombatDummy_4.png differ diff --git a/SimplexRPGEngine/Engine source/sprites/images/sInventoryTitle_0.png b/SimplexRPGEngine/Engine source/sprites/images/sInventoryTitle_0.png index f0ccb2a7..d0da5980 100644 Binary files a/SimplexRPGEngine/Engine source/sprites/images/sInventoryTitle_0.png and b/SimplexRPGEngine/Engine source/sprites/images/sInventoryTitle_0.png differ diff --git a/SimplexRPGEngine/Engine source/sprites/images/sInventoryTitle_4.png b/SimplexRPGEngine/Engine source/sprites/images/sInventoryTitle_4.png new file mode 100644 index 00000000..b21dca25 Binary files /dev/null and b/SimplexRPGEngine/Engine source/sprites/images/sInventoryTitle_4.png differ diff --git a/SimplexRPGEngine/Engine source/sprites/sCombatDummy.sprite.gmx b/SimplexRPGEngine/Engine source/sprites/sCombatDummy.sprite.gmx new file mode 100644 index 00000000..1cec22b1 --- /dev/null +++ b/SimplexRPGEngine/Engine source/sprites/sCombatDummy.sprite.gmx @@ -0,0 +1,29 @@ + + + 0 + 32 + 32 + 0 + 0 + -1 + 0 + 2 + 61 + 5 + 59 + 0 + 0 + + 0 + + 0 + 64 + 64 + + images\sCombatDummy_0.png + images\sCombatDummy_1.png + images\sCombatDummy_2.png + images\sCombatDummy_3.png + images\sCombatDummy_4.png + + diff --git a/SimplexRPGEngine/Engine source/sprites/sInventoryTitle.sprite.gmx b/SimplexRPGEngine/Engine source/sprites/sInventoryTitle.sprite.gmx index 7510e324..0b5f84d6 100644 --- a/SimplexRPGEngine/Engine source/sprites/sInventoryTitle.sprite.gmx +++ b/SimplexRPGEngine/Engine source/sprites/sInventoryTitle.sprite.gmx @@ -24,5 +24,6 @@ images\sInventoryTitle_1.png images\sInventoryTitle_2.png images\sInventoryTitle_3.png + images\sInventoryTitle_4.png diff --git a/SimplexRPGEngine/Engine source/sprites/sprite270.sprite.gmx b/SimplexRPGEngine/Engine source/sprites/sprite270.sprite.gmx deleted file mode 100644 index e9127f29..00000000 --- a/SimplexRPGEngine/Engine source/sprites/sprite270.sprite.gmx +++ /dev/null @@ -1,23 +0,0 @@ - - - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - 0 - - 0 - 32 - 32 - -