Can a sorcerer spell cast from a magic item trigger a Wild Magic Surge?

A Wild Magic Surge may happen when a Wild Magic sorcerer (PHB, p. 103-104) casts a sorcerer spell of 1st level or higher:

Once per turn, the DM can have you roll a d20 immediately after you cast a sorcerer spell of 1st level or higher. If you roll a 1, roll on the Wild Magic Surge table to create a magical effect.

Some magic items let you cast spells that are on the sorcerer spell list. For example, the Staff of the Magi lets you cast enlarge/reduce, which is a sorcerer spell.

Would casting a spell on the sorcerer spell list from a magic item have the potential of causing a Wild Magic Surge (for a Wild Magic sorcerer) ?

What are the limitations of the ‘circumstance’ I can choose to trigger the Contingency spell?

The contingency spell description states:

Instead, it takes effect when a certain circumstance occurs. You describe that circumstance when you cast the two spells.

There is nothing written that requires the circumstance is perceivable, in contrast with how you can Ready an action. It also does not limit the distance. It also does not limit the details you could come up with (since 10 minutes is pretty long time). Possible scenario on my mind:

When the King Leo XIII died. I wouldn’t have known since I’m so far away, but when the Message cantrip takes effect, whispering my previous Message, now I know he is dead.

I’ve just realized that this spell is insanely powerful and can be abused if not properly limited. What are the limitations, anyway?

Does a successful Tumble Through trigger reactions?

The text of tumble through says:

You Stride up to your Speed. During this movement, you can try to move through the space of one enemy. Attempt an Acrobatics check against the enemy’s Reflex DC as soon as you try to enter its space. You can Tumble Through using Climb, Fly, Swim, or another action instead of Stride in the appropriate environment.

This doesn’t mention that it won’t trigger reactions such as attacks of opportunity. However in Failure it states:

Your movement ends, and you trigger reactions as if you had moved out of the square you started in.

Which implies that success won’t trigger those reactions.

Can you use darts as improvised “light melee weapons” to trigger Two-Weapon Fighting?

Can you take the Attack action and use darts as improvised “light melee weapons” to trigger Two-Weapon Fighting for the purpose of making two thrown attacks?

My financially challenged first level wizard chooses the attack action. He declares the darts to be improvised daggers so they are “treated as such”.

This declaration requires a ruling that a dart “is akin” to a dagger. This declaration; using the “as if it were that weapon” clause; changes them to “simple melee weapons” with 1d4 piercing damage, adds the “finesse”, “light” and “thrown” properties, and gives a range of 20/60.

Improvised Weapons PHB p.147. “In many cases, an improvised weapon is similar to an actual weapon and can be treated as such. For example, a table leg is akin to a club. At the DM’s option, a character proficient with a weapon can use a similar object as if it were that weapon and use his or her proficiency bonus.”

He holds them in each hand, this triggers a bonus action per Two-Weapon fighting. The thrown property permits me to thrown them in place of a melee attack. Negating the need for a melee attack.

Two-Weapon Fighting PHB p. 195 “When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative.

If either weapon has the thrown property, you can throw the weapon, instead of making a melee attack with it.

This resolves the thematic head scratching of why I can uses daggers to make two attacks, but not darts due to its placement on a weapon table. It also saves a poor 1st level wizard a few coins.

Is this interpretation correct RAW?

Blocking drop table for specific schema using trigger

I’m trying to prevent anyone from dropping tables on a specific schema named “test” unless the user is an rds_superuser but the function I wrote is blockin on all schemas.

CREATE OR REPLACE FUNCTION guard_tables() RETURNS event_trigger LANGUAGE plpgsql AS $  $   BEGIN IF TG_TABLE_SCHEMA = 'test' AND (SELECT COUNT(*) FROM pg_roles WHERE pg_has_role(CURRENT_USER, oid, 'member') AND rolname = 'rds_superuser') = 0 THEN RAISE EXCEPTION 'command % is disabled for this table', tg_tag; END IF; END; $  $  ; 

How do I get this to work?

When does “Paired opportunists” trigger?

I have a question about the feat “Paired Opportunists”:

Whenever you are adjacent to an ally who also has this feat, you receive a +4 circumstance bonus on attacks of opportunity against creatures that you both threaten. Enemies that provoke attacks of opportunity from your ally also provoke attacks of opportunity from you so long as you threaten them (even if the situation or an ability would normally deny you the attack of opportunity). This does not allow you to take more than one attack of opportunity against a creature for a given action.

So, when does it really trigger another AoO?

Case 1:

I trip an enemy with a “Greater Trip”:

You receive a +2 bonus on checks made to trip a foe. This bonus stacks with the bonus granted by Improved Trip. Whenever you successfully trip an opponent, that opponent provokes attacks of opportunity.

1) I trip an enemy – I make an AoO (provoking act – trip)

2) My ally makes an AoO (triggering act – trip)

3) I make an AoO (triggering act – enemy provoked my ally’s AoO from trip)

4) My ally makes an AoO (triggering act – enemy provoked my AoO from trip)

5) AoOs end (I can’t make more than one AoO with “Paired Opportunists”)

Case 2:

We have an “Outflank” and one of us crits:

Whenever you and an ally who also has this feat are flanking the same creature, your flanking bonus on attack rolls increases to +4. In addition, whenever you score a critical hit against the flanked creature, it provokes an attack of opportunity from your ally.

1) My ally makes an AoO (source – my crit)

2) I make an AoO (source – enemy provoked my ally’s AoO)

3) An ally makes AoO (source – enemy provoked my AoO)

4) AoOs end.

So, is it right, or am I piling up a lot of excess AoOs?

And if all of this AoOs are not allowed, when does “Paired opportunist” really get you an AoO? Because all of the triggers I see already provoke AoOs from both of you.

Create a trigger to insert into a view from an existing table

I have a table (Inventory) with below specifications:

Inventory :

([ProductID] [numeric](18, 3) NULL, [RegionID] [numeric](18, 3) NULL, [ShopCode] [int] NULL, [QTY] [float] NULL, [OLAPDate] [varchar](6) NULL, [Price] [float] NULL, [ID] [bigint] IDENTITY(1,1) NOT NULL PRIMARY KEY) 

And I have created a view on it to add a column (HaveQTY) following the below code:

CREATE VIEW V_Inventory_HaveQTY AS SELECT ID, HaveQTY = CASE                     WHEN QTY > 1 THEN 1                     ELSE 0                     END  FROM Inventory 

To finally create the below table:

SELECT I.ProductID, I.RegionID, I.OLAPDate, (100* (1.0*SUM(V.HaveQTY))/(COUNT(V.HaveQTY))) AS NoQTYStores INTO Inventory_NoQTYStores FROM Inventory  I INNER JOIN      V_Inventory_HaveQTY V ON I.ID = V.ID GROUP BY I.ProductID, I.RegionID, I.OLAPDate 

I monthly add new records to Inventory table via bcp utility and want to create a trigger to add these new records to the destination table (Inventory_NoQTYStores) via V_Inventory_HaveQTY view.

I am very new to writing triggers and not sure if I am writing it right. So I get the help from this answer and create the first trigger to insert the new records into V_Inventory_HaveQTY view:

CREATE TRIGGER Update_V_Inventory_HaveQTY ON Inventory AFTER INSERT AS  BEGIN     INSERT INTO V_Inventory_HaveQTY(         ID,         HaveQTY         )     SELECT ID, HaveQTY = CASE                     WHEN QTYMojoodi > 1 THEN 1                     ELSE 0                     END    FROM Inventory END; 

When I add a record manually to the Inventory table to check the trigger, however, I get the below error :

Msg 4406, Level 16, State 1, Procedure Update_V_Inventory_HaveQTY, Line 6 [Batch Start Line 35] Update or insert of view or function ‘V_Inventory_HaveQTY’ failed because it contains a derived or constant field.

Any help would be appreciated.

Do the Unearthed Arcana Tunnel Fighter Fighting Style and the Arcane Archer Fighter’s Grasping Arrow features trigger when standing from prone?

The Light, Dark, Underdark! Unearthed Arcana includes the Tunnel Fighter Fighting Style which states:

[…] As a bonus action, you can enter a defensive stance that lasts until the start of your next turn. While in your defensive stance, you can make opportunity attacks without using your reaction, and you can use your reaction to make a melee attack against a creature that moves more than 5 feet while within your reach.

And the Arcane Archer Fighter’s Grasping Arrow Arcane Shot feature states:

[…] The creature hit by the arrow takes an extra 2d6 poison damage, its speed is reduced by 10 feet, and it takes 2d6 slashing damage the first time on each turn it moves 1 foot or more without teleporting […]

What happens if the creature in question is currently prone, and stands from prone? Does this activate the Tunnel Fighter’s opportunity attack? Does this activate the 2d6 poison damage from Grasping Arrow?


Note I am aware that the following Q/A already exists:

  • Does standing up from prone trigger the damage from Booming Blade?

But I was told in my answer to another question that I cannot generalize answers there to conclude that standing from prone does not count as moving. So I am asking these separately instead.

I wanted to ask the question “Does standing from prone count as moving?” but was told that “There is no reason for the question “Does X count as Y?” to have a consistent, universally applicable answer.” and so have asked this instead.

Can a Barbarian/Wizard multiclass trigger a magic item while raging?

My party has a Barbarian who multiclassed to wizard. Levels 3 and 1, respectively.

He has incorporated the Staff of Defense (from Glasstaff, Lost Mines of P) into the handle of his great axe and is attuned to it. He also has Shield in his spellbook.

When raging he loses his ability to cast his Wizard spells, but can he use the Staff’s ability to cast Shield as a reaction while enraged?