Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Best LastHit, Harass and LaneClear logic.


  • Please log in to reply
18 replies to this topic

#1
Inferno

Inferno

    Advanced Member

  • Contributor
  • 217 posts
So...
I found that LH is a little imperfect - it misses CS, when it shouldn't.
My throughts about that? Update LH system!
What is must look like?
Post version: 2.0
 

Step 0 - Fundamental Preparations
To start "Most Efficient LastHitâ„¢", we should create at least, one function and gather some information.
Function, that we need to create, will be:
getMinionHealthAfterTime(minion, milliseconds)
I think it is pretty obvious, what function takes. Now about function insides, how it works:
1. We scanning through all enemy particles, and creating list of ones, that is targetted to minion.
2. Using formulas, we calculating: Damage that Ally Melee Minion will do to minion, same as Magic and Cannon minions. We also should know particle speeds of Cannon minion, Magic and Melee minions (because they are constants!).
3. After that we creating an array, winch contains structures like (time, dmg). Because we know distance between minion and each of particle that targetted him, we could calulate time. By knowing sender of particle, we know damage. So, we adding to array something like that: (120,50 ; 122,55 ; 130,39) and so on.
4. We scanning through all ally minions, and founding the ones who attack minion. We searching for time, after what they will attack next time (their "current attack delay"). Next we adding to array next values: (time_before_next_attack + full_time_of_travel_from_minion_position, dmg), and repeating adding those until time will be more than 10000 ms.
5. That is all information we need to know. Now we working with milliseconds and output_variable. First of all, in output_variable we writing minion's HEALTH. Next, we searching through array we just created. If somewhere we finding an element, where time is lesser than milliseconds, we subtracting this damage of element to output variable. (from example above and milliseconds = 125: 50 + 55 will be subtracted)
6. Returning output_variable.

Step 1 - Gathering Hero Information
Now, at this step, we should calculate next things:
1. Autoattack_Time. It is a time in milliseconds, that need for our particle to travel from our position to minion position + autoattack_delay (from 0 to maximum value, if we just attacked). Of course, we should know speed of our attack particle.
2. Autoattack_Damage. It is a damage we could output to minions. It even can calculate Sheen's passive, Statikk Shiv and etc! It is only important for calculations to be precise as possible.

Step 2 - Using Everything We Gathered
Now it is easy part.
We looking, if our Harass/LastHit Key is pressed. If so, we scanning a field nearby us for victimminion from list of all minions. If we found victimminion, we checking for 2 conditions.
getMinionHealthAfterTime(victimminion, Autoattack_Time) > 0 && getMinionHealthAfterTime(victimminion, Autoattack_Time) < Autoattack_Damage
If both conditions are met: Autoattacking victimminion.
Else - taking next victimminion from list of enemy minions.

Step 3 - Further Evolving
We also could do second function, called "getTimeToDeath(minion)"
I will not say how it must look like (similar to step 0 through), but it outputs MinionState: (Time:-1 if minion will not die after 10s, or 0-10000 if he do) and (Health:returning health of minion before dying).
Next, we creating array with minions, sorted by getTimeOfDeath function from lesser to biggest, excluding ones with Time = -1.
It will allow us to know:
1) What minions we couldn't get by AAing (too late)
2) What minions we will get by AAing (their Health will be low enough to kill them from AA)
3) What minions we couldn't get by AAing ONCE (after one attack they will still have 1-2 HP left)
4) What minions is not attacked at all.
 
On minions type 1: We still can use instadamaging function, like Brand's E or Ryze's W to take our CS!
On minions type 2: Just simple AA. Why not?
On minions type 3: We could AA once or twice to make Minion become Type 2, if there is no Type 2 that is ready to be finished. Or we could use skill+aa if nessesary.
On minions type 4... LaneClear? :)

 
That is all I had for today.
Hope you will have fun implementing this prediction.
I know, it is still imperfect, but it is better than standart "If minion health is low to kill - shoot"
  • 16

#2
Mirabelle

Mirabelle

    I'm Back :D

  • Local Support
  • 1,031 posts
  • LocationSEA

nice logic :D


  • 0

#3
Minion

Minion

    Advanced Member

  • Members
  • 31 posts
  • LocationDogeland

This is kinda like l$'s Nice :3


  • 0

#4
SweetStrawberry

SweetStrawberry

    Advanced Member

  • Members
  • 449 posts
  • LocationZyppy BedRoom

Good job.


  • 0

#5
Gitbox

Gitbox

    Advanced Member

  • Members
  • 64 posts

good logic overall ! +1


  • 0

#6
littledopa

littledopa

    Member

  • Members
  • 20 posts

similar to L#'s logic, nice!


  • 0

#7
Feretorix

Feretorix

    Administrator

  • Administrators
  • 2,096 posts
Well explained and built.
  • 0

#8
Aurea

Aurea

    Member

  • Members
  • 20 posts

This logic is awesome


  • 0

#9
Archer

Archer

    Advanced Member

  • Members
  • 148 posts
  • LocationHungary

When API comes live, you should make a last-hit script for us  :wub:  :D


  • 0

#10
Akama

Akama

    Advanced Member

  • Members
  • 106 posts

Even though I may be a little late for the party, I gotta admit that this was pretty great. 

 

You should definitely consider developing once our API goes live. 


  • 1

#11
filippe999

filippe999

    Advanced Member

  • Members
  • 49 posts

Awesome, solid logic and very good sounding


  • 0

#12
Kiara789

Kiara789

    Advanced Member

  • Contributor
  • 187 posts
  • LocationChile

meh


  • 0

#13
Pillow

Pillow

    Advanced Member

  • Members
  • 73 posts
  • LocationSomewhere on Geeky Planet

Who cares if it similar to L$ its not exactly L# and its awesome, Good Job mate great post Plus 1 


  • 0

#14
bucogos

bucogos

    Newbie

  • Members
  • 2 posts

ty


  • 0

#15
BXSS

BXSS

    Newbie

  • Members
  • 5 posts
  • LocationSpain

Best logic.


  • 0

#16
Tiritto

Tiritto

    Script Developer

  • Members
  • 377 posts
  • LocationPoland

It's very nice logic, but Im wondering how would it looks like from performance aspect. 


  • 0

#17
Inferno

Inferno

    Advanced Member

  • Contributor
  • 217 posts

It's very nice logic, but Im wondering how would it looks like from performance aspect.

It mostly depends on count of minions. If you do a minion TSUNAMI, then it will lag for sure! But if calculated...
It is not more than 60-70 actions per one minion...
So, in normal games, there is 3 lanes with 7 minions in wave, 2 teams...
Around 2730 actions per run.

Believe me, current "ObjectManager" do even more than that :)
  • 0

#18
kingSWAG9

kingSWAG9

    Advanced Member

  • Members
  • 32 posts

Man we really need this "api" to get all these ideas live!1


  • 0

#19
JohanLiebert

JohanLiebert

    Advanced Member

  • Members
  • 62 posts

I like the sound of this. Will be better logic for last hitting with Annie Q as well.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users