public static void Skill_Qiangbing03(Wujiang wujiang, Coordinates target) { Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); Wujiang targetWujiang = wujiangExpeditions[target]; // 1.伤害 targetWujiang.OnDamage(5000); // 2.移动 Coordinates c1 = wujiang.GetCoordinates(); Coordinates c2 = targetWujiang.GetCoordinates(); int dx = (c2.HexX - c1.HexX) * 2; int dy = (c2.HexY - c1.HexY) * 2; Coordinates myCoordinates = new Coordinates(); Coordinates otherCoordinates = new Coordinates(); myCoordinates.SetHexXY(c1.HexX + dx, c1.HexY + dy); otherCoordinates.SetHexXY(c2.HexX + dx, c2.HexY + dy); if (!Skills.CanMoveIn(myCoordinates)) { return; } else if (!Skills.CanMoveIn(otherCoordinates)) { targetWujiang.Move(myCoordinates); } else { targetWujiang.Move(otherCoordinates); } }
public static void Skill_Jibing03(Wujiang wujiang, Coordinates target) { Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); List <Coordinates> neighbors = MapManager.GetInstance().GetNeighbours(wujiang.GetCoordinates()); foreach (Coordinates c in neighbors) { if (wujiangExpeditions.ContainsKey(c)) { wujiangExpeditions[c].OnDamage(5000); } } }
public static void Skill_Nubing02(Wujiang myWujiang, Coordinates target) { Coordinates c1 = myWujiang.GetCoordinates(); Coordinates c2 = target; List <Coordinates> targets = new List <Coordinates>(); if (c1.HexX == c2.HexX) { int count = c2.HexY - c1.HexY; int step = count > 0 ? 1 : -1; for (int i = c2.HexY; i != c1.HexY; i -= step) { Coordinates c = new Coordinates(); c.SetHexXY(c1.HexX, i); targets.Add(c); } } else if (c1.HexY == c2.HexY) { int count = c2.HexX - c1.HexX; int step = count > 0 ? 1 : -1; for (int i = c2.HexX; i != c1.HexX; i -= step) { Coordinates c = new Coordinates(); c.SetHexXY(i, c1.HexY); targets.Add(c); } } else if (c1.HexZ == c2.HexZ) { int count = c2.HexY - c1.HexY; int step = count > 0 ? 1 : -1; for (int i = c2.HexY; i != c1.HexY; i -= step) { Coordinates c = new Coordinates(); c.SetHexXY(-c1.HexZ - i, i); targets.Add(c); } } Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); foreach (Coordinates c in targets) { if (wujiangExpeditions.ContainsKey(c)) { wujiangExpeditions[c].OnDamage(4000); } } }
public static List <Coordinates> ShowSkillTarget_Qibing01(Wujiang wujiang) { List <Coordinates> targets = new List <Coordinates>(); List <Coordinates> neighbour = MapManager.GetInstance().GetNeighbours(MapManager.GetInstance().TerrainPositionToCorrdinate(BattleGameManager.GetInstance().GetWujiangTransparent().transform.position)); Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); foreach (Coordinates c in neighbour) { if (wujiangExpeditions.ContainsKey(c)) { // 不能是自己 if (!wujiang.GetCoordinates().Equals(c)) { targets.Add(c); } } } return(targets); }
public static void Skill_Jibing01(Wujiang wujiang, Coordinates target) { Dictionary <Coordinates, Wujiang> wujiangExpeditions = BattleGameManager.GetInstance().GetWujiangData().GetWujiangExpeditions(); Wujiang targetWujiang = wujiangExpeditions[target]; // 1.伤害 targetWujiang.OnDamage(3000); // 2.移动 Coordinates c1 = wujiang.GetCoordinates(); Coordinates c2 = targetWujiang.GetCoordinates(); int dx = c1.HexX - c2.HexX; int dy = c1.HexY - c2.HexY; Coordinates myCoordinates = new Coordinates(); myCoordinates.SetHexXY(c2.HexX + dx, c2.HexY + dy); if (!Skills.CanMoveIn(myCoordinates)) { return; } wujiang.Move(myCoordinates); targetWujiang.Move(c1); }