How does additional damage work with the Hand Mortar’s explosive property?

So I am building a gunslinger, and see a possible very high risk, but very high reward tactic for large groups.

Say I have a hand mortar, and fire it into a creature surrounded by at least 2 others. The hand mortar has the explosive property

Explosive. Upon a hit, everything within 5 ft of the target must make a Dexterity saving throw (DC equal to 8 + your proficiency bonus + your Dexterity modifier) or suffer 1d8 fire damage. If the weapon misses, the ammunition fails to detonate, or bounces away harmlessly before doing so.

Now say I choose to spend 2 grit points on the Violent Shot trick shot.

When you make a firearm attack against a creature, you can expend one or more grit points to enhance the volatility of the attack. For each grit point expended, the attack gains a +2 to the firearm’s misfire score. If the attack hits, you can roll one additional weapon damage die per grit point spent when determining the damage.

Does this mean that if I hit and do not misfire (roll above a 7, and above the main target’s AC) I deal 6d8 + DEX fire damage to the main target AND a potential 3d8 fire damage to the creature around the target, or does the "splash damage" not count as weapon damage?

This is entirely based on the DnD beyond Gunslinger subclass definition.

Defender Sword: do I use its property before or after the 1st attack?

In dnd 5e, the description for the Defender sword is (emphasis mine):

You gain a +3 bonus to attack and damage rolls made with this magic weapon.

The first time you attack with the sword on each of your turns, you can transfer some or all of the sword’s bonus to your Armor Class, instead of using the bonus on any attacks that turn. For example, you could reduce the bonus to your attack and damage rolls to +1 and gain a +2 bonus to AC. The adjusted bonuses remain in effect until the start of your next turn, although you must hold the sword to gain a bonus to AC from it.

I have 1 question:

  1. The description states that I can transfer a portion of the attack roll modifier to my AC the first time I attack. So if I’m a character that can hit twice in 1 round, does that mean I can choose to transfer a portion of the attack modifier just after my first attack? Or is it just before my first attack? It sounds to me like I get the attack bonus for the first attack of my turn, and then if I want to do the transfer, I can activate it just after that first attack, but the transfer is not allowed any other time.

Does the bane magic weapon property work like greater magic weapon or weapon enhancement for DR

The weapon property bane is a wonderful boost to a weapon on the occasions where its the right bane. One effect is that the weapon enhancement is +2 than what the weapon states, so a +1 bane (human) sword is actually a a +3 weapon against humans. But when dealing with creatures that have DR, the difference enhancement levels matter for overcoming DR, and other sources like magic weapon greater while increasing the enhancement, do not affect DR.

from magic weapon greater

This bonus does not allow a weapon to bypass damage reduction aside from magic.

Since the weapon property doesnt have the same wording as the spell, my thoughts are that it would be effective against higher DR types, but I have nothing to stand on for this.

Property “Centroid” of result from ConvexHullMesh[] can not be extracted

As the title describes, specifically, simple code below

ConvexHullMesh[RandomReal[1, {10, 2}]]["Centroid"] 

returns an error in V. 12.2, but it worked in V. 12.1.1 as far as I remember

BoundaryMeshRegion::unsupported 

Is it a bug introduced by the new version? Or is there another way to get the centroid?


Update

I just find it that not only "Centroid", but also extractions of other "Properites" fail; except for "BoundaryPolygons".


Update 2

To make this problem more understandable, let me make some modifications to the code.

mesh = ConvexHullMesh[RandomReal[1, {10, 2}]]; mesh["Properties"] 

This would return a long List of strings as the properties mesh has. And then

mesh[str] 

would return something, at least without any error message, where str is arbitrary one of the elements of the aforementioned property List; very much like OOP (objective-oriented programming). And that is what would happen in former versions like V. 12.1.1.

However now in V. 12.2, mesh["Centroid"] fails, even though "Centroid" can be found in that property List of mesh.

Why is the ‘Integrity’ property required in consensus protocols?

Formally a consensus protocol must satisfy the following three properties:

Termination

  • Eventually, every correct process decides some value.

Integrity

  • If all the correct processes proposed the same value "v", then any correct process must decide "v".

Agreement

  • Every correct process must agree on the same value.

"Termination" certifies the protocol is resilient to halting failures. "Agreement" deters any two correct processes from deciding on different values which would break consensus. But what about "Integrity", why is it required? If all correct processes propose "x" but then they all decide "y" (e.g. f(x) = y), is that a violation of consensus?

Counting a property of every sub-sets

Consider a array $ a$ of length $ n$ and $ a_i<n$ and a array of length $ n$ ,$ b=[0,0….(n$ $ times)]$ .Consider every sub-set of array $ a$ and denote it by $ s$ i need to find a number $ k$ with the largest number of occurrences or the most frequent one, If there are several options, choose the smallest one and then increase $ b[k]$ by one .I need to final $ b$ after considering all sub sets.

My idea is that ,I make a array $ val$ of length $ n$ where $ val[i]$ is number of times $ i$ occurred in array $ a$ .Consider that i am trying to find value for $ b[k]$ then i will create a array $ temp$ of length where $ temp[i]=min(val[k],val[i])$ .Then consider the value of $ val[k]$ to be $ m$ then in a subset element $ k$ can occur from $ 0$ to $ m$ times and using this i will find answer for all of its occurrences from $ 0$ to $ m$ which is a simple number of sub sets problem and finally i will have my answer.

But my algorithms complexity is bad as it quadratic or worse.Could anyone help me.