• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Spell] A Simple Fireball ability that scale with Int

Level 11
Joined
Sep 30, 2017
Messages
169
I really want a simple ability but i don't know to make it scale with INT of the hero? Like it's a normal fireball ability that damages and stuns but also deals bonus damage based on the hero INT, Any help?
 
With reforged you can use the new natives that fortunately work

1751832953659.png


You'll need to adapt the "level: 0" part if it's an hero ability, and I can't remember if level 0 = level 1 ingame in this case
 
Or use ujapi that gives you many features of reforged & more, downside your map will only work in ujapi.
 
With reforged you can use the new natives that fortunately work

View attachment 540479

You'll need to adapt the "level: 0" part if it's an hero ability, and I can't remember if level 0 = level 1 ingame in this case

I know i could test it myself (bit too lazy right now), but does that mean we're able to display the result of such calculations?
 
So, you can only set tooltip for an ability, meaning that all characters with that ability have the same tooltip.
For my hero-map this is not a problem (can only be 1 of that hero).

I don't really have a reason for keeping this in GUI as it has become more and more jass over time, but this is one way of doing it.

  • HHShurikenUpdateAbilityText
    • Events
    • Conditions
    • Actions
      • Custom script: local integer levelOfAbility = GetUnitAbilityLevel(udg_hh_hero, HH_SHURIKEN_ABILITY)
      • Custom script: local real baseDamage = HHShurikenDamageBase(levelOfAbility)
      • Custom script: local real dmgPercent = HHShurikenDamagePercent(levelOfAbility)
      • Custom script: local real spPercent = HHShurikenSpellPowerPercent(levelOfAbility)
      • Custom script: local real heroDmg = GetTotalDamage(udg_hh_hero)
      • Custom script: local real heroSp = GetSpellPower(udg_hh_hero)
      • Custom script: local real dmgTotal = baseDamage + dmgPercent * heroDmg + spPercent * heroSp
      • Custom script: local real dmgTotH = dmgTotal * udg_hh_ability_damage_modifier
      • Custom script: set udg_temp_string = "Throws 4 Shuriken in direction of target point over 0.75 seconds. Shurikens travels 850 units, deals damage to all enemies hit, reduced by " + R2I2Sx100(HH_SHURIKEN_REDUCTION_PER_TARGET)
      • Custom script: set udg_temp_string=udg_temp_string+"% per target down to "+R2I2Sx100(HH_SHURIKEN_MINIMUM_DMG_PERCENT)+"% of the original damage.|nEach shuriken deals "+R2I2S(dmgTotH)+" ("+R2I2S(baseDamage)+" + "+ScalingText(heroDmg, dmgPercent, BONUS_DAMAGE)+" + "
      • Custom script: set udg_temp_string=udg_temp_string + ScalingText(heroSp, spPercent, BONUS_SPELL_POWER) + ") damage.|nLiving Shadow damage: " + R2I2S(dmgTotal * udg_hh_living_shadow_mirror_percen)+" (" + R2I2Sx100(udg_hh_living_shadow_mirror_percen)
      • Custom script: set udg_temp_string=udg_temp_string + "%).|nWhile invisible, damage is increased to " + R2I2S(dmgTotH * HH_SHURIKEN_INVIS_BONUS) + " (+" + R2I2Sx100(HH_SHURIKEN_INVIS_BONUS - 1.0) + "%) for the Shadow Dancer."
      • Custom script: set udg_temp_string=udg_temp_string + "|nShurikens remain for " + R2I2S(HH_SHURIKEN_DECAY_TIME) + " seconds before decaying.|n|nCooldown: "
      • Set temp_real1 = (Ability Cooldown of hh_hero for ability Shuriken (HH, channel, Target point), Level: ((Level of Shuriken (HH, channel, Target point) for hh_hero) - 1))
      • Custom script: set udg_temp_string=udg_temp_string + R2SW(udg_temp_real1,0,2)+" Seconds."
      • Ability - Set Extended Tooltip of Shuriken (HH, channel, Target point) to temp_string for level 0
Basically what happens is that I put whatever I want in a "temp_string" variable, then put that for my ability.
This displays the actual damages and cooldown (because I have cooldown reduction).

If you "only" do X% of intelligence, it will be way simpler, but at least you can see how you can do it.

NOTE: I only set tooltip for level 0. For this to work, you must only have "Level 1 - Text - Tooltip - Normal - Extended" set and all other levels must be blank. Otherwise, you'll need to set it to levelOfAbility - 1.
 
Back
Top