Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | function TestFormationExiting(mode) | ||||
unitAI.SetupAttackRangeQuery(1); | unitAI.SetupAttackRangeQuery(1); | ||||
if (mode == 1) | if (mode == 1) | ||||
{ | { | ||||
AddMock(enemy, IID_Health, { | AddMock(enemy, IID_Health, { | ||||
GetHitpoints: function() { return 10; }, | GetHitpoints: function() { return 10; }, | ||||
}); | }); | ||||
AddMock(enemy, IID_Attack, {}); | |||||
Freagarach: Redundant. | |||||
AddMock(enemy, IID_UnitAI, { | AddMock(enemy, IID_UnitAI, { | ||||
IsAnimal: function() { return false; } | "GetStance": function() { return { "targetVisibleEnemies": true } } | ||||
}); | }); | ||||
} | } | ||||
else if (mode == 2) | else if (mode == 2) | ||||
AddMock(enemy, IID_Health, { | AddMock(enemy, IID_Health, { | ||||
GetHitpoints: function() { return 0; }, | GetHitpoints: function() { return 0; }, | ||||
}); | }); | ||||
var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0}); | var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0}); | ||||
▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Redundant.