Prechádzať zdrojové kódy

Working WIDE_BREATH ability

Dydzio 8 rokov pred
rodič
commit
5ba8d64b63
1 zmenil súbory, kde vykonal 6 pridanie a 9 odobranie
  1. 6 9
      lib/battle/CBattleInfoCallback.cpp

+ 6 - 9
lib/battle/CBattleInfoCallback.cpp

@@ -1161,11 +1161,8 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes (const CStack
 	{
 	{
 		std::vector<BattleHex> hexes;
 		std::vector<BattleHex> hexes;
 		const int WN = GameConstants::BFIELD_WIDTH;
 		const int WN = GameConstants::BFIELD_WIDTH;
-		logGlobal->infoStream() << hex;
-		logGlobal->infoStream() << destinationTile;
-
 		// atack stand
 		// atack stand
-		if (hex == destinationTile.movedInDir(BattleHex::EDir::LEFT, false)) {
+		if (hex == destinationTile.cloneInDirection(BattleHex::EDir::LEFT, false)) {
 			if (destinationTile.getY() % 2 == 0)
 			if (destinationTile.getY() % 2 == 0)
 			{
 			{
 				BattleHex::checkAndPush(destinationTile, hexes);
 				BattleHex::checkAndPush(destinationTile, hexes);
@@ -1185,7 +1182,7 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes (const CStack
 			}
 			}
 
 
 		}
 		}
-		if (hex == destinationTile.movedInDir(BattleHex::EDir::RIGHT, false)) {
+		if (hex == destinationTile.cloneInDirection(BattleHex::EDir::RIGHT, false)) {
 			if (destinationTile.getY() % 2 == 0)
 			if (destinationTile.getY() % 2 == 0)
 			{
 			{
 				BattleHex::checkAndPush(destinationTile, hexes);
 				BattleHex::checkAndPush(destinationTile, hexes);
@@ -1206,7 +1203,7 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes (const CStack
 			}
 			}
 		}
 		}
 		// atack down
 		// atack down
-		if (hex == destinationTile.movedInDir(BattleHex::EDir::TOP_LEFT, false)) {
+		if (hex == destinationTile.cloneInDirection(BattleHex::EDir::TOP_LEFT, false)) {
 			if (destinationTile.getY() % 2 == 1)
 			if (destinationTile.getY() % 2 == 1)
 			{
 			{
 				BattleHex::checkAndPush(destinationTile, hexes);
 				BattleHex::checkAndPush(destinationTile, hexes);
@@ -1225,7 +1222,7 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes (const CStack
 				BattleHex::checkAndPush(destinationTile + WN - 1, hexes);
 				BattleHex::checkAndPush(destinationTile + WN - 1, hexes);
 			}
 			}
 		}
 		}
-		if (hex == destinationTile.movedInDir(BattleHex::EDir::TOP_RIGHT, false)) {
+		if (hex == destinationTile.cloneInDirection(BattleHex::EDir::TOP_RIGHT, false)) {
 
 
 			if (destinationTile.getY() % 2 == 1)
 			if (destinationTile.getY() % 2 == 1)
 			{
 			{
@@ -1248,7 +1245,7 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes (const CStack
 
 
 		}
 		}
 		// attack up
 		// attack up
-		if (hex == destinationTile.movedInDir(BattleHex::EDir::BOTTOM_LEFT, false)) {
+		if (hex == destinationTile.cloneInDirection(BattleHex::EDir::BOTTOM_LEFT, false)) {
 			if (destinationTile.getY() % 2 == 1)
 			if (destinationTile.getY() % 2 == 1)
 			{
 			{
 				BattleHex::checkAndPush(destinationTile, hexes);
 				BattleHex::checkAndPush(destinationTile, hexes);
@@ -1267,7 +1264,7 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes (const CStack
 				BattleHex::checkAndPush(destinationTile - WN + 1, hexes);
 				BattleHex::checkAndPush(destinationTile - WN + 1, hexes);
 			}
 			}
 		}
 		}
-		if (hex == destinationTile.movedInDir(BattleHex::EDir::BOTTOM_RIGHT, false)) {
+		if (hex == destinationTile.cloneInDirection(BattleHex::EDir::BOTTOM_RIGHT, false)) {
 
 
 			if (destinationTile.getY() % 2 == 1)
 			if (destinationTile.getY() % 2 == 1)
 			{
 			{