diff --git a/Assets/Scenes/Level01.unity b/Assets/Scenes/Level01.unity index 4d2b26fec68189c23611e05206994ecb36afaf6e..6324ed9b005d5ae282f76b14fef2af1ecdccaf2e 100644 --- a/Assets/Scenes/Level01.unity +++ b/Assets/Scenes/Level01.unity @@ -4360,7 +4360,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 660127adb6b066043a008b88ccbbe913, type: 3} m_Name: m_EditorClassIdentifier: - countdownDuration: 3 + countdownDuration: 60 + isCompleted: 0 countdownText: {fileID: 961404588} --- !u!114 &564408470 MonoBehaviour: diff --git a/Assets/Scripts/Cheat/DoubleSpeed.cs b/Assets/Scripts/Cheat/DoubleSpeed.cs index a50d587347b3abb78cbfc7555be1a32edcdf1344..a7ede4740020823d6af555a09e59a4413d69b434 100644 --- a/Assets/Scripts/Cheat/DoubleSpeed.cs +++ b/Assets/Scripts/Cheat/DoubleSpeed.cs @@ -14,7 +14,7 @@ namespace Nightmare public DoubleSpeed() { commandID = "double_speed"; - commandDescription = "Player will move with double speed"; + commandDescription = "Your speed doubled, you're faster than the Flash"; AddCommandToConsole(); } @@ -22,7 +22,9 @@ namespace Nightmare public override void RunCommand() { _playerMovement = _player.GetComponent<PlayerMovement>(); - _playerMovement.speed *= 2; + // Double the speed but ensure it does not exceed 12 + float doubledSpeed = _playerMovement.speed * 2; + _playerMovement.speed = Mathf.Min(doubledSpeed, 12f); } public static DoubleSpeed CreateCommand() diff --git a/Assets/Scripts/Cheat/NoDamagePet.cs b/Assets/Scripts/Cheat/FullHpPet.cs similarity index 86% rename from Assets/Scripts/Cheat/NoDamagePet.cs rename to Assets/Scripts/Cheat/FullHpPet.cs index e2fe25ad5854f7bcc8a15478f8e4cde6924eddee..50dd5bc33c10600f234aada42b4a79336eea7eed 100644 --- a/Assets/Scripts/Cheat/NoDamagePet.cs +++ b/Assets/Scripts/Cheat/FullHpPet.cs @@ -4,7 +4,7 @@ using UnityEngine; namespace Nightmare { - public class NoDamagePet : CheatCommandBase + public class FullHpPet : CheatCommandBase { public override string commandID { get; protected set; } public override string commandDescription { get; protected set; } @@ -16,10 +16,10 @@ namespace Nightmare private PetDragonHealth petDragonHealth; private int currentPet;*/ - public NoDamagePet() + public FullHpPet() { - commandID = "no_damage_pet"; - commandDescription = "Enemy attacks will not affect to pet health"; + commandID = "full_hp_pet"; + commandDescription = "Your pet is immortal now"; AddCommandToConsole(); } @@ -56,9 +56,9 @@ namespace Nightmare }*/ } - public static NoDamagePet CreateCommand() + public static FullHpPet CreateCommand() { - return new NoDamagePet(); + return new FullHpPet(); } } } \ No newline at end of file diff --git a/Assets/Scripts/Cheat/NoDamagePet.cs.meta b/Assets/Scripts/Cheat/FullHpPet.cs.meta similarity index 100% rename from Assets/Scripts/Cheat/NoDamagePet.cs.meta rename to Assets/Scripts/Cheat/FullHpPet.cs.meta diff --git a/Assets/Scripts/Cheat/Motherlode.cs b/Assets/Scripts/Cheat/Motherlode.cs index 63f97acd24f8192bc58eb63d0d6dd2d1202eb2f0..ee16ffac68d050726a5ac2d4ca364fb1142c07b5 100644 --- a/Assets/Scripts/Cheat/Motherlode.cs +++ b/Assets/Scripts/Cheat/Motherlode.cs @@ -11,8 +11,8 @@ namespace Nightmare public Motherlode() { - commandID = "Motherlode"; - commandDescription = "Get 9999 stars"; + commandID = "motherlode"; + commandDescription = "Holy Moly you're a corruptor getting 9999 stars instantly"; AddCommandToConsole(); } diff --git a/Assets/Scripts/Cheat/NoDamage.cs b/Assets/Scripts/Cheat/NoDamage.cs index a47c6cf5586b09ef7e9facdd777df3b6dbe464f1..43d826b2f1f682ada5ab6f2bd1678a1417a3f7b1 100644 --- a/Assets/Scripts/Cheat/NoDamage.cs +++ b/Assets/Scripts/Cheat/NoDamage.cs @@ -14,7 +14,7 @@ namespace Nightmare public NoDamage() { commandID = "no_damage"; - commandDescription = "God mode activated, player immortal"; + commandDescription = "Immortal is your middle name now"; AddCommandToConsole(); } diff --git a/Assets/Scripts/Cheat/OneHitKill.cs b/Assets/Scripts/Cheat/OneHitKill.cs index 8cdb08a050e249edf10a8347dfe65ae7868d209b..30a85b9170fc2ec60a9244f7e7c61965954e23b2 100644 --- a/Assets/Scripts/Cheat/OneHitKill.cs +++ b/Assets/Scripts/Cheat/OneHitKill.cs @@ -20,7 +20,7 @@ namespace Nightmare public OneHitKill() { commandID = "one_hit_kill"; - commandDescription = "Enemy will die instantly only by one hit"; + commandDescription = "Saitama mode activated, one shoot enough to kill mother nature"; AddCommandToConsole(); } diff --git a/Assets/Scripts/Cheat/SkipQuest.cs b/Assets/Scripts/Cheat/SkipQuest.cs new file mode 100644 index 0000000000000000000000000000000000000000..b3a63deaf00ecb4cbd5ccaf4c66d429086bccb99 --- /dev/null +++ b/Assets/Scripts/Cheat/SkipQuest.cs @@ -0,0 +1,30 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Nightmare +{ + public class SkipQuest : CheatCommandBase + { + public override string commandID { get; protected set; } + public override string commandDescription { get; protected set; } + + public SkipQuest() + { + commandID = "skip_quest"; + commandDescription = "What a loser skipping the challenge"; + + AddCommandToConsole(); + } + + public override void RunCommand() + { + QuestManager.setIsCheat(true); + } + + public static SkipQuest CreateCommand() + { + return new SkipQuest(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Cheat/SkipQuest.cs.meta b/Assets/Scripts/Cheat/SkipQuest.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..75700d6bd435014f8732844080784935c61c2b13 --- /dev/null +++ b/Assets/Scripts/Cheat/SkipQuest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ff011ddc19082614d8edf9a817fc377b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Managers/CheatManager.cs b/Assets/Scripts/Managers/CheatManager.cs index c634e6736910cecf00f9c46465944b89e3027924..4175f8d46d58e90111b20366cf30145943ba5dab 100644 --- a/Assets/Scripts/Managers/CheatManager.cs +++ b/Assets/Scripts/Managers/CheatManager.cs @@ -46,8 +46,13 @@ namespace Nightmare OneHitKill.CreateCommand(); Motherlode.CreateCommand(); DoubleSpeed.CreateCommand(); - NoDamagePet.CreateCommand(); + FullHpPet.CreateCommand(); KillPet.CreateCommand(); + /*OrbDamage.CreateCommand(); + OrbHealth.CreateCommand(); + OrbSpeed.CreateCommand(); + */ + SkipQuest.CreateCommand(); } void Start() diff --git a/Assets/Scripts/Managers/QuestManager.cs b/Assets/Scripts/Managers/QuestManager.cs index 22d995f56379da5020b1cf698c7b31d1eff0ea63..11855b551373383f75ae30746cc090963516b7a5 100644 --- a/Assets/Scripts/Managers/QuestManager.cs +++ b/Assets/Scripts/Managers/QuestManager.cs @@ -11,6 +11,7 @@ namespace Nightmare public int rewardCompletion; private bool _added; + public static bool cheat = false; private void Awake() { @@ -46,6 +47,11 @@ namespace Nightmare public static bool IsQuestCompleted() { + if (cheat) + { + return true; + } + if (_timeObjectiveManager != null && _timeObjectiveManager.IsCompleted()) { if (_enemyObjectiveManagers.Count != 0) // If there are enemy objectives @@ -78,6 +84,13 @@ namespace Nightmare public static void ClearObjectives() { _enemyObjectiveManagers.Clear(); + cheat = false; + } + + + public static void setIsCheat(bool isCheat) + { + cheat = isCheat; } } }