コード例 #1
0
ファイル: ControllableUnit.cs プロジェクト: vana41203/O9K
        public ControllableUnit(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
        {
            this.Owner          = owner;
            this.abilitySleeper = abilitySleeper;
            this.OrbwalkSleeper = orbwalkSleeper;
            this.Menu           = menu;
            this.Handle         = owner.Handle;

            this.MoveComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.item_blink, x => this.moveBlink = new BlinkAbility(x) },
                { AbilityId.item_force_staff, x => this.moveForceStaff = new ForceStaff(x) },
                { AbilityId.item_hurricane_pike, x => this.movePike = new ForceStaff(x) },

                { AbilityId.item_butterfly, x => this.movePhaseBoots = new MoveBuffAbility(x) },
                { AbilityId.item_invis_sword, x => this.moveShadowBlade = new MoveBuffAbility(x) },
                { AbilityId.item_silver_edge, x => this.moveSilverEdge = new MoveBuffAbility(x) },
                { AbilityId.item_glimmer_cape, x => this.moveGlimmer = new ShieldAbility(x) },

                { AbilityId.item_black_king_bar, x => this.moveBkb = new ShieldAbility(x) },
                { AbilityId.item_blade_mail, x => this.moveBladeMail = new ShieldAbility(x) },
                { AbilityId.item_hood_of_defiance, x => this.moveHood = new ShieldAbility(x) },
                { AbilityId.item_lotus_orb, x => this.moveLotus = new ShieldAbility(x) },

                { AbilityId.item_diffusal_blade, x => this.moveDiffusal = new DebuffAbility(x) },
                { AbilityId.item_abyssal_blade, x => this.moveAbyssal = new DisableAbility(x) },
                { AbilityId.item_rod_of_atos, x => this.moveAtos = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.moveOrchid = new DisableAbility(x) },
                { AbilityId.item_sheepstick, x => this.moveHex = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.moveBloodthorn = new Bloodthorn(x) },
                { AbilityId.item_ethereal_blade, x => this.moveEthereal = new DebuffAbility(x) },
            };
        }
コード例 #2
0
        public Windranger(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.windranger = owner as BaseWindranger;

            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                {
                    AbilityId.windrunner_shackleshot, x =>
                    {
                        this.shackleshot = new Shackleshot(x);
                        if (this.powershot != null)
                        {
                            this.powershot.Shackleshot = this.shackleshot;
                        }

                        return(this.shackleshot);
                    }
                },
                {
                    AbilityId.windrunner_powershot, x =>
                    {
                        this.powershot = new Powershot(x);
                        if (this.shackleshot != null)
                        {
                            this.powershot.Shackleshot = this.shackleshot;
                        }

                        return(this.powershot);
                    }
                },
                { AbilityId.windrunner_windrun, x => this.windrun = new Windrun(x) },
                { AbilityId.windrunner_focusfire, x => this.focusFire = new FocusFire(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_blink, x => this.blink = new BlinkDaggerWindranger(x) },
                { AbilityId.item_swift_blink, x => this.blink = new BlinkDaggerWindranger(x) },
                { AbilityId.item_arcane_blink, x => this.blink = new BlinkDaggerWindranger(x) },
                { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkDaggerWindranger(x) },
                //{ AbilityId.item_force_staff, x => this.force = new ForceStaff(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_sheepstick, x => this.hex = new DisableAbility(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.windrunner_shackleshot, _ => this.shackleshot);
            this.MoveComboAbilities.Add(AbilityId.windrunner_windrun, x => this.windrunMove = new MoveBuffAbility(x));
        }