Can a spell be readied to trigger when its intended target comes into view?

Can I ready witch bolt, for instance, with the condition of attacking “the first goblin to come out of the cave” if I cannot see the goblin at the time of my (Ready) action? To be perfectly clear: at the time of the Ready action, the goblin is around a corner, in darkness: not targetable by witch bolt.

On the one hand: the Ready action states that (PHB p.193)

when you ready a spell, you cast it as normal but hold its energy….”

Part of casting a spell is targeting (inferred from “Targeting” as a sub-heading under “Casting a Spell”, PHB pp.202-204).

You can’t target something that you can’t see, so it would seem that since you can’t target the goblin at the time of the Ready action you can’t cast the spell in the first place.

On the other hand: isn’t this use of “Ready” the same as the “I’ll attack the first goblin to come out of the cave” that is the classic use-case for Ready? Picking a target is part of the Attack action, after all.

When does a reaction happen if the trigger is movement?

I realize there are a bunch of these questions about the ready action but I couldn’t find one that answers what I have in mind.

I know by RAW the reaction happens after the trigger finishes but how does that work with movement?

1. What if I specify the distance that must be travelled for the reaction to occur?

For example, if the trigger is “when that creature has moved 10 feet” but the creature’s movement that turn is to be 20 feet without any breaks – do I react at 10 feet or after the intended movement of 20 feet is completed?

2. What if the trigger was only specified as movement by an opponent?

For example, if the trigger is “when that creature moves” but the creature will move a total of 30 feet and plans to break for an attack in the middle of that movement, when do I react? Does the reaction occur after the first 15 feet but before the attack? Does it wait until the whole 30 feet movement is finished?

Even though I’ve used “I” as the player, I am asking as a DM. Is there something in RAW I’m missing or are there any designer comments on this by chance?

Does moving away from a prone creature trigger an opportunity attack?

I will give you the situation this came up in, but essentially I would like to know whether moving away from a prone creature would trigger an opportunity attack or not.

If you move 20 feet to attack as a Warhorse while in druid Wild Shape, the creature needs to do a DC 14 Strength check or be knocked prone. (PHB p.311)

If the target fails and is knocked prone you can make a bounus attack with your hooves.

If you want to move away to be able to charge again on your next turn, would this normally trigger an opportunity attack?

I am not sure because the creature would have the prone condition, so guidance with this would be helpful.

MySQL trigger calling stored procedure always get null value for out parameter of stored procedure

My stored procedure OUT parameter, always return a null value.

Here is sample Table, Trigger and Procedure code.

Table: test
Columns:

  • id - Int
  • status - enum(‘pass’, ‘fail’)

    • status - enum(‘pass’, ‘fail’) (null is allowed)

Values in a table:

id  |  status 1   |  null 

Trigger:

create trigger BEFORE_UPDATE_TEST before update on `test` for each row begin      call Test_BEFORE_UPDATE_TEST(old.id, @updatedStatus);         ## I always get @updatedStatus null/nil      if (@updatedStatus is not null and @updatedStatus <> new.status) then         set new.status = @updatedStatus;     end if;  end; 

Procedure:

create procedure Test_BEFORE_UPDATE_TEST (   IN id int(5),   OUT status enum(‘pass’, ‘fail’) ) begin    @status = ‘pass’;  END; 

What is wrong with this code, as I get unexpected result as null in the value @updatedStatus, which should be 'pass'.

I looked around following QAs on dba.stackexchange but could’t find solution.

I use MySQLWorkbench in MacOS Catalina and version of MySQL is 8.0.19.

Programmatically create a trigger within abnormally shaped room

So I’m trying to create a trigger in each of my rooms. These rooms can be created by players. Basically, I need to know all the objects in a room. These rooms can be shaped in weird and wonderful ways. I’m struggling to figure out how to “fill” an area? The other problem is that some walls are curved.

My current thinking is:

  • Loop over all the walls in a scene. Do 4 raycasts from each side of the wall and see if we hit other walls. If we do, we are likely in a room.

  • From the offset, literally check each node adjacent to that until we fill the room. Once I have this though, Im not sure what to do with it.

How do I create bounds that I can check for collisions with this data?

Does the result of ‘you cast …’ from rolling in Wild Magic Surge table can trigger Wild Magic Surge?

Wild Magic Surge triggers when

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

I rolled on the table, and rolled on “You cast Fireball as a 3rd-level spell centered on yourself”.

Because fireball is a sorcerer spell, does this mean that this casting triggers Wild Magic Surge feature again?

I know that the DM can choose not to roll on the table, but theoretically, this can build up an infinite chain of fireball!

Can you trigger a Finishing Blow off both Compromise AND Unmasking?

The dueling rules on P.159 of the core book states:

The first time their opponent becomes Compromised or unmasks during a duel, a character may immediately execute a finishing blow.

Does this mean you get to perform a finishing blow the first time each happens or one happens?

EG. Tonbo Testdummy gains enough strife to become compromised so Kitsu killhappy immediately performs a Finishing strike. Unfortunately they are forced to keep enough Strife Symbols to become compromised their self. Tonbo-san Unmasks to avoid the dice penalty for remaining compromised and potentially get a better roll. Does Kitsu-san get to attempt a second finishing blow?

Can Dispel magic be used on a readied spell before the trigger occurs?

NOTE: this does not refer to the case of readying a Dispel magic to stop a spell from being cast as in this question, but rather using Dispel magic to stop a readied spell from being cast.

While writing this answer, I ran into an interesting corner case regarding Dispel magic. Given that a readied spell is cast as normal on your turn, but its energy is held (requiring your concentration) until the trigger occurs, after which is released with your reaction, would this classify it as an ongoing magical effect (explicitly called out in the Dispel magic description)?

The rules on spell duration (PHB p. 203) explicitly split spells into instantaneous and concentration, mentioning that (empasis mine):

Concentration (PHB p. 203)

Some spells require you to maintain concentration in order to keep their magic active.

Official rules answers for March 2016

Whenever you wonder whether a spell’s effects can be dispelled or suspended, you need to answer one question: is the spell’s duration instantaneous? If the answer is yes, there is nothing to dispel or suspend. Here’s why: the effects of an instantaneous spell are brought into being by magic, but the effects aren’t sustained by magic (see PH, 203).

Was my players trigger for readied action legal?

I ran into a situation with ready action that I feel goes against the spirit of the game and maybe the rules but I’m unsure.

I’m running a homebrew game and I made this blade singer npc and gave them a magic item that when they took the dodge action they got more reactions. He challenged my players to a fight and if they could put up a good fight for x amount of turns he would give them information.

Once they figured out he was taking the dodge action every turn and hitting them with reactions they came up with this ready action. “When he stops benefitting from dodge and before he uses his action, I want to swing sword/ cast magic/ shoot arrow”. It was late in the session, they had almost reached the point where the fight was going to end anyway and I couldn’t really see where they had technically broken a rule, so I allowed it for just that fight. I’m not going to allow it in future fights and this guy and his magic item might never come back, but was my players ready action legal?