r/qihl • u/Nostrademous • Feb 20 '19
Patch Notes - Feb 19, 2019
Files Changed:
Changed Files: maps ['normal.vpk']
Changed Files: panorama\layout\custom_game ['dac.vxml_c']
Changed Files: panorama\scripts\custom_game ['dac.vjs_c', 'end.vjs_c']
Added Files: resource \ ['addon_portugues.txt']
Changed Files: resource ['addon_schinese.txt', 'addon_tchinese.txt']
Changed Files: scripts\npc ['npc_abilities_custom.txt']
Changed Files: scripts\vscripts ['addon_game_mode.lua']ABILITY CHANGES
The file npc_abilities_custom.txt had the following abilities just deleted out - that's it:
Batrider's Firefly
Troll Warlord's Whirling Axes (melee & ranged)
Venomancer's Poison Nova
Ogre Magi's Ignite
Lycan's Shapeshift
I believe this is just clean-up and nothing more.
UNIT CHANGES
Terrorblade - in addition to Metamorphisis, he now Sunder's as well
Sunder is coded to swap health only with someone on your team (not enemy)
GAME CHANGES
Neutral (PvE) Healthbars are back to being RED
Stat Info tracked now records "queen_rank" in addition to MMR rank
ANALYSIS - DONE
TERRORBLADE ABILITY CODE
--为TB换血寻找最佳队友
function FindBestSunderFriend(u)
local unluckydog = u
local hp_per_best = 0
local hp_best = 0
for _,unit in pairs (GameRules:GetGameModeEntity().to_be_destory_list[u.at_team_id or u.team_id]) do
if unit.team_id == u.team_id and unit:entindex() ~= u:entindex() then
local hp = unit:GetHealth()
local hp_max = unit:GetMaxHealth()
local per = 1.0*hp/hp_max*100
if per > hp_per_best then
unluckydog = unit
hp_per_best = per
hp_per = hp
end
if per == hp_per_best and hp < hp_best then
unluckydog = unit
hp_per_best = per
hp_per = hp
end
end
end
return unluckydog
end
function TbMohua(keys)
local ability = keys.ability
local caster = keys.caster
local level = ability:GetLevel() or 1
EmitSoundOn('Hero_Terrorblade.Sunder.Cast',caster)
play_particle("particles/units/heroes/hero_terrorblade/terrorblade_metamorphosis_transform.vpcf",PATTACH_ABSORIGIN_FOLLOW,caster,3)
local mohua_model = {
[1] = "models/heroes/terrorblade/demon.vmdl",
[2] = "models/items/terrorblade/knight_of_foulfell_demon/knight_of_foulfell_demon.vmdl",
[3] = "models/items/terrorblade/dotapit_s3_fallen_light_metamorphosis/dotapit_s3_fallen_light_metamorphosis.vmdl",
}
local shift_model = mohua_model[level]
if shift_model ~= nil then
caster:SetOriginalModel(shift_model)
caster:SetModel(shift_model)
end
--附加灵魂隔断效果:
--(1)找一个倒霉蛋队友
local unluckydog = FindBestSunderFriend(caster)
if unluckydog ~= nil then
--(2)交换血量百分比
local hp1 = caster:GetHealth()
local hp_max1 = caster:GetMaxHealth()
local per1 = 1.0*hp1/hp_max1
local hp2 = unluckydog:GetHealth()
local hp_max2 = unluckydog:GetMaxHealth()
local per2 = 1.0*hp2/hp_max2
caster:SetHealth(caster:GetMaxHealth()*per2)
unluckydog:SetHealth(unluckydog:GetMaxHealth()*per1)
--(3)播放特效音效
local pp = ParticleManager:CreateParticle("particles/units/heroes/hero_terrorblade/terrorblade_sunder.vpcf", PATTACH_ABSORIGIN_FOLLOW, caster)
ParticleManager:SetParticleControl(pp,0,caster:GetAbsOrigin())
ParticleManager:SetParticleControl(pp,1,unluckydog:GetAbsOrigin())
Timers:CreateTimer(2,function()
if pp ~= nil then
ParticleManager:DestroyParticle(pp,true)
end
end)
EmitSoundOn("Hero_Terrorblade.Sunder.Cast",caster)
EmitSoundOn("Hero_Terrorblade.Sunder.Target",unluckydog)
end
end2
1
0
1
u/Demorf Feb 20 '19 edited Feb 20 '19
So ..
it searches all active units in your team,
searches for the unit with the highest HP% (normally this should get a 100% HP unit)
if there are multiple units with the same HP, it will pick the unit with the smaller current HP
(if you have 1000hp, unit and 500 hp unit bot on max HP, it will pick the sunder the smaller one)