Code Monkey home page Code Monkey logo

fateanother's Introduction

fateanother's People

Contributors

dun1007 avatar ethanfe avatar f1l00 avatar gelguy avatar hermit1007 avatar kritth avatar manjix avatar maurotoscano avatar sngweicong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fateanother's Issues

Inaccurate timers

The UI timers shown are inaccurate. The most obvious one would be the round timer where the round typically ends when the timer shows 2 seconds. I think this gets worse as the game goes on but cannot confirm.

This is caused by the ticking of the UI timers being handled by the Scaleform end, rather than the Lua end.

Compare this to the Game timer on the scoreboard.

The current GameTime is passed as an argument. This allows the timer shown to be as close to the true GameTime as possible, rather than letting Scaleform handle it.

Crowd Control Unification&Spell Shield Mechanics

On back end, crowd control effects are all over the place. Some are using Dota 2 built in modifiers(i.e modifier_stunned) and some use its own KV state. It makes code vulnerable to bugs since every addition of new ability that involves CC has to be followed up by an update to table, and interrupts developer from devising brand new game mechanics that revolve around CC.

By unifying the CCs and handling all of them with one function, we can expect to:

  1. Come up with new mechanics that require special interaction with CC
  2. Add visual cue that is universal across the game
  3. Significantly reduce the frequency of bugs occuring in regards to CC

Extending on 1), spell shield mechanics is outdated and requires an update alongside of CC unification.

WC3 spell differences

  • Berserker's Divinity Lvl 2 providing 20% magic resist (for a total of 28%) as opposed to 15% in WC3
  • Alter's Improved Mana Shroud should provide 30 armour to Alter alone, and not a 20 armour aura
  • Alter's Deranged orbs not cleared at end of round (similar to Caster 4's madness)
  • Lancer 4's Gae Buidhe HP reduction pierces Avalon

This issue will list all the WC3 spell differences which were not mentioned in changelogs.

Lancer 5 Spellbook putting all spells on cooldown

After opening rune spellbook, by queuing abilities, (i.e. close spellbook and use Q rune very quickly, similar to the Lancelot E-R spellbook bug), you can have your spellbook already closed before the rune spell is cast.

function RuneMagicUsed(keys)
local caster = keys.caster
local a1 = caster:GetAbilityByIndex(0)
local a2 = caster:GetAbilityByIndex(1)
local a3 = caster:GetAbilityByIndex(2)
local a4 = caster:GetAbilityByIndex(3)
local a5 = caster:GetAbilityByIndex(4)
local a6 = caster:GetAbilityByIndex(5)
a1:StartCooldown(20)
a2:StartCooldown(20)
a3:StartCooldown(20)
a4:StartCooldown(20)
a6:StartCooldown(20)
caster:SwapAbilities(a1:GetName(), "lancer_5th_rune_magic", true, true)
caster:SwapAbilities(a2:GetName(), "lancer_5th_relentless_spear", true, true)
caster:SwapAbilities(a3:GetName(), "lancer_5th_gae_bolg", true, true)
caster:SwapAbilities(a4:GetName(), "lancer_5th_battle_continuation", true, true)
caster:SwapAbilities(a5:GetName(), "fate_empty1", true, true)
caster:SwapAbilities(a6:GetName(), "lancer_5th_gae_bolg_jump", true, true)
caster:GetAbilityByIndex(0):StartCooldown(20)
end

The RuneMagicUsed then puts all spells in index 0-5 (which happens to be your normal spells) on cooldown.

Rider 4's Via Expugnatio timer leak

Timers:CreateTimer("chariot_dash_damage", {
endTime = 0.0,
callback = function()
CreateLightningField(keys, caster:GetAbsOrigin())
local targets = FindUnitsInRadius(caster:GetTeam(), caster:GetAbsOrigin(), nil, 400, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_ALL, 0, FIND_ANY_ORDER, false)
for k,v in pairs(targets) do
if v.ChariotChargeHit ~= true then
v.ChariotChargeHit = true
Timers:CreateTimer(1.0, function()
v.ChariotChargeHit = false
end)
DoDamage(caster, v, keys.ChargeDamage * currentMS / 100, DAMAGE_TYPE_MAGICAL, 0, keys.ability, false)
v:AddNewModifier(caster, v, "modifier_stunned", {Duration = 1.25})
end
end
return 0.1
end})

Similar to Black Rider's timer leak, the Charge timer is not cleared.

On a side note, I still think Hammer charge has memory leaks, but that might be removed so just indicating here.

Gawain W does damage to allies

Since W is a basic attack, it does damage to allies (breaking red pots and able to kill).

Suggestion would be to add a AttackStart trigger to apply a 0 damage modifier.

Revisit Fatepedia

The scaleform-based Fatepedia is currently outdated and requires to be ported into Panorama UI.

C scroll not killing scout familiar

https://github.com/dun1007/fateanother/blob/master/game/dota_addons/fateanother/scripts/vscripts/libraries/util.lua#L1027

Due to the rounding, at certain INT values C scroll will only do 199 damage instead of the intended 200. This makes C scrolls leaving scout familiars at 1 hp sometimes.

This might be due to the engine rounding down for damage values? Not entirely sure.

The 1 damage difference can also affect other spells which use threshold values. One that comes to mind is S scroll against Saber's Avalon doing 299 instead of 300 (after magic resist).

GetPlayerOwner does not work when player has left the game

The GetPlayerOwner() function is used quite a few times in the scripts, most noticeably when taking Master 2 attributes.

    local caster = keys.caster
    local pid = caster:GetPlayerOwnerID()
    local hero = PlayerResource:GetSelectedHeroEntity(pid)

However, I believe it returns nil if the player has disconnected from the game, both before and after abandoning.

This makes heroes who have left unable to take their attributes.

This also occurs for Caster 5 who cannot summon a Workshop again if the old Workshop is destroyed while disconnected.

I'm not sure if there is an API to get the player for a disconnected player, but in most of the cases we can avoid the need to go through pid by setting the hero unit directly as a field e.g. master.hero = GetSelectedHeroEntity(pid) since we can assume the player is connected at the time he enters the game.

Lancelot keeping Combo in spells permanently

W-Q to make combo active, then open Knight of Honor and close it before combo becomes inactive.

https://github.com/dun1007/fateanother/blob/master/game/dota_addons/fateanother/scripts/vscripts/lancelot_ability.lua#L614

When combo is active, it is swapped with either Blessing of Fairy or Empty spell (let's call this Empty1).

https://github.com/dun1007/fateanother/blob/master/game/dota_addons/fateanother/scripts/vscripts/lancelot_ability.lua#L154

This makes a4 the combo ability, which is swapped out for either an empty spell (Empty2) or Nine Lives.

https://github.com/dun1007/fateanother/blob/master/game/dota_addons/fateanother/scripts/vscripts/lancelot_ability.lua#L230

Closing spellbook then swaps Nine Lives (or Empty2) with Blessing of Fairy or Empty1.

When combo is made inactive, it swaps with Blessing of Fairy or Empty1, so it becomes the spell at index 3.

Opening and closing spellbook will remove the combo.

Attribute Display Improvement

Attribute mana cost in string should be removed(i.e Master Mana Required : 10) since it conflicts with localization version control as explained here. The blue mana tag from default Dota UI gives sufficient clarity without cost in string.

Also, the cooldown display method using timed modifier, proposed by Jeekarose, seems to have no issue so far. It should be extended feature for all other abilities with 'hidden' cooldown for improved clarity.

Lancer 4 able to toggle Doublespear off during cast but keep its effects

Toggle Doublespear on, and during cast of E or R, toggle it off. The ability will still be active, meaning you can double spear again.

if caster.IsDoubleSpearAcquired and caster.IsDoubleSpearReady and caster:FindAbilityByName("diarmuid_gae_buidhe"):IsCooldownReady() and caster:GetMana() >= 550 then
--print("Double spear activated")
local buidhe = caster:FindAbilityByName("diarmuid_gae_buidhe")
keys.Damage = buidhe:GetLevelSpecialValueFor("damage", buidhe:GetLevel()-1)
keys.ability = buidhe
Timers:CreateTimer(0.033, function()
caster:FindAbilityByName("diarmuid_gae_buidhe"):StartCooldown(32)
local doublestrike = caster:FindAbilityByName("diarmuid_double_spear_strike")
doublestrike:StartCooldown(55)
doublestrike:ToggleAbility()
caster:SetMana(caster:GetMana() - 550)
Timers:CreateTimer(55, function()
doublestrike:ToggleAbility()
end)
OnBuidheStart(keys)
end)
--caster:CastAbilityOnTarget(target, caster:FindAbilityByName("diarmuid_gae_dearg"), caster:GetPlayerID())
end

I believe this is caused by the 0.033 timer.

Timers:CreateTimer(0.033, function()
			caster:FindAbilityByName("diarmuid_gae_buidhe"):StartCooldown(32)
			local doublestrike = caster:FindAbilityByName("diarmuid_double_spear_strike")
			doublestrike:StartCooldown(55)
			doublestrike:ToggleAbility()
			caster:SetMana(caster:GetMana() - 550)
			Timers:CreateTimer(55, function()
				doublestrike:ToggleAbility() 
			end)
			OnBuidheStart(keys)
		end)

Meaning if you queue the toggle off during the 0.033 seconds (because you queued it it occurs on the server tick), the timer is already created and will run. ToggleAbility then runs and since it is currently off, it is set to on again.

Tamamo able to have Shackle ability without using Mantra

This is done by spamming F (to open and close spellbook). Due to Dota 2 engine's queuing of abilities, it is possible that at some point, your spellbook is open when the Open Spellbook spell is cast.

	if caster:GetAbilityByIndex(2):GetAbilityName() == "tamamo_mantra" then
		a3 = caster:FindAbilityByName("tamamo_mantra") -- Mantra
	else
		a3 = caster:FindAbilityByName("tamamo_mystic_shackle")
	end

if caster:GetAbilityByIndex(2):GetAbilityName() == "tamamo_mantra" then

The check then finds that Ability 2 is E charm and not the expected Mantra, and then sets a3 as Shackle. Shackle is then swapped with E charm. On closing spellbook, E charm is swapped with Mantra and since Shackle is in E charm's position, Shackle becomes your 3rd ability.

Caster Extra Armed Up with no cooldown

If you open spellbook, take a charm and close spellbook very quickly (i.e. open spellbok, Q and F), the spellbook opens again, and when you close it Armed Up cooldown ends.

Tsbuame Gaeshi not applying on-hit effect when Ganryu is acquired

if caster.IsGanryuAcquired then
giveUnitDataDrivenModifier(caster, target, "silenced", 0.31)
DoDamage(caster, target, keys.Damage, DAMAGE_TYPE_PURE, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, keys.ability, false)
--[[local targets = FindUnitsInRadius(caster:GetTeam(), target:GetAbsOrigin(), nil, 250, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_ALL, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_ANY_ORDER, false)
for i=1, #targets do
DoDamage(caster, targets[i], keys.Damage, DAMAGE_TYPE_PURE, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, keys.ability, false)
caster:PerformAttack(targets[i], true, true, true, true, false)
local slashIndex = ParticleManager:CreateParticle( "particles/custom/false_assassin/tsubame_gaeshi/tsubame_gaeshi_windup_indicator_flare.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl(slashIndex, 0, targets[i]:GetAbsOrigin())
ParticleManager:SetParticleControl(slashIndex, 1, Vector(500,0,150))
ParticleManager:SetParticleControl(slashIndex, 2, Vector(0.2,0,0))
end]]

if caster.IsGanryuAcquired then
giveUnitDataDrivenModifier(caster, target, "silenced", 0.31)
DoDamage(caster, target, keys.Damage, DAMAGE_TYPE_PURE, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, keys.ability, false)
--[[local targets = FindUnitsInRadius(caster:GetTeam(), target:GetAbsOrigin(), nil, 250, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_ALL, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_ANY_ORDER, false)
for i=1, #targets do
DoDamage(caster, targets[i], keys.Damage, DAMAGE_TYPE_PURE, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, keys.ability, false)
caster:PerformAttack(targets[i], true, true, true, true, false)
local slashIndex = ParticleManager:CreateParticle( "particles/custom/false_assassin/tsubame_gaeshi/tsubame_gaeshi_windup_indicator_flare.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl(slashIndex, 0, targets[i]:GetAbsOrigin())
ParticleManager:SetParticleControl(slashIndex, 1, Vector(500,0,150))
ParticleManager:SetParticleControl(slashIndex, 2, Vector(0.2,0,0))
end]]

if caster.IsGanryuAcquired then
local targets = FindUnitsInRadius(caster:GetTeam(), target:GetAbsOrigin(), nil, 250, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_ALL, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_ANY_ORDER, false)
DoDamage(caster, target, keys.LastDamage, DAMAGE_TYPE_PURE, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, keys.ability, false)
--[[for i=1, #targets do
DoDamage(caster, targets[i], keys.LastDamage, DAMAGE_TYPE_PURE, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, keys.ability, false)
caster:PerformAttack(targets[i], true, true, true, true, false)
targets[i]:AddNewModifier(caster, targets[i], "modifier_stunned", {Duration = 1.5})
local slashIndex = ParticleManager:CreateParticle( "particles/custom/false_assassin/tsubame_gaeshi/tsubame_gaeshi_windup_indicator_flare.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl(slashIndex, 0, targets[i]:GetAbsOrigin())
ParticleManager:SetParticleControl(slashIndex, 1, Vector(500,0,150))
ParticleManager:SetParticleControl(slashIndex, 2, Vector(0.2,0,0))
end]]

Last hit does not apply stun effect as well.

Ruler Flag Lock and Root interactions

Destroying the flag does not remove the Root and Lock modifiers.

if caster.LETargetTable then
for i=1, #caster.LETargetTable do
if IsValidEntity(caster.LETargetTable[i]) and caster.LETargetTable[i]:IsAlive() then
caster.LETargetTable[i]:RemoveModifierByName("rooted")
caster.LETargetTable[i]:RemoveModifierByName("locked")
caster.LETargetTable[i]:RemoveModifierByName("modifier_luminosite_eternelle_unjust_debuff")
end
end
end

Casting the flag (AbilityPhaseStart) causes Root and Lock modifiers (including modifiers from other spells e.g. Tamamo's W) to be removed from targets which were hit by the previous flag.

Lancer 4 E still able to reduce Max HP to below 0

For a more likely scenario, Avenger's True From gives a Max HP bonus. So it is possible to have HP reduced below the True Form bonus (and not meet the Kill condition). When True Form runs out, Max HP drops below 0.

if target:GetHealth() < keys.Damage then
target:Kill(keys.ability, caster)
end

The Kill Condition checks for less than, but not equal to. So on the occassion the enemy hero is at the exact HP where a multiple of E spears will kill, the Kill condition is not met.

Update: there is a consistent way to do this by using Lancer 4's E in conjunction with TA's Snatch Strike. If enough HP is lost by the strength reduction, it is possible to fall below 0 max HP (e.g. hero with 200 HP after Lancer 4 E gets 20 strength stolen).

Inconsistent spell immunity effects

There are a few spells which do not take into account spell immunity.

Examples are Bloodfort with Seal upgrade, Tamamo's Amaterasu mana degen and stun, Martial Arts silence proc.

Not sure if these are intended, but other spells such as Gae Bolg AOE and Belle take into account spell immunity when applying the stun.

Anti-camp system abuse

Currently there is a flaw on losing team taking advantage of anti -camp system with tp scroll.

The losing team would plant some wards on mid. And send a familair ward across the map and plant a ward.

When the winning team rushes in and near the loaing team, the whole losing team would use tp scroll to teleport to the opposite of the map.

If its before its acceptable as a strat. But current mode of 2 minute is too short and the winning team had to run back after crossing the bridge, and cost alot of time to do so. It quickly became unhealthy.

Infact this kind if play is happening alot of times recently.

It happens mostly in a game where a team snowballs real hard and the losing team decide to max camp + tp ward strat just to firce draw for win.

A few suggestions would be
A) increase tp cast time each time a new tp scroll comes in on the same ward.
B) increase cast time long as the further the targeted ward between the user is.
C) setting tp scroll range limit

Vector(0,0,0) Issue with Particle and Sound

Recent patch brought forth an issue with sound. Possible workarounds are making an alternative function in utils.lua or listening to sound event from Panorama, proposed by Karawasa.

Also few particles play its child on Vector(0,0,0), such as Archer(5th)'s Hrunting and occassionally Caster(5th)'s Argos. This is an independent issue caused by mismatching/null control point setup, most likely.

Purging Spirit Link buff does not remove target from link tables

The Spirit Link buff "modifier_share_damage" is purgable but purging it does not remove the target from the other heroes' link tables.

This makes the target still take shared damage from DoDamage . However, the target will not have the buff to keep them at 1 hp on lethal damage, meaning they can be killed from shared damage.

A fix would be to remove the target from the link tables OnDestroy of the buff.

Teleport into marbles

Put a ward the top edge of UBW using a scout familiar and you can teleport to it.

You cannot target teleport below the -2000 coordinate, but if you target just above that (which is just below the pathable part of the map), it is within the 2000 range acquisition of the ward. This lets you teleport into UBW.

Tooltip and spell differences

  • Lancer 5's E tooltip says 1.3 cast delay, but code indicates 1.2
  • Lancer 5's Improved Battle Continuation tooltip says revive is at 25% of max HP, but code revives at fixed 500 HP
  • Archer 5's Sword Rain sword creation tick tooltip says 0.06 but code indicates 0.055
  • Archer 5's Improve Projection attribute increases Kanshou Bakuya's damage but is not indicated in tooltip. Changelog says Kanshou Bakuya is no longer improved.
  • Archer 5's Improve Projection level 2 passive sword damage tooltip indicates 75 but code says 50. Changelog indicates 50 is correct.
  • Lancer 4's Gae Buidhe tooltip says 1.1 cast delay, but code indicates 1.2. Changelog indicates 1.2 is correct.
  • Extra Assassin's R tooltip says 1 second cast delay but code indicates 0.9. Changelog indicates 0.9 is correct.
  • FA's Tsubame Gaeshi tooltip says 1 sec delay but code indicates 0.9. Changelog indicates 0.9 is correct.
  • Avenger's Blood Mark attribute tooltip says it replaces Vengeance Mark
  • Caster 5's Dagger of Treachery attribute tooltip says revoke duration is 7.5 seconds but code says 3 seconds. Mentioned in this changelog.
  • Am I by any chance looking at the wrong numbers? Does the delay key override the AbilityCastPoint field?

Will update this issue with tooltip and spell differences and when they get fixed.

Gawain Sunlight W and combo cooldown modifiers

From f8f58d5.

It currently covers only combos, and not other spells which have an indicator (Hrunting, Strike Air etc.)

It checks for combo condition, but there are 2 heroes with different combo conditions - FA with 25 agility and 25 strength, and Lancelot with Arondite buff check. I assume it is only possible to get the combo modifier by using the combo spell, so the combo condition check should be able to be dropped. To make the code cleaner, each hero can have a field to indicate their cooldown modifiers and just go through those instead of all modifiers.

Tamamo Shackle able to pull units out of UBW

Tamamo's Shackle range limit is up to 2500 range. This is able to reach UBW from the bottom edge of the playable map. By pre-casting Mantra or using the Shackle bug in #52, you can pull units out of UBW.

In particular, you can pull Archer out, who can then proceed to use UBW spells outside.

Heroes with Spirit Link buff cannot take lethal damage

Even the main target will not take lethal damage, e.g. if you have 500 hp, linked with 1 other person, and take 1200 damage, you will be reduced to 1 hp even though it would have been lethal on the main target. This makes it pretty much a Battle Continuation.

Is this intended?

If no, one solution would be to apply non-lethal damage flag when doing ApplyDamage if isLoop is true, and removing the Spirit Link buff if health is 1. This means the main target can still take lethal damage, but the linked targets will not, and the spirit link buff removed.

Possible fix for "C scroll stock running out so fast"

Q) Why is C scroll stock running out so fast?

A) In Dota 2 the stock in shop is team-bound, not personal and there's no way to do anything about it at the moment. It is very likely that someone else have hogged all scrolls before you get your hands on them.

For this you can have the C scroll have an unlimited stock, and when the player buys a C scroll (In OnItemPurchased), check the player's C-scroll count. If player has too many C scrolls > delete item > reproduce C scroll item with correct charges > display custom error message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.