dnd 5e – Are my weapon damage house rules balanced?

TLDR: In my game, finesse and ranged weapons don’t get a stat damage bonus and Dueling gives the damage bonus to 1- and 2- handed weapons. Is this balanced?

Starting running a game for the first time in several years. Two of the players are new to D&D (a Warlock and a Bard). The other hasn’t played since 2nd edition (a Ranger).

During character creation, I gave them incorrect rules about weapon damage which I must have misremembered. I told them that Finesse and Ranged weapons don’t get a damage bonus, whereas other weapons get a strength bonus. The correct rule, having checked, is that Finesse and Ranged weapons get a damage bonus from dexterity.

Now, the Ranger player, remembering 2nd edition, gave his character a high dexterity for archery, but chose to have them wield a longsword with no shield. That means has base damage dice is the same as the bard with his rapier – both a d8. However, his bonuses are actually lower. At 1st level, he was a worse fighter than the bard!

After the first session, I took his player over the bonus and dual-weapon rules and checked if he wanted to keep using the longsword and not use a shield, and he did: he just chose to wield it two-handed for the higher damage dice. So I decided to keep my rules error a feature of the game. That way at least the Ranger gets a bonus on his damage dice, and the Bard does not.

I’m not sure why the Ranger wants to keep the longsword, I think he’s just got a strong image in his head from his 2nd edition Ranger characters. As a result, I also rejected the obvious compromise of letting the Ranger have a “longsword” that’s actually a rapier. I figured that might also cause problems with distributing magic items (is it a rapier? is it a sword?).

At 2nd level, the Ranger chose Duelling and, again, I’ve let him keep it as +2 damage with his longsword even though, strictly speaking, it’s not supposed to be used two-handed. Now the Bard gets +3 to hit and a d8 damage while the Ranger gets +1 to hit and a d10 +3 damage, which at least makes him seem like a bit more of a warrior.

I haven’t explained to the players that I’ve got the rule wrong. Not out of fear of losing face but because it makes the party a little better balanced, and I don’t want the Bard claiming his +3 damage, putting him back in front of the Ranger. None of the other players has a rulebook.

I don’t believe this is in any way game breaking: it just gives the party a marginally lower damage output. So long as I tailor the encounters accordingly, I don’t see it as an issue. But I know D&D 5e is much better “mechanically balanced” that some older editions and I might have missed something going forward when the party gains more levels and meets more powerful foes.

Is my approach here balanced and fair, in particular, have I made the Ranger overpowered and the Bard underpowered in comparison?

dnd 5e – How compatible are the published D&D 5e rules with the rules in the SRD?

It’s missing all changes made in errata since 2016

The Systems Reference Document was last updated to version 5.1 on January 12, 2016. However, it has not been updated at all since then. The FAQ on the linked page states:

Will more content be added to the SRD?

The full 5th edition game and its expansions are available for use via
the DMs Guild. New material will be added to the SRD if it is
necessary to keep this document and its contents updated to the latest
D&D rules.

The PHB received errata in 2017, all 3 core books (the PHB, DMG, and MM) received a larger round of errata in 2018, and the PHB was once again updated in errata in 2020. However, despite the second sentence of that answer, the SRD hasn’t been updated to match the changes to the corresponding portions of the 3 core books.

Several examples of these discrepancies follow; if you’re not interested in such details, skip to the latter potion of my answer.

Player’s Handbook

For instance, the 2017 PHB errata says:

Glyph of Warding (p. 245). The first sentence clarifies that the magical effect needn’t be harmful. The final two sentences of the first paragraph now read as follows: “The glyph can cover an area no larger than 10 feet in diameter. If the surface or object is moved more than 10 feet from where you cast this spell, the glyph is broken, and the spell ends without being triggered” (6th printing).

However, the first paragraph of the description of glyph of warding on p. 149 of the SRD reads:

When you cast this spell, you inscribe a glyph that harms other creatures, either upon a surface (…) or within an object that can be closed (…) to conceal the glyph. If you choose a surface, the glyph can cover an area of the surface no larger than 10 feet in diameter. If you choose an object, that object must remain in its place; if the object is moved more than 10 feet from where you cast this spell, the glyph is broken, and the spell ends without being triggered.

As you can see, the description in the SRD doesn’t match the current description of glyph of warding, which says:

When you cast this spell, you inscribe a glyph that later unleashes a magical effect. You inscribe it either on a surface (…) or within an object that can be closed (…) to conceal the glyph. The glyph can cover an area no larger than 10 feet in diameter. If the surface or object is moved more than 10 feet from where you cast this spell, the glyph is broken, and the spell ends without being triggered.

This difference does have mechanical implications; the original description of the spell doesn’t limit the size of the object, and doesn’t state that the glyph breaks if the object is moved.

Likewise, the 2018 PHB errata makes a number of modifications; most of them are minor wording clarifications, and some affect content that’s not in the SRD, but one of them affects the advantage and disadvantage rules:

(New) Advantage and Disadvantage (p. 173). In the first sentence of the fourth paragraph, both instances of “reroll” have been changed to “reroll or replace.”

However, on p. 76 of the SRD, that sentence says:

When you have advantage or disadvantage and something in the game, such as the halfling’s Lucky trait, lets you reroll the d20, you can reroll only one of the dice.

This is an important change, because it affects how advantage and disadvantage interact with things that replace a roll, like the School of Divination wizard’s Portent feature (though it’s not in the SRD) or the glibness spell (which is on p. 149 of the SRD).

The full list of changes in the 2018 PHB errata is too long to list here, but suffice it to say that it changed plenty of spells (e.g. contagion) – and the exhaustion condition, and the rules for grappling and shoving – in significant ways, and none of those changes are accounted for in the SRD.

The 2020 PHB errata only changes 2 other things, and only one of those things appears in the SRD. The description of the Heavy property on p. 65 of the SRD says that “Creatures that are Small” have disadvantage on attack rolls with weapons with the heavy property; the errata changes this to apply to Tiny creatures as well. This may seem minor, as it’s already a logical extension of the rule, but technically the property originally didn’t affect Tiny creatures at all. The errata fixes that, and the SRD does not include that fix either.

Dungeon Master’s Guide

Although examples from the DMG and MM aren’t relevant to your exact use-case (since players ostensibly aren’t looking at DM-facing materials most of the time), these discrepancies are still important to note. For instance, the 2018 DMG errata says:

(New) Rod of Lordly Might (p. 196). The following text is appended to the sentence on button 1: “(you choose the type of sword).”

However, the corresponding text on p. 240 of the SRD is missing this parenthetical:

If you press button 1, the rod becomes a flame tongue, as a fiery blade sprouts from the end opposite the rod’s flanged head.

This isn’t a contradiction so much as it is an omission (where the SRD is missing a clarification that was added to previously ambiguous text), but it’s just another example of how the SRD can differ from the rules.

Monster Manual

As for the 2018 MM errata, nearly every change affecting a monster that appears in the SRD causes the updated Monster Manual to “contradict” the SRD, since almost all of them change a saving throw modifier, skill modifier, attack roll bonus, or damage roll from one value to another. For instance, it says of the efreeti:

(New) Efreeti (p. 145). Innate Spellcasting: “3/day” changed to “3/day each.”

The corresponding portion of the efreeti’s Innate Spellcasting trait on p. 310 of the SRD says:

3/day: enlarge/reduce, tongues

1/day each: conjure elemental (fire elemental only), gaseous form, invisibility, major image, plane shift, wall of fire

This is a notable difference, because the version in the SRD makes it seem as if efreeti can cast any combination of enlarge/reduce and tongues 3 times per day in total, when in fact the efreeti can cast each of those two spells 3 times a day.

Likewise, for the purple worm, the MM errata says:

(New) Purple Worm (p. 255). Bite and Tail Stinger: +14 to hit (each was +9).

However, the statblock on p. 341 of the SRD (continued from the previous page) still includes the incorrect “+9” attack roll modifier (instead of +14), which is a dramatic difference – especially considering bounded accuracy.


There were other errors in the SRD even before errata

Even ignoring errata, parts of the SRD were inconsistent with the published rules even when the SRD was created/updated – particularly in the descriptions of certain magic items. For instance, the description of the sword of sharpness on p. 246 of the SRD says:

When you attack a creature with this weapon and roll a 20 on the attack roll, that target takes an extra 4d6 slashing damage.

However, the description of the sword of sharpness on p. 206 of the DMG says the target takes an extra 14 slashing damage, not 4d6. This distinction is especially important because a natural 20 on the die roll is typically a critical hit, which causes all of the attack’s damage dice to be rolled twice – including any extra damage dice added to the same attack. If the extra damage of the sword of sharpness were 4d6, this would actually be doubled to 8d6 (unless something caused it to become a regular hit instead of a critical hit).

However, as lead rules designer Jeremy Crawford unofficially clarified in a January 2018 tweet:

The sword of sharpness deals an extra 14 slashing damage when you roll a 20 on its attack roll. The SRD incorrectly says otherwise. Note that the SRD is not an official rules source for D&D.

The same discrepancy exists for several other magic items as well. The mace of smiting (DMG, p. 179) says that a nat. 20 on the attack roll does “an extra 7 bludgeoning damage, or 14 bludgeoning damage if it’s a construct”, but SRD p. 229 incorrectly lists these values as 2d6 and 4d6 respectively. Likewise, the sword of life stealing (DMG, p. 206) does an extra 10 necrotic damage on a nat. 20 and grants the wielder 10 temp HP, rather than 3d6 damage (and equivalent temp HP) as SRD p. 246 indicates. And finally, a vicious weapon (DMG, p. 209) deals an extra 7 damage on a nat. 20, not 2d6 as SRD p. 248 says; this discrepancy resulted in its own Q&A here (and another Q&A about the interaction of the supposed 2d6 damage roll with the critical hits rule).


The SRD isn’t an official rules source

As Crawford’s tweet mentions, the SRD is not an official rules source. As the description of the SRD on Wizards of the Coast’s official D&D website says:

The Systems Reference Document (SRD) contains guidelines for publishing content under the Open-Gaming License (OGL).

I elaborate on what this means in an answer to another Q&A about the interaction between SRD versions of material and published versions of the same material, where I reiterate that the SRD is not an official rules resource (and thus material from it is not a consideration in the official rules):

Essentially, the SRD details what official D&D 5e material can and can’t be (re)published by others using the OGL. (It doesn’t preclude other methods of legally publishing D&D material, such as under the terms of Dungeon Masters Guild (DMsGuild).) Notably, it’s not intended to function as even a partial list of the 5e rules; the material contained within the SRD is just a comprehensive list of what’s allowed to be published under the OGL.

Because the SRD is not official rules material, whenever the SRD conflicts with the latest version of the published rulebooks, the latest published rulebooks always take precedence. The SRD merely attempts to reflect some of the core rules in determining what D&D 5e material can be republished by others, and even the material included within it does not always match the versions in the source books (as detailed throughout this answer).

(Note that D&D Beyond does list all material that appears in either the SRD or the Basic Rules PDF as being from the “Basic Rules” – even though the Basic Rules and SRD have several important differences, both in purpose/function and in the content included. D&D Beyond’s “Basic Rules” listing is an inclusive combination of the two separate documents from Wizards of the Coast. However, for material that appears both in the SRD and the Basic Rules PDF, the descriptions always match the most up-to-date and official version of the material – i.e. the published books.)


All in all, this answer is merely intended to point out that the SRD does, in fact, now contradict the official rules in a number of places, due to later errata as well as existing discrepancies. Many of the changes in errata are minor clarifications, but some do have significant mechanical implications. It’s nevertheless important to keep these distinctions in mind when attempting to play the game using the SRD rather than the core rules, especially when some participants are relying on the SRD while others are using the published books.

dnd 5e – Holding, Delaying, or Readying an Action? – Rules As Written

Please point or link me to any official rules (rules as written) on when a character can delay, hold or ready an action for later in a round, instead of going on their initiative.

What does a character have to do to delay or hold an action during a round?

What actions are characters allowed to take when they delay?

dnd 5e – Are my accidental weapon damage house rules balanced?

TLDR: In my game, finesse and ranged weapons don’t get a stat damage bonus and Dueling gives the damage bonus to 1- and 2- handed weapons. Is this balanced?

Starting running a game for the first time in several years. Two of the players are new to D&D (a Warlock and a Bard). The other hasn’t played since 2nd edition (a Ranger).

During character creation, I gave them incorrect rules about weapon damage which I must have misremembered. I told them that Finesse and Ranged weapons don’t get a damage bonus, whereas other weapons get a strength bonus. The correct rule, having checked, is that Finesse and Ranged weapons get a damage bonus from dexterity.

Now, the Ranger player, remembering 2nd edition, gave his character a high dexterity for archery, but chose to have them wield a longsword with no shield. That means has base damage dice is the same as the bard with his rapier – both a d8. However, his bonuses are actually lower. At 1st level, he was a worse fighter than the bard!

After the first session, I took his player over the bonus and dual-weapon rules and checked if he wanted to keep using the longsword and not use a shield, and he did: he just chose to wield it two-handed for the higher damage dice. So I decided to keep my rules error a feature of the game. That way at least the Ranger gets a bonus on his damage dice, and the Bard does not.

I’m not sure why the Ranger wants to keep the longsword, I think he’s just got a strong image in his head from his 2nd edition Ranger characters. As a result, I also rejected the obvious compromise of letting the Ranger have a “longsword” that’s actually a rapier. I figured that might also cause problems with distributing magic items (is it a rapier? is it a sword?).

At 2nd level, the Ranger chose Duelling and, again, I’ve let him keep it as +2 damage with his longsword even though, strictly speaking, it’s not supposed to be used two-handed.

I haven’t explained to the players that I’ve got the rule wrong. Not out of fear of losing face but because it makes the party a little better balanced, and I don’t want the Bard claiming his +3 damage, putting him back in front of the Ranger. None of the other players has a rulebook.

I don’t believe this is in any way game breaking: it just gives the party a marginally lower damage output. So long as I tailor the encounters accordingly, I don’t see it as an issue. But I know D&D 5e is much better “mechanically balanced” that some older editions and I might have missed something. Is my approach here balanced and fair?

dnd 5e – Is my accidental house rules on weapon damage in D&D 5e balaced?

Starting running a game for the first time in several years. Two of the players are new to D&D (a Warlock and a Bard). The other hasn’t played since 2nd edition (a Ranger).

During character creation, I gave them incorrect rules about weapon damage which I must have misremembered. I told them that Finesse and Ranged weapons don’t get a damage bonus, whereas other weapons get a strength bonus. The correct rule, having checked, is that Finesse and Ranged weapons get a damage bonus from dexterity.

Now, the Ranger player, remembering 2nd edition, gave his character a high dexterity for archery, but chose to have them wield a longsword. That means has base damage dice is the same as the bard with his rapier – both a d8. However, his hit bonus is actually lower. At 1st level, he was a worse fighter than the bard!

After the first session, I double-checked with his player if he wanted to keep using the longsword, and he did: he just chose to wield it two-handed for the higher damage dice. So I decided to keep my rules error a feature of the game. That way at least the Ranger gets a bonus on his damage dice, and the Bard does not.

I’m not sure why the Ranger wants to keep the longsword, I think he’s just got a strong image in his head from his 2nd edition Ranger characters. As a result, I also rejected the obvious compromise of letting the Ranger have a “longsword” that’s actually a rapier. I figured that might also cause problems with distributing magic items (is it a rapier? is it a sword?).

At 2nd level, the Ranger chose Duelling and, again, I’ve let him keep it as +2 damage with his longsword even though, strictly speaking, it’s not supposed to be used two-handed.

I haven’t explained to the players that I’ve got the rule wrong. Not out of fear of losing face but because it makes the party a little better balanced, and I don’t want the Bard claiming his +3 damage, putting him back in front of the Ranger. None of the other players have a rulebook.

I don’t believe this is in any way game breaking: it just gives the party a marginally lower damage output. So long as I tailor the encounters accordingly, I don’t see it as an issue. But I know D&D 5e is much better “mechanically balanced” that some older editions and I might have missed something. Is my approach here balanced and fair?

Understanding htaccess cache rules – Webmasters Stack Exchange

Ok.

I’ve read a lot and I understand almost nothing.

I talk about cache, and I don’t know any cache system that is interested in keeping my files, for me, and for free. And, as I read, there are almost 5 other cache systems triggered when a user/client access let’s say www.webmasters.stackexchange.com

Ok, I know one cache. My visitor browser’s cache, which, once he accesses my website, he (the browser) may save the resources into his system (where the browser set it). The next time when the user navigates to the same page, the resources are loaded from his system and not from my website.

Further, I want to take advantage of the most important cache methods for my website. So I use some rules. The problem is that it doesn’t help me just to have them. I also want to understand them.

The code I found from stack overflow and other sites is (which I will modify further):

# Block 1 #
<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access plus 2 months"
    Header set Cache-Control "max-age=290304000, public"
</ifModule>

# Block 2 #
<IfModule mod_headers.c>
    <FilesMatch ".(js|css|xml|svg|gz)$">
        Header append Vary Accept-Encoding
    </FilesMatch>
</IfModule>

# Block 3 #
<IfModule mod_deflate.c>
    <filesMatch ".(js|css|html|php|txt|svg|otf|ttf|woff2|xml)$">
        SetOutputFilter DEFLATE
    </filesMatch>
</IfModule>

In the first block, I have some instructions but ONLY if mod_expires module is available. Anyway, inside the block 2, I also have at the last line:

    Header set Cache-Control "max-age=290304000, public"

Is it true that this line doesn’t belong to this block as instructions will be loaded only if mod_expires is available ? If mod_headers is disabled, then I will probably get a 500 error. So this line should better be in the <IfModule mod_headers.c> block. Isn’t it ?

So, the code looks now like this:

# Block 1 #
<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access plus 2 months"
</ifModule>

# Block 2 #
<IfModule mod_headers.c>
    <FilesMatch ".(js|css|xml|svg|gz)$">
        Header append Vary Accept-Encoding
    </FilesMatch>
    
    # Line from block 1 #
    Header set Cache-Control "max-age=290304000, public"
</IfModule>

# Block 3 #
<IfModule mod_deflate.c>
    <filesMatch ".(js|css|html|php|txt|svg|otf|ttf|woff2|xml)$">
        SetOutputFilter DEFLATE
    </filesMatch>
</IfModule>

I’m not interested in checking if module xyz is available. It must be. So I will remove IF conditions. If, for some reason, one module won’t be available in the future, then I’ll probably get a 500 error, which is fine for me. I want to take advantage of the cache methods for true, not if whatever. It’s something wrong here ?

So, the code looks now like this:

# Block 1 #
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access plus 2 months"

# Block 2 #
Header set Cache-Control "max-age=290304000, public"
<FilesMatch ".(js|css|xml|svg|gz)$">
    Header append Vary Accept-Encoding
</FilesMatch>

# Block 3 #
<filesMatch ".(js|css|html|php|txt|svg|otf|ttf|woff2|xml)$">
    SetOutputFilter DEFLATE
</filesMatch>

Inside block 1 I have the first line which sets “ExpiresActive on”, which is clear. I activate the module even if it is available.

Next, on second line I set ExpiresByType image/jpg “access 1 year”

Is this the cache system for the user’s browser (I talked above) ? I understand well ?

What cache availability should I set here ? It depends on the file ? I see 1 year for some files and one month for others. What should I consider when set the expiration time ?

Why:

ExpiresByType image/jpg "access 1 year"

And not:

ExpiresByType image/jpg "1 year"

What’s access keyword doing here ?

A user access my website which contains one jpg image. Next, the browser loads and save that image and keeps it for one year. After one year, the browser automatically delete this image and the next time the user access my website, the browser will save the jpg image again for another year. If the user cleans his browser cache after let’s say 2 months, the next time when the user access my website, the browser saves the image again, even if a year hasn’t passed. Do I understand ok ?

What types of files should I put here ?

I know that images, css files and javascript files are almost required. Do I need to put other files here ?

Does ExpiresDefault rule works for php files too ? I mean, if I have a contact.php file with some content and I modify the content of contact.php, because of ExpiresDefault rule, the content won’t change to the user ?

If one image file was changed, how would I force the browser to re-download the file ? I understand that the recommendation would be to set another link for that image, but let’s say I want to use the same url. The name of that image may be good for optimization and I may not want to change his name or even his directory. So, if the image was already saved to the user, how can I force a re-download ?

Now, last line of block 1 is:

ExpiresDefault "access plus 2 months"

I understand that this is the default expiration time, but for what type of files ?

In the block 2 I have now:

Header set Cache-Control "max-age=290304000, public"

Does this has something to do with block 1 ? If the answer is yes, then means that a file saved in the user’s browser won’t exceed the time set in max-age even if I set ExpiresByType image/jpg "access 999 years" ?

What files are included in Header set Cache-Control "max-age=290304000, public" ? For what types of files is this max-age cache available ?

Can someone give me an example of what are the benefits of Header append Vary Accept-Encoding rule ? And an example of what happens if I don’t use it ?

In the block 2, the Header append Vary Accept-Encoding is available only for js, css, xml, svg, gz files. There are other files should I put here ? What should I consider when I set those file types ?

Can someone explain what does SetOutputFilter DEFLATE with an example ? And what happens if I don’t use this ?

Here, almost like in block 2, the line SetOutputFilter DEFLATE is available for js, css, html, php, txt, svg, otf, ttf, woff2 and xml files. Should the php files be here ? Should I put other file types here too ?


That’s all. Please, be kind and don’t condemn my questions. I just try to understand what I’m doing…

Is web application routing is either Enterprise or Application Business Rules from the viewpoint of Clean Architecture?

From the one side, customer can order “I need products list on /products and conversion statistics on /statistics/conversion“. In this case, we need to obey in and write something like:

const RoutingData: { (routeID: string): Route } = {
  products: {
    URN: "/products",
    queryParameters: {
      category: "CATEGORY",
      tag: "TAG"
    }
  },
  conversion: {
    URN: "/conversion"
  }
}

I suppose, in this case the routing is the Business Rules, because the customers wants it and it will bring the income to customer (at least, the customer thinks as such).

From the other side, the routing is just the Web application feature, but the Business rules must not know about implementation method like Web or Native.

Just in case, I’ll remind the Clean Architecture terminology:

enter image description here

forms – Adding a dependent field with the Business Rules module makes the loading time and queries increase abnormally

I have an entity form with a dependent field. The dependent field is created following this guide and using Business Rules module.

Everything works fine, but now the form takes an insane amount of time to load (7011.24 ms) and makes an insane amount of queries (4040).

These queries come from business_rules.process and many of them are repeated. For example, this one SELECT name, value FROM key_value_expire WHERE collection = :collection AND expire > :now is made 1287 times.

If I disable the Bussines Rules module or remove the dependent field, everything goes to normal, with ~120 queries and normal form loading time.

Is there something I am missing? If not, any alternatives to make a dependent field?

linear programming – Minimize total cost of shopping cart with discount rules

Here is the problem I am trying to solve, given 2 items to purchase from 2 stores with a discount for Store 1, what is the cheapest way to purchase the items?

Discount for Store 1, 50% off with minimum spend of $15 capped at $6.

Item 1 Store 1 = $5
Item 1 Store 2 = $10
Item 2 Store 1 = $10
Item 2 Store 2 = $5

The obvious answer would be to purchase both items from Store 1, at a cost of $10 + $5 - $6 = $9

Here is my formulation, which I got stuck when the discount amount is less than $6 not calculating correctly.

Item 1 Store 1 = x1 = $5
Item 1 Store 2 = x2 = $10
Item 2 Store 1 = x3 = $10
Item 2 Store 2 = x4 = $5
Min Spend Discount Binary = x6
Max Spend Discount Binary = x7

Minimize
 obj: 5 x1 + 10 x2 + 10 x3 + 5 x4 - 6 x6 
+ ( - 5 x1*x5 + 5 x1*x6 - 10 x3*x5 + 10 x3*x6 ) / 2 # apply discount and compensate amount if exceeds capped discount

Subject To
 c1: x1 + x2 = 1 // need to purchase item 1 from either store
 c2: x3 + x4 = 1 // need to purchase item 2 from either store
 c3: 5 x1 + 10 x3 - 12 x5 >= 0 // min spend for item 1 and item 2 from store 1 needs to exceed $12
 c4: x5 - x6 = 0 // this is the part that I got stuck, this works when the total cost exceeds the discount cap but doesn't work when it's below the cap

Bounds
 0 <= x1 <= 1
 0 <= x2 <= 1
 0 <= x3 <= 1
 0 <= x4 <= 1
 0 <= x5 <= 1
 0 <= x6 <= 1

Binaries
 x1 x2 x3 x4 x5 x6
End 

I’m sure I’m missing something with the fourth constraint (c4), any ideas on how this problem should be formulated?

air travel – Rules regarding the changing my return flight date on Belavia (Frankfurt -> Minsk -> Frankfurt)

I want to change the date of my flight back to Frankfurt from Minsk on Belavia. On their website it says:

Changes in the date, flight number and route before departure: Allowed for 30 EUR. Differences can be paid up to a higher fare or brand level.

Changes in the date, flight number and route after departure: Allowed
from 100 EUR. Differences can be paid up to a higher fare or brand
level.

I’m having some trouble with the language here. By departure, is it referring to my original flight from Frankfurt to Minsk? Or does it mean, for example if my return flight is on 20.01.2021, that if I change my flight date to 15.01.2021 then it’s 30€ + difference in fares, and if I change the date to 30.01.2021 then it’s 100€ + difference in fares?

Kind of confused here. I tried contacting them, but I couldn’t get through to an English speaking agent.