asmrobot
2019-10-16 5597c0b354f881994a75878731c3a02183e9c970
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
using RichCreator.Utility;
using RichCreator.Utility.InputControl;
using RichCreator.Utility.Structs;
using RichCreator.StateMachines;
using RichCreator.Utilitys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
 
namespace RichCreator.Maps.Lindong
{
    /// <summary>
    /// 单人进房间技能释放
    /// </summary>
    public class SingleEntryHouseSkill
    {
        /// <summary>
        /// 释放技能
        /// </summary>
        /// <param name="houseIndex"></param>
        /// <param name="preHouseIndex"></param>
        public static void ReleaseSkill(Int32 houseIndex, Int32 preHouseIndex,MoveState moveState)
        {
 
            //移动和发招
            switch (houseIndex)
            {
                case 2:
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.LeftArrow);
                    moveState.SyncMove(new ZTPoint(-110, 0));
                    G.Instance.InputControl.PressKeys(HIDCode.LeftArrow, HIDCode.G);
 
                    break;
                case 1:
                    moveState.SyncMove(new ZTPoint(-480, 80));
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.W);
                    break;
                case 5:
                    //G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.RightArrow);
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.R);
                    Thread.Sleep(1000);
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.T);
                    break;
                case 4:
                    moveState.SyncMove(new ZTPoint(-1150, -50));
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.RightArrow);
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.E);
                    //Thread.Sleep(1000);
                    //G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.E);
                    break;
                case 8:
                    moveState.SyncMove(new ZTPoint(-100, 110));
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.RightArrow);
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.G);
                    //Thread.Sleep(300);
                    //G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.Z);
                    break;
                case 9:
                    moveState.SyncMove(new ZTPoint(325, 65));
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.R);
                    Thread.Sleep(1000);
                    moveState.SyncMove(new ZTPoint(300, 0));
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.T);
                    break;
                case 10:
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.Q);
                    break;
                case 12:
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.RightArrow);
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.R);
                    Thread.Sleep(1000);
                    moveState.SyncMove(new ZTPoint(-110, 0));
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.T);
                    break;
                case 13:
                    if (preHouseIndex == 12)
                    {
                        moveState.SyncMove(new ZTPoint(600, 150));
                    }
                    else
                    {
                        moveState.SyncMove(new ZTPoint(-300, 200));
                        G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.RightArrow);
                    }
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.Q);
                    Thread.Sleep(1000);
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.E);
                    break;
                case 14:
                    if (preHouseIndex == 13)
                    {
                        moveState.SyncMove(new ZTPoint(400, 0));
                    }
                    else
                    {
                        moveState.SyncMove(new ZTPoint(0, 100));
                    }
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.W);
                    break;
 
                case 15:
                    moveState.SyncMove(new ZTPoint(600, 0));
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.H);
                    Thread.Sleep(5000);
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.Y);
                    break;
                case 18:
                    G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.W);
                    break;
 
            }
        }
    }
}