Adding +1 damage for each attack

FannyShaver

Well-Known Member
Reaction score
31
Trigger:
  • Lightning Tower Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Ultimate Lightning Tower
      • ((Attacked unit) belongs to an enemy of Player 1 (Red)) Equal to True
    • Actions
      • Unit - Add Ultimate Lightning Tower +1 dmg (+1) to (Attacking unit)
      • Unit - Set level of Ultimate Lightning Tower +1 dmg (+1) for (Attacking unit) to 2
      • Unit - Remove Ultimate Lightning Tower +1 dmg (+1) from (Attacking unit)


Ability was:

level 1 = 0dmg
level 2 = 1dmg

and

level 1 = 0dmg
level 2 = -1dmg

None worked. Any clue how to get that done?
 

hopy

Active Member
Reaction score
64
Trigger:
  • Lightning Tower Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Ultimate Lightning Tower
      • ((Attacked unit) belongs to an enemy of Player 1 (Red)) Equal to True
    • Actions
      • Unit - Add Ultimate Lightning Tower +1 dmg (+1) to (Attacking unit)
      • Unit - Set level of Ultimate Lightning Tower +1 dmg (+1) for (Attacking unit) to 2
      • Unit - Remove Ultimate Lightning Tower +1 dmg (+1) from (Attacking unit)


Ability was:

level 1 = 0dmg
level 2 = 1dmg

and

level 1 = 0dmg
level 2 = -1dmg

None worked. Any clue how to get that done?

What exactly do you need? Cause I'm having a bit of trouble understanding what you want to achieve. :p

- If you want the tower to deal damage +1 just add a Item attack bonus ability to it.

- If you want the tower to deal +1 damage on each attack upgrade the level each attack using a trigger, or use Incinerate (Neutral Hostile).

- If you want it to have a chance to deal more damage use Bash or Critical Strike.

- If you want it to deal more damage only to player 1, you'd have to use waits or such, though I'd suggest you just use the "Cause attacking unit to damage Attacked unit for 1.

Why doesn't the trigger work?
Trigger:
  • Unit - A unit Is attacked

Works when the unit is about to attack, not when it attacks. So when it's about to attack it will: Get the ability but it'll get removed before the unit attacks.
- You Order the attack.
- Aim, Ready andd
- Gets ability
- Removes ability
- FIREEE!!!!
- BOOM!
Like that...
 

hopy

Active Member
Reaction score
64
Trigger:
  • Im overpowered at the end of the map
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Ultimate Lightning Tower
      • ((Attacked unit) belongs to an enemy of Player 1 (Red)) Equal to True
    • Actions
      • Unit - Set level of Ultimate Lightning Tower for (Attacking unit) to ((Level of Ultimate Lightning Tower for (Attacking unit)) + 1)


That should be ok, just make sure that the tower has the ability Ultimate Lightning Tower.
A small problem with this is that the ability would have a massive amount of levels... A way to avoid that is to use "Damage attacked unit for Intreger" and increase Intreger+1 every time he attacks, with an Array in case you'll have multiple of these units.
 

FannyShaver

Well-Known Member
Reaction score
31
This what you gave me requires even thousands of levels for this ability. I need another idea.
 

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
You can use the upgrade. In trigger, upgrade's max can be increased. But this upgrade will affect other towers of this player that has this upgrade. There's no other way to make a bonus damage for a single tower if not using the bonus damage spell and leveling it to something high. But if it's only 1 per player then, you can use the upgrade :thup:

Trigger:
  • Actions
    • Set IntegerX = (IntegerX + 1)
    • Player - Set the max research level of Storm Hammers to (IntegerX + 1) for (Owner of (Triggering unit))
    • Player - Set the current research level of Storm Hammers to IntegerX for (Owner of (Triggering unit))
    • -------- The Storm Hammer should be the upgrade that gives bonus damage----------


NOTE: Also, do not use A Unit is Attacked event, cuz players can press "S" or stop to gain damage faster. Use damage detection
 

X-maul

AKA: Demtrod
Reaction score
201
You can use the upgrade. In trigger, upgrade's max can be increased. But this upgrade will affect other towers of this player that has this upgrade. There's no other way to make a bonus damage for a single tower if not using the bonus damage spell and leveling it to something high. But if it's only 1 per player then, you can use the upgrade :thup:

An upgrade would diffinitly be the solution, but you can just create a new upgrade, and aply it to that single tower, and give it.. 100 levels (think thats the max) and apply the bonus you like

then you increase it 1 level for every shot.
 

FannyShaver

Well-Known Member
Reaction score
31
I am trying now with providing an inventory slot, giving it a permament damage increase +1 tome, and removing inv slot. Problem is, that terrain around it might be pretty blocked. 100 levels is not enough ;) Erm well, I think I can get more than 100 levels...
 

FannyShaver

Well-Known Member
Reaction score
31
Well, I tried that:

Trigger:
  • Lightning Tower Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Lightning Tower
      • ((Attacked unit) belongs to an enemy of Player 1 (Red)) Equal to True
    • Actions
      • Player - Set the max research level of Lightning Power to 200 for (Owner of (Attacking unit))
      • Player - Set the current research level of Lightning Power to ((Current research level of Lightning Power for (Owner of (Attacking unit))) + 1) for (Owner of (Attacking unit))


Doesn't work.
 

FannyShaver

Well-Known Member
Reaction score
31
The function:

Trigger:
  • Player - Set the max research level of Lightning Power to (dupa + 1) for (Owner of (Attacking unit))


Doesn't work at all.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Laiev:
Haha, welcome to the Warcraft World, wheres everything is limited without reason lol
Unfortunately its true...

Gotta be mad at blizzard not making a function to do that(increasing units properties) right?

If you really want this to work the you have to do(I think this is the easiest way to do this):

1. Go here and download newgen if you don't have it -> newgen
2. Go here and download Unit Properties -> unit properties
3. then use custom script: call UnitModifyDamage(GetAttacker(), 1)
 

xAnaMorphine

Active Member
Reaction score
43
nothing to do, i attached a map witch solves the problem imo
 

Attachments

  • TD_AttackGrow.w3x
    13.7 KB · Views: 218

FannyShaver

Well-Known Member
Reaction score
31
Erm. Right. I've got it working, but:

I was hoping it's gonna get that damage fit into base damage, not as a bonus, as I have another bonus running, and this (+1) is not affected by another bonus :/
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Hope this is what you wanted -> see the attached map

You could check DotU's official site www.playdotu.com also.
 

Attachments

  • PDG inspired by DotU.w3x
    19.7 KB · Views: 240

FannyShaver

Well-Known Member
Reaction score
31
Did you actually tried that map before you pasted? I had to add another player to see that no damage is added to this tower.
 

Grymlax

Probably not around
Reaction score
138
Adding an inventory slot is the way to go if you don't want it to be green bonus damage. here is a test map I made for you that is mui.


these are the triggers in the map.

Trigger:
  • bonus dmg
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to damage gain
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacking unit) is in avoidAbuse) Equal to True
        • Then - Actions
          • Unit Group - Remove (Attacking unit) from avoidAbuse
        • Else - Actions
          • Unit - Add Inventory (Hero) to (Attacking unit)
          • Hero - Create +1 damage tome and give it to (Attacking unit)
          • Unit - Remove Inventory (Hero) from (Attacking unit)


Damage gain is the name of the tower and +1 damage tome is just a tome which I gave a modified version of the ability "item permanent damage gain"

Trigger:
  • avoid abuse
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to damage gain
    • Actions
      • Unit Group - Add (Triggering unit) to avoidAbuse


If you didn't have this trigger you could spam stop or order the tower to attack another unit which would restart an attack resulting in more damage for the tower.

well thats about it here is the map:
 

Attachments

  • towerdmg.w3x
    17.8 KB · Views: 225
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top