dnd 5e – Can you use Feeblemind to Awaken more beasts in order to use them as sidekicks?

Step 1: Feeblemind

Let’s suppose you have a way to successfully stop the creature from being killed by Feeblemind’s psychic damage, or that the creature has enough hit points to take the damage and not die, it will have Intelligence and Charisma set to 1, which can be rolled for save again every 30 days. Thus whenever the creature successfully resists, this part of the effect will be over and its ability scores should return to the original values and whenever it fails, the scores are set to 1.

Step 2: Awaken

Awaken gives the target creature intelligence 10, provided its stats are in the range for it to be affected, which is less than score 4 or to not have that score. The spell also gives the target 1 language, the ability to move and sense the world if they couldn’t beforehand, all of these previous effects are implied to be permanent. Finally, target is also automatically charmed for 30 days.

So the main idea is to exploit/avoid the restriction on Awaken possible targets, forcing our target to be inside Awaken’s range of x < 4 through Feeblemind.

Step 3: Analysis

I’ll ignore the damage aspect for Feeblemind as there way to prevent or mitigate this damage.

Both spells have Duration: Instantaneous, but part of both spells have semi-permanent and permanent effects, which are the actual effects that are clashing against each other.

Given that both spells set an ability score to a value, i’d argue you can go about interpreting the change in two ways:

  • Route 1: The stronger spell wins (Feeblemind wins, as it’s a 8th
    level spell vs a 5th level spell)
  • Route 2: The order of casting determines the final value of that ability score (Awaken wins because it was casted after Feeblemind).
  • Route 3: Do either Route 1 or 2, but after 30 days, if the target fails the save for Feeblemind, Intelligence and Charisma get set to 1 again.

If we follow route 1:
Until Feeblemind is finally resisted or ended, the target will have Intelligence and Charisma scores of 1. But if somehow it was ended, then Awaken effect would kick in and make its Intelligence 10.

If we go route 2:
It would work regardless of Feeblemind remaining active forever or not (Intelligence would be 10 after Awaken, but charisma would remain 1 until the target resisted Feeblemind). I consider this to be the most probable route.

If we go route 3:
To go around this greater restoration, heal or wish would be required.

Final Considerations

Final answer is Yes, it’s possible, better with someone that can remove that Feeblemind.

However, I think we are violating the spirit of the rules here (why create a restriction that needs to be bypassed like this?).

If as a GM you’re not okay with the way these two spells can be combined, houserule that Awaken checks the original unmodified intelligence score on the creature’s sheet, not modified by anything and making it not castable on targets affected by Feeblemind.

magento2 – How to filter Order Collection by Specific Product Item name?

I would like to know how to filter order collection by using a product item name in magento 2?

$collection = $this->_orderCollectionFactory->create()->addAttributeToSelect('*');
        ("soi" => "sales_order_item"),
        'main_table.entity_id = soi.order_id',
     ->where('soi.name', array('like' => '% '.$params('filter-text').' %'))

Just tried this way and it didn’t work. I get no order collection using this collection filter. Any help will be appreciated! Thanks!

9 – The “Array” plugin does not exist after saving the order type form in Commerce

After saving any order type, the following error shows:

DrupalComponentPluginExceptionPluginNotFoundException: The "Array" plugin does not exist. Valid plugin IDs for Drupalstate_machineWorkflowManager are: invoice_default, order_default, order_default_validation, order_fulfillment, order_fulfillment_validation, payment_default, payment_manual, shipment_default in DrupalCorePluginDefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Any ideas?

order theory – Verification of a maximal antichain

In order theory, an antichain (Sperner family/clutter) is a subset of a partially-ordered set, with the property that no two elements are comparable with each other. A maximal antichain is the antichain which is not properly contained in another antichain. Let’s take the power set of ${1,2,ldots, n}$ as our partially-ordered set, here the order is given by inclusion. Then my question is, for any given antichain of this partially-orded set, is there any polynomial-time algorithm (with respect to $n$) to verify that this antichain is indeed “maximal”? In other words, verifying that any subset of ${1,2,ldots, n}$ is either contained in, or contains some set from the antichain. Here such algorithm should have polynomial run-time for ANY antichain.

Magento 2 Sales order creation upon checkout

I’m in the process of migration from v1.9 – v2.4 and realized that the sales orders are only created in Admin Panel after successful payment. Is there a way to configure it to behave like v1 where the order is created upon clicking Place Order? It used to create a Pending Payment order and had its status updated after payment (processing/cancelled).

Does mysql “order by” guarantees to give the same order for the same query every time if the sort key is equal?

When the field being sorted on is not unique, then the order of the results are non-deterministic, meaning there is no guarantee on their exact ordering. Specifically in your example case where the first 10 results all share the same exact value for the s field could yield indeterminate results for the first time you run the query vs the second time. It is possible you see the same result in both cases or not at all as you guessed. You would need to add another field to the ORDER BY clause that uniqifies the sort in order to always guarantee deterministic results.

For a little proof of case and further reading, here is a DBA.StackExchange question and answer where the user was experiencing unpredictable ordering of results because the field they were sorting on wasn’t unique. The comments on that answer briefly mention that being the cause.

magento2.3 – How do i get the order ID and Order Subtotal in the credit memo page?

Im currently trying to write a piece of code that refunds an order and attach it to the “refund” button in the credit memo page using the “sales_order_payment_refund” event.

But, right now, I want to be able to get Order_ID and Order_Subtotal from the credit memo page of the order I have opened to proceed, how can I retrieve those 2?

layout – move discount block below order total in checkout_index_index in sidebar

i want to move discount block below order total on one-page-checkout, like below in screenshot

enter image description here

I tried below code in checkout_index_index.xml but it is placing copon block in bottom

<referenceBlock name="checkout.root">
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="sidebar" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="summary" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="discount" xsi:type="array">
                                                    <item name="component" xsi:type="string">Magento_SalesRule/js/view/payment/discount</item>
                                                    <item name="children" xsi:type="array">
                                                        <item name="errors" xsi:type="array">
                                                            <item name="sortOrder" xsi:type="string">0</item>
                                                            <item name="component" xsi:type="string">Magento_SalesRule/js/view/payment/discount-messages</item>
                                                            <item name="displayArea" xsi:type="string">messages</item>

Magento 2, Cancels order after credit card payment complete

I’m facing an interesting issue.
When the customer pays with credit card, magento cancels the order automatically.
I have no idea how it happens tough.
Since i’m newbie, i couldn’t find out what is wrong.
Any ideas?

wp query – ElasticPress post type order error

I’ve built a custom search in WordPress using WP_Query that queries through two post types. The post types are almost identical but one parameter requires them to be two different post types. The query lists all listings displaying post_type_1 before post_type_2. The second sorting parameter is a length meta_key that lists the posts in order of length. Using just WordPress the search works but is incredibly slow, so elasticpress/elastic search was installed. Elastic search requires returning a numerical value in to sort the order.

$args = array(
    'ep_integrate'   => true,
    'post_type' => array('post_type_1', 'post_type_2'),
    'paged' => $paged,
    'tax_query' => (
           'taxonomy' => 'post_status',
           'terms' => 'term_1',
           'field' => 'slug',
           'include_children' => true,
           'operator' => 'IN',
     'meta_key' => 'length_range',
     'orderby' => (
         'type' => 'post_type',  //This is not a numerical value, elastic search returns 400 error
         'meta_value_num' => 'DESC',
     'relation' => 'AND',
     'meta_query' => $meta_query, // Checks if the search fields are used and includes them if so.

If I remove 'type' => 'post_type', elastic search no longer errors, but the search only returns one post type. There does not seem to be a numerical ID attached to post types, only posts. Using elastic search, how could I return two post types with post_type_1 displaying before post_type_2?