From 811071332ad7597fb5f3b4d2c21f688d2f0adeb9 Mon Sep 17 00:00:00 2001 From: elexis Date: Sun, 6 Nov 2016 03:11:04 +0000 Subject: [PATCH] Invincible women on survival of the fittest to prevent women fights and cheap tower kills. Based on patch by bb, refs #3102. git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@18915 3db68df2-c116-0410-a063-a993310a9797 --- .../mods/public/maps/random/survivalofthefittest_triggers.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/binaries/data/mods/public/maps/random/survivalofthefittest_triggers.js b/binaries/data/mods/public/maps/random/survivalofthefittest_triggers.js index c413947300..7d18ae86cf 100644 --- a/binaries/data/mods/public/maps/random/survivalofthefittest_triggers.js +++ b/binaries/data/mods/public/maps/random/survivalofthefittest_triggers.js @@ -142,8 +142,18 @@ Trigger.prototype.InitGame = function() let playerEntities = cmpRangeManager.GetEntitiesByPlayer(i); // Get all of each player's entities for (let entity of playerEntities) + { if (TriggerHelper.EntityHasClass(entity, "CivilCentre")) this.playerCivicCenter[i] = entity; + else if (TriggerHelper.EntityHasClass(entity, "Female")) + { + let cmpDamageReceiver = Engine.QueryInterface(entity, IID_DamageReceiver); + cmpDamageReceiver.SetInvulnerability(true); + + let cmpHealth = Engine.QueryInterface(entity, IID_Health); + cmpHealth.SetUndeletable(true); + } + } } this.PlaceTreasures(); -- 2.11.4.GIT