Skip to content

Commit c14c7fb

Browse files
author
lofcz
committed
Příprava komponenty NPC na release
1 parent 065bc81 commit c14c7fb

13 files changed

+81
-678
lines changed

DragonRise3/Engine source/DragonRise3.project.gmx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,9 +1026,6 @@
10261026
<object>objects\oEnemySlime</object>
10271027
<object>objects\oSlimePart</object>
10281028
</objects>
1029-
<objects name="Goblin">
1030-
<object>objects\oGoblin</object>
1031-
</objects>
10321029
<object>objects\parEnemy</object>
10331030
</objects>
10341031
<objects name="NPCs">
@@ -1043,7 +1040,6 @@
10431040
<objects name="Controllers">
10441041
<objects name="Camera">
10451042
<object>objects\oCamera</object>
1046-
<object>objects\oDebugCamera</object>
10471043
</objects>
10481044
<objects name="HUD">
10491045
<object>objects\oHUD</object>

DragonRise3/Engine source/objects/oCamera.object.gmx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ ds_list_destroy(listSpeed);
116116
<string>/// Jump to player position
117117

118118
if (instance_number(oPlayer) &gt; 0)
119-
{
120-
x = oPlayer.x;
121-
y = oPlayer.y;
122-
}
119+
{
120+
x = oPlayer.x;
121+
y = oPlayer.y;
122+
}
123123
</string>
124124
</argument>
125125
</arguments>
@@ -220,7 +220,7 @@ else
220220
<arguments>
221221
<argument>
222222
<kind>1</kind>
223-
<string>/// Don't draw anything
223+
<string>/// Draw in-game editor
224224

225225
if (keyboard_check_pressed(ord("H")))
226226
{

DragonRise3/Engine source/objects/oEnemySlime.object.gmx

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ scrEnemyIni(30,5,1,choose(1,1,2),"Slime",bestiaryEnemySlime,scrColorflag(c_blue)
5656
<string>/// Collide
5757
event_inherited();
5858

59-
if (mood = "jump") {randomize(); bonus_damage = 10; repeat(5) {instance_create(x-random(10)+random(10),y+random(10)-random(10),oBlob);}}
59+
if (mood == "jump") {randomize(); bonus_damage = 10; repeat(5) {instance_create(x-random(10)+random(10),y+random(10)-random(10),oBlob);}}
6060

6161
</string>
6262
</argument>
@@ -92,61 +92,14 @@ scrEnemyDamage(oPlayer,15, coloredName + " ti způsobil [flagDamage] [flagPoints
9292

9393

9494

95-
if (mood = "jump")
95+
if (mood == "jump")
9696
{
9797
if (dir = dir_up) {dir = dir_down; y-= 4;}
9898
else if (dir = dir_down) {dir = dir_up; y += 4;}
9999
else if (dir = dir_right) {dir = dir_left; x -= 4;}
100100
else if (dir = dir_left) {dir = dir_right; x += 4;}
101101
mood = "jump";
102102
}
103-
</string>
104-
</argument>
105-
</arguments>
106-
</action>
107-
</event>
108-
<event eventtype="6" enumb="7">
109-
<action>
110-
<libid>1</libid>
111-
<id>603</id>
112-
<kind>7</kind>
113-
<userelative>0</userelative>
114-
<isquestion>0</isquestion>
115-
<useapplyto>-1</useapplyto>
116-
<exetype>2</exetype>
117-
<functionname></functionname>
118-
<codestring></codestring>
119-
<whoName>self</whoName>
120-
<relative>0</relative>
121-
<isnot>0</isnot>
122-
<arguments>
123-
<argument>
124-
<kind>1</kind>
125-
<string>followMouse = false;
126-
</string>
127-
</argument>
128-
</arguments>
129-
</action>
130-
</event>
131-
<event eventtype="6" enumb="4">
132-
<action>
133-
<libid>1</libid>
134-
<id>603</id>
135-
<kind>7</kind>
136-
<userelative>0</userelative>
137-
<isquestion>0</isquestion>
138-
<useapplyto>-1</useapplyto>
139-
<exetype>2</exetype>
140-
<functionname></functionname>
141-
<codestring></codestring>
142-
<whoName>self</whoName>
143-
<relative>0</relative>
144-
<isnot>0</isnot>
145-
<arguments>
146-
<argument>
147-
<kind>1</kind>
148-
<string>can_move = !can_move
149-
followMouse = true;
150103
</string>
151104
</argument>
152105
</arguments>
@@ -180,7 +133,7 @@ if (random(100) &gt; 80)
180133
{
181134
mood = "jump";
182135
}
183-
else if (random(100) &gt; 80 &amp;&amp; mood = "attack")
136+
else if (random(100) &gt; 80 &amp;&amp; mood == "attack")
184137
{
185138
mood = "slime";
186139
}
@@ -228,7 +181,6 @@ scrEnemyLoot(oGem2, 1, 1, true, 10, 2);
228181
scrEnemyLoot(oGem3, 1, 1, true, 10, 2);
229182
scrEnemyLoot(oGem4, 1, 1, true, 10, 2);
230183
scrEnemyLoot(oGem5, 1, 1, true, 10, 2);
231-
232184
scrEnemyDie(true);
233185
}
234186
</string>

DragonRise3/Engine source/objects/oHUD.object.gmx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ spellsxPlus = 16;
6060
expxPlus = 8;
6161
craftingHelper = -1;
6262
craftingTitle = "Výroba";
63-
craftingMenuAlpha = 1;
63+
craftingMenuAlpha = 1;
6464
craftingMenuIndex[0] = "Předměty";
6565
craftingMenuIndex[1] = "Zdokonalení";
6666
craftingMenuIndex[2] = "Materiály";
6767
craftingMenuIndex[3] = "Zušlechtění";
6868
craftingMenuIndex[4] = "Alchymie";
69-
craftingTitleHelper = "";
70-
activeComponent = false;
71-
tempComponent = false;
69+
craftingTitleHelper = "";
70+
activeComponent = false;
71+
tempComponent = false;
7272

7373
drawCraftingMenu = 1;
7474
craftingSelectedIndex = -1;

DragonRise3/Engine source/objects/oPlayer.object.gmx

Lines changed: 7 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,9 @@ apiPlayerMoveStand();
323323
<kind>1</kind>
324324
<string>/// Handle movement
325325

326-
if (load &gt; 0) {load -- } else {load = -1; event_user(0);}
327326
apiPlayerMove();
328-
temp_rychlost = ((rychlost / 100) * parrySlowdown) * (1 - slowdown);
329-
time += 0.02;;
330-
cyber_r++;
331327

332-
// test
328+
// Game save &amp; load
333329
if (keyboard_check_pressed(vk_numpad7))
334330
{
335331
scrGameSave();
@@ -340,8 +336,7 @@ if (keyboard_check_pressed(vk_numpad8))
340336
}
341337

342338
if (can_move2)
343-
{
344-
339+
{
345340
if (keyboard_check(ord("J")))
346341
{
347342
if (spell[0] != "") {spell_index = 0; event_user(2);}
@@ -361,72 +356,16 @@ if (vlastnost[vlastnost_zkusenosti] &gt; vlastnost[vlastnost_max_zkusenosti])
361356
{
362357
event_user(1);
363358
}
364-
365-
366-
for (a = 0; a &lt; 3; a++)
367-
{
368-
if (spell_cd[a] &gt; 0) {spell_cd[a]--;}
369-
}
370-
371-
372-
if (keyboard_check_pressed(ord("V")))
373-
{
374-
inventoryExtend(8);
375-
}
359+
360+
for (a = 0; a &lt; 3; a++)
361+
{
362+
if (spell_cd[a] &gt; 0) {spell_cd[a]--;}
363+
}
376364

377365
if (keyboard_check_pressed(vk_escape))
378366
{
379367
scrPauseGame();
380368
}
381-
</string>
382-
</argument>
383-
</arguments>
384-
</action>
385-
</event>
386-
<event eventtype="6" enumb="4">
387-
<action>
388-
<libid>1</libid>
389-
<id>603</id>
390-
<kind>7</kind>
391-
<userelative>0</userelative>
392-
<isquestion>0</isquestion>
393-
<useapplyto>-1</useapplyto>
394-
<exetype>2</exetype>
395-
<functionname></functionname>
396-
<codestring></codestring>
397-
<whoName>self</whoName>
398-
<relative>0</relative>
399-
<isnot>0</isnot>
400-
<arguments>
401-
<argument>
402-
<kind>1</kind>
403-
<string>/// TEST
404-
405-
/***************************************************
406-
Příklad cutscény
407-
***************************************************/
408-
409-
/*
410-
var ins1, ins2;
411-
ins1 = instance_create(x-100, y+100, oTestNpc2); ins1.name = "První objekt";
412-
ins2 = instance_create(x+100, y+100, oTestObject); ins2.name = "Druhý objekt";
413-
414-
scrCutscenePlay(ins1, DemoCutscene, false, 1);
415-
*/
416-
417-
//scrHintShow("LoF", "Vítej v " +scrColorflag(c_aqua) + "Simplexu" + scrEndColorflag() + " ", "Ok");
418-
419-
//apiPlayerSay("Ahoj. :-)");
420-
//apiPlayerSay("Bavíš se?");
421-
//oHUD.draw = !oHUD.draw
422-
423-
//with(oHUD)
424-
// {
425-
// craftingItemsSprite[0, 4] = 7;
426-
// scrCraftingSetItemKnown(4, "Dřevo", "Poškození: " + scrColorflag(c_lime) + "5" + scrEndColorflag() + " - " + scrColorflag(c_lime) + "8#" + scrEndColorflag() + "Stamina na úder: " + scrColorflag(c_red) + "4 " + scrEndColorflag() + "- " + scrColorflag(c_red) + "5#");
427-
// }
428-
429-
scrQuestEntryAdd(0, "Oltář předků", "Alice mi řekla o prastarém oltáři, který už je dlouho zanedbán. Bude mi vděčná, když se postarám o tuto památku z druhého věku. Oltář najdu kousek severně od jejího domku.", "120G, 5x Lektvar života", scrColorText("[Hlavní úkol]", c_yellow));
430369
</string>
431370
</argument>
432371
</arguments>

DragonRise3/Engine source/objects/oSlimePart.object.gmx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
image_xscale = random_range(0.8,1.2);
3131
image_yscale = image_xscale;
32-
speed = random_range(4,6);
33-
secure = 6;
32+
speed = random_range(4,6);
33+
secure = 6;
3434
</string>
3535
</argument>
3636
</arguments>
@@ -56,8 +56,8 @@ secure = 6;
5656
<string>/// Lerp
5757

5858
image_alpha -= 0.02;
59-
image_angle += 1+(speed/10);
60-
speed += 0.02;
59+
image_angle += 1 + (speed / 10);
60+
speed += 0.02;
6161

6262
if (image_alpha &lt;= 0) {instance_destroy();}
6363
secure--;
@@ -86,9 +86,9 @@ secure--;
8686
<string>/// Bounce
8787

8888
if (secure &lt;= 0)
89-
{
90-
move_bounce_all(1);
91-
}
89+
{
90+
move_bounce_all(1);
91+
}
9292
</string>
9393
</argument>
9494
</arguments>

0 commit comments

Comments
 (0)