Commit Graph

5248 Commits

Author SHA1 Message Date
wraitii 3eb03bd1e1 New Gaul team bonus: reduce blacksmith tech cost.
The Gauls were part of well-connected trade networks in ancient times.
Their exports mainly centered on slaves, mercenary, and military
equipment.
As such, a team bonus reducing blacksmith costs makes much more sense
than one reducing technology research time (particularly since the
historical justification for the existing team bonus was... thin).

Patch by: Nescio
Approved by: borg-, ValihrAnt, wraitii
Differential Revision: https://code.wildfiregames.com/D2669
This was SVN commit r23832.
2020-07-14 08:53:05 +00:00
wraitii 1f2286305d Rework PreferredClasses to target either Human or Human/Siege.
'Hack' melee units had a preference towards Siege units. This made them
awkward to use in some fights.
PreferredClasses is not intended to remove Micro from the player's hand
but to prevent units from attacking unlikely targets (e.g. ships for
land units).

As such, this reworks PreferredClasses so that:
- Ranged & Spearmen/Pikemen (which deal Pierce damage) target Human
units, against which they are reasonably effective.
- Other units target either Human or Siege units with no particular
preference (Unit+!Ship).

This further specifies the preferred classes for all base templates for
easier modification, since extending this list (ordered by priority) is
tricky.

Patch by: borg-
Reviewed By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2851
This was SVN commit r23831.
2020-07-14 08:39:31 +00:00
wraitii 2eecb0f508 Give Macedonians a champion swordsman.
This is a major buff to their anti-ram capabilities and thus to their
viability in general.

The historical background for this unit is an elite corps of Thracians
under Philip V of Macedon.

Patch by: Nescio
Approved by: borg-, badosu, wraitii
Differential Revision: https://code.wildfiregames.com/D2872
This was SVN commit r23829.
2020-07-14 07:55:36 +00:00
wraitii c1d71abe0b Tweak wonder/pyramid cost and remove healing aura from wonders.
Wonders cost food previously, which is not in line with their look or
other buildings.
Their healing aura is removed to make the slightly easier to capture.

Kushites pyramids are adjusted slightly, and the monumental architecture
tech moved to the CC to match the Persian.

Patch by: Nescio
Accepted By: borg-, Feldfeld
Differential Revision: https://code.wildfiregames.com/D2686
This was SVN commit r23824.
2020-07-12 16:03:50 +00:00
wraitii b97f1cadc5 Give Mauryan a 30% bonus to elephant build time.
Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2862
This was SVN commit r23823.
2020-07-12 09:44:38 +00:00
wraitii e4e5b6c72e Fix trailing commas in JSON following e007caf642
This was SVN commit r23822.
2020-07-12 09:36:21 +00:00
wraitii 01fdf01b5b Increase citizen soldier capture attack strength.
Attack strengths for citizen soldiers is increased, making it easier to
capture in the early game.
Hero capture points reduced to align them with their attack multiplier.

Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2847
This was SVN commit r23820.
2020-07-12 09:21:28 +00:00
wraitii a1e812a3ea Tweak Macedonian champ infantry to have more attack, not more armour.
Patch by; borg-

Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D2868
This was SVN commit r23819.
2020-07-12 09:17:07 +00:00
wraitii e007caf642 Move train time increase for advanced/elite to the upgrade tech.
Techs which enabled training advanced/elite mercenaries directly also
increased the train time of those units.
It is more consistent and more maintainable to increase the train time
in the advanced/elite tech.
This does not affect promoting units since those are not trained.

Also rename and use a consistent order.

Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2865
This was SVN commit r23818.
2020-07-12 09:14:44 +00:00
Stan d4b567ca85 Fix broken templates following 33042ad23d while retaining the same functionnality
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2864
This was SVN commit r23810.
2020-07-08 11:21:10 +00:00
wraitii a7da40ac2f Fix formations reshaping incorrectly & related issues.
Formation were reshaping in cases where they should not (such as when
the controller is waiting on members).
This made them look very odd for some orders.

This also cleans up held positions for formations somewhat.

Also:
- ed54ad3486 fixed units not facing correctly after a formation-walk.
The fix is correct, but we can actually make it slightly more
self-contained by moving everything in `leave`. Also clarify comments.
- This fixes some very broken code in 4ca448a686 in
FORMATIONMEMBER.WALKING.MovementUpdate. It never errored because
formation controllers weren't moved out of the world before.

Reviewed By: Angen
Fixes #5443

Differential Revision: https://code.wildfiregames.com/D2763
This was SVN commit r23806.
2020-07-07 10:24:58 +00:00
Stan 33042ad23d [gameplay-a24] differentiate African and Indian war elephants because of their sizes.
maur, pers, sele champion elephants +10% resource costs, training time,
health, and attack damage;
cart, kush, ptol champion elephants −10% resource costs, training time,
health, and attack damage.

Patch by: @Nescio
Accepted by: @Feldfeld, @borg-
Differential Revision: https://code.wildfiregames.com/D2861
This was SVN commit r23804.
2020-07-04 18:15:05 +00:00
Stan 586b045d09 Deprecate rotary mill, and instead introduce a special technology (town phase, workers +15% grain gather rate) for the Gauls, to reflect the fact they invented a harvesting machine in the Iron Age.
Patch by: @Nescio
Accepted by: @scythetwirler, @borg-
This was SVN commit r23803.
2020-07-04 14:11:17 +00:00
Angen 5e57e35c0a [gameplay-a24] Allow to train mercenaries from embassy by any civilisation
As a result, any player that captures an embassy (including Blemmy camp
or Nuba village) can train these mercenaries there, while preventing
them from building structures they shouldn't have access to.

Differential Revision: https://code.wildfiregames.com/D2536
Patch by: @Nescio
Reviewed by: @Angen
Agreed by: @ValihrAnt, @borg-
This was SVN commit r23802.
2020-07-04 13:10:27 +00:00
Angen a7894f05b8 [gameplay-a24] Lower the repeat rate of spear cavalry
Lower repeat rate of spear cavalry so it does not look like attacking in
slow motion and lower attack damage as well to compensate speeding up
attack.

Differential Revision: https://code.wildfiregames.com/D1365
Patch by: @temple
Reviewed by: @wraitii, @Angen
Agreed by: @ValihrAnt, @Lionkanzen
Comments by: @badosu
This was SVN commit r23801.
2020-07-04 12:43:55 +00:00
Stan 8e19745bba Decrease penalty -50% to -30% when promoting to advanced and elite.
Decrease the health gain to 10%. (20% health + 1 armour);
Increase the crush damage for axemen as well (Previously they only got a
penalty)

Patch by: @borg-
Reviewed by: @Nescio, @Feldfeld, @badosu
Differential Revision: https://code.wildfiregames.com/D2792
This was SVN commit r23800.
2020-07-04 11:05:05 +00:00
Stan 55dc5ed987 Increase cost of "upgrade mercenaries rank" tech to make it more like the other armor techs
Authored by: @borg,
Reviewed by: @badosu, @Nescio, @FeldFeld
Differential Revision: https://code.wildfiregames.com/D2835
This was SVN commit r23798.
2020-07-04 10:14:30 +00:00
wraitii 108efc9291 Allow building Kushite mercenary camps in neutral territory.
This gives Kushites more interesting gameplay options, and is consistant
with other mercenary camps.
Kushite mercenaries lived outside of the core Kushite territory, thus
giving a historical ground to this change.


Accepted by: ValihrAnt, borg-, scythetwirler, Angen, badosu, sundiata
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2534
This was SVN commit r23793.
2020-06-28 09:55:09 +00:00
Stan cdc2f4cf57 Fix an issue with checkrefs.pl introduced in c04a1ebac3/https://code.wildfiregames.com/D2533. Checkrefs should support duplicated tags
Reported by: @Itms, checkrefs.pl
This was SVN commit r23788.
2020-06-23 18:06:32 +00:00
bb 9680d08b96 Remove unused bonuses schema from deathDamage
refs 16b452cf91

Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2831
This was SVN commit r23785.
2020-06-22 20:12:10 +00:00
Stan 332b997ca6 Make javelineers easier to catch by cavalry, by reducing their speed slightly
Reviewed by: @borg-, @scythetwirler, @ValhirAnt
Differential Revision: https://code.wildfiregames.com/D2628
This was SVN commit r23782.
2020-06-19 06:31:50 +00:00
Stan c04a1ebac3 Remove the briton kennel as it's not historically correct.
War dogs are limited to a total of 20 instead of a five kennels times
ten dogs each, to compensate for the fact they no longer have special
requirements.

Patch by: @Nescio
Reviewed by: @borg-, @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/25620-kennel-issues/&tab=comments#comment-372159

Differential Revision: https://code.wildfiregames.com/D2533
This was SVN commit r23781.
2020-06-19 06:28:39 +00:00
s0600204 dd5c7edea3 Introduce axeman templates
Introduces axeman parent templates, used to differentiate axemen from
swordsmen
(which they had been "under the hood" up until now), and update entity
templates
and maps where applicable.

Artwork (actors, icons) is not touched here - see D2688 for that.


Patch by: Nescio
Reviewed By: s0600204
Differential Revision: https://code.wildfiregames.com/D1355
This was SVN commit r23780.
2020-06-18 21:36:16 +00:00
wraitii 4b1a4ef4cf Rework ScriptInterface EnumeratePropertyNames to support non-enumerable properties.
This lets it support the JSClass syntax, introduced for components in
5fb88172a2/D2492, which required a workaround before.
As cleanup, remove the prefix logic which was too specific to be in
ScriptInterface, and use an upstream-compatible API that also does more
of what we want.

Based on a patch by: elexis
Differential Revision: https://code.wildfiregames.com/D2644
This was SVN commit r23771.
2020-06-14 09:49:32 +00:00
wraitii bea7a65389 Delete unused technologies.
Many were 'pair' technologies, originally removed from the game in
13b229d503.

Patch by: Nescio
Reviewed by: wraitii
Fixes #3800

Differential Revision: https://code.wildfiregames.com/D1775
This was SVN commit r23770.
2020-06-14 09:08:53 +00:00
wraitii 14b5cf0673 Increase the max # of embassies from 2 to 3.
Carthaginians currently rely on embassies to be competitive, and
restricting them to 2 is too limiting for balance purposes.
This change also affects Kushites structures which was also approved by
borg- and ValihrAnt.

Further, the original choice of 2 seems to have been to force
Carthaginian players to make a choice, but since one can delete an
existing embassy and pick another, that seems somewhat artificially
restricting.

Patch by: borg-
Approved By: ValihrAnt, PhyZic
Differential Revision: https://code.wildfiregames.com/D2798
This was SVN commit r23764.
2020-06-12 15:32:35 +00:00
Stan 27647e61c4 Play a sound when walls are upgraded to gates.
This was SVN commit r23761.
2020-06-11 07:00:52 +00:00
Angen e181614215 [PetraAI] Remove redundant branch introduced in f1610ce4fa
Branches introduced in f1610ce4fa had commented part to consider
stonewalls as blocking targets only if there have been siege units in
army.
Commented part was removed in ade8bcc0b8.

Differential Revision: https://code.wildfiregames.com/D2804
This was SVN commit r23760.
2020-06-10 18:27:13 +00:00
Angen 267ccd3127 [PetraAI] Do not try to attack entities which can't be attacked.
Avoid trying to attack unattackable entities based on restricted classes
from Attack component.

Differential Revision: https://code.wildfiregames.com/D2111
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23759.
2020-06-10 18:23:41 +00:00
Angen 3336d6d543 Adjust trader footprints
Match trader footprint with mesh shape for nicer visual effect.
This also removes footprint inconsistency among camels.

Patch by: Nescio
Reviewed by: Angen
Comments by: Feldfeld
Differential Revision: https://code.wildfiregames.com/D2640
This was SVN commit r23758.
2020-06-10 18:13:22 +00:00
wraitii ea67b79667 Handle stacking status effects, modifiers, some related fixes.
Continuation of work on status effects, following 82a5ab6d19.

Allow techs to modify properties.
Enable different behaviour when status effects would stack, such as
extending the duration or stacking the effects.
Fix GUI issue with more than 5 status effects.
Improve tooltips.
Let status effects show a different tooltip for the attacker and the
receiver.

Patch by: Freagarach
Reviewed By: wraitii, Angen (on an older differential).
Differential Revision: https://code.wildfiregames.com/D2296
This was SVN commit r23757.
2020-06-09 11:47:16 +00:00
wraitii f3a49014fb Make rams less effective by reducing speed and preventing attacks on organics.
Rams are currently evry strong. This nerfs them by reducing their speed
slightly and by preventing them from attacking organic units.

The speed change was agreed by ValihrAnt, the organic restriction is
more experimental and might be reverted in favour of a "reduced damage"
approach (see D2684) if it proves too limiting.

Patch By: borg-
Approved by: wraitii, ValihrAnt (mostly on the speed debuf)
Differential Revision: https://code.wildfiregames.com/D2782
This was SVN commit r23753.
2020-06-08 15:06:13 +00:00
wraitii dab3bbc2ca Remove 'Structure' preferred class from elephants, shorten max range.
Elephants were designed to prefer targeting structures. This is not
particularly historically accurate, and makes them rather annoying to
use against enemy units, reducing their efficiency.

This simply removes the preferred class, making elephants easier to
handle while keeping their usage as siege units for some civilisations.

Max-range is reduced slightly as the previous one was extremely large
for a melee unit.

Approved by: Nescio, wraitii
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D2786
This was SVN commit r23752.
2020-06-08 14:43:50 +00:00
wraitii d1d4a1d6b9 Train champion cavalry at stable.
Remove champions from the fortress. This mimics the Maurian elephant
stable.

Approved By: ValihrAnt, Feldfeld, borg-
Differential Revision: https://code.wildfiregames.com/D2532
This was SVN commit r23746.
2020-06-07 13:09:17 +00:00
wraitii 04221b2835 Standardize wonder healing.
Patch by: Nescio
Accepted By: borg-
Differential Revision: https://code.wildfiregames.com/D2660
This was SVN commit r23745.
2020-06-07 13:03:06 +00:00
wraitii feda708d5d Fix formations not queueing orders properly.
Formation controllers were not always waiting on their members correctly
because the "finishedOrder" check was being reset in the wrong place.
This happened particularly with queued orders.

This merges the "finishedOrder" and the "InPosition" logic.

Reported by: elexis
Based on a patch by: Freagarach
Tested by: Freagarach
Reviewed By: Angen
Fixes #3274

Differential Revision: https://code.wildfiregames.com/D2702
This was SVN commit r23744.
2020-06-06 16:07:01 +00:00
wraitii 759bc754c3 Fix arrow count not being properly calculated when autogarrisoning.
423b3cbcaa Moved the message sent that an entity garrisons from
`PerformGarrison` to `Garrison`. However, when an entity is
autogarrisoned from `ProductionQueue` `PerformGarrison` is called thus
not triggering the message. When ejecting the entity from the structure
there is a message sent that the entity is removed, thus allowing for a
negative amount of archers/arrows in `BuildingAI` (see
423b3cbcaa#42654).

Note that `PerformGarrison` was explicitly split in 2102648f7c when
introducing autogarrisoning. It probably has something to do with the
position, since that was split. But I couldn't find any reason why it
cannot be used now.

A side effect of this is that when autogarrisoning an entity with
visible garrison points those will be occupied as well now.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2790
This was SVN commit r23743.
2020-06-06 10:19:42 +00:00
wraitii 4588ee3bbc Trigger an exit-reentry when the target entity of an order is renamed
This lets unitAI FSM states correctly handle target entity renaming by
processing a message when that happens. The default behaviour is to
leave-reenter the state, which re-runs sanity checks and optionally
picks a better behaviour.

UnitMotion is still not made aware of entity renaming, as the
leave-enter makes it irrelevant in practice. It still may be a good idea
to implement that someday.

Fixes the concern raised at de1bb8a766.
Fixes #5584

Comments by: bb, Freagarach
Tested by: Freagarach
Reported by: minohaka, bb, Freagarach, gameboy (error in the original
commit)

Differential Revision: https://code.wildfiregames.com/D2735
This was SVN commit r23742.
2020-06-06 06:19:15 +00:00
wraitii f6977b64db Use IID_Health in test_Damage after 16b452cf91.
The wrong components were mocked, but the test did not fail as the
asserts were not called.
Add a check that tests are indeed called here.

Patch by: Freagarach
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D2787
This was SVN commit r23738.
2020-06-05 17:14:04 +00:00
wraitii 829567c304 Unify Cavalry walk speeds across citizen/champion/hero variants.
Citizen, Champion and Hero cavalry now have the same 2x walk speed
multiplier.
Speed difference between cavalry type unchanged.

Patch by: Nescio
Approved by: borg-, ValihrAnt, wraitii
Differential Revision: https://code.wildfiregames.com/D2596
This was SVN commit r23737.
2020-06-05 16:58:18 +00:00
wraitii 4812844c33 Look for foundations near the target, not the entity.
Entities should look for a new foundation near the targeted one, not
near themselves, when they cannot proceed with constructing the original
target.
This behaviour matches expectations from players better, since the
entity will go closer to where the player intended.

It also rejoins behaviour when gathering introduced in 7d53fb19a2.

For now, keep looking near the entity too if there are no obvious picks
at the destination, but this could be done only within a certain range
(see D2525).


Comments by: Angen
Differential Revision: https://code.wildfiregames.com/D2753
This was SVN commit r23734.
2020-06-04 11:06:27 +00:00
wraitii cdfa6cb8b4 Make CommitResources accept a target, not a type.
This moves some resource committing logic from `UnitAI` to
`ResourceGatherer`.
Allows easier modification by modders, and cleaner separation of
concerns.

Check if the carried resources actually changed before sending the
message.

Make all paths through Repair.ConstructionFinished return resources.

Patch by: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2664
This was SVN commit r23733.
2020-06-04 11:01:06 +00:00
wraitii 7440523ade Enable garrisoning on gates / fix movement of units with visible garrison points (2nd commit)
This is the same commit as 2abd9cead2 / D1418, fixing noted issues.

This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.

De-activate the obstruction of visibly-garrisoned entities, fixing the
2nd issue.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.

Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.

Based on work by temple

Fixes #2679.
Fixes #5151.

Differential Revision: https://code.wildfiregames.com/D2775
This was SVN commit r23731.
2020-06-02 11:40:29 +00:00
Stan aad8aa9a3e Make elephants more interesting by reducing their cost.
Reviewed by: @borg-
Patch by: @ValihrAnt, @Nescio

Differential Revision: https://code.wildfiregames.com/D2575
This was SVN commit r23728.
2020-06-01 16:53:01 +00:00
bb 74a02d232e Allow a garrisonholder to not have health.
Patch by: Freagarach
Adaptation by: wraitii
Differential Revision: D2375
This was SVN commit r23720.
2020-05-31 19:40:54 +00:00
bb 743443977b Rename brit_champion_cavalry* to brit_champion_chariot*
Patch By: Nescio
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2529
This was SVN commit r23716.
2020-05-31 14:16:23 +00:00
Angen 10fb4822df [gameplay-a24] Allow training all barracks champions at captured barracks.
Before this change, civilisation could train champions in captured
barracks only if captured barracks allowed to train that unit, what was
not always the case so some champions were allowed to be trained in
captured barracks and some was not.

Differential Revision: https://code.wildfiregames.com/D2547
Patch by: Nescio
Reviewed by: ValihrAnt
This was SVN commit r23715.
2020-05-31 10:12:02 +00:00
wraitii 531dcf40c3 Revert 0363202a20, 2abd9cead2 and b4144dc2c3
Player-testing has revealed QA issues, so reverting these for now.

Differential Revision: https://code.wildfiregames.com/D2773
This was SVN commit r23714.
2020-05-31 10:06:39 +00:00
Stan 0cde295654 Make wall segment cost proportional.
Patch by: @Nescio.
Reviewed by: @ValihrAnt
Differential Revision: https://code.wildfiregames.com/D2611
This was SVN commit r23713.
2020-05-31 07:29:26 +00:00
wraitii b4144dc2c3 Hotfix for 2abd9cead2 - remove the OnEntityRenamed handling.
0363202a20 actually fixed the particular issue of upgrading a long-wall
to a gate by correctly handling it in UnitAI, so this code, which didn't
work, is no longer needed anyways.

Noticed by running units_demo which seems to have skirmish replacer
placeholders.

This was SVN commit r23711.
2020-05-30 14:26:33 +00:00