...
  View open merge request
Commits (3)
......@@ -1310,6 +1310,19 @@ ModifierList SpellBookBlight
; ModelCondition = UPGRADE_ECONOMY_BONUS // UPGRADE_ECONOMY_BONUS is used in draw module to fire particle FX
End
ModifierList ProximityPenaltyResources
Category = SPELL
Modifier = PRODUCTION 75% // Production decreased 50%
Duration = 3000
; ModelCondition = USER_5
End
ModifierList ProximityPenaltyCommandPoints
Category = SPELL
Duration = 3000
Upgrade = Upgrade_ProximityPenalty Delay:50
End
ModifierList SpellBookSnowbind
Category = SPELL
Modifier = PRODUCTION 1% // Production stopped (essentially)
......
......@@ -191,6 +191,8 @@
#define GENERIC_STATUE_COMMAND_POINT_BONUS 10
#define GENERIC_ECONOMY_COMMAND_POINT_BONUS 50
#define MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS 25
#define MULTIPLAYER_ECONOMY_HIGH_COMMAND_POINT_BONUS 50
#define GENERIC_FORTRESS_COMMAND_POINT_BONUS 100
#define DORMITORY_COMMAND_POINT_BONUS 25
#define OUTPOST_COMMAND_POINT_BONUS 25
......
......@@ -19202,7 +19202,7 @@ SelectPortrait = BPCSlaughterHouse
Side = Mordor
EditorSorting = STRUCTURE
ThreatLevel = 1.0
CommandPointBonus = GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandPointBonus = MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS ;,; GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandSet = SellableCommandSet
......@@ -19616,7 +19616,7 @@ Object Furnace
Side = Civilian
EditorSorting = STRUCTURE
ThreatLevel = 1.0
CommandPointBonus = GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandPointBonus = MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS ;,; GENERIC_ECONOMY_COMMAND_POINT_BONUS
BuildCost = 350
BuildTime = 15
......@@ -221,7 +221,7 @@ Object AngmarMill
Side = Angmar
EditorSorting = STRUCTURE
ThreatLevel = 1.0
CommandPointBonus = GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandPointBonus = MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS ;,; GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandSet = SellableCommandSet
......@@ -315,6 +315,9 @@ Object AngmarMill
IncomeInterval = GOBLIN_MINE_MONEY_TIME ; How often (in msec) we give that much money
End
; *** Farm spamming countermeasure ***
#include "..\..\..\includes\farmproximity.inc"
ClientBehavior = TerrainResourceClientBehavior ModuleTag_MoneyProductionClient
End
......
......@@ -37,6 +37,9 @@ ChildObject IsengardFurnace Furnace
DamageCreationList = OCL_Furnace_Chunk4 CATAPULT_ROCK LEFT_DESTROYED
End
; *** Farm spamming countermeasure ***
#include "..\..\..\includes\farmproximity.inc"
Behavior = TerrainResourceBehavior ModuleTag_NewMoney
Radius = ISENGARD_FURNACE_MONEY_RANGE ; How far we try to claim ground
MaxIncome = ISENGARD_FURNACE_MONEY_AMOUNT ; If we were to get all we wanted, how much we would earn. Linear slope to 0 at 0% claim
......
......@@ -45,6 +45,8 @@ ChildObject MordorSlaughterHouse SlaughterHouse
; InitialCaptureBonus = 0 ; no initial bonus
;End
; *** Farm spamming countermeasure ***
#include "..\..\..\includes\farmproximity.inc"
Behavior = TerrainResourceBehavior ModuleTag_NewMoney
Radius = MORDOR_SLAUGHTERHOUSE_MONEY_RANGE ; How far we try to claim ground
......
......@@ -248,7 +248,7 @@ Object WildMineShaft
Side = Wild
EditorSorting = STRUCTURE
ThreatLevel = 1.0
CommandPointBonus = GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandPointBonus = MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS ;,; GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandSet = WildMineShaftCommandSet
......@@ -369,6 +369,9 @@ Object WildMineShaft
ExitDelay = 0
End
; *** Farm spamming countermeasure ***
#include "..\..\..\includes\farmproximity.inc"
Behavior = SubObjectsUpgrade ModuleTag_HideAll
TriggeredBy = Upgrade_StructureLevel1
HideSubObjects = V1 V2 V2a
......
......@@ -434,7 +434,7 @@ End
ChildObject DwarvenMineShaft MineShaft_Interface
Side = Dwarves
CommandPointBonus = GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandPointBonus = MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS ;,; GENERIC_ECONOMY_COMMAND_POINT_BONUS
KindOf = +LIVING_WORLD_BUILDING_MIRROR
......@@ -470,6 +470,9 @@ ChildObject DwarvenMineShaft MineShaft_Interface
ClientBehavior = TerrainResourceClientBehavior ModuleTag_MoneyProductionClient
End
; *** Farm spamming countermeasure ***
#include "..\..\..\includes\farmproximity.inc"
Behavior = WeaponSetUpgrade ModuleTag_ThirdLevelBuildingArrows
TriggeredBy = Upgrade_StructureLevel3
ConflictsWith = Upgrade_EasyAIMultiPlayer
......
......@@ -197,7 +197,7 @@ Object ElvenMallornTree
VisionRange = ELVEN_MALLORN_TREE_SHROUD_CLEAR ; Shroud clearing distance
ShroudClearingRange = ELVEN_MALLORN_TREE_SHROUD_CLEAR
BountyValue = ELVEN_MALLORN_TREE_BOUNTY_VALUE
CommandPointBonus = GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandPointBonus = MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS ;,; GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandSet = SellableCommandSet
......@@ -334,6 +334,9 @@ Object ElvenMallornTree
ShareUpgrades = Yes
End
; *** Farm spamming countermeasure ***
#include "..\..\..\includes\farmproximity.inc"
Behavior = BuildingBehavior ModuleTag_Building
NightWindowName = N_WINDOW N_GLOW
;GlowWindowName =
......
......@@ -40,7 +40,7 @@ ChildObject GondorFarm FarmInterface
BuildTime = GONDOR_FARM_BUILDTIME ; in seconds
BountyValue = GONDOR_FARM_BOUNTY_VALUE
ShroudClearingRange = GONDOR_FARM_SHROUD_CLEAR
CommandPointBonus = GENERIC_ECONOMY_COMMAND_POINT_BONUS
CommandPointBonus = MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS ;,; GENERIC_ECONOMY_COMMAND_POINT_BONUS
;;--- to allow generation of peasants ----------------
CommandSet = SellableCommandSet
......@@ -126,6 +126,9 @@ ChildObject GondorFarm FarmInterface
;Behavior = LevelUpUpgrade ModuleTag_BarracksLevel3
;End
; *** Farm spamming countermeasure ***
#include "..\..\..\includes\farmproximity.inc"
Behavior = WeaponSetUpgrade ModuleTag_Weapon
TriggeredBy = Upgrade_StructureLevel3
End
......
;-------------------------------;
; Proximity penalty ;
;-------------------------------;
; Step 1: Give free upgrade upon construction completion
Behavior = GrantUpgradeCreate ModuleTag_ConstructionCompletionUpgrade
UpgradeToGrant = Upgrade_FarmBuilt
GiveOnBuildComplete = Yes
End
; Step 2: Wait for a while
Behavior = ObjectCreationUpgrade ModuleTag_DelayCPGrant
TriggeredBy = Upgrade_FarmBuilt
Delay = 100
GrantUpgrade = Upgrade_FarmBuildDelayOver
End
; Step 3: Spawn a sub object that gives 25CP
; UNLESS another farm is too close by
Behavior = ObjectCreationUpgrade ModuleTag_SpawnCommandPointGranter
TriggeredBy = Upgrade_FarmBuildDelayOver
ConflictsWith = Upgrade_ProximityPenalty ; prevent creation of CPCreator if this farm is hit by another farm's aura
Delay = 0.0
ThingToSpawn = ResourceBuildingCPCreator
;Offset = X:0.0 Y:0.0 Z:51.0
End
; Penalty aura
Behavior = AttributeModifierAuraUpdate ModuleTag_ProximityPenalty
StartsActive = No
TriggeredBy = Upgrade_FarmBuilt
BonusName = ProximityPenaltyResources
RefreshDelay = 2000
Range = 300
TargetEnemy = No
ObjectFilter = INDUSTRY_TYPE_SPELL_OBJECT_FILTER
End
;-------------------------------;
;-------------------------------;
\ No newline at end of file
......@@ -5232,4 +5232,41 @@ Object CloudBreak_Healing
GeometryMinorRadius = 50.0
GeometryHeight = 100.0
GeometryIsSmall = No
End
\ No newline at end of file
End
Object ResourceBuildingCPCreator ;;,;; added
Draw = W3DScriptedModelDraw ModuleTag_Draw
DefaultModelConditionState
Model = None
End
End
KindOf = INERT IMMOBILE UNATTACKABLE
CommandPointBonus = #SUBTRACT( MULTIPLAYER_ECONOMY_HIGH_COMMAND_POINT_BONUS MULTIPLAYER_ECONOMY_LOW_COMMAND_POINT_BONUS )
Body = ActiveBody ModuleTag_MakesKillWork
MaxHealth = 1
End
; Penalty aura
Behavior = AttributeModifierAuraUpdate ModuleTag_ProximityPenalty
StartsActive = Yes
BonusName = ProximityPenaltyCommandPoints
RefreshDelay = 2000
Range = 300
TargetEnemy = No
ObjectFilter = INDUSTRY_TYPE_SPELL_OBJECT_FILTER
End
Behavior = SlavedUpdate ModuleTag_Slave
LeashRange = 0
GuardMaxRange = 0
GuardWanderRange = 0
AttackRange = 0
UseSlaverAsControlForEvaObjectSightedEvents = No // Not a creep
GuardPositionOffset = X:0 Y:0 Z:0
; FadeOutRange = 20
; FadeTime = 1000 //in msec
DieOnMastersDeath = Yes //Die when my master dies!
End
End
......@@ -4206,6 +4206,18 @@ Upgrade Upgrade_ActivateBfme1Skins ;,;
Type = PLAYER
End
Upgrade Upgrade_FarmBuilt ;;,;; Added for 8.1
Type = OBJECT
End
Upgrade Upgrade_FarmBuildDelayOver ;;,;; Added for 8.1
Type = OBJECT
End
Upgrade Upgrade_ProximityPenalty ;;,;; Added for 8.1
Type = OBJECT
End
//-------------------------------------------------------
// Create A Hero Include file
#include "CreateAHeroUpgrades.inc"