### The intent appears to be that the random spell just comes into effect, at the cost of whatever the casting time of the chosen spell was. There is no clear rules answer here. The best we can do is to try to suss out the intent based on a couple observations. I know you asked for rules, not rulings, but sometimes it just doesn't work out that way. The rules aren't perfect and cannot account for every possible interaction. sometimes *rules-informed rulings* are the best you can do. #### 1. There is no restriction on the casting time for the spell we attempt to cast. The item description simply states no casting time restriction, so I should be able to attempt to cast a spell with a casting time of one bonus action, or a longer casting time. However - #### 2. Spells with a casting time of 1 Reaction are unclear, but probably shouldn't work. Spell with a casting time of 1 Reaction can only be cast in response to the trigger stated in the spell description. So the apparatus definitely doesn't allow you to just cast *shield* whenever you want. It is not clear to me that reaction spells even work at all. The rules for reactions state: >Certain special abilities, spells, and situations allow you to take a special action called a reaction. A reaction is an instant response to a trigger of some kind, which can occur on your turn or on someone else's. The Apparatus does not state that it allows you take reactions, but the rules for reactions require that a feature allow you to take a reaction. Unfortunately, I have to go with a ruling here, instead of a clear rules based conclusion. Based on the above, I'm ruling that reaction spells are not eligible, but there is some room to rule otherwise. #### 3. Not every spell on the random tables has a casting time of 1 Action. Rolling a 2 on the 4th level table yields *conjure minor elementals*, which has a casting time of *1 Minute*. Now, normally it takes 1 minute to finish casting *conjure minor elementals*. It is not said that you have "cast" the spell until the minute is up. However, the Apparatus says "you cast a different spell from the one you intended." Based on this, if you fail the ability check, and roll *conjure minor elementals*, it is cast completely at that moment, rather than the casting beginning at that moment. Unfortunately, this is once again not entirely clear, so this is my ruling based on what is here. Given this interaction with *conjure minor elementals*, I would extend it to bonus action spells. You attempt to cast a bonus action spell with your bonus action, you fail and roll on the table, and you get a different spell, still having expended your bonus action. This is the most intuitive ruling that results in not having to weird stuff with the action economy. [Medix2's answer](https://rpg.stackexchange.com/a/191132/62294) comes to a different conclusion about *shield* and covers some similar interactions with other magic items that don't really make things much clearer, which just highlights the fact that there is no clear rules answer with this, and an informed ruling is the best you're going to get.