Created
July 14, 2019 02:49
-
-
Save Azaezel/ca382efb6dbdba958dabef2b2f2c5161 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~// | |
// DAMAGE | |
datablock afxDamageData(Burning_damage_CE) | |
{ | |
label = "rof_dot"; | |
flavor = "fire"; | |
directDamage = "$$ %%._damage"; | |
directDamageRepeats = "$$ mFloor(%%._dur)/2 + 1"; | |
}; | |
datablock afxEffectWrapperData(Burning_damage_EW) | |
{ | |
effect = Burning_damage_CE; | |
posConstraint = "victim"; | |
posConstraint2 = "victim"; | |
lifetime = "$$ %%._dur"; | |
delay = 0; | |
}; | |
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~// | |
// Particle Effect | |
datablock afxXM_LocalOffsetData(FireGlobe_offset_XM) | |
{ | |
localOffset = "0 0 1"; | |
}; | |
datablock afxEffectWrapperData(FireGlobe_EW) | |
{ | |
effect = FireGlobeEm; | |
constraint = "victim"; | |
lifetime = "$$ (%%._dur)"; | |
xfmModifiers[0] = ElectricGlobe_offset_XM; | |
}; | |
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~// | |
datablock afxEffectronData(Burning_effect) | |
{ | |
execOnNewClients = true; | |
addEffect = Burning_damage_EW; | |
addEffect = FireGlobe_EW; | |
}; | |
function applyBurninate(%victim, %sourceObject, %damage, %duration) | |
{ | |
if (!isobject(%sourceObject)) return; | |
if (!isobject(%victim)) return; | |
%sourceDB = %sourceObject.getdataBlock(); | |
%effectron = new afxEffectron() | |
{ | |
datablock = Burning_effect; | |
_damage = %damage; | |
_dur = %duration; | |
sourceObject = %sourceObject; | |
}; | |
%effectron.addConstraint(%victim, "victim"); | |
%effectron.schedule(%duration*1000,"delete"); | |
return %effectron; | |
} | |
datablock afxAnimClipData(burning__Victim_Clip_CE) | |
{ | |
clipName = "flame"; | |
ignoreCorpse = true; | |
rate = 1.0; | |
lockAnimation = true; | |
}; | |
datablock afxEffectWrapperData(burning_Victim_Clip_EW) | |
{ | |
effect = burning__Victim_Clip_CE; | |
constraint = "victim"; | |
lifetime = "$$ %%._dur"; | |
delay = 0.0; | |
}; | |
datablock afxEffectronData(burning) | |
{ | |
execOnNewClients = true; | |
addEffect = burning_Victim_Clip_EW; | |
// param defaults // | |
_dur = 1.0; | |
}; | |
function Burning_effect::onDamage(%this, %spell, %label, %flavor, %damaged_obj, %amount, | |
%count, %pos, %ad_amount, %radius, %impulse) | |
{ | |
// deal the damage | |
if (isObject(%damaged_obj) && (%damaged_obj.getType() & $TypeMasks::PlayerObjectType)) | |
{ | |
%damaged_obj.damage(%spell.sourceObject, %pos, %amount, "firedot"); | |
%damaged_obj.effectron = startEffectron(burning, %damaged_obj, "victim"); | |
if (%damaged_obj.isBot) | |
%damaged_obj.schedule(1000,"randomPoint",1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment