Ejemplo n.º 1
0
        public Kunkka(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.playerHandle = owner.BaseOwner.Handle;

            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.kunkka_torrent, x => this.torrent = new Torrent(x) },
                { AbilityId.kunkka_tidebringer, x => this.tidebringer = new TargetableAbility(x) },
                { AbilityId.kunkka_x_marks_the_spot, x => this.xMark = new XMark(x) },
                { AbilityId.kunkka_return, x => this.xReturn = new UntargetableAbility(x) },
                { AbilityId.kunkka_ghostship, x => this.ship = new Ghostship(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_armlet, x => this.armlet = new BuffAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) },
            };

            this.ancientCamps = Context9.JungleManager.JungleCamps.Where(x => x.IsAncient).Select(x => x.CreepsPosition).ToArray();

            ParticleManager.ParticleAdded += OnParticleAdded;
            ModifierManager.ModifierAdded += OnModifierAdded;
            OrderManager.OrderAdding      += OnOrderAdding;
        }
Ejemplo n.º 2
0
        public TrollWarlord(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.troll_warlord_berserkers_rage, x => this.rage = new UntargetableAbility(x) },
                { AbilityId.troll_warlord_whirling_axes_melee, x => this.axeMelee = new NukeAbility(x) },
                { AbilityId.troll_warlord_whirling_axes_ranged, x => this.axeRanged = new NukeAbility(x) },
                { AbilityId.troll_warlord_battle_trance, x => this.trance = new ShieldAbility(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
                { AbilityId.item_diffusal_blade, x => this.diffusal = new DebuffAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_mask_of_madness, x => this.mom = new BuffAbility(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_abyssal_blade, x => this.abyssal = new DisableAbility(x) },
            };
        }
Ejemplo n.º 3
0
        // Token: 0x060002AD RID: 685 RVA: 0x00011088 File Offset: 0x0000F288
        public override bool Combo(TargetManager targetManager, ComboModeMenu comboModeMenu)
        {
            AbilityHelper abilityHelper = new AbilityHelper(targetManager, comboModeMenu, this);
            Unit9         target        = targetManager.Target;

            if ((!abilityHelper.CanBeCasted(this.blink, true, true, true, true) || base.Owner.Distance(target) < 400f) && abilityHelper.UseAbility(this.ravage, true))
            {
                return(true);
            }
            if (abilityHelper.UseDoubleBlinkCombo(this.force, this.blink, 0f))
            {
                return(true);
            }
            if (abilityHelper.UseAbilityIfCondition(this.blink, new UsableAbility[]
            {
                this.ravage
            }))
            {
                return(true);
            }
            if (!abilityHelper.CanBeCasted(this.ravage, false, false, true, true))
            {
                if (abilityHelper.UseAbility(this.blink, 400f, 0f))
                {
                    return(true);
                }
                if (abilityHelper.UseAbility(this.force, 400f, 0f))
                {
                    return(true);
                }
            }
            if (abilityHelper.UseAbility(this.shiva, true))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.bladeMail, 400f))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.smash, true))
            {
                return(true);
            }
            if ((abilityHelper.CanBeCasted(this.refresher, true, true, true, true) || abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true)) && abilityHelper.CanBeCasted(this.ravage, true, true, true, false) && !this.ravage.Ability.IsReady)
            {
                UntargetableAbility untargetableAbility = abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true) ? this.refresherShard : this.refresher;
                if (abilityHelper.HasMana(new UsableAbility[]
                {
                    this.ravage,
                    untargetableAbility
                }) && abilityHelper.UseAbility(untargetableAbility, true))
                {
                    return(true);
                }
            }
            return(abilityHelper.UseAbility(this.gush, true));
        }
Ejemplo n.º 4
0
        public Tidehunter(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.tidehunter_gush, x => this.gush = new NukeAbility(x) },
                { AbilityId.tidehunter_anchor_smash, x => this.smash = new NukeAbility(x) },
                { AbilityId.tidehunter_ravage, x => this.ravage = new Ravage(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkDaggerAOE(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_blade_mail, x => this.bladeMail = new ShieldAbility(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new DebuffAbility(x) },
                { AbilityId.item_refresher, x => this.refresher = new UntargetableAbility(x) },
                { AbilityId.item_refresher_shard, x => this.refresherShard = new UntargetableAbility(x) },
            };
        }
Ejemplo n.º 5
0
        public Enigma(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.enigma_malefice, x => this.malefice = new DisableAbility(x) },
                { AbilityId.enigma_midnight_pulse, x => this.pulse = new AoeAbility(x) },
                { AbilityId.enigma_black_hole, x => this.blackHole = new BlackHole(x) },

                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_ghost, x => this.ghost = new ShieldAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkDaggerEnigma(x) },
                { AbilityId.item_refresher, x => this.refresher = new UntargetableAbility(x) },
                { AbilityId.item_refresher_shard, x => this.refresherShard = new UntargetableAbility(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new DebuffAbility(x) },
            };
        }
Ejemplo n.º 6
0
        public Warlock(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.warlock_fatal_bonds, x => this.bonds = new FatalBonds(x) },
                { AbilityId.warlock_shadow_word, x => this.word = new DebuffAbility(x) },
                { AbilityId.warlock_upheaval, x => this.upheaval = new DebuffAbility(x) },
                { AbilityId.warlock_rain_of_chaos, x => this.chaos = new ChaoticOffering(x) },

                { AbilityId.item_refresher, x => this.refresher = new UntargetableAbility(x) },
                { AbilityId.item_refresher_shard, x => this.refresherShard = new UntargetableAbility(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
                { AbilityId.item_rod_of_atos, x => this.atos = new DisableAbility(x) },
            };
        }
Ejemplo n.º 7
0
        public SandKing(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.sandking_burrowstrike, x => this.burrow = new Burrowstrike(x) },
                { AbilityId.sandking_sand_storm, x => this.sandstorm = new UntargetableAbility(x) },
                { AbilityId.sandking_epicenter, x => this.epicenter = new Epicenter(x) },

                { AbilityId.item_veil_of_discord, x => this.veil = new DebuffAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new DebuffAbility(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.sandking_burrowstrike, x => this.burrowBlink = new BlinkAbility(x));
        }
Ejemplo n.º 8
0
        public ChaosKnight(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.chaos_knight_chaos_bolt, x => this.bolt = new DisableAbility(x) },
                { AbilityId.chaos_knight_reality_rift, x => this.rift = new TargetableAbility(x) },
                { AbilityId.chaos_knight_phantasm, x => this.phantasm = new UntargetableAbility(x) },

                { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_manta, x => this.manta = new BuffAbility(x) },
                { AbilityId.item_armlet, x => this.armlet = new BuffAbility(x) },
                { AbilityId.item_heavens_halberd, x => this.halberd = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.slardar_sprint, _ => this.bolt);
        }
Ejemplo n.º 9
0
        // Token: 0x060001C7 RID: 455 RVA: 0x0000E1A0 File Offset: 0x0000C3A0
        public override bool Combo(TargetManager targetManager, ComboModeMenu comboModeMenu)
        {
            AbilityHelper abilityHelper = new AbilityHelper(targetManager, comboModeMenu, this);

            if (abilityHelper.UseAbility(this.chaos, true))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.force, 600f, 500f))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.bonds, true))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.word, true))
            {
                return(true);
            }
            if ((abilityHelper.CanBeCasted(this.refresher, true, true, true, true) || abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true)) && abilityHelper.CanBeCasted(this.chaos, true, true, true, false) && !this.chaos.Ability.IsReady)
            {
                UntargetableAbility untargetableAbility = abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true) ? this.refresherShard : this.refresher;
                if (abilityHelper.HasMana(new UsableAbility[]
                {
                    this.chaos,
                    untargetableAbility
                }) && abilityHelper.UseAbility(untargetableAbility, true))
                {
                    base.ComboSleeper.ExtendSleep(0.2f);
                    DebuffAbility debuffAbility = this.upheaval;
                    if (debuffAbility != null)
                    {
                        debuffAbility.Sleeper.Sleep(0.5f);
                    }
                    return(true);
                }
            }
            return(abilityHelper.UseAbility(this.upheaval, true));
        }
Ejemplo n.º 10
0
        public Magnus(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.magnataur_shockwave, x => this.shockwave = new Shockwave(x) },
                {
                    AbilityId.magnataur_skewer, x =>
                    {
                        this.skewer = new Skewer(x);
                        this.polarity?.AddSkewer(this.skewer);
                        return(this.skewer);
                    }
                },
                {
                    AbilityId.magnataur_reverse_polarity, x =>
                    {
                        this.polarity = new ReversePolarity(x);
                        if (this.skewer != null)
                        {
                            this.polarity.AddSkewer(this.skewer);
                        }

                        return(this.polarity);
                    }
                },

                { AbilityId.item_blink, x => this.blink = new BlinkDaggerMagnus(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkDaggerMagnus(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkDaggerMagnus(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkDaggerMagnus(x) },
                { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) },
                { AbilityId.item_shivas_guard, x => this.shiva = new ShivasGuard(x) },
                { AbilityId.item_refresher, x => this.refresher = new UntargetableAbility(x) },
                { AbilityId.item_refresher_shard, x => this.refresherShard = new UntargetableAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.magnataur_skewer, x => this.moveSkewer = new BlinkAbility(x));
        }
Ejemplo n.º 11
0
        // Token: 0x06000634 RID: 1588 RVA: 0x0001E5C4 File Offset: 0x0001C7C4
        public override bool Combo(TargetManager targetManager, ComboModeMenu comboModeMenu)
        {
            AbilityHelper abilityHelper = new AbilityHelper(targetManager, comboModeMenu, this);

            if (abilityHelper.CanBeCasted(this.blackHole, true, true, true, true))
            {
                if (abilityHelper.CanBeCasted(this.bkb, false, false, true, true) && abilityHelper.ForceUseAbility(this.bkb, false, true))
                {
                    return(true);
                }
                if (abilityHelper.HasMana(new UsableAbility[]
                {
                    this.pulse,
                    this.blackHole
                }) && abilityHelper.UseAbility(this.pulse, true))
                {
                    return(true);
                }
                if (abilityHelper.HasMana(new UsableAbility[]
                {
                    this.shiva,
                    this.blackHole
                }) && abilityHelper.UseAbility(this.shiva, true))
                {
                    return(true);
                }
                if (abilityHelper.UseAbility(this.blackHole, true))
                {
                    return(true);
                }
            }
            if (abilityHelper.CanBeCastedIfCondition(this.blink, new UsableAbility[]
            {
                this.blackHole
            }))
            {
                if (abilityHelper.CanBeCasted(this.bkb, false, false, true, true) && abilityHelper.ForceUseAbility(this.bkb, false, true))
                {
                    return(true);
                }
                if (abilityHelper.CanBeCasted(this.ghost, false, false, true, true) && abilityHelper.ForceUseAbility(this.ghost, false, true))
                {
                    return(true);
                }
            }
            if (abilityHelper.UseAbilityIfCondition(this.blink, new UsableAbility[]
            {
                this.blackHole
            }))
            {
                return(true);
            }
            if ((abilityHelper.CanBeCasted(this.refresher, true, true, true, true) || abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true)) && abilityHelper.CanBeCasted(this.blackHole, true, true, true, false) && !this.blackHole.Ability.IsReady)
            {
                UntargetableAbility untargetableAbility = abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true) ? this.refresherShard : this.refresher;
                if (abilityHelper.HasMana(new UsableAbility[]
                {
                    this.blackHole,
                    untargetableAbility
                }) && abilityHelper.UseAbility(untargetableAbility, true))
                {
                    return(true);
                }
            }
            return(abilityHelper.UseAbility(this.malefice, true));
        }
Ejemplo n.º 12
0
        // Token: 0x0600054A RID: 1354 RVA: 0x0001B424 File Offset: 0x00019624
        public override bool Combo(TargetManager targetManager, ComboModeMenu comboModeMenu)
        {
            AbilityHelper abilityHelper = new AbilityHelper(targetManager, comboModeMenu, this);

            if (abilityHelper.UseAbility(this.polarity, true))
            {
                return(true);
            }
            if (!abilityHelper.CanBeCasted(this.polarity, false, false, false, true) && !abilityHelper.CanBeCasted(this.skewer, true, true, true, true) && abilityHelper.UseAbility(this.shiva, true))
            {
                return(true);
            }
            if (abilityHelper.UseDoubleBlinkCombo(this.force, this.blink, 0f))
            {
                return(true);
            }
            if (abilityHelper.UseAbilityIfCondition(this.blink, new UsableAbility[]
            {
                this.polarity
            }))
            {
                UpdateManager.BeginInvoke(delegate
                {
                    this.polarity.ForceUseAbility(targetManager, this.ComboSleeper, comboModeMenu);
                }, 50);
                return(true);
            }
            if (abilityHelper.UseAbility(this.force, 500f, 100f))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.skewer, true))
            {
                return(true);
            }
            if (abilityHelper.CanBeCasted(this.skewer, false, false, true, true))
            {
                bool flag  = abilityHelper.CanBeCasted(this.blink, false, false, true, true);
                bool flag2 = abilityHelper.CanBeCasted(this.force, false, false, true, true);
                if (this.skewer.UseAbilityIfCondition(targetManager, base.ComboSleeper, comboModeMenu, this.polarity, flag, flag2))
                {
                    return(true);
                }
            }
            if (abilityHelper.UseAbilityIfCondition(this.skewer, new UsableAbility[]
            {
                this.blink,
                this.force
            }))
            {
                return(true);
            }
            if (abilityHelper.CanBeCasted(this.skewer, false, false, true, true) && abilityHelper.CanBeCasted(this.shockwave, false, true, true, true) && !abilityHelper.CanBeCasted(this.polarity, false, false, true, true) && this.skewer.UseAbilityOnTarget(targetManager, base.ComboSleeper))
            {
                return(true);
            }
            if (abilityHelper.UseAbilityIfCondition(this.shockwave, new UsableAbility[]
            {
                this.blink,
                this.force,
                this.skewer,
                this.polarity
            }))
            {
                return(true);
            }
            if ((abilityHelper.CanBeCasted(this.refresher, true, true, true, true) || abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true)) && abilityHelper.CanBeCasted(this.polarity, true, true, true, false) && !this.polarity.Ability.IsReady)
            {
                UntargetableAbility untargetableAbility = abilityHelper.CanBeCasted(this.refresherShard, true, true, true, true) ? this.refresherShard : this.refresher;
                if (abilityHelper.HasMana(new UsableAbility[]
                {
                    this.polarity,
                    untargetableAbility
                }) && abilityHelper.UseAbility(untargetableAbility, true))
                {
                    return(true);
                }
            }
            return(false);
        }