Stop getting gold from conquering inactive players 🔧#3020
Stop getting gold from conquering inactive players 🔧#3020ryanbarlow97 merged 8 commits intoopenfrontio:mainfrom
Conversation
WalkthroughConquest now skips transferring gold when a conquered Human has no recorded attacks sent; active defenders still yield gold and record goldWar. Display events differ: Changes
Sequence DiagramsequenceDiagram
participant Conquest as Conquest Handler
participant Stats as Player Stats Store
participant Event as Event System
participant Locale as Localization
Conquest->>Stats: Query defender ATTACK_INDEX_SENT
alt Defender active (attacksSent > 0)
Stats-->>Conquest: attacksSent > 0
Conquest->>Conquest: Compute gold amount
Conquest->>Stats: conqueror.addGold(gold) / conquered.removeGold(gold)
Conquest->>Stats: Record goldWar stat
Conquest->>Event: Create `received_gold_from_conquest` with {name, gold, rendered}
Event->>Locale: Request localized message with params
Locale-->>Event: Return formatted message
else Defender inactive (attacksSent == 0)
Stats-->>Conquest: attacksSent == 0
Conquest->>Event: Create `conquered_no_gold` with {name}
Event->>Locale: Request localized message with params
Locale-->>Event: Return formatted message
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description:
Maybe for v29.
In the 5M starting gold modifier games you can conquer a inactive player (spawned but didn't do anything) and get their 5M gold.
Huge unfair advantage.
I think that even without the starting gold modifier you should not get the gold of inactive players because its unfair.
I identify inactive players (spawned but didn't do anything) by checking the attack stats.
I added a translation for the displayMessage "Conquered {name}, received {gold} gold". Why was that not translated?
I added a new message "Conquered {name} (Inactive player, received no gold)".
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
FloPinguin