Beispiel #1
0
        internal static void ApplyWorldBehaviors(Player player)
        {
            if (Main.netMode == NetmodeID.MultiplayerClient)
            {
                return;
            }

            string timerName = "NecrotisOmnisDeBuff_" + player.whoAmI;

            if (Timers.GetTimerTickDuration(timerName) > 0)
            {
                return;
            }

            Timers.SetTimer(timerName, 5, false, () => {
                var myplayer = player.GetModPlayer <NecrotisPlayer>();

                if (!player.dead && NecrotisOmnisDeBuff.CanBuff(player, myplayer.AnimaPercent))
                {
                    CursedBramblesAPI.SetPlayerToCreateBrambleWake(player, true, 64, 10);
                }
                else
                {
                    CursedBramblesAPI.UnsetPlayerBrambleWakeCreating(player);
                }
                return(false);
            });
        }
Beispiel #2
0
        public static bool CanPlaceBrambleAt(int tileX, int tileY)
        {
            Tile tileAt = Main.tile[tileX, tileY];

            if (tileAt == null || tileAt.active())
            {
                return(false);
            }

            if (tileAt.liquid != 0 && (tileAt.honey() || tileAt.lava()))
            {
                return(false);
            }

            return(CursedBramblesAPI.IsBrambleAllowedByHooks(tileX, tileY));
        }