Exemplo n.º 1
0
        public static void Init(AssetBundle expandSharedAssets1)
        {
            WoodCrestObject = expandSharedAssets1.LoadAsset <GameObject>("Wooden Crest");
            ItemBuilder.AddSpriteToObject(WoodCrestObject, expandSharedAssets1.LoadAsset <Texture2D>("junglecrest"), false, false);

            WoodenCrest woodenCrest = WoodCrestObject.AddComponent <WoodenCrest>();

            string shortDesc = "Protection of Wood";
            string longDesc  = "A shield made of wood. Provides fleeting protection.";

            ItemBuilder.SetupItem(woodenCrest, shortDesc, longDesc, "ex");
            // woodenCrest.quality = ItemQuality.SPECIAL;
            woodenCrest.quality = ItemQuality.EXCLUDED;
            woodenCrest.ItemSpansBaseQualityTiers      = false;
            woodenCrest.additionalMagnificenceModifier = 0;
            woodenCrest.ItemRespectsHeartMagnificence  = true;
            woodenCrest.associatedItemChanceMods       = new LootModData[0];
            woodenCrest.contentSource             = ContentSource.BASE;
            woodenCrest.ShouldBeExcludedFromShops = false;
            woodenCrest.CanBeDropped = false;
            woodenCrest.PreventStartingOwnerFromDropping = false;
            woodenCrest.PersistsOnDeath            = false;
            woodenCrest.PersistsOnPurchase         = false;
            woodenCrest.RespawnsIfPitfall          = false;
            woodenCrest.PreventSaveSerialization   = false;
            woodenCrest.IgnoredByRat               = false;
            woodenCrest.SaveFlagToSetOnAcquisition = 0;
            woodenCrest.UsesCustomCost             = false;
            woodenCrest.CustomCost                 = 65;
            woodenCrest.CanBeSold                  = false;
            woodenCrest.passiveStatModifiers       = new StatModifier[0];
            woodenCrest.ArmorToGainOnInitialPickup = 0;

            WoodCrestID = woodenCrest.PickupObjectId;
        }
Exemplo n.º 2
0
        public override DebrisObject Drop(PlayerController player)
        {
            DebrisObject debrisObject = base.Drop(player);

            player.healthHaver.HasCrest = false;
            player.OnReceivedDamage    -= PlayerDamaged;

            if (debrisObject)
            {
                WoodenCrest component = debrisObject.GetComponent <WoodenCrest>();
                if (component)
                {
                    component.m_pickedUpThisRun = true;
                    component.Break();
                }
            }

            return(debrisObject);
        }