Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/StatusEffects.js
function StatusEffects() {} | |||||
StatusEffects.prototype.Schema = | |||||
"<a:help>Handling effects like poisioning or burning attached to an entity.</a:help>" + | |||||
"<a:example>" + | |||||
"<Poison>" + | |||||
"<Duration>2000</Duration>" + | |||||
"<Interval>200</Interval>" + | |||||
"<Damage>5</Damage>" + | |||||
"</Poison>" + | |||||
"</a:example>" + | |||||
"<optional>" + | |||||
"<element name='Capture'>" + | |||||
"<interleave>" + | |||||
"<element name='Duration' a:help='The duration of the status while the effect occurs.'><ref name='nonNegativeDecimal'/></element>" + | |||||
"<element name='Interval' a:help='Interval between the occurances of the effect.'><ref name='nonNegativeDecimal'/></element>" + | |||||
"<element name='Damage' a:help='Damage caused by the effect.'><ref name='nonNegativeDecimal'/></element>" + | |||||
"</interleave>" + | |||||
"</element>" + | |||||
"</optional>"; | |||||
StatusEffects.prototype.Init = function() | |||||
{ | |||||
this.poison = {}; | |||||
this.poison.duration = +this.template.Poison.Duration; | |||||
this.poison.interval = +this.template.Poison.Interval; | |||||
this.poison.damage = +this.template.Poison.Damage; | |||||
}; | |||||
Engine.RegisterComponentType(IID_StatusEffects, "StatusEffects", StatusEffects); |
Wildfire Games · Phabricator