Esempio n. 1
0
        public override void Pickup(PlayerController player)
        {
            base.Pickup(player);
            player.OnReceivedDamage += DoBigPoison;
            this.m_poisonImmunity    = new DamageTypeModifier();
            this.m_poisonImmunity.damageMultiplier = 0f;
            this.m_poisonImmunity.damageType       = CoreDamageTypes.Poison;
            Owner.healthHaver.damageTypeModifiers.Add(this.m_poisonImmunity);
            LiveAmmoItem liveammo = PickupObjectDatabase.GetById(414).GetComponent <LiveAmmoItem>();

            if (!PassiveItem.ActiveFlagItems.ContainsKey(player))
            {
                PassiveItem.ActiveFlagItems.Add(player, new Dictionary <Type, int>());
            }
            if (!PassiveItem.ActiveFlagItems[player].ContainsKey(liveammo.GetType()))
            {
                PassiveItem.ActiveFlagItems[player].Add(liveammo.GetType(), 1);
            }
            else
            {
                PassiveItem.ActiveFlagItems[player][liveammo.GetType()] = PassiveItem.ActiveFlagItems[player][liveammo.GetType()] + 1;
            }
            SpeculativeRigidbody specRigidbody = player.specRigidbody;

            specRigidbody.OnRigidbodyCollision += HandleRigidbodyCollision;
            if (uwu == true)
            {
                player.healthHaver.Armor = player.healthHaver.Armor + 1;
                uwu = false;
            }
        }
Esempio n. 2
0
        public override DebrisObject Drop(PlayerController player)
        {
            Gamer = false;
            LiveAmmoItem liveammo = PickupObjectDatabase.GetById(414).GetComponent <LiveAmmoItem>();

            player.specRigidbody.RemoveCollisionLayerIgnoreOverride(CollisionMask.LayerToMask(CollisionLayer.EnemyHitBox, CollisionLayer.EnemyCollider));
            if (PassiveItem.ActiveFlagItems[player].ContainsKey(liveammo.GetType()))
            {
                PassiveItem.ActiveFlagItems[player][liveammo.GetType()] = Mathf.Max(0, PassiveItem.ActiveFlagItems[player][liveammo.GetType()] - 1);
                if (PassiveItem.ActiveFlagItems[player][liveammo.GetType()] == 0)
                {
                    PassiveItem.ActiveFlagItems[player].Remove(liveammo.GetType());
                }
            }
            return(base.Drop(player));
        }
Esempio n. 3
0
        public override DebrisObject Drop(PlayerController player)
        {
            LiveAmmoItem liveammo = PickupObjectDatabase.GetById(414).GetComponent <LiveAmmoItem>();

            Owner.healthHaver.damageTypeModifiers.Remove(this.m_poisonImmunity);
            if (PassiveItem.ActiveFlagItems[player].ContainsKey(liveammo.GetType()))
            {
                PassiveItem.ActiveFlagItems[player][liveammo.GetType()] = Mathf.Max(0, PassiveItem.ActiveFlagItems[player][liveammo.GetType()] - 1);
                if (PassiveItem.ActiveFlagItems[player][liveammo.GetType()] == 0)
                {
                    PassiveItem.ActiveFlagItems[player].Remove(liveammo.GetType());
                }
            }
            SpeculativeRigidbody specRigidbody = player.specRigidbody;

            specRigidbody.OnRigidbodyCollision -= HandleRigidbodyCollision;
            return(base.Drop(player));
        }
Esempio n. 4
0
        public override void Pickup(PlayerController player)
        {
            base.Pickup(player);
            Gamer = true;
            player.specRigidbody.AddCollisionLayerIgnoreOverride(CollisionMask.LayerToMask(CollisionLayer.EnemyHitBox, CollisionLayer.EnemyCollider));
            LiveAmmoItem liveammo = PickupObjectDatabase.GetById(414).GetComponent <LiveAmmoItem>();

            if (!PassiveItem.ActiveFlagItems.ContainsKey(player))
            {
                PassiveItem.ActiveFlagItems.Add(player, new Dictionary <Type, int>());
            }
            if (!PassiveItem.ActiveFlagItems[player].ContainsKey(liveammo.GetType()))
            {
                PassiveItem.ActiveFlagItems[player].Add(liveammo.GetType(), 1);
            }
            else
            {
                PassiveItem.ActiveFlagItems[player][liveammo.GetType()] = PassiveItem.ActiveFlagItems[player][liveammo.GetType()] + 1;
            }
        }
Esempio n. 5
0
        public override DebrisObject Drop(PlayerController player)
        {
            DebrisObject debrisObject = base.Drop(player);

            LiveAmmoItem liveammo = PickupObjectDatabase.GetById(414).GetComponent <LiveAmmoItem>();

            if (PassiveItem.ActiveFlagItems[player].ContainsKey(liveammo.GetType()))
            {
                PassiveItem.ActiveFlagItems[player][liveammo.GetType()] = Mathf.Max(0, PassiveItem.ActiveFlagItems[player][liveammo.GetType()] - 1);
                if (PassiveItem.ActiveFlagItems[player][liveammo.GetType()] == 0)
                {
                    PassiveItem.ActiveFlagItems[player].Remove(liveammo.GetType());
                }
            }
            player.PostProcessBeamTick -= PostProcessBeamTick;
            SpeculativeRigidbody specRigidbody = player.specRigidbody;

            specRigidbody.OnRigidbodyCollision -= HandleRigidbodyCollision;
            return(debrisObject);
        }
Esempio n. 6
0
        public override void Pickup(PlayerController player)
        {
            LiveAmmoItem liveammo = PickupObjectDatabase.GetById(414).GetComponent <LiveAmmoItem>();

            if (!PassiveItem.ActiveFlagItems.ContainsKey(player))
            {
                PassiveItem.ActiveFlagItems.Add(player, new Dictionary <Type, int>());
            }
            if (!PassiveItem.ActiveFlagItems[player].ContainsKey(liveammo.GetType()))
            {
                PassiveItem.ActiveFlagItems[player].Add(liveammo.GetType(), 1);
            }
            else
            {
                PassiveItem.ActiveFlagItems[player][liveammo.GetType()] = PassiveItem.ActiveFlagItems[player][liveammo.GetType()] + 1;
            }

            player.PostProcessBeamTick += PostProcessBeamTick;
            SpeculativeRigidbody specRigidbody = player.specRigidbody;

            specRigidbody.OnRigidbodyCollision += HandleRigidbodyCollision;
            base.Pickup(player);
        }