Greatsword with light and thrown?? (New wild barbarian)

One of the posible wild surges from the playtest barbarian Wild Soul subclass:

Shadows weave around a weapon of your choice you are holding. Until your rage ends, your weapon deals psychic damage instead of its bludgeoning, slashing, or piercing damage, and it gains the light and thrown properties with a normal range of 20 feet and a long range of 60 feet. If you drop the weapon or throw it, the weapon dissipates and reappears in your hand at the end of your turn.

By default a greatsword (other big sticks are available) has both two-handed:

This weapon requires two hands when you Attack with it.

… and heavy:

Small creatures have disadvantage on Attack rolls with heavy Weapons. A heavy weapon’s size and bulk make it too large for a Small creature to use effectively.

But if the barbarian wild surge comes up with option 7, then it seems it would gain light:

A light weapon is small and easy to handle, making it ideal for use when fighting with two Weapons.

So… going by the mechanics alone, I see no problem between a weapon being both light and heavy, since a small creature would have disadvantage and you could duel wield, but thematically I have a problem with something being light AND heavy since, ya know, there both oposite6 ends of the “how heavy” scale. I guess the important question here is how heavy is it?

The mechanical problems come with light and two-handed. Two-handed sort of rules out duel wielding unless you have more than two arms (but I’ve seen this be overruled in official books, such as when a giant wields it in one hand) but light says that it’s perfect for duel wielding. So what happens in this case?

My interpretation is that you can’t duel weild because of the weight and heftyness, but light cancels that out, but I may well be wrong.

Do the new UA Fighting Style Thrown Weapon Fighting overlap with the Dueling Fighting Style?

PHB p. 72 (and others)

Dueling

When you are wielding a melee weapon in one hand and no other weapons, you gain a +2 bonus to damage rolls with that weapon.

PHB p.147

Thrown. If a weapon has the thrown property, you can throw the weapon to make a ranged attack. If the weapon is a melee weapon

With the release of the new UA Class Feature Variants, do the new Thrown Weapon Fighting can give the boost to Daggers when you Throw them one at a time?

In this post, it was answered that Thrown Weapons can get the Duelist Bonus. So if I throw one dagger at a time do I get a +3 bonus to damage if I have both Fighting Styles?

Thrown Weapon Fighting

You can draw a weapon that has the thrown property as part of the attack you make with the weapon.

In addition, when you hit with a ranged attack using a thrown weapon, you gain a +1 bonus to the damage roll

What is a good algorithm for generating a linear regression of positions in 3D space? (for getting the direction of a thrown object in VR)

I’m trying to get throwing to feel right in my VR game. I don’t plan on actually using physics to do this; my idea is to accurately determine the lateral direction of the throw, then move the object in the intended direction (with a doctored Y value) at a speed dependent on other factors.

The language of the code doesn’t matter too much, but I’m using Godot, so something that wouldn’t require me to import a bunch of different math libraries (by converting them to Godot’s Python-style GDScript) would be ideal. It doesn’t need to be robust.

To give you an idea of what I was thinking, my original plan was to save the position of the grabbing controller every frame while an object is being held, removing old positions if the controller is moving backwards, then averaging out the movement deltas over the last 10 or 15 frames or so before letting go (it should be consistent since Godot has a fixed-timestep “update” function available) and normalizing the vector to get the direction the object should travel in.

However, this blog post got me thinking that spending the time learning how to do the linear regression in a more robust way, then applying that to 3D/VR, might be worthwhile. I just wonder if, since I don’t need the actual linear or angular velocity, it might be overkill in terms of time spent on the feature.

Is the oil thrown on a creature consumed when it’s dealt fire damage and lit?

I had the idea of throwing oil flasks on enemies at level 1, then hitting them with a torch to deal a bunch of bonus fire damage.

PHB 152:

If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil.

PHB 152:

If you make a melee attack with a burning torch and hit, it deals 1 fire damage.

A flat 6 fire damage is pretty potent at level 1, but does the oil remain or does it burn out in a flash when hit (since it has no damage over time) when hit?

If not there is potential for a dual torch wielding PC to throw down 12 fire damage per round, or for multiple PCs to deal 6 damage per torch per PC per round.

Can you use a Shalantha’s delicate disk as a thrown weapon?

Given that Shalantha’s delicate disk is a horribly awful spell which I try to avoid as much as possible, me and my group were wondering wheter or not one can use a disk as a thrown weapon.
In the spell’s description it says that in order to activate the disk you need to shatter it in a specific way.

The disk stores an imbued spell indefinitely until it is shattered (a standard action requiring only 1 point of damage or a DC 5 Strength check).

Now, while this DM here would just rule that it depends and handle each situation accordingly (for example throw on a wall: it breaks, throw on soft ground/on a enemy: roll a d100 and see if it breaks), I was wondering about a more RAW interpretation of the text about shattering it.

Do thrown breakable items (like oil flasks) do damage when they hit?

Some items, specifically acid vials, alchemist’s fire, holy water, and oil flasks, allow you to throw them at enemies for various effects. To do this, you make a ranged attack, treating the object as an improvised weapon (which normally does damage equal to 1d4 + Dexterity modifier).

However, these objects have ‘on hit’ effects, such as dealing 2d6 damage in the case of the acid vial. Are these effects in addition to the ‘improvised weapon’ damage?

How can my rust code check for exceptions thrown by calls to java code?

I have rust code that invokes a java method:

let cls = je.find_class("com/purplefrog/batikExperiment/ToPixels")?;  let width = 400; let height = 400; let rgbs = je.new_byte_array(width*height*3)?; let rgbs2:JObject = JObject::from(rgbs);  let result = je.call_static_method(cls, "renderTo", "(II[B)V", &[     JValue::from(width),     JValue::from(height),     JValue::from(rgbs2), ])?; 

When I run it I get a lot of warnings like:

WARNING in native method: JNI call made without checking exceptions when required to from CallVoidMethod     at sun.dc.pr.PathStroker.dispose(Native Method)     at sun.dc.DuctusRenderingEngine.createStrokedShape(DuctusRenderingEngine.java:108)     at java.awt.BasicStroke.createStrokedShape(BasicStroke.java:301)     at org.apache.batik.gvt.StrokeShapePainter.getPaintedArea(StrokeShapePainter.java:125)     at org.apache.batik.gvt.StrokeShapePainter.getPaintedBounds2D(StrokeShapePainter.java:134)     at org.apache.batik.gvt.CompositeShapePainter.getPaintedBounds2D(CompositeShapePainter.java:156)     at org.apache.batik.gvt.ShapeNode.getPrimitiveBounds(ShapeNode.java:238)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(AbstractGraphicsNode.java:854)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:820)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(CompositeGraphicsNode.java:224)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(CompositeGraphicsNode.java:295)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:820)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(CompositeGraphicsNode.java:207)     at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(AbstractGraphicsNode.java:768)     at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:443)     at com.purplefrog.batikExperiment.ToPixels.renderTo(ToPixels.java:49) 

How can I modify my code to check for exceptions so it will not print hundreds of these warnings?

Unexpected token error thrown by JSON parse

Need some help in figuring out this JSON error.

This is just a sample code provided in Mastercard payment gateway documentation. I am trying to test it with test data provided by the merchant. I ran the code through a validator and it doesn’t return any errors.

Here is the code I’m trying to execute.

<!DOCTYPE html> <html>     <head>         <script src="https://test-gateway.mastercard.com/checkout/version/52/checkout.js"                 data-error="errorCallback"                 data-cancel="cancelCallback">         </script>          <script type="text/javascript">             function errorCallback(error) {                   console.log(JSON.stringify(error));             }             function cancelCallback() {                   console.log('Payment cancelled');             }              Checkout.configure({                 "merchant" : "TEST",                 "order" : {                     "amount" : 1000,                     "currency" : "USD",                     "description" : "Ordered goods" ,                     "id" : 123                  },                 "interaction" : {                     "operation" : "AUTHORIZE",                      "merchant" : {                         "name" : "ABC Hotel" ,                         "address" : {                             "line1" : "some road" ,                             "line2" : "some city"                                   }                         }                 }             });          </script>     </head>     <body>         ...         <input type="button" value="Pay with Lightbox" onclick="Checkout.showLightbox();" />         <input type="button" value="Pay with Payment Page" onclick="Checkout.showPaymentPage();" />         ...     </body> </html>

enter image description here

CSOM : Exception of type ‘System.OutOfMemoryException’ was thrown

I am trying to get the details of users from User Profiles using CSOM. I have a list of users in Excel file(approx 20000).

I am reading the excel file and storing data in DataTable, i am iterating over the DataTable rows and trying to get details for each of the user using CSOM.

foreach (DataRow row in Inputtbl_ExcelFile.Rows)         {             GroupCollection grps1;             User user;             i++;             string loginName = "";             try             {                 loginName = row["UserID"].ToString();                 //loginName = @"dom434567";                 #region GetUserDetails                      user = clientContext.Web.SiteUsers.GetByLoginName(loginName);                     clientContext.Load(user, user1 => user1.LoginName, user1 => user1.Email, user1 => user1.Groups, user1 => user1.Id);                      grps1 = user.Groups;                     clientContext.Load(grps1, groups => groups.Include(group => group.Title, group => group.Users, group => group.Id));                     clientContext.ExecuteQuery();                  string groupName = string.Empty;                 if (grps1.Count == 0)                     groupName = "NT AUTHORITY\authenticated users";                 foreach (Group gr in grps1)                 {                     groupName = groupName + gr.Title + ";";                 }                 #endregion                  #region UserProf                 //// PeopleManager class provides the methods for operations related to people                 PeopleManager peopleManager = new PeopleManager(clientContext);                  PersonProperties personProperties = peopleManager.GetPropertiesFor(loginName);                  clientContext.Load(personProperties);                 clientContext.ExecuteQuery();                  string Sector = personProperties.UserProfileProperties["Sector"];                 #endregion                   Outputtbl.Rows.Add(i, user.Id, loginName.Replace("i:0#.w|", ""), user.Email, groupName, "Success", Sector);              }             catch (Exception ep)             {                 Outputtbl.Rows.Add(i, "", loginName.Replace("i:0#.w|", ""), "", "", "Failed ," + ep.Message, "");                  Console.WriteLine(ep.Message);             }             clientContext.Dispose();         } 

Now the issue is after some point of time, approx after it has iterated for 2000 items or sometimes 1500 or sometimes even after 3000 items, it throws an error at line :

user = clientContext.Web.SiteUsers.GetByLoginName(loginName); 

Exception of type ‘System.OutOfMemoryException’ was thrown.

I have gone through various article on internet and I understand that this is not related physical memory space but is given slot available at one time.

Can anybody please help me understand if there is any other issue in code or if i can improve code?