Login to Account Create an Account
Best LastHit, Harass and LaneClear logic.
#1
Posted 05 July 2015 - 09:59
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"
#2
Posted 05 July 2015 - 10:08
nice logic
#3
Posted 05 July 2015 - 10:24
This is kinda like l$'s Nice :3
#4
Posted 05 July 2015 - 09:07
Good job.
#5
Posted 06 July 2015 - 09:53
good logic overall ! +1
#6
Posted 06 July 2015 - 06:28
similar to L#'s logic, nice!
#7
Posted 10 July 2015 - 09:58
#8
Posted 11 July 2015 - 05:09
This logic is awesome
#9
Posted 11 July 2015 - 07:51
When API comes live, you should make a last-hit script for us
#10
Posted 11 July 2015 - 09:31
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.
#11
Posted 12 July 2015 - 02:48
Awesome, solid logic and very good sounding
#12
Posted 12 July 2015 - 02:55
meh
#13
Posted 12 July 2015 - 04:07
Who cares if it similar to L$ its not exactly L# and its awesome, Good Job mate great post Plus 1
#14
Posted 04 August 2015 - 12:13
#15
Posted 19 August 2015 - 02:06
Best logic.
#16
Posted 21 August 2015 - 03:26
It's very nice logic, but Im wondering how would it looks like from performance aspect.
#17
Posted 21 August 2015 - 11:28
It mostly depends on count of minions. If you do a minion TSUNAMI, then it will lag for sure! But if calculated...It's very nice logic, but Im wondering how would it looks like from performance aspect.
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
#18
Posted 02 September 2015 - 10:53
Man we really need this "api" to get all these ideas live!1
#19
Posted 02 September 2015 - 11:49
I like the sound of this. Will be better logic for last hitting with Annie Q as well.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users