Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Mirage.js
Show All 23 Lines | Mirage.prototype.Init = function() | ||||
this.hitpoints = null; | this.hitpoints = null; | ||||
this.repairable = null; | this.repairable = null; | ||||
this.unhealable = null; | this.unhealable = null; | ||||
this.injured = null; | this.injured = null; | ||||
this.capturePoints = []; | this.capturePoints = []; | ||||
this.maxCapturePoints = 0; | this.maxCapturePoints = 0; | ||||
this.armourStrengths = {}; | |||||
this.maxAmount = null; | this.maxAmount = null; | ||||
this.amount = null; | this.amount = null; | ||||
this.type = null; | this.type = null; | ||||
this.isInfinite = null; | this.isInfinite = null; | ||||
this.killBeforeGather = null; | this.killBeforeGather = null; | ||||
this.maxGatherers = null; | this.maxGatherers = null; | ||||
this.numGatherers = null; | this.numGatherers = null; | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
this.miragedIids.add(IID_Health); | this.miragedIids.add(IID_Health); | ||||
this.maxHitpoints = cmpHealth.GetMaxHitpoints(); | this.maxHitpoints = cmpHealth.GetMaxHitpoints(); | ||||
this.hitpoints = cmpHealth.GetHitpoints(); | this.hitpoints = cmpHealth.GetHitpoints(); | ||||
this.repairable = cmpHealth.IsRepairable(); | this.repairable = cmpHealth.IsRepairable(); | ||||
this.injured = cmpHealth.IsInjured(); | this.injured = cmpHealth.IsInjured(); | ||||
this.unhealable = cmpHealth.IsUnhealable(); | this.unhealable = cmpHealth.IsUnhealable(); | ||||
}; | }; | ||||
bb: nuke | |||||
Mirage.prototype.GetMaxHitpoints = function() { return this.maxHitpoints; }; | Mirage.prototype.GetMaxHitpoints = function() { return this.maxHitpoints; }; | ||||
Mirage.prototype.GetHitpoints = function() { return this.hitpoints; }; | Mirage.prototype.GetHitpoints = function() { return this.hitpoints; }; | ||||
Mirage.prototype.IsRepairable = function() { return this.repairable; }; | Mirage.prototype.IsRepairable = function() { return this.repairable; }; | ||||
Mirage.prototype.IsInjured = function() { return this.injured; }; | Mirage.prototype.IsInjured = function() { return this.injured; }; | ||||
Mirage.prototype.IsUnhealable = function() { return this.unhealable; }; | Mirage.prototype.IsUnhealable = function() { return this.unhealable; }; | ||||
Mirage.prototype.CanAttack = Health.prototype.CanAttack; | |||||
// Capture data | // Capture data | ||||
Mirage.prototype.CopyCapturable = function(cmpCapturable) | Mirage.prototype.CopyCapturable = function(cmpCapturable) | ||||
{ | { | ||||
this.miragedIids.add(IID_Capturable); | this.miragedIids.add(IID_Capturable); | ||||
this.capturePoints = clone(cmpCapturable.GetCapturePoints()); | this.capturePoints = clone(cmpCapturable.GetCapturePoints()); | ||||
this.maxCapturePoints = cmpCapturable.GetMaxCapturePoints(); | this.maxCapturePoints = cmpCapturable.GetMaxCapturePoints(); | ||||
}; | }; | ||||
Mirage.prototype.GetMaxCapturePoints = function() { return this.maxCapturePoints; }; | Mirage.prototype.GetMaxCapturePoints = function() { return this.maxCapturePoints; }; | ||||
Mirage.prototype.GetCapturePoints = function() { return this.capturePoints; }; | Mirage.prototype.GetCapturePoints = function() { return this.capturePoints; }; | ||||
Mirage.prototype.CanCapture = Capturable.prototype.CanCapture; | Mirage.prototype.CanCapture = Capturable.prototype.CanCapture; | ||||
//TODO stop dupli | |||||
Mirage.prototype.CanAttack = Capturable.prototype.CanAttack; | |||||
// Armour data | |||||
Mirage.prototype.CopyDamageReceiver = function(cmpDamageReceiver) | |||||
{ | |||||
this.miragedIids.add(IID_DamageReceiver); | |||||
this.armourStrengths = cmpDamageReceiver.GetArmourStrengths(); | |||||
}; | |||||
Mirage.prototype.GetArmourStrengths = function() { return this.armourStrengths }; | |||||
Mirage.prototype.GetDamage = Armour.prototype.GetDamage; | |||||
// ResourceSupply data | // ResourceSupply data | ||||
Mirage.prototype.CopyResourceSupply = function(cmpResourceSupply) | Mirage.prototype.CopyResourceSupply = function(cmpResourceSupply) | ||||
{ | { | ||||
this.miragedIids.add(IID_ResourceSupply); | this.miragedIids.add(IID_ResourceSupply); | ||||
this.maxAmount = cmpResourceSupply.GetMaxAmount(); | this.maxAmount = cmpResourceSupply.GetMaxAmount(); | ||||
this.amount = cmpResourceSupply.GetCurrentAmount(); | this.amount = cmpResourceSupply.GetCurrentAmount(); | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
nuke