Jump to content

Onslaught Consistency (XML Fix)


Recommended Posts

Onslaught should be 100% consistent after these files are modified.

Affected units can now chase the target through fog (unless it's invis) without needing it to be sighted or revealed, similar to how legionnaires taunt works.

The forced attack command will no longer be disrupted (from being bound to a projectile etc).

Undeads will no longer run back to deadlift or act weird while onslaught is active.

File names and code that corresponds listed below:

deadlift\ability_02\ability.entity
<?xml version="1.0" encoding="UTF-8"?>
<ability
	name="Ability_Deadlift2"

	icon="icon.tga"
	statuseffecttooltip=""
	
	anim="ability_2"
	casttime="0"
	castactiontime="0"
	
	maxlevel="4"
	requiredlevel="1,3,5,7"

	actiontype="target_entity"
	targetscheme="enemy_units_and_structures"
	casteffecttype="Physical"
	
	activatescheme="movement"
	frontqueue="true"
	
	manacost="75,90,105,120"
	cooldowntime="30000,26000,22000,18000"
	novoiceresponse="true"
	
	range="1000"
	
	showareacast="true"
	areacastmaterial="/shared/materials/area_cast_indicator_spokes.material"

	targetpriorities="enemy_heroes,enemy_buildings"
>
	<onimpact>
		<applystate name="State_Deadlift_Ability2_Slow" target="target_entity" duration="2000" />
		<order command="event" source="source_entity" target="target_entity" ordername="Order_Deadlift_Ability2" ignoresight="true" />
		<setproxy entity="this_entity" target="target_entity" />
		
		<!-- Spawn Undead units -->
		<spawnunit name="Pet_Deadlift_Ability3" owner="source_entity" source="source_entity" target="this_owner_entity" count="2,3,4,5" pushentity="true" />
			
		<!-- VFX for explosion -->
		<hasavatarkey name="Hero_Deadlift.Alt">
			<playeffect effect="../alt/ability_03/effects/explosion.effect" source="source_position" target="source_position" occlude="true" />
		</hasavatarkey>
		<else>
			<hasavatarkey name="Hero_Deadlift.Alt2">
				<playeffect effect="../alt2/ability_03/effects/explosion.effect" source="source_position" target="source_position" occlude="true" />
			</hasavatarkey>
			<else>
				<hasavatarkey name="Hero_Deadlift.Alt3">
					<playeffect effect="../alt3/ability_03/effects/explosion.effect" source="source_position" target="source_position" occlude="true" />
				</hasavatarkey>
				<else>
					<playeffect effect="../ability_03/effects/explosion.effect" source="source_position" target="source_position" occlude="true" />
				</else>
			</else>
		</else>

		<!-- Range check -->
		<getrange entity="this_entity" />
		<setvar0 a="result" b="300" op="add" />
		
		<!-- AoE for the creeps -->
		<areaofeffect
			center="source_entity"
			radius="var0"
			targetselection="all"
			targetscheme="willing_ally_nonhero_nonboss_nonElitePet_units_and_my_pseudo_pets"
		>
			<applystate name="State_Deadlift_Ability2_Killer" proxy="source_entity" duration="6000" />
			<order command="stop" force="true" source="target_entity" target="target_entity" />
			<order command="attack" force="true" forceduration="6000" source="target_entity" target="this_proxy_entity" ignoresight="true" />
			<applystate name="State_Deadlift_Ability2" proxy="this_proxy_entity" duration="6000"/>
		</areaofeffect>
		<applystate name="State_Deadlift_Ability2_VFX" target="target_entity" duration="6000" />
	</onimpact>

</ability>
deadlift\ability_02\state.entity
<?xml version="1.0" encoding="UTF-8"?>
<state
	name="State_Deadlift_Ability2"
	
	icon="icon.tga"
	passiveeffect="effects/state.effect"

	effecttype=""
	allowtransfer="false"
	morphpriority="101"
	morphattacktargetscheme="all_units_and_buildings"
	silenced="true"
	
	attackspeed="0.2,0.4,0.6,0.8"
	movespeedmultiplier="100"
	slowresistance="1"
	unitwalking="true"

	modifierkey="Deadlift_ForceAttack"
>
	<onframe>
	    <hasmodifier name="forced_Attack" />
		<else>
		    <order command="attack" force="true" forceduration="6000" source="this_owner_entity" target="this_proxy_entity" ignoresight="true" />
		</else>
		
		<targettype type="alive" source="this_proxy_entity" target="this_proxy_entity" />
		<else>
			<expirestate name="State_Deadlift_Ability2" target="this_owner_entity" />
		</else>
		
		<!-- Range check -->
		<pushability name="Ability_Deadlift2" />
		<getrange entity="stack_entity" />
		<setvar0 a="result" b="300" op="add" />
		<distance source="this_owner_entity" target="this_proxy_entity" />
		<compare a="result" b="var0" op="gt">
			<expirestate name="State_Deadlift_Ability2" target="this_owner_entity" />
		</compare>
	</onframe>

	<!-- Half damage when attacking non-buildings -->
	<onattackingdamageevent>
		<targettype type="building">
			<setvalue name="damage_attempted" a="damage_attempted" b="1.5" op="mult" />
		</targettype>
		<else>
			<setvalue name="damage_attempted" a="damage_attempted" b="0.5" op="mult" />
		</else>
	</onattackingdamageevent>
	
	<onexpired>
		<order command="stop" force="true" source="this_owner_entity" />
		
		<hasmodifier entity="this_owner_entity" name="deadlift_controls_me">
			<order command="aggressive_wander" source="this_owner_entity" target="this_proxy_entity" force="true" forceduration="10000" />
		</hasmodifier>
	</onexpired>
	
	<altavatar key="Hero_Deadlift.Alt"
		passiveeffect="../alt/ability_02/effects/state.effect"
	/>
	
	<altavatar key="Hero_Deadlift.Alt2"
		passiveeffect="../alt2/ability_02/effects/state.effect"
	/>
	
	<altavatar key="Hero_Deadlift.Alt3"
		passiveeffect="../alt3/ability_02/effects/state.effect"
	/>
</state>
deadlift\ability_03\pet\pet.entity
<?xml version="1.0" encoding="UTF-8"?>
<pet
	name="Pet_Deadlift_Ability3"
	
	icon="icon.tga"
	portrait="icon.tga"
	model="/npcs/good_melee/model.mdf"
	skin=""
	
	passiveeffect="../../ability_04/effects/state.effect"
	spawneffect="effects/spawn.effect"
	respawneffect=""
	selectsound=""
	orderconfirmedsound=""
	
	preglobalscale="1.3"
	modelscale="1.0"
	effectscale="0.9"
	boundsheight="64"
	boundsradius="16"
	selectionradius="36"
	targetoffset="0 0 54"

	movespeed="325"
	turnrate="320"

	maxhealth="200"
	healthregen="0"
	immunity=""
	maxmana="0"
	manaregen="0"
	diewithowner="true"
	iscontrollable="true"
	unitwalking="true"

	armor="2"
	magicarmor="0"

	cancarryitems="false"
	inventory0=""
	inventory1=""
	inventory2=""
	inventory3=""
	inventory4=""
	inventory5=""
	inventory6=""
	inventory7=""

	attackduration="700"
	attackactiontime="350"
	attackcooldown="1600"
	attackdamagemin="30"
	attackdamagemax="30"
	attacknumanims="2"
	attackoffset="0 30 100"
	attackprojectile=""
	attackrange="90"
	attackstarteffect=""
	attackactioneffect=""
	attackimpacteffect="effects/impact.effect"
	attacktargetscheme="attack"
	attacktype="melee"
	combattype="Melee"

	aggrorange="600"
	proximityrange="0"
	sightrangeday="1000"
	sightrangenight="600"
	wanderrange="150"

	experiencebounty="10"
	goldbountymin="10"
	goldbountymax="10"
	
	corpsetime="1500"
	corpsefadetime="2500"
	corpsefadeeffect="/shared/effects/corpse_sink.effect"
	
	lifetime="6000"
	showlifetime="true"
	unittype="Uninfestable"
	inheritvisibilityfromowner="true"
	isdragselectablemulti="true"
>
	<onspawn>
		<!-- If Deadlift is dead, kill me -->
		<targettype type="dead" target="source_entity">
			<kill target="this_entity" />
		</targettype>
		<compare source="this_owner_entity" a="2" b="source_team" op="eq">
			<setactivemodifierkey entity="this_entity" name="Hellbourne" />
		</compare>
		
		<applystate name="State_Deadlift_Ability3_Movespeed" continuous="true" target="this_entity" />
		<order command="aggressive_wander" force="true" forceduration="100000" source="this_entity" target="this_owner_entity" />
	</onspawn>
	
	<ondamage />
	<onattack />
	
	<onframe>
	    <hasmodifier name="Deadlift_ForceAttack" />
		<else>
			<distance source="this_entity" target="this_owner_entity" />
			<compare a="result" b="2000" op="gt">
				<teleport source="this_entity" target="this_owner_entity" interpolate="false" />
				<order command="aggressive_wander" force="true" forceduration="100000" source="this_entity" target="this_owner_entity" />
			</compare>

			<distance source="this_entity" target="this_owner_entity" />
			<compare a="result" b="750" op="gt">
				<order command="aggressive_wander" force="true" forceduration="100000" source="this_entity" target="this_owner_entity" />
			</compare>
			
			<!-- Creep aggro control when Deadlift is invis -->
			<isstealthed entity="this_owner_entity">
				<applystate name="State_Deadlift_Ability3_Invis_AggroControl" target="this_entity" continuous="true" />
			</isstealthed>
			<else>
				<expirestate name="State_Deadlift_Ability3_Invis_AggroControl" target="this_entity" />
			</else>
		</else>
	</onframe>

	<onexpired>
		<pushability name="Ability_Deadlift3" source="this_owner_entity" />
		<compare source="stack_entity" a="source_level" b="0" op="gt">
			<!-- Heal based on level of E: 1/1.5/2/2.5% of Max Health -->
			<evaluate a="source_level" source="stack_entity" b="0.005" op="mult" />
			<evaluate a="result" b="0.005" op="add" />
			<setvar0 source="this_owner_entity" a="source_maxhealth" b="result" op="mult" />
			<heal source="this_owner_entity" target="this_owner_entity" a="var0" />
			
			<!-- VFX -->
			<hasavatarkey name="Hero_Deadlift.Alt">
				<playeffect effect="../../alt/ability_03/effects/strength.effect" target="this_entity" source="this_owner_entity" />
			</hasavatarkey>
			<else>
				<hasavatarkey name="Hero_Deadlift.Alt2">
					<playeffect effect="../../alt2/ability_03/effects/strength.effect" target="this_entity" source="this_owner_entity" />
				</hasavatarkey>
				<else>
					<hasavatarkey name="Hero_Deadlift.Alt3">
						<playeffect effect="../../alt3/ability_03/effects/strength.effect" target="this_entity" source="this_owner_entity" />
					</hasavatarkey>
					<else>
						<playeffect effect="../effects/strength.effect" target="this_entity" source="this_owner_entity" />
					</else>
				</else>
			</else>
		</compare>
	</onexpired>

	<modifier key="Deadlift_CreepVis" modpriority="102" 
		inheritvisibilityfromowner="false"
		alwaysvisible="true"
	>
	</modifier>
	
	<modifier key="Hellbourne" modpriority="101"
		model="/npcs/bad_melee/model.mdf"
	/>

	<modifier key="deadlift_controls_me"  modpriority="110"
		iscontrollable="false"
		proximityrange="200"
	>
		<onattack>
			<cantarget targetscheme="nonneutral_enemy_units">
				<applystate name="State_Deadlift_Ability3_Reveal" target="this_entity" duration="2000" />
			</cantarget>
		</onattack>
	</modifier>

	<modifier key="Deadlift_ForceAttack"  modpriority="111"
		iscontrollable="false"
	/>

	<altavatar key="Hero_Deadlift.Alt"
		icon="../../alt/ability_03/pet/icon.tga"
		passiveeffect="../../alt/ability_03/pet/effects/state.effect"
		spawneffect="../../alt/ability_03/effects/spawn.effect"
		attackimpacteffect="../../alt/ability_03/effects/impact.effect"
	/>

	<altavatar key="Hero_Deadlift.Alt2"
		icon="../../alt/ability_03/pet/icon.tga"
		passiveeffect="../../alt2/ability_03/effects/state.effect"
		spawneffect="../../alt2/ability_03/effects/spawn.effect"
	/>
	
	<altavatar key="Hero_Deadlift.Alt3"
		icon="../../alt/ability_03/pet/icon.tga"
		attackimpacteffect="../../alt3/ability_03/effects/impact.effect"
		passiveeffect="../../alt3/ability_03/effects/state.effect"
		spawneffect="../../alt3/ability_03/effects/spawn.effect"
	/>
</pet>

 

Link to post
Share on other sites
×
×
  • Create New...