public static void Accept(PlayerController player, GameObject npc)
        {
            npc.GetComponent <tk2dSpriteAnimator>().PlayForDuration("doEffect", -1, "idle");
            player.RemoveAllPassiveItems();
            player.RemoveAllActiveItems();
            player.inventory.DestroyAllGuns();
            LoopManager.LoopAMT += 1;

            RGG.RandomizeStats();
            player.inventory.AddGunToInventory(TimeGun, true);
            player.ownerlessStatModifiers.Clear();
            if (player.characterIdentity != PlayableCharacters.Robot)
            {
                float armor = player.healthHaver.Armor;
                player.healthHaver.Armor -= armor;
            }
            if (player.characterIdentity == PlayableCharacters.Robot)
            {
                float armor = player.healthHaver.Armor;
                if (armor < 6)
                {
                    float ChangeAr = 6 - armor;
                    player.healthHaver.Armor += ChangeAr;
                }
                if (armor > 6)
                {
                    float ChangeAr = armor - 6;
                    player.healthHaver.Armor -= ChangeAr;
                }
            }
            AIActor.HealthModifier *= 1.40f;
            LoopManager.UsedLoop    = true;
            GameManager.Instance.LoadCustomLevel("tt_castle");
        }
Beispiel #2
0
 public static void FoyerAwake(Action <MainMenuFoyerController> orig, MainMenuFoyerController self)
 {
     orig(self);
     RGG.RandomizeStats();
     Replacement.RunReplace(m_cachedReplacementTiers);
     PrimeSaw.HasGottenVice = false;
     CrownChanger.Change();
 }
Beispiel #3
0
 public static void OnQuickRestart(Action <GameManager, float, QuickRestartOptions> orig, GameManager self, float duration, QuickRestartOptions options = default(QuickRestartOptions))
 {
     orig(self, duration, options);
     RGG.RandomizeStats();
     Replacement.RunReplace(m_cachedReplacementTiers);
     PrimeSaw.HasGottenVice = false;
     CrownChanger.Change();
 }
Beispiel #4
0
        protected override void DoEffect(PlayerController user)
        {
            user.RemoveAllPassiveItems();
            user.RemoveAllActiveItems();
            user.inventory.DestroyAllGuns();
            user.carriedConsumables.Currency           -= user.carriedConsumables.Currency;
            user.carriedConsumables.KeyBullets         -= user.carriedConsumables.KeyBullets;
            user.carriedConsumables.ResourcefulRatKeys -= user.carriedConsumables.ResourcefulRatKeys;
            user.Blanks -= user.Blanks;
            if (user.IsGunLocked == true)
            {
                user.IsGunLocked = false;
            }
            LoopManager.LoopAMT += 1;
            RGG.RandomizeStats();
            user.inventory.AddGunToInventory(TimeGun, true);
            user.ownerlessStatModifiers.Clear();
            if (user.characterIdentity != PlayableCharacters.Robot)
            {
                float armor = user.healthHaver.Armor;
                user.healthHaver.Armor -= armor;
                LootEngine.GivePrefabToPlayer(PickupObjectDatabase.GetById(85).gameObject, user);
                LootEngine.GivePrefabToPlayer(PickupObjectDatabase.GetById(85).gameObject, user);
                LootEngine.GivePrefabToPlayer(PickupObjectDatabase.GetById(85).gameObject, user);
            }
            if (user.characterIdentity == PlayableCharacters.Robot)
            {
                float armor = user.healthHaver.Armor;
                if (armor < 6)
                {
                    float ChangeAr = 6 - armor;
                    user.healthHaver.Armor += ChangeAr;
                }
                if (armor > 6)
                {
                    float ChangeAr = armor - 6;
                    user.healthHaver.Armor -= ChangeAr;
                }
            }

            AIActor.HealthModifier *= 1.40f;
            LoopManager.UsedLoop    = true;
            GameManager.Instance.LoadCustomLevel("tt_castle");
        }