Spell that reduces attack range

Gryffin

New Member
Reaction score
6
Hello,
I would love some help creating a spell that reduces the attack range of a ranged unit. Currently, I have a spell that reduces a unit's acquisition range, but this does not work as I would like. I could use something like Cloud, but that full-out prevents ranged attacks in an area. I would love a target-unit spell that reduces the target's attack range.

Thanks for the help.

I have an additional, off topic question you might be able to answer. Do chance to miss factors stack? For example, if an attacking unit has Curse, causing it to have a chance to miss an attack, and the attacked unit has Evasion, causing it to dodge attacks, will the Curse and Evasion percentages stack, or how is the chance to hit/miss calculated?
 

Ayanami

칼리
Reaction score
288
Perhaps use an attack detection event.

Trigger:
  • Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • <Your Conditions>
    • Actions
      • Set AttackerPoint = Position of (Attacking unit)
      • Set AttackedPoint = Position of (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between AttackerPoint and AttackedPoint) Greater than or Equal to <Restrict Range>
        • Then - Actions
          • Unit - Order (Attacking unit) to Stop
        • Else - Actions
      • Custom script: RemoveLocation(udg_AttackedPoint)
      • Custom script: RemoveLocation(udg_AttackerPoint)
 

Gryffin

New Member
Reaction score
6
Hey Glenphir, thanks for the idea. I believe this may work somewhat with my game, but, unfortunately, I believe this method may be insufficient for my game's needs. Thanks for the response.
 

Bogrim

y hello thar
Reaction score
154
The only way to alter a unit's actual attack range is through upgrades. However, you would need an upgrade for each time the spell is casted and for each and every unit targetable to share all of the upgrade, so it's basicly impossible.

And yes, miss chances stack. You can run a simple test to find out whether it's additive or multiplicative. For example, debuff unit a with a 50% Curse and and have it attack a unit with 50% Evasion. If the attacking unit misses every single attack, it’s additive (50% + 50%) and if not, it’s multiplicative ((chance to hit – 50%) -50%).
 

Gryffin

New Member
Reaction score
6
The only way to alter a unit's actual attack range is through upgrades. However, you would need an upgrade for each time the spell is casted and for each and every unit targetable to share all of the upgrade, so it's basicly impossible.

And yes, miss chances stack. You can run a simple test to find out whether it's additive or multiplicative. For example, debuff unit a with a 50% Curse and and have it attack a unit with 50% Evasion. If the attacking unit misses every single attack, it’s additive (50% + 50%) and if not, it’s multiplicative ((chance to hit – 50%) -50%).

Awesome. Thank you.
 
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