Commit graph

28 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
15dd804112 Remove trailing whitespace of all map scripts (as in all whitespace that doesn't come before any non-whitespace character on the same line).
This was SVN commit r18840.
2016-10-18 13:08:01 +00:00
elexis
8dddd369ef Basic regicide gamemode. Based on patch by Sandarac, refs #2160.
Spawn a random hero at gamestart and defeat the player if the hero dies.
Consider nomad maps where units spawn without buildings or start on a
ship.
Correct a comment for TriggerHelper.SpawnUnits.
Make shuffleArray available to GUI and simulation and use it to
randomize heroes.

This was SVN commit r18544.
2016-07-21 15:12:49 +00:00
elexis
9f796068f8 Win and defeat cleanup, fixes #4013.
Add a new simulation message and chat notification for players who won.
Avoid duplicate playerstate messages in the sim and GUI by triggering
changes with a function instead of a message.
Reveal the map on defeat/win exclusively in the player component
(instead of having a silly GUI proxy and doing it also in the
EndGameManager sometimes).
Remove the skipAlliedVictory argument from the player component, since
that shouldn't contain references to the EndGameManager, refs #3970.

Show a proper message box on win/loss and add the hint for hosts
disconnecting other players.
Do defeat/win procedure in the GUI when such a message arrives, instead
of checking onTick for playerstate changes.
Thus don't show that confirmation again on every rejoin.
Don't show a pointless message box if IsAtlasRunning.

Explain that the session.js variable is needed to avoid an
order-of-execution bug.
Select "observer" item when rejoining as a defeated player.
Remove an unneeded call to updateTopPanel.

This was SVN commit r18441.
2016-06-26 04:40:50 +00:00
elexis
8302eeaf73 Rest of the previous commit.
This was SVN commit r18383.
2016-06-15 16:16:55 +00:00
elexis
949f22b67d Victory check cleanup.
Use let instead of var.
Add newlines and a missing semicolon.
Remove an excess semicolon.

This was SVN commit r18374.
2016-06-14 11:18:28 +00:00
leper
fa5b373698 Add some missing semicolons.
This was SVN commit r15470.
2014-06-30 21:38:45 +00:00
Spahbod
00fa45161d Added "Survival of the Fittest", a demo random map with triggers. Refs #52
This was SVN commit r15468.
2014-06-30 13:59:34 +00:00
sanderd17
17c473f2f3 Add a trigger to the gallic fields map + fix a typo.
This was SVN commit r15429.
2014-06-23 18:12:51 +00:00