Commit graph

77 commits

Author SHA1 Message Date
wraitii
16b452cf91 Generalise Attack effects. All attacks, including death damage and splash, can deal any number of attack effects (damaging, capture, giving status effects.)
This moves most of what was in the Damage system component to a helper,
and renames that component DelayedDamage.
It also introduces a new global script with all possible attack effects.

Comments Taken From: Freagarach, Stan, bb

Differential Revision: https://code.wildfiregames.com/D2092
This was SVN commit r22754.
2019-08-22 18:00:33 +00:00
bb
0b1593e268 recieve -> receive
Reported by Stan in 13288df4f4

This was SVN commit r22169.
2019-04-07 16:06:10 +00:00
bb
13288df4f4 Update the wonder victory timer in case the wonder renames.
Reviewed By: smiley
Comment By: elexis
Differential Revision: https://code.wildfiregames.com/D1732
This was SVN commit r22165.
2019-04-06 21:58:20 +00:00
bb
b3487dfb60 Handle entity renames in regicide
This allows heroes to be upgraded

Patch By: smiley
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1694
This was SVN commit r22019.
2019-01-04 20:09:28 +00:00
Stan
9442c927fc Fix imperative of choose
Differential Revision: https://code.wildfiregames.com/D1528
This was SVN commit r21986.
2018-12-29 18:15:09 +00:00
elexis
76d648349d Fix gaia units ignoring players without CCs.
As demonstrated by Dizaka, it allowed players to win a game by deleting
all buildings, sending one unit across the map and having the enemy get
defeated by the double gaia count.
It also means that players that still have buildings but no CCs/Wonders
are targetted by elephants.

This was SVN commit r21777.
2018-04-24 12:46:59 +00:00
elexis
2bc068aa41 Add some missing IsInWorld checks to Danubius for cases where all targets are garrisoned, promoted, upgraded, transformed, becoming packed or undergoing any special treatment by some mod, refs D1449.
This was SVN commit r21766.
2018-04-23 11:22:46 +00:00
elexis
a74352b100 Spawn proportionately less gaia attackers when players become defeated.
This also reduces the attackercount slightly, because gaia is now
excluded when counting players.
PlayerManager.GetActivePlayers helper function.

This was SVN commit r21730.
2018-04-15 16:47:51 +00:00
elexis
dc0da7c430 Allow TriggerHelper SpawnGarrisonedUnits to spawn units on visible garrison points / walls, refs D1146 / e29dfb7000.
This was SVN commit r21564.
2018-03-16 15:49:08 +00:00
elexis
a3e5e0fef8 Common TriggerHelper functions to set formations on units, get the mapsize and current time, refs #5040.
This was SVN commit r21484.
2018-03-10 17:16:39 +00:00
bb
6d54ab4c1f Implement combine victory conditions
Excluding the changes to scenario and skirmisch maps
Transform gameType string to victoryCondition array in load/replaymenu
Adapt the gamesetup to use checkboxes for every victory condition and an
array for storing them
Allow multiple queries in conquestCommon
Remove conquest from regicide, wonder and capture the relic
Move the endless gamedescription from settings to gamedescription
Fixing wrong tabulation from a8a29271ce

This commit will break all scenario and skirmisch maps, their "Gametype"
string needs to be transformed in a "VictoryCondition" array as is done
in the tutorial map (counting endless as an empty array). This counts
for mods too!
Old svn replays and savegame will throw warnings/errors as they are
incompatible after this commit. So svn users will need to delete all
those.

Comments on ai and autostart games By: mimo
Comments on Atlas By: Vladislav
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1240
fixes: #4014

This was SVN commit r21474.
2018-03-09 21:51:18 +00:00
elexis
adb84c50fb Fix oversight in 14da2f841f.
This was SVN commit r21463.
2018-03-08 14:06:41 +00:00
elexis
14da2f841f TriggerHelper functions to retrieve entities by player and by class.
Removes repetitive RangeManager and Identity component querying from
triggerscripts.
It means that mostly map specific logic remains in the triggerscript.
This should bring TriggerScript coding a bit closer to map authors who
aren't exactly software developers.
Call the RangeManager entity getters on Danubius and Survival multiple
times on init to further simplify code, as these microseconds on init
are irrelevant.

This was SVN commit r21459.
2018-03-07 13:54:58 +00:00
elexis
3f7ea11059 TriggerHelper SetUnitStance helper function for a very frequent triggerscript order.
This was SVN commit r21458.
2018-03-07 12:36:45 +00:00
elexis
2a1929d378 Fix a typo (ritualIdx / heroIdx) in the Danubius OwnershipChange in 026dcf10eb / D204.
Simplify that function by tracking entities using Sets instead of
Arrays, even though it costs two Set-to-Array conversions.

This was SVN commit r21457.
2018-03-07 12:21:09 +00:00
elexis
6113edd746 Refactor and move random template composition triggerscript code used for gaia attacker waves from Danubius (026dcf10eb / D204) and Survival Of The Fittest (18e7d8a518 / D145) to the TriggerHelper.
Eases implementation of new maps with diverse scripted attackers, refs
#5040, D11 and  map difficulties, refs #4963, D1189.
Replaces hardcoded templatenames with calls to a new TriggerHelper
function to query template names, given Classes, Civ, Rank or Packed
state.
Removes the duplicated template counting logic, that was intertwined
with map specific unit classes balancing logic, refs #4805.

Use mimos garrison function from e29dfb7000 / D1146 to support
doubleclicking on garrisoned gaia heroes on Danubius, fixing the bug
described in comment:10 of #4291.
Fix wrong (Trigger) prototype reference in ce65af8dcb.

This was SVN commit r21445.
2018-03-06 13:31:34 +00:00
elexis
d8b5439956 Small map cleanup and performance improvements.
This was SVN commit r21444.
2018-03-06 11:44:20 +00:00
bb
d86148defc Create winning teams for relic and wonder victory instead of letting all allies of a player win.
Create a getNonGaia function
Reset counters on playerDefeat
MarkPlayersAsWon function
Rename MarkPlayerAsWon to MarkPlayerAndAlliesAsWon
Stop letting winningplayers in relic depend on PlayerID

Comments By and Discussion With: elexis
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D972
fixes #4648

This was SVN commit r21441.
2018-03-05 18:02:27 +00:00
elexis
ce65af8dcb Move Danubius triggerscript function to compose random templates and garrison all entities of a given identity class to TriggerHelper.
Delete the copy thereof in Elephantine, refs #4805, #5040.
Use absolute paths for template names.

This was SVN commit r21416.
2018-03-02 16:32:10 +00:00
elexis
d5af005a00 Expose INVALID_PLAYER to the JS simulation and use it instead of -1 for consistency with the C++ counterpart.
This was SVN commit r20953.
2018-01-22 01:02:29 +00:00
elexis
36400458bf Add randomAngle helper function to abbreviate calls.
This was SVN commit r20874.
2018-01-15 14:20:57 +00:00
bb
7f4edf1926 Add support for diplomacy changes for wonder victory, make notifications more correct, add behaviour string to the gamedescription panel and on the fly cleanup
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D881
This was SVN commit r20687.
2017-12-26 12:59:27 +00:00
mimo
e29dfb7000 Provide a TriggerHelper function to spawn garrisoned entities
Differential Revision: https://code.wildfiregames.com/D1146
This was SVN commit r20659.
2017-12-17 17:17:00 +00:00
bb
dfa66fbc12 Cleanup getNumPlayers() calls
Do not check for system components,
Do not inline in loops for performance
Use QueryPlayerIDInterface instead of querying the playerEnt

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1137
This was SVN commit r20652.
2017-12-13 20:41:41 +00:00
elexis
84e88edd36 Remove pairwise annihilating array constructor and spread operator in e4a5d5b4dd.
Differential Revision: https://code.wildfiregames.com/D1134
Reviewed By: bb
This was SVN commit r20619.
2017-12-09 20:25:23 +00:00
bb
722578fdcd Cleanup the conquest code
Stop listening to OnTrainingFinished and OnStructureBuild messages but
use OnOwnershipChanged messages. This fixes the defeat when only
promoted/upgrades/regi-hero units remain.
Add foundations to the conquest lists and make them visible on the
minimap.

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1022
This was SVN commit r20471.
2017-11-17 11:38:51 +00:00
bb
ae74075a22 Rename TriggerHelper.EntityHasClass to TriggerHelper.EntityMatchesClassList
and so making that function much more general by using MatchesClassList.

Some suggestion and checking by leper
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1020
This was SVN commit r20432.
2017-11-10 12:14:16 +00:00
elexis
a19aaed550 Move catafalque relic templates from the "other" directory to the regular units directory.
Differential Revision: https://code.wildfiregames.com/D994
Refs #4770, D152, D269
Patch By: Nescio
Some comments by fatherbushido

This was SVN commit r20385.
2017-10-31 11:44:24 +00:00
bb
63ca7ad672 Split VictoryDuration in RelicDuration and WonderDuration
As proposed by leper in 35377c51a7
refs #4014

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D874
This was SVN commit r20122.
2017-09-06 08:44:26 +00:00
mimo
744581a255 Remove the tutorial-ai which is obsolete
Discussed with Elexis

Differential Revision: https://code.wildfiregames.com/D526
This was SVN commit r20084.
2017-08-31 17:48:50 +00:00
elexis
8f51469793 Colorize relic victory message.
Refs D36 / 9a6c5eac60, D152 / 35377c51a7

This was SVN commit r20060.
2017-08-27 23:30:33 +00:00
elexis
f61dd9bfc8 Grammar improvement for the wonder victory message, as proposed by WhiteTreePaladin / brian in accordance with 661284a403.
This was SVN commit r20017.
2017-08-21 13:13:08 +00:00
mimo
abbdd391b5 Simplify work in translation of tutorials by cutting long strings by paragraph
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D802
also includes https://code.wildfiregames.com/D755

This was SVN commit r20009.
2017-08-20 18:04:48 +00:00
elexis
661284a403 Fix some string issues and reveal the name of the next release (Ken Wood).
Change the tense of the Capture The Relic message, as proposed by brian
(WhiteTreePaladin).
Consistently use title case for buttons.
Use more descriptive and concise option titles.
Remove two unused strings.

Fixes #4718
Refs
https://wildfiregames.com/forum/index.php?/topic/22745-all-relics-captured-message/
Refs
https://wildfiregames.com/forum/index.php?/topic/22461-alpha-23-name-suggestions/
Reviewed by: brian (WhiteTreePaladin), leper, GunChleoc.
Release name agreed with Itms on 2017-07-29 on irc.

This was SVN commit r20000.
2017-08-19 11:47:24 +00:00
mimo
8a32deb5ca Fix tutorial stuck after building farm
Trac Tickets: #4696, #4697

Differential Revision: https://code.wildfiregames.com/D774
This was SVN commit r19998.
2017-08-19 09:38:52 +00:00
elexis
d2d43ab46f Victory and defeat reason strings.
Clarify the victory / defeat reason by using a custom string for each
defeat and victory reason.
Group chat notifications instead of posting one for each player.
This also slightly improves lobby performance upon win.

Differential Revision: https://code.wildfiregames.com/D762
Fixes #4382
Based on patch by: Angen
This was SVN commit r19955.
2017-08-08 11:32:00 +00:00
elexis
495d219d99 Don't always reset the Capture The Relic victory timer upon diplomacy change following 35377c51a7.
Only reset it if any of the original allies changes the diplomatic
relation to one of the other original allies.

Differential Revision: https://code.wildfiregames.com/D305
Fixes #4529
Patch By: Sandarac
This was SVN commit r19818.
2017-06-22 11:00:10 +00:00
elexis
03550f7595 Fix whitespace and lineendings in few recent commits.
This was SVN commit r19763.
2017-06-11 00:51:11 +00:00
mimo
feedca18cd fix an absurd concern due to a crazy rule which push people to raise a concern for such thing, causing much more effort to raise and then accept the fix rather than simply fix it
This was SVN commit r19683.
2017-05-28 17:34:18 +00:00
leper
a533fff883 Add a -autostart-nonvisual option. Patch by sacha_vrand. Fixes #4577.
This allows automated testing of AIs without any GUI or sound (similar
to non-visual replays).

Differential Revision: https://code.wildfiregames.com/D379
This was SVN commit r19645.
2017-05-23 19:26:33 +00:00
elexis
3957ebf51f Option to disable garrisoning of heroes in regicide gamemode.
Accomplish this by adding a Garrisonable component that can be removed
from individual units or templates.

Differential Revision: https://code.wildfiregames.com/D104
Refs #2160
Patch By: Sandarac
This was SVN commit r19631.
2017-05-22 01:18:51 +00:00
mimo
61b243fdc6 fixes to the economic tutorial (D194) following 15e2b42525
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D520
This was SVN commit r19628.
2017-05-21 16:41:39 +00:00
mimo
15e2b42525 New economic tutorial based on triggers, accessible from the "learn to play" button
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D194
This was SVN commit r19599.
2017-05-17 17:33:36 +00:00
elexis
bbc7852df8 Use let keyword for cmpTrigger consistently, so that this reference to the component before deserialization can't be reused inside the Trigger component after deserialization which would cause an OOS on rejoin / savegame loading as experienced prior 53570da065.
Differential Revision: https://code.wildfiregames.com/D195
Refs #4310, 53570da065, d124b32f6a
Reviewed By: Sandarac
This was SVN commit r19552.
2017-05-10 14:03:51 +00:00
elexis
f4ff462449 Select the number of relics to spawn in the gamesetup.
Differential Revision: https://code.wildfiregames.com/D410
Reviewed By: Sandarac
This was SVN commit r19518.
2017-05-05 20:41:37 +00:00
elexis
2ce840bab3 Handle relics that are destroyed for any reason and maps that have no gaia entities at all.
Differential Revision: https://code.wildfiregames.com/D283
Reviewed By: Sandarac
This was SVN commit r19378.
2017-04-05 04:14:19 +00:00
elexis
7f8d57a1f0 Catafalque templates and auras for each civilization.
Patch By: Hanibal Barca aka Hannibal_Baraq
Differential Revision: https://code.wildfiregames.com/D269
Strings Reviewed By: Gallaecio
Balancing Reviewed By: borg-, Grugnas
Addresses few issues found by fatherbushido

This was SVN commit r19370.
2017-04-02 20:50:30 +00:00
elexis
35377c51a7 Capture The Relic gamemode.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D152
This was SVN commit r19345.
2017-03-25 07:01:07 +00:00
leper
1aa5ecb8a7 Remove entity if spawning fails.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D159
This was SVN commit r19239.
2017-02-24 15:41:19 +00:00
elexis
9a6c5eac60 Colorize playernames in the wonder victory time notification.
Differential Revision: https://code.wildfiregames.com
Reviewed By: Imarok
This was SVN commit r19181.
2017-01-28 20:30:30 +00:00