• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Pillage Doodads

Status
Not open for further replies.
Level 7
Joined
May 30, 2018
Messages
290
Hey :)

Is it possible to make the spell pillage work against doodads/neutral buildings? And if yes - how? :)
 
Level 8
Joined
May 21, 2019
Messages
435
Hey :)
Is it possible to make the spell pillage work against doodads/neutral buildings? And if yes - how? :)

Going by "gut feel" I'd say that there's a pretty good chance that it will not, seeing how it works by stealing currency from the owning player, and Neutral Passive/Hostile do not have currency, at least as far as I know.

You can quite easily trigger this effect though.
There are events that go off when a unit is attacked. You can use conditions to check that the attacking unit has pillage, and then you just add gold to the owner of the attacking unit if it does.
This is technically exploitable with attack interruption, so if you want it to be resistant to this, you need a damage event. Bribe's damage engine could be useful for that, but you may also choose to simply have it work with any source of damage, since buildings are immune to most spells anyway.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
I don't think Pillage steals the currency, it just adds it. But yeah, a Damage Detection System is what you're looking for when it comes to the Neutral Buildings. Destructibles on the other hand (I assume you meant Destructible since Doodads can't be attacked) are tricky because there's no Event to detect when one is attacked.

A possible solution:
You could give a hidden ability based on Channel to all of your units. Then whenever you order a unit to right click/attack a Destructible replace that order with the Channel ability order. It will look like your unit is running up to attack the destructible when in reality it's running up to begin channeling our hidden ability.

Then make sure to set the cast range of the Channel ability to be equal to the ordered unit's attack range (you can do this with with triggers). And instead of playing the Spell Channel animation the channeling unit should play it's Attack animation. Then have a timer trigger that periodically adds gold to the owner of the channeling unit while also damaging the destructible (set it's life to be equal to life - casters damage). You can calculate the caster's attack damage with triggers too.
 
Last edited:
Level 8
Joined
May 21, 2019
Messages
435
I don't think Pillage steals the currency, it just adds it.
Doesn't it check to see if the enemy actually has the currency you're trying to steal?
I recall seeing something along those lines when I tried a joke build against an AI in a melee match, in which my central goal was to drain all of the enemy's gold with pillage. I recall it stopping at some point, presumably due to the enemy running out.

This may be totally wrong memory on my part though, does anyone have a definitive answer?
A possible solution:
You could give a hidden ability based on Channel to all of your units. Then whenever you order a unit to right click/attack a Destructible replace that order with the Channel ability order. It will look like your unit is running up to attack the destructible when in reality it's running up to begin channeling our hidden ability.

Then make sure to set the cast range of the Channel ability to be equal to the ordered unit's attack range (you can do this with with triggers). And instead of playing the Spell Channel animation the channeling unit should play it's Attack animation. Then have a timer trigger that periodically adds gold to the owner of the channeling unit while also damaging the destructible (set it's life to be equal to life - casters damage). You can calculate the caster's attack damage with triggers too.

This is a cool idea, but it does have one flaw as far as I can reason: Sound.
If you play an attack animation, it will play the swing sound effect, but not the impact sound effect, since that requires a target.
I guess you could play that sound manually, but then you'd have to synchronize it to the attack animation of every single unit, and this solution starts to look very intensive.

Destructibles on the other hand (I assume you meant Destructible since Doodads can't be attacked) are tricky because there's no Event to detect when one is attacked.
It's also a possible solution to simple modify neutral passive buildings to look like the desired destructible instead. There's probably going to be a few minor UI differences as a result of this, but as far as solutions go, that would be quite simple.
 
Last edited:
Status
Not open for further replies.
Top