Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiper: Boss - Code #2158

Merged
merged 22 commits into from
Apr 24, 2018
Merged

Swiper: Boss - Code #2158

merged 22 commits into from
Apr 24, 2018

Conversation

TideSofDarK
Copy link
Contributor

No description provided.


caster:Stop()

local modifier = caster:AddNewModifier(caster, self, "boss_swiper_reapers_rush_active", {})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the modifier to start with modifier_

local modifierTable = {}
modifierTable.speed = self:GetSpecialValueFor("speed")
modifierTable.distance = distance
modifier:InitRush(modifierTable)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should be handled on the modifier itself (OnCreated) , you can send the data needed in the KV parameter

@@ -0,0 +1,80 @@
function DebugRange(caster, range, ability)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid global function, this could conflict with other functions if we starts making them global.
either move to a helper class on components or put it on the ability/modifier class


--------------------------------------------------------------------------------

function FindUnitsInCone(position, coneDirection, coneLength, coneWidth, teamNumber, teamFilter, typeFilter, flagFilter, order)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid global function, this could conflict with other functions if we starts making them global.
either move to a helper class on components or put it on the ability/modifier class


--------------------------------------------------------------------------------

function PointOnCircle(radius, angle)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid global function, this could conflict with other functions if we starts making them global.
either move to a helper class on components or put it on the ability/modifier class


-- Swipe

local swipeRange = thisEntity.hFrontswipeAbility:GetCastRange(thisEntity:GetAbsOrigin(), thisEntity)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nitpicking but if we decide to change an ability in the future would be nince to the AI not to break, null check the abilities if you can

-- Swipe

local swipeRange = thisEntity.hFrontswipeAbility:GetCastRange(thisEntity:GetAbsOrigin(), thisEntity)
local frontSwipeEnemies = FindUnitsInCone(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find units is expensive, you should only call it if the cooldown is ready

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really think calling FindUnits and iterating over units once per second is any kind of expensive.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is one of the slowest methods I've saw in the api but whatever.
I'm just asking to move inside the if statement for is cooldown ready, for all the abilities

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved two of them. third is needed for chase/taking best swipe position

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to find the best swipe position if the swipe is in CD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it makes sense to take good position in advance. also adds some action to the boss, its boring if he stands still

local thrustMinRange = thisEntity.hThrustAbility:GetSpecialValueFor("target_min_range")
local thrustTarget
local thrustCount = 0
for k,v in pairs(enemies) do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another expensive operation, you should only call it if the cooldown is ready

local reapersRushTarget
local moveToTarget
local reapersRushCount = 0
for k,v in pairs(enemies) do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another expensive operation, you should only call it if the cooldown is ready, and can use the ability

[MODIFIER_STATE_COMMAND_RESTRICTED] = true,
[MODIFIER_STATE_NO_UNIT_COLLISION] = true,
[MODIFIER_STATE_FLYING_FOR_PATHING_PURPOSES_ONLY] = true,
[MODIFIER_STATE_STUNNED] = true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more a question then a comment, why it has no collision and is stunned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good practice to disable units during such movement skills. Nothing should interrupt it like autoattack or bodyblocking.

@TideSofDarK
Copy link
Contributor Author

@carlosrpg

  1. can you explain "aggro/deagro/leash" part? the boss doesnt autoattack and i have it's aggro in the end of its thinker
  2. also third "expensive" thingy needs to be called to determine best swipe target position. fixed other two though
    everything else should be fixed

local width = self:GetSpecialValueFor("width")
local target = self:GetCursorPosition()
local distance = (target - caster:GetAbsOrigin()):Length2D()
local direction = (target - caster:GetAbsOrigin()):Normalized()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 99% sure this code will work incorrectly in case of a Z difference (the projectile will travel slower than intended).


for _, unit in pairs(units) do
local direction = (unit:GetAbsOrigin() - position):Normalized()
if direction:Dot(coneDirection) >= math.cos(coneWidth/2) then
Copy link

@DoctorGester DoctorGester Apr 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

math.cos(coneWidth/2) can be moved into a local variable, it's constant per function call.


v:EmitSound("hero_ursa.attack")

local impact = ParticleManager:CreateParticle("particles/econ/items/pudge/pudge_ti6_immortal/pudge_meathook_witness_impact_ti6.vpcf", PATTACH_POINT_FOLLOW, v)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing something? None of the particles in your code have ReleaseParticleIndex

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Position = thisEntity.vInitialSpawnPos
})

return 6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably move 'magic numbers' into constants


local delay = thisEntity.hFrontswipeAbility:GetCastPoint() + 1.0

if math.random(1,4) == 1 then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure you don't want to use that function, use RandomInt

if math.random(1,4) == 1 then
-- thisEntity.hFrontswipeAbility:StartCooldown(8.0)
Timers:CreateTimer(delay - 0.9, function ( )
thisEntity.hFrontswipeAbility:StartCooldown(8.0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the entity is dead at that point?

})
end

return 0.5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@l34Um1 I'm not sure if it was decided in the documentation but I think this boss should fall back to right click if all the abilities are in CD and there are enemies nearby

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the abilities are his rightclicks. They shouldn't have cooldowns, he just alternates between them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats wrong with having like 4s cooldown just to tell that this ability isnt available now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure what you mean with your question? His abilities aren't supposed to be "not available". He only uses abilities, never anything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by "not available" i mean there should be some time window after using some ability(you can regulate swipe rate by editing the cooldown basically)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's important to me is that he only attacks with his swipes. How you achieve that I don't care too much about.

TideSofDarK and others added 10 commits April 9, 2018 05:56
- Added all of swiper's effects for his different actions
- Doubled the size of all ieffects
- Improved alpha fade in/out and general transparency
- Fixed rotation issues with frontswipe and backswipe
- Improved Thrust and Rush alignments & Sword placement/rotation
- Generally improved overall visuals & clarity of all effects
@l34Um1
Copy link
Collaborator

l34Um1 commented Apr 23, 2018

The windup on the swipes is too short. They should also have longer range,

@TideSofDarK
Copy link
Contributor Author

@l34Um1
Copy link
Collaborator

l34Um1 commented Apr 23, 2018

More windup and we gucci

@TideSofDarK
Copy link
Contributor Author

You sure you want more windup? I just noticed that red spheres (area indicator) appears after some delay but actuall windup starts earlier than that. Maybe i just need to show the indicator at the beginning of windup and thats it?

@l34Um1
Copy link
Collaborator

l34Um1 commented Apr 23, 2018

I assumed that's how it already worked. So yeah, do that.

@Toyoka
Copy link
Contributor

Toyoka commented Apr 23, 2018

@TideSofDarK you can now merge the latest version of my swiper particles commit. Radius, alpha, and other changes were made so the effects fit better.

@l34Um1
Copy link
Collaborator

l34Um1 commented Apr 23, 2018

Definitely still needs more windup, dodging it is impossible. But else we gucci.

@TideSofDarK
Copy link
Contributor Author

@l34Um1 should be fine now

@carlosrpg carlosrpg merged commit b4ac80a into OpenAngelArena:master Apr 24, 2018
carlosrpg pushed a commit that referenced this pull request Apr 25, 2018
* Less towers and a bit closer together

*  Most of the Rest of the Bottles (#2150)

* Most of the Rest of the Bottles

New bottles and aliasing fixes

* Bottle Script

Should probably add the script too 🌚

* Fix typo

* Fix Typo In script

* 1 More Bottle

Brickbracks bottle

* 😠

* Revert "😠"

This reverts commit 73cb48a.

* Revert "1 More Bottle"

This reverts commit 262ae25.

* Clap

Travis im sorry it was my fault my bad mate

* lul

* Travis

* Revert "Travis"

This reverts commit d50718e.

* Subtle Sohei dash value fix (#2154)

* Sohei

* Same fix as with Dash

to guarantee followup opportunities

* Fix errors from dota update (#2157)

* travis

* more travis

* member dis

* Remove attribute Status Resistance (#2170)

* 3.2.1

* Document the release process

* Map changes, new props and core item model (#2159)

* fixed misalignment in both rad/dire offsides zone. fixed hole in dire large arena zone. requires map rebuild.

* travis

* rad platform corner

* pretty map oaa_test

* distribute map

* angel and gargoyle statues

* fixed some details

* loading screen map

* more travis

* member dis

* new fountain for radiant. fixed some particles

* new item models for upgrade cores

* dire fountain

* pregame map screen

* added models folder to precache

* fixed precache for core models/paarticles

* making sure

* updated model workflow (#2173)

* updated model workflow

* wording

* Balance (#2169)

* Sohei

* Phoenix Egg nerf

* Refresher Buff

* Magic Wand Buff

* Spirit Vessel fix

* Lycan Boss Buff

* Set level cap to 50, remove diminishing stats (#2167)

* minor changes

* Sets lvl cap and removes diminishing stats

MaxLevel = 50
Removes diminishing stats above lvl 25 for heroes and illusions

* Revert "minor changes"

This reverts commit 82796d4.

* correct version

* adjust indentation

* Electrician code (#2101)

* Electrician code

shocking

* i have your wife and kids hostage travis

* Fix Electrician struggling with items

* Deaged Electrician from old dog to new dog

* Tweaked Electric Shield

Made it re-castable while a shield is currently active and gave it an
aura_interval AbilitySpecial

* Made Cleansing Shock move speed properly %

was previously flat due to exhaustion

ain't that my life

* Made the Static Grip pull modifier temporary

might not actually be the cause of a problem but it should probably be
this way anyway

* Changed ability ids to avoid conflicts

* Fix test cases to support talents and massive names

* Fixed Static Grip channel time

Now matches with the debuff duration when said duration is altered.

Also made it so that multiple Static Grips could affect a target at
once, to prevent fuckery with Morphling.

* Fix ID numbers

* Electrician: Model (#2127)

* Electrician code

shocking

* i have your wife and kids hostage travis

* Fix Electrician struggling with items

* Deaged Electrician from old dog to new dog

* Tweaked Electric Shield

Made it re-castable while a shield is currently active and gave it an
aura_interval AbilitySpecial

* Made Cleansing Shock move speed properly %

was previously flat due to exhaustion

ain't that my life

* Made the Static Grip pull modifier temporary

might not actually be the cause of a problem but it should probably be
this way anyway

* Changed ability ids to avoid conflicts

* created basic file structure and copied over my blender files.

* Fix test cases to support talents and massive names

* more textures, animations, etc

* materials and added animations to vmdl. still needs Activity links.

* minor changes

* Fixed Static Grip channel time

Now matches with the debuff duration when said duration is altered.

Also made it so that multiple Static Grips could affect a target at
once, to prevent fuckery with Morphling.

* hooking it up

* particles and portrait

* some stuff

* fixed precache

* fixed particle, added hitboxes

* Fix ID numbers

* Compile things

* Add Capture Points objectives throughout the game (#2151)

* Time remaining function

Adde a function to the timer class that returns how much time is left on a specific timer

* Capture point compoint barebones

Just added basic when it should start

* Revert "Capture point compoint barebones"

This reverts commit 85731b6.

* Revert "Revert "Capture point compoint barebones""

This reverts commit a01de15.

* Framwork for accurences of Capture Points

Capture point will now happen when they should happen

* Test Active capture zones added

Enabled captures zones to spawn

* Add capture point spots

Just a bunch of random spots mirrored ont the map

* ADded all the capture zones and pinging functionality

* Syntax Fixes

* Finished only missing comments

* Added Comments

* Added tooltip

* Now really added tooltips

* Revert "Added tooltip"

This reverts commit 36140c6.

* Revert "Now really added tooltips"

This reverts commit 61ba51c.

* Hopefully finished with tooltips

* Added global variables

* Syntax Errors

* Add some comments and todos, fix debug enabling line

* 3.3.0

* Fix Chatterjee tooltips

* Compile minimaps and add Sohei to CM

* Map Changes (#2174)

Fixed a glitch in the map
Created 4 new ward towers.
Created new terrain texture materials
Water arena "duel_5" can now be enabled in duels.lua

* Second Day Spiders: Boss - Code (#2155)

* Second Day Spiders: Spidershot ability

* Cannonshot; AI

* Localization; IDs

* More localization

* Removed whitespaces

* Fixed tabs; Fixed "caster" variable

* Added LerpVectors global to .luacheckrc

* W431 shadowing fix

* Corrected shadowing fix

* Fixed sounds; Fixed RandomVector range

* Fixed particle release; local functions

* Fixed aggro/leash

* New ID

* BossTier workaround

* MagResist fix; Explosion particle fix

* Swiper: Boss - Code (#2158)

* Frontswipe; backswipe; reaper's rush; thrust

* AI; Reworked backswipe

* Fixed lua errors

* Empty if fix

* Fixed backswipe; Fixed followrange

* Lua corrections

* DG's suggestions

* DebugRange ix

* Leash mechanic

* Better aggro/leash

* Swiper boss ability effects

- Added all of swiper's effects for his different actions

* BossTier workaround

* Swipe rework

* New IDs

* Swiper ability indicator effects adjustments

- Doubled the size of all ieffects
- Improved alpha fade in/out and general transparency
- Fixed rotation issues with frontswipe and backswipe
- Improved Thrust and Rush alignments & Sword placement/rotation
- Generally improved overall visuals & clarity of all effects

* Increased swipe length and windup time

* Fixed DebugRange call

* Even more windup

* Some fixes for new bosses and map minimaps (#2180)

* Fixes for the new Bosses (#2179)

* Fixes to spiders

* Fixed swipe impact

* Fixes to swipe

* Removed fow_visible flag

* 3.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants