From 276daaabd34a3d5491fa6ff4f22d169ecdd9e6f1 Mon Sep 17 00:00:00 2001 From: DodoBirb Date: Sun, 26 Jun 2022 11:12:05 +1000 Subject: [PATCH] Combat changes --- Export_Code/gml_Object_oCharacter_Collision_438.gml | 2 ++ Export_Code/gml_Object_oCharacter_Other_12.gml | 7 ++++++- Export_Code/gml_Object_oClient_Other_68.gml | 2 ++ Export_Code/gml_Object_oControl_Other_10.gml | 5 ++++- Export_Code/gml_Object_oMissile_Other_10.gml | 1 + Export_Code/gml_Script_damage_player.gml | 12 ++++++++++++ 6 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Export_Code/gml_Object_oCharacter_Collision_438.gml b/Export_Code/gml_Object_oCharacter_Collision_438.gml index afd9158..2602f01 100644 --- a/Export_Code/gml_Object_oCharacter_Collision_438.gml +++ b/Export_Code/gml_Object_oCharacter_Collision_438.gml @@ -2,6 +2,8 @@ if (other.sax != global.sax && global.playerFreeze == 0 && invincible == 0 && ca { if other.smissile other.damage = 50 + else + other.damage = 20 event_user(2) if (!global.spectator) global.showHealthIndicatorsTimer = 900 diff --git a/Export_Code/gml_Object_oCharacter_Other_12.gml b/Export_Code/gml_Object_oCharacter_Other_12.gml index 7f149b8..56720b1 100644 --- a/Export_Code/gml_Object_oCharacter_Other_12.gml +++ b/Export_Code/gml_Object_oCharacter_Other_12.gml @@ -4,6 +4,11 @@ if global.spectator otherOBJ = other.object_index if (invincible == 0) { + if (otherOBJ == 440 || otherOBJ == 438) + { + if other.smissile + global.hitBySuper = 1 + } damageDir = -1 knockbackY = -3 combo = 0 @@ -41,7 +46,7 @@ if (invincible == 0) kDown = 0 } } - if (otherOBJ == 440 && other.icemissiles && (!other.smissile) && (!((global.currentsuit == 2 && global.item[5] == 1))) && global.playerFreeze == 0 && invincible == 0 && canbehit && state != IDLE && state != SAVING && state != SAVINGFX && state != SAVINGSHIPFX && state != SAVINGSHIP && state != ELEVATOR && state != GFELEVATOR) + if ((otherOBJ == 440 || otherOBJ == 438) && other.icemissiles && (!other.smissile) && (!((global.currentsuit == 2 && global.item[5] == 1))) && global.playerFreeze == 0 && invincible == 0 && canbehit && state != IDLE && state != SAVING && state != SAVINGFX && state != SAVINGSHIPFX && state != SAVINGSHIP && state != ELEVATOR && state != GFELEVATOR) { global.playerFreeze = 120 damageDir = 0 diff --git a/Export_Code/gml_Object_oClient_Other_68.gml b/Export_Code/gml_Object_oClient_Other_68.gml index 351d47a..1c58c3c 100644 --- a/Export_Code/gml_Object_oClient_Other_68.gml +++ b/Export_Code/gml_Object_oClient_Other_68.gml @@ -386,6 +386,8 @@ switch type_event } if checkMissile otherOBJ = 440 + if (checkMissile && checkDamage == 100) + global.hitBySuper = 1 if (checkMissile && global.playerFreeze > 0 && global.playerFreeze <= 151 && (!global.frozenNormally)) { if ((!checkFreeze) || checkDamage == 100) diff --git a/Export_Code/gml_Object_oControl_Other_10.gml b/Export_Code/gml_Object_oControl_Other_10.gml index 1473738..e848e31 100644 --- a/Export_Code/gml_Object_oControl_Other_10.gml +++ b/Export_Code/gml_Object_oControl_Other_10.gml @@ -1,5 +1,8 @@ if (global.saxmode && global.enemyNearby) - exit +{ + if (global.sax || (!global.spectator)) + exit +} if (global.ingame == 1 && global.enablecontrol == 1 && room != rm_transition && ((!keyboard_check(vk_alt)) || os_type == os_linux)) { event_user(3) diff --git a/Export_Code/gml_Object_oMissile_Other_10.gml b/Export_Code/gml_Object_oMissile_Other_10.gml index 58405be..bc001ee 100644 --- a/Export_Code/gml_Object_oMissile_Other_10.gml +++ b/Export_Code/gml_Object_oMissile_Other_10.gml @@ -1,6 +1,7 @@ expl = instance_create(round(x), round(y), oMissileExpl) expl.sax = sax expl.myid = myid +expl.icemissiles = icemissiles if (smissile == 0) { expl.image_xscale = 0.6 diff --git a/Export_Code/gml_Script_damage_player.gml b/Export_Code/gml_Script_damage_player.gml index 8a56845..8ad6531 100644 --- a/Export_Code/gml_Script_damage_player.gml +++ b/Export_Code/gml_Script_damage_player.gml @@ -1,6 +1,10 @@ var damage_taken, currState, experimentalExtraSAXDamageMultiplier; if global.spectator exit +if (global.lavastate <= 7) + global.damageMult = 1 +if (global.lavastate > 7) + global.damageMult = 3 experimentalExtraSAXDamageMultiplier = 1 if global.experimental experimentalExtraSAXDamageMultiplier = 1.25 @@ -85,6 +89,13 @@ if (global.playerhealth > 0) sfx_play(sndHurt) ctrl_vibrate(0.5, 0.5, 10) invincible = 60 + if global.hitBySuper + { + if (global.currentsuit == 1) + invincible = 90 + if (global.currentsuit == 2 && global.item[5] == 1) + invincible = 90 + } if (global.playerFreeze > 0) { invincible = 45 @@ -147,3 +158,4 @@ with (oCharacter) } global.multiDamageCollision = 0 global.ignoreKnockback = 0 +global.hitBySuper = 0