#3522 closed defect (fixed)
[PATCH] When a wonder is destroyed, the +50 pop bonus should disappear too
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | sanderd17 | Patch: |
Description
After researching the +50 pop at the wonder, the building itself becomes quite useless. Sure it gives you territory, but that's by far not as important as the +50 pop tech.
People should have to guard it so that they can keep the +50 pop advantage.
Also gives an incentive to the attacker to focus on the wonder and cause a lot of economic damage, as the wonder needs to be rebuilt (like 4k wood and food or so).
Also how about some aura? After all, it's a wonder and people should be more willing to fight or something. Maybe the population bonus can also be implemented as an aura, thus it could easily disappear when the wonder is destroyed.
Attachments (10)
Change History (33)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Also it costs only 1000 foood 1000 wood 500 metal 500 stone or similar to build the wonder, but like 3k food wood to upgrade. It should be the other way around, so that losing the wonder without having it researched costs like 3/4 of the total cost, not 1/4.
by , 9 years ago
Invert the costs of the tech and the wonder. It doesn't really make sense though on resource POV.
by , 9 years ago
Attachment: | 3522.1.diff added |
---|
This patch makes more sense in the resource Pov. I made it separate cause there will be differents proposal and this is the base.
comment:3 by , 9 years ago
Keywords: | simple design patch added |
---|---|
Summary: | When a wonder is destroyed, the +50 pop bonus should disappear too → [PATCH] When a wonder is destroyed, the +50 pop bonus should disappear too |
Using a global aura for the max-popcap might work, see this global aura of the briton hero Boudicca:
<Aura1> <Type>global</Type> <Affects>Champion</Affects> <Modifications> <UnitMotion.WalkSpeed> <Multiply>1.25</Multiply> </UnitMotion.WalkSpeed> <Attack.Ranged.Pierce> <Add>5</Add> </Attack.Ranged.Pierce> <Attack.Melee.Hack> <Add>5</Add> </Attack.Melee.Hack> <Attack.Capture.Value> <Add>2</Add> </Attack.Capture.Value> </Modifications> <AuraName>Champion Army</AuraName> <AuraDescription>+5 Attack, +2 Capture and +25% Speed for Champion Units.</AuraDescription> </Aura1>
comment:5 by , 9 years ago
Keywords: | simple removed |
---|
After doing some testing it seems an aura doesn't work as Aura.js
and AuraManager.js
only accept changes for units. Might be wrong.
In case we go with the aura, it should look like this:
<Auras> <Aura1> <Type>global</Type> <Affects>Something</Affects> <AffectedPlayers>Player</AffectedPlayers> <Modifications> <Player.MaxPopulation> <Add>50</Add> </Player.MaxPopulation> </Modifications> <AuraName>Population Bonus</AuraName> <AuraDescription>Population Bonus</AuraDescription> </Aura1> </Auras>
follow-up: 8 comment:6 by , 9 years ago
I think it should be done with the aura since it is the best way to add and remove bonuses on destroy.
comment:7 by , 8 years ago
Milestone: | Backlog → Alpha 20 |
---|
comment:8 by , 8 years ago
Replying to stanislas69:
should be done with the aura since it is the best way to add and remove bonuses on destroy.
in particular it rewards the capturing of a wonder.
As the +20% territory bonus of the gymnaseon is also implemented using an aura it would be somewhat consistent too.
comment:10 by , 8 years ago
I have a patch who solve this defect as expected and fixes more general stuff. But i need :#3769 before.
by , 8 years ago
Attachment: | 3522.2.diff added |
---|
comment:11 by , 8 years ago
ApplyValueModificationsToPlayer@ValueModifications.js
is only called by GetMaxPopulation@Player.js
.
I modify it to take into account auras and to use computations from ApplyTemplateModifications
instead of ApplyModifications
. I also add an iddentity and a class to player entity, so auras can affect global players settings like technologies.
Related to the previous ideas of elexis and stanislas69, i set total cost of the wonder as the previous structure+technology.
With this patch :
- when building the wonder, we get the +50 pop global auras.
- If the wonder is destroyed, we lose it. If someone capture the wonder, he get the +50 pop.
- If one have a wonder and capture the ennemy wonder, he get +100 pop. It doesn't change the total max units.
It would be very nice to enhance strategy choices (building, protect, capture...).
comment:12 by , 8 years ago
Milestone: | Backlog → Alpha 20 |
---|
comment:13 by , 8 years ago
Keywords: | review added |
---|
comment:14 by , 8 years ago
You get +100pop if you have two wonders of two different civs. But if you have two wonders of the same civ, you only get +50pop.
Also it breaks the tests, which can be solved with an early return in ApplyValueModificationsToPlayer
in case cmpTemplateManager
wasn't found.
comment:15 by , 8 years ago
Thanks for the remarks.
- We need to add this check.
- It's an expected behavior of auras : if one have two macedonians theater (one and one captured), auras don't stack. But if one have one macedonian theater and one spartan theater (captured), auras stack. I think it's not really a problem since a wonder is related to the glory of a civ and we have one bonus per civ, not per player.
comment:16 by , 8 years ago
The wonder cost has increased a lot because it is now the sum of the previous wonder + tech costs. IMO that is not what we should do, when there are some cases where you are not interested by the population bonus (when wonder victory for example). I think it would be better to keep the wonder and tech separation, but with the tech effect only enabling the aura. It should be doable relatively simply by adding a requiredTechnology property to auras, and then line 74 to 93 inside the Auras Init function would be executed only when it is empty, otherwise they would be executed when the required technologies are researched..
You've added the GarrisonHolder component to the template_structure_wonder.xml, but be aware that it was already defined in the specific civ wonders. To have them all garrisonable now is certainly better, but is there a reason to give them a Max garrison of 20 (while previously defined had 30) ? some justification about these choices would be good. And while modifying them, also adding some cleaning in these templates (for example the elements like EjectHealth or EjectClassesOnDestroy which are identical for all wonders do not need to be redefined in the civ specific ones).
comment:17 by , 8 years ago
I cleaned the templates and set garrison at 30 for all civs.
Adding requiredTechnology doesn't work in the init function since we need entities owner to check if the technology is yet searched.
If we sum up, there is only one case where we are not interested by the population bonus : it's for wonder game. We juste make it more challenging with an expensive wonder.
Perhaps we can just decrease the costs a bit ?
comment:18 by , 8 years ago
Cc: | added |
---|
In fact, after looking at the Auras.js code, i think it would be even simpler to test on the techs availability in ApplyBonus and ApplyTemplateBonus (maybe also caching the result of this check to avoid doing it too often), and make a Clean when the required techs are researched (adding sanderd17 on cc).
comment:19 by , 8 years ago
As we discussed (mimo, sanderd17 and me) on irc, we implement modifications by technology of modifications of the aura.
by , 8 years ago
Attachment: | 3522.5.diff added |
---|
by , 8 years ago
Attachment: | 3522.6.diff added |
---|
by , 8 years ago
Attachment: | 3522.6.2.diff added |
---|
comment:21 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:23 by , 8 years ago
Keywords: | design removed |
---|---|
Milestone: | Alpha 20 → Alpha 21 |
I think it should increase trade income as this basically what happens when you have a touristic site.