public void AttachCard(Card card) { _CardAttached = card; _CardAttached.GetGameObject().transform.position = _FieldInfo.GetPosition((int)GetEmptyRearPosition()); _CardAttached.GetGameObject().transform.eulerAngles = _FieldInfo.GetCardRotation(); _Game._CardMenuHelper.SetCard(card.cardID); }
public void Open(Card card) { bIgnore = true; _Card = card; bOpen = true; iSelectedCard = 0; _Game.playerHand.bBlockHand = false; num_options = 0; if(_Card.bIsInhand) { Card tmpVanguard = _Game.field.GetCardAt(fieldPositions.VANGUARD_CIRCLE); if(tmpVanguard.grade >= _Card.grade) { SetOption("Call"); } if(tmpVanguard.grade == _Card.grade || tmpVanguard.grade == (_Card.grade - 1)) { if(_Game.bRideThisTurn && _Card.unitAbilities.CanRide()) { SetOption("Ride"); } } if(_Card.unitAbilities.HasInHandEffect(_Card)) { SetOption ("Activate"); } } else if(_Card._Coord == CardCoord.DAMAGE) { if(_Card.unitAbilities.HasOnDamageEffect() > 0) { SetOption("Activate"); } } else { //Card is on the field. int count = _Card.unitAbilities.HasOnFieldEffect(_Card); if(count == 1) { SetOption("Activate"); } else if(count > 1) { for(int i = 1; i <= count; i++) { SetOption("Activate " + i); } } if(card.IsVanguard() && _Game.field.GetNumberOfCardsInSoul() > 0) { SetOption("View soul"); } if(card.pos == fieldPositions.REAR_GUARD_LEFT || card.pos == fieldPositions.REAR_GUARD_RIGHT|| card.pos == fieldPositions.FRONT_GUARD_LEFT|| card.pos == fieldPositions.FRONT_GUARD_RIGHT) { Card c = card.unitAbilities.GetSameColum(card.pos); if(c == null || !c.IsLocked()) { SetOption("Move"); } } } SetOption("Cancel"); Vector3 pos = _Camera.WorldToScreenPoint(card.GetGameObject().transform.position); _x = pos.x + 10.0f; _y = Camera.main.pixelHeight - pos.y - 50.0f; //_Game.bBlockMouse = true; if(num_options == 1) { Close (); _Game.bCardMenuJustClosed = false; } }
public void OpenOnDrop(Card card) { bOpen = true; bIgnore = true; num_options = 0; iSelectedCard = 0; _Card = card; SetOption("View Dropzone"); SetOption("Cancel"); _customW = 30; Vector3 pos = _Camera.WorldToScreenPoint(card.GetGameObject().transform.position); _x = pos.x + 10.0f; _y = Camera.main.pixelHeight - pos.y - 50.0f; //_Game.bBlockMouse = true; }
public void OpenDeckMenu(Card card) { _Card = card; bOpen = true; iSelectedCard = 0; _Game.playerHand.bBlockHand = false; num_options = 0; _customW = 20; _Game.playerDeck.RemoveFromDeck(card); SetOption("Put on top"); SetOption("Put on bottom"); Vector3 pos = _Camera.WorldToScreenPoint(card.GetGameObject().transform.position); _x = pos.x + 10.0f; _y = Camera.main.pixelHeight - pos.y - 50.0f; _Game.bBlockMouse = true; _Game._CardMenuHelper.SetCard(card.cardID); }
void SendInformationToOpponent(int cardID, int gameAction, int other1, int other2, string str1, int other3 = 0) { CardIdentifier _cardID = (CardIdentifier)cardID; GameAction _gameAction = (GameAction)gameAction; DataTransferManager.getTransferManager().ExecuteDataTransfer(new DataTransfer(_cardID, _gameAction, other1, other2, other3, str1)); if(_gameAction == GameAction.LOSE_BY_CARD_EFFECT) { bGameEnded = true; bPauseGameplay = false; bWinByCardEffect = false; bLoseByCardEffect = true; } else if(_gameAction == GameAction.FORCE_DAMAGE_CHECK) { ForceDamageCheck(other1); } else if(_gameAction == GameAction.FROM_DECK_TO_GUARDIANCIRCLE) { Card tempCard = enemyDeck.DrawCard(); Data.FillCardWithData(tempCard, _cardID); guardZone.AddToGuardZone(tempCard, false); //guardZone.AddExtraPower(tempCard.shield); CardToAttack.AddExtraShield(tempCard.shield); tempCard.TurnUp(); } else if(_gameAction == GameAction.FROM_BIND_TO_DROP) { Card tmp = enemyField.GetCardFromBindByID(_cardID); enemyField.RemoveFromBindZone(tmp); enemyField.AddToDropZone(tmp, false); } else if(_gameAction == GameAction.OPPONENT_FROM_BIND_TO_DROP) { Card tmp = field.GetBoundByID(_cardID); dummyUnitObject.FromBindToDrop(tmp); } else if(_gameAction == GameAction.OPPONENT_FROM_HAND_TO_BIND) { int index = playerHand.Size() - other1; dummyUnitObject.FromHandToBind(playerHand.GetCardAtIndex(index), index, true); } else if(_gameAction == GameAction.ENEMY_FROM_BIND_TO_HAND) { Card cardToReturn = field.GetBoundByID(_cardID); dummyUnitObject.FromBindToHand(cardToReturn); } else if(_gameAction == GameAction.SET_ENEMY_ENDTURN) { enemyPhase = EnemyPhase.ENDTURN; SendPacket(GameAction.CONFORM_ENEMY_ENDTURN); } else if(_gameAction == GameAction.CONFORM_ENEMY_ENDTURN) { bConfirmEndTurn = true; } else if(_gameAction == GameAction.MOVE_TO_OPENRC) { Card c = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1)); EnemyFieldPosition p2 = Util.TranformToEnemyPosition((fieldPositions)other2); fieldPositions p = Util.EnemyToFieldPosition(p2); enemyField.ClearZone(Util.TransformToEquivalentEnemyPosition(c.pos)); c.pos = p; if(p == fieldPositions.ENEMY_FRONT_LEFT) enemyField.Left_Front = c; else if(p == fieldPositions.ENEMY_FRONT_RIGHT) enemyField.Right_Front = c; else if(p == fieldPositions.ENEMY_REAR_CENTER) enemyField.Center_Rear = c; else if(p == fieldPositions.ENEMY_REAR_RIGHT) enemyField.Right_Rear = c; else if(p == fieldPositions.ENEMY_REAR_LEFT) enemyField.Left_Rear = c; Vector3 newVector = enemyField.fieldInfo.GetPosition((int)p2); c.GoTo(newVector.x, newVector.z); } else if(_gameAction == GameAction.EXCHANGE) { Card c1 = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1)); Card c2 = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other2)); fieldPositions p1 = c1.pos; fieldPositions p2 = c2.pos; if(p1 == fieldPositions.ENEMY_REAR_CENTER) enemyField.Center_Rear = c2; else if(p1 == fieldPositions.ENEMY_REAR_LEFT) enemyField.Left_Rear = c2; else if(p1 == fieldPositions.ENEMY_REAR_RIGHT) enemyField.Right_Rear = c2; else if(p1 == fieldPositions.ENEMY_FRONT_LEFT) enemyField.Left_Front = c2; else if(p1 == fieldPositions.ENEMY_FRONT_RIGHT) enemyField.Right_Front = c2; if(p2 == fieldPositions.ENEMY_REAR_CENTER) enemyField.Center_Rear = c1; else if(p2 == fieldPositions.ENEMY_REAR_LEFT) enemyField.Left_Rear = c1; else if(p2 == fieldPositions.ENEMY_REAR_RIGHT) enemyField.Right_Rear = c1; else if(p2 == fieldPositions.ENEMY_FRONT_LEFT) enemyField.Left_Front = c1; else if(p2 == fieldPositions.ENEMY_FRONT_RIGHT) enemyField.Right_Front = c1; c1.pos = p2; c2.pos = p1; Vector3 c1NewPos = enemyField.fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(c1.pos)); Vector3 c2NewPos = enemyField.fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(c2.pos)); c1.GoTo(c1NewPos.x, c1NewPos.z); c2.GoTo(c2NewPos.x, c2NewPos.z); } else if(_gameAction == GameAction.SET_ENEMY_MAIN) { enemyPhase = EnemyPhase.MAIN; } else if(_gameAction == GameAction.BIND_HAND_FACEDOWN_RETURN_ENDTURN) { _OppBindHandFacedownReturnEndTurn = true; GameChat.AddHelpMessage("Choose a card from your hand and bind it."); } else if(_gameAction == GameAction.OPPONENT_FROM_FIELD_TO_DAMAGE) { _OppFromFieldToDamage = true; GameChat.AddHelpMessage("Choose one of your rear-guards."); } else if(_gameAction == GameAction.ENEMY_FROM_DAMAGE_TO_DROP) { Card c = field.GetDamageAtIndex(other1); dummyUnitObject.FromDamageToDrop (c); } else if(_gameAction == GameAction.FROM_DRIVE_TO_DROP) { enemyField.AddToDropZone(DriveCard, false); } else if(_gameAction == GameAction.OPEN_DECISIONWINDOW) { Card tmp = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1)); _DecisionWindow.Set(tmp, other2); _DecisionWindow.SetCaption(str1); } else if(_gameAction == GameAction.DECISIONWINDOW_ACCEPT) { Card tmp = field.GetCardAt(Util.TransformToPlayerField((fieldPositions)other1)); if(tmp != null) { tmp.unitAbilities.DecisionWindowAccept(other2); } } else if(_gameAction == GameAction.REGISTER_ID) { lastIDRegistered = other1; } else if(_gameAction == GameAction.DECISIONWINDOW_DENIED) { Card tmp = field.GetCardAt(Util.TransformToPlayerField((fieldPositions)other1)); if(tmp != null) { tmp.unitAbilities.DecisionWindowDenied(other2); } else { GameChat.AddChatMessage("ADMIN", "NULL"); } } else if(_gameAction == GameAction.EFFECT_ON) { bEnemyEffectOngoing = true; } else if(_gameAction == GameAction.EFFECT_OFF) { bEnemyEffectOngoing = false; } else if(_gameAction == GameAction.BLOCK_EFFECT_TRIGGER_THIS_BATTLE) { bBlockTriggerEffects = true; } else if(_gameAction == GameAction.CREATE_AUXILIAR_INT_ARRAY) { intArr = new List<int>(); } else if(_gameAction == GameAction.ADD_TO_INT_ARRAY) { intArr.Add(other1); } else if(_gameAction == GameAction.FORCE_CALL_FROM_BIND) { bForceToCallFromBind = true; iNumberOfUnitsToCallFromBind = other1; field.ViewBindZone(1, delegate(Card c) { for(int i = 0; i < intArr.Count; i++) { CardIdentifier tmpId = (CardIdentifier)intArr[i]; if(tmpId == c.cardID) { return true; } } return false; }); bEndEvent = false; } else if(_gameAction == GameAction.OPPONENT_CANNOT_NORMAL_GUARD_ENDBATTLE) { bCanNormalGuard = false; } else if(_gameAction == GameAction.OPPONENT_CANNOT_RECEIVEDAMAGE_ENDBATTLE) { bCanReceiveDamage = false; } else if(_gameAction == GameAction.BIND_FROM_DECK) { //Take the top card of the enemy deck. Card c = enemyDeck.DrawCard(); //Transform the card to the desired card identifier. Data.FillCardWithData(c, _cardID); //Add the card to the enemy bind zone. enemyField.AddToBindZone(c); //Perform the bind animation. c.TurnUp(); c.BindAnim(); } else if(_gameAction == GameAction.FROM_BIND_TO_DECK) { Card c = enemyField.GetCardFromBindByID(_cardID); enemyField.RemoveFromBindZone(c); enemyDeck.AddCard(c); c.FromEnemyBindTo(new Vector3(-15.89146f, -2.667145f, 9.565327f), delegate { enemyDeck.SetDeckPosition(); }); } else if(_gameAction == GameAction.OPPONENT_MOVE_SOUL) { fieldPositions p = (fieldPositions)other1; Card c = field.GetCardAt(Util.TransformToPlayerField(p)); if(c != null) { MoveToSoul(c); } } else if(_gameAction == GameAction.DRAW_FROM_DECK) { //Remove a number "other1" of cards from the deck an put them on the enemy hand. for(int i = 0; i < other1; i++) { enemyHand.AddToHand (enemyDeck.DrawCard()); } } else if(_gameAction == GameAction.FROM_DROP_TO_HAND) { Card c = enemyField.GetDropByID(_cardID); enemyField.RemoveFromDropZone(c); enemyHand.AddToHand(c); } else if(_gameAction == GameAction.BLOCK_GUARD_END_BATTLE) { bBlockGuardEndBattle = true; bMaxGuardGradeBlocked = other1; } else if(_gameAction == GameAction.BLOCK_GUARD_END_BATTLE_MIN) { bBlockGuardEndBattle = true; bMinGuardGradeBlocked = other1; } else if(_gameAction == GameAction.UNIT_CANNOT_INTERCEPT_ENDTURN) { fieldPositions p = Util.TransformToPlayerField((fieldPositions)other1); Card c = field.GetCardAt(p); SelectAnimField(c); c.BlockInterceptEndTurn(); } else if(_gameAction == GameAction.RIDE_FROM_BIND) { Card c = enemyField.GetCardFromBindByID(_cardID); if(c != null) { enemyField.RemoveFromBindZone(c); enemyField.Ride(c); } } else if(_gameAction == GameAction.PLAY_CARD_ON_THE_FIELD) { //The opponent Call/Ride an unit from hand. EnemyFieldPosition pos = (EnemyFieldPosition)other1; if(pos != EnemyFieldPosition.VANGUARD) { Card tempCard = enemyHand.RemoveFromHand(); Data.FillCardWithData(tempCard, _cardID); enemyField.Call(tempCard, pos); } else { Card tempCard = enemyHand.RemoveFromHand(); Data.FillCardWithData(tempCard, _cardID); enemyField.Ride(tempCard); } } else if(_gameAction == GameAction.LOCK) { fieldPositions tmpPos = (fieldPositions)other1; Card card = field.GetCardAt(Util.TransformToPlayerField(tmpPos)); card.Lock(); } else if(_gameAction == GameAction.UNLOCK) { fieldPositions tmpPos = (fieldPositions)other1; Card card = field.GetCardAt(Util.TransformToPlayerField(tmpPos)); card.Unlock(); } else if(_gameAction == GameAction.LOCK_ENEMY) { enemyField.GetCardAt((EnemyFieldPosition)other1).Lock(); } else if(_gameAction == GameAction.OMEGA_LOCK) { fieldPositions tmpPos = (fieldPositions)other1; Card card = field.GetCardAt(Util.TransformToPlayerField(tmpPos)); card.SetOmegaLock(true); } else if(_gameAction == GameAction.UNLOCK_ENEMY) { EnemyFieldPosition pos = (EnemyFieldPosition)other1; Card tempCard = enemyField.GetCardAt(pos); tempCard.Unlock(); field.CheckAbilities(CardState.EnemyUnlockCard, tempCard); bEndEvent = true; } else if(_gameAction == GameAction.PLAY_CARD_FROM_SOUL) { EnemyFieldPosition pos = (EnemyFieldPosition)other1; Card tempCard = enemyField.GetCardFromSoulByID(_cardID); enemyField.RemoveFromSoul(tempCard); enemyField.Call(tempCard, pos); } else if(_gameAction == GameAction.FROM_BIND_TO_FIELD) { EnemyFieldPosition pos = (EnemyFieldPosition)other1; Card tempCard = enemyField.GetCardFromBindByID(_cardID); enemyField.RemoveFromBindZone(tempCard); enemyField.Call(tempCard, pos); } else if(_gameAction == GameAction.REST_UNIT) { enemyField.GetCardAt((EnemyFieldPosition)other1).RestEnemy(); } else if(_gameAction == GameAction.ADD_EXTRA_SHIELD) { if(CardToAttack != null) { CardToAttack.AddExtraShield(other1); } } else if(_gameAction == GameAction.FROM_HAND_TO_BIND) { Card c = enemyHand.GetCardAtIndex(enemyHand.Size() - other1 - 1); Data.FillCardWithData(c, _cardID); FromHandToBindList.Add(c); c.BindAnim(); } else if(_gameAction == GameAction.SELECT_UNIT_TO_ATTACK) { Card tempCard = field.GetCardAt(Util.TransformToPlayerField((fieldPositions)other1)); PutSelectorOnCard(tempCard); CardToAttack = tempCard; AttackedList.Add(CardToAttack); CurAttackedListIndex = 0; CardAttacking = enemyField.GetCardAt((EnemyFieldPosition)other2); bShowAttackPowerWindow = true; bShowDefensePowerWindow = true; SendPacket (GameAction.REQUEST_BOOT); //gamePhase = GamePhase.GUARD; } else if(_gameAction == GameAction.ATTACK_ALL_UNITS) { AttackedList.Clear(); Card c = field.GetCardAt(fieldPositions.FRONT_GUARD_LEFT); if(c != null) AttackedList.Add(c); c = field.GetCardAt(fieldPositions.FRONT_GUARD_RIGHT); if(c != null) AttackedList.Add(c); c = field.GetCardAt(fieldPositions.REAR_GUARD_LEFT); if(c != null) AttackedList.Add(c); c = field.GetCardAt(fieldPositions.REAR_GUARD_CENTER); if(c != null) AttackedList.Add(c); c = field.GetCardAt(fieldPositions.REAR_GUARD_RIGHT); if(c != null) AttackedList.Add(c); c = field.GetCardAt(fieldPositions.VANGUARD_CIRCLE); if(c != null) AttackedList.Add(c); CardToAttack = AttackedList[0]; CurAttackedListIndex = 0; TargetCard(CardToAttack); CardAttacking = enemyField.GetCardAt((EnemyFieldPosition)other1); bShowAttackPowerWindow = true; bShowDefensePowerWindow = true; BeginGuardPhase(); gamePhase = GamePhase.GUARD; } else if(_gameAction == GameAction.ALL_FRONT) { AttackedList.Clear(); Card c = field.GetCardAt(fieldPositions.FRONT_GUARD_LEFT); if(c != null) AttackedList.Add(c); c = field.GetCardAt(fieldPositions.FRONT_GUARD_RIGHT); if(c != null) AttackedList.Add(c); c = field.GetCardAt(fieldPositions.VANGUARD_CIRCLE); if(c != null) AttackedList.Add(c); CardToAttack = AttackedList[0]; CurAttackedListIndex = 0; TargetCard(CardToAttack); CardAttacking = enemyField.GetCardAt((EnemyFieldPosition)other1); bShowAttackPowerWindow = true; bShowDefensePowerWindow = true; BeginGuardPhase(); gamePhase = GamePhase.GUARD; } else if(_gameAction == GameAction.FROM_DAMAGE_TO_DROP) { Card c = enemyField.GetDamageAtIndex(other1); enemyField.RemoveFromDamage(c); enemyField.AddToDropZone(c, false); } else if(_gameAction == GameAction.FROM_DAMAGE_TO_SOUL) { Card tempCard = enemyField.GetDamageAtIndex(other1); enemyField.RemoveFromDamage(tempCard); enemyField.AddToSoul(tempCard); tempCard.TurnUp(); tempCard.SetRotation(0,0,0); Vector3 newPosition = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.VANGUARD) + new Vector3(0.0f, -0.002f, 0.0f); tempCard.GoTo (newPosition.x, newPosition.y, newPosition.z); } else if(_gameAction == GameAction.ADD_TO_GUARDZONE) { Card tempCard = enemyHand.RemoveFromHand(); Data.FillCardWithData(tempCard, _cardID); guardZone.AddToGuardZone(tempCard, false); CardToAttack.AddExtraShield(tempCard.shield); } else if(_gameAction == GameAction.FROM_SOUL_TO_GC) { Card tempCard = enemyField.GetCardFromSoulByID(_cardID); enemyField.RemoveFromSoul(tempCard); guardZone.AddToGuardZone(tempCard, false); CardToAttack.AddExtraShield(tempCard.shield); } else if(_gameAction == GameAction.END_ATTACK) { CardSelector.transform.position = new Vector3(0.0f, 100.0f, 0.0f); bShowAttackPowerWindow = false; bShowDefensePowerWindow = false; bAttacking = false; guardZone.CleanGuardZone(enemyField); bDoAttackOnce = true; bBlockGuardEndBattle = false; } else if(_gameAction == GameAction.ADD_TO_DAMAGEZONE) { Card tmpCard = enemyDeck.DrawCard(); Data.FillCardWithData(tmpCard, _cardID); enemyField.AddToDamageZone(tmpCard); } else if(_gameAction == GameAction.SURRENDER) { bGameEnded = true; bSurrender = false; bOpponentSurrender = true; } else if(_gameAction == GameAction.FROM_DAMAGE_TO_DECK) { Card c = enemyField.GetDamageAtIndex(other1); enemyField.RemoveFromDamage(c); enemyDeck.AddCard(c); enemyDeck.SetDeckPosition(); //c.TurnUp(); } else if(_gameAction == GameAction.END_TURN) { bBlockInterceptUntilEndTurn = false; enemyField.ResetPowers(); enemyField.ResetTurnPowers(); field.ResetPowers(); field.ResetTurnPowers(); gamePhase = GamePhase.DRAW; field.DoStandPhase(); SendPacket(GameAction.STAND_ALL_UNITS); numTurn++; } else if(_gameAction == GameAction.FROM_BIND_TO_HAND) { Card c = enemyField.GetCardFromBindByID(_cardID); if(c != null) { enemyField.RemoveFromBindZone(c); enemyHand.AddToHand(c); } } else if(_gameAction == GameAction.POWER_INCREASE) { enemyField.GetCardAt((EnemyFieldPosition)other1).IncreasePower(other2); } else if(_gameAction == GameAction.CAN_BE_RETIRED) { if(other2 == 0) { enemyField.GetCardAt((EnemyFieldPosition)other1).bCanBeRetireByEffects = false; } else { enemyField.GetCardAt((EnemyFieldPosition)other1).bCanBeRetireByEffects = true; } } else if(_gameAction == GameAction.FLIPDOWN) { Card c = enemyField.GetDamageAtIndex(other1); if(c != null) { c.TurnDown(); } } else if(_gameAction == GameAction.FLIPUP) { Card c = enemyField.GetDamageAtIndex(other1); if(c != null) { c.TurnUp(); } } else if(_gameAction == GameAction.INCREASE_POWER_END_TURN) { enemyField.GetCardAt((EnemyFieldPosition)other1).IncreasePowerUntilEndTurn(other2); } else if(_gameAction == GameAction.INCREASE_CRITICAL_END_TURN) { enemyField.GetCardAt((EnemyFieldPosition)other1).IncreaseCriticalUntilEndTurn(other2); } else if(_gameAction == GameAction.STAND_ALL_UNITS) { //enemyField.StandAllUnits(); enemyField.DoStandPhase(); } else if(_gameAction == GameAction.SEND_TO_DROPZONE) { enemyField.AddToDropZone(enemyField.GetCardAt((EnemyFieldPosition)other1), true); enemyField.ClearZone((EnemyFieldPosition)other1); } else if(_gameAction == GameAction.SELECT_ANIM_DAMAGE) { enemyField.GetDamageAtIndex(other1).DoSelectAnim(); } else if(_gameAction == GameAction.DRIVE_CHECK) { if(field.GetCardAt(fieldPositions.VANGUARD_CIRCLE).hasTwinDrive()) { bTwinDrive = true; } else { bTwinDrive = false; } DriveCheck(); } else if(_gameAction == GameAction.PUT_CARD_ON_DRIVEZONE) { DriveCard = enemyDeck.DrawCard(); if(DriveCard != null) { Data.FillCardWithData(DriveCard, _cardID); DriveCard.GetGameObject().transform.position = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.DRIVE); DriveCard.GetGameObject().transform.eulerAngles = EnemyFieldInfo.GetDriveRotation(); DriveCard.TurnUp(); } } else if(_gameAction == GameAction.SEND_DRIVE_TO_HAND) { if(DriveCard != null) { enemyHand.AddToHand(DriveCard); DriveCard = null; } } else if(_gameAction == GameAction.END_DRIVECHECK) { for(int i = 0; i < AttackedList.Count - 1; i++) { ResolveBattle(AttackedList[i]); } ResolveLastBattle(AttackedList[AttackedList.Count - 1]); } else if(_gameAction == GameAction.STAND_UNIT) { enemyField.GetCardAt((EnemyFieldPosition)other1).StandEnemy(); } else if(_gameAction == GameAction.REST_ENEMY_UNIT) { fieldPositions p = Util.TransformToPlayerField((fieldPositions)other1); Card c = field.GetCardAt(p); if(c != null) { c.Rest(); } } else if(_gameAction == GameAction.CRITICAL_INCREASE) { enemyField.GetCardAt((EnemyFieldPosition)other1).IncreaseCritical(other2); } else if(_gameAction == GameAction.END_BATTLE) { Card temp = field.GetCardAt(Util.TransformToPlayerField((fieldPositions)(other1))); temp.ResetPower(); temp.IsBoostedBy = null; field.CheckAbilitiesBind(CardState.BindZone_EndBattle); temp.CheckAbilities(CardState.EndBattle); field.CheckAbilitiesExcept(temp.pos, CardState.EndBattle_NotMe, temp); bBlockGuardEndBattle = false; bMinGuardGradeBlocked = 0; bMaxGuardGradeBlocked = 99; bDoPerfectGuardPerBattle = false; bBlockInterceptUntilEndBattle = false; CardToAttack.ResetPower(); field.CheckAbilities(CardState.ClearEndBattleVariables); } else if(_gameAction == GameAction.FROM_DROP_TO_DECK) { DD_Card = enemyField.GetDropByID(_cardID); Vector3 newPos = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.DECK); DD_Card.GoTo(newPos.x, newPos.z); } else if(_gameAction == GameAction.HEAL_TRIGGER) { enemyField.AddToDropZone(enemyField.RemoveFromDamage(), false); } else if(_gameAction == GameAction.ADD_CARD_TO_ABILITYSTACK) { //Description: When an enemy ability is resolved during your turn. The enemy effect //will be added to the Stack Ability and it will be performed like any normal ability does. //The game will be paused for current player and enemy will take the control. fieldPositions p = Util.TransformToPlayerField((fieldPositions)other1); EnemyTurnStackedCards.Add(field.GetCardAt(p)); } else if(_gameAction == GameAction.CLEAR_ZONE) { enemyField.ClearZone((EnemyFieldPosition)other1); } else if(_gameAction == GameAction.INTERCEPT) { Card c = enemyField.GetCardAt((EnemyFieldPosition)other1); guardZone.AddToGuardZone(enemyField.GetCardAt((EnemyFieldPosition)other1), true); CardToAttack.AddExtraShield(c.shield); } else if(_gameAction == GameAction.SHOW_CARD) { ShowCardEffect(Resources.Load ("CardHelper/" + Data.GetCardInfo(_cardID).clan + "/" + Data.GetImageName(_cardID)) as Texture2D); } else if(_gameAction == GameAction.FLIPDAMAGE) { enemyField.FlipDamageZoneCard(); } else if(_gameAction == GameAction.UNFLIPDAMAGE) { enemyField.UnflipDamageZoneCard(); } else if(_gameAction == GameAction.ENEMY_REMOVE_FROM_GUARDIAN) { guardZone.Remove(guardZone.cards[other1], true); } else if(_gameAction == GameAction.SEND_TO_DROPZONE_ALLY) { fieldPositions tmpPos = (fieldPositions)other1; Card card = field.GetCardAt(Util.TransformToPlayerField(tmpPos)); Debug.Log("Send to drop zone ally event"); if(!card.IsVanguard()) { Debug.Log("Sent to dropzone: " + card.cardID); card.CheckAbilities(CardState.DropZoneFromRC); } field.AddToDropZone(field.GetCardAt(Util.TransformToPlayerField(tmpPos))); field.ClearZone(Util.TransformToPlayerField(tmpPos)); } else if(_gameAction == GameAction.SEND_TO_BINDZONE_ALLY) { fieldPositions tmpPos = (fieldPositions)other1; Card card = field.GetCardAt(Util.TransformToPlayerField(tmpPos)); field.AddToBindZone(field.GetCardAt(Util.TransformToPlayerField(tmpPos))); field.ClearZone(Util.TransformToPlayerField(tmpPos)); card.BindAnim(); } else if(_gameAction == GameAction.ENEMY_DISCARD) { Card tmpCard = enemyHand.RemoveFromHand(); Data.FillCardWithData(tmpCard, _cardID); enemyField.AddToDropZone(tmpCard, false); tmpCard.TurnUp(); } else if(_gameAction == GameAction.RETURN_FROM_HAND_TO_DECK) { Card tmpCard = enemyHand.RemoveFromHand(); enemyDeck.AddCard(tmpCard); enemyDeck.SetDeckPosition(); } else if(_gameAction == GameAction.FROM_HAND_TO_DECK) { Card tmpCard = enemyHand.RemoveFromHand(playerHand.Size() - other1 - 1); enemyDeck.AddCard(tmpCard); enemyDeck.SetDeckPosition(); } else if(_gameAction == GameAction.DRAW_FROM_DECK_AND_SHOW) { Card tmpCard = enemyDeck.DrawCard(); enemyHand.AddToHand(tmpCard); Data.FillCardWithData(tmpCard, _cardID); tmpCard.TurnUp(); ShowingCardAtHandTimer = SHOW_CARD_FROM_HAND_DELAY; bIsCardAtHandShowing = true; } else if(_gameAction == GameAction.FROM_DAMAGE_TO_HAND) { Card c = enemyField.GetDamageAtIndex(other1); enemyField.RemoveFromDamage(c); enemyHand.AddToHand(c); } else if(_gameAction == GameAction.CARDSTATE_FROM_BIND_TO_HAND_END_TURN) { Card c = playerHand.GetCardAtIndex(playerHand.Size() - other1 - 1); if(c != null) { Debug.Log ("Adding Ability to " + c.cardID); c.unitAbilities.AddExternAuto(delegate(CardState cs, Card effectOwner) { if(cs == CardState.EnemyEndTurn) { c.unitAbilities.FromBindToHand(c); } }); } } else if(_gameAction == GameAction.FROM_HAND_TO_DAMAGE) { Card c = enemyHand.GetCardAtIndex(enemyHand.Size() - other1 - 1); Data.FillCardWithData(c, _cardID); enemyHand.RemoveFromHand(c); enemyField.AddToDamageZone(c); } else if(_gameAction == GameAction.SHOW_CARD_HAND) { Card tmpCard = enemyHand.GetCardAtIndex(enemyHand.Size() - other1 - 1); Data.FillCardWithData(tmpCard, _cardID); tmpCard.TurnUp(); ShowingCardAtHandTimer = SHOW_CARD_FROM_HAND_DELAY; bIsCardAtHandShowing = true; } else if(_gameAction == GameAction.ATTACK_HITS) { CardAttacking.CheckAbilities(CardState.AttackHits, CardAttacking); field.CheckAbilitiesExcept(CardAttacking.pos, CardState.AttackHits_NotMe, CardAttacking); } else if(_gameAction == GameAction.ADD_POWER_TO_GUARDZONE) { guardZone.AddExtraPower(other1); } else if(_gameAction == GameAction.RETURN_FROM_FIELD_TO_DECK) { Card tempCard = enemyField.GetCardAt((EnemyFieldPosition)other1); enemyField.RemoveFrom((EnemyFieldPosition)other1); tempCard.SetRotation(0,0,0); enemyDeck.ReturnToDeck(tempCard); ReturnToDeckCard = tempCard; } else if(_gameAction == GameAction.FROM_FIELD_TO_DAMAGE) { Card tempCard = enemyField.GetCardAt((EnemyFieldPosition)other1); enemyField.RemoveFrom((EnemyFieldPosition)other1); enemyField.AddToDamageZone(tempCard); } else if(_gameAction == GameAction.SOULCHARGE) { Card tempCard = enemyDeck.DrawCard(); Data.FillCardWithData(tempCard, _cardID); enemyField.AddToSoul(tempCard); tempCard.TurnUp(); tempCard.SetRotation(0,0,0); //Vector3 newPosition = fieldInfo.GetPosition((int)fieldPositions.VANGUARD_CIRCLE) + new Vector3(0.0f, -0.001f, 0.0f); Vector3 newPosition = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.VANGUARD) + new Vector3(0.0f, -0.002f, 0.0f); tempCard.GoTo (newPosition.x, newPosition.y, newPosition.z); } else if(_gameAction == GameAction.SOULBLAST) { EnemySoulBlastQueue.Add(enemyField.GetCardFromSoulByID(_cardID)); } else if(_gameAction == GameAction.PERSISTENT_POWER) { fieldPositions pos = (fieldPositions)other1; Card temp = enemyField.GetCardAt(Util.TranformToEnemyPosition(pos)); if(temp != null) { temp.SetPersistentPower(other2); } } else if(_gameAction == GameAction.RIDE_FROM_FIELD) { Card c = enemyField.GetCardAt(Util.TransformToEquivalentEnemyPosition((fieldPositions)other1)); fieldPositions p = c.pos; enemyField.RemoveFrom(Util.TransformToEquivalentEnemyPosition(c.pos)); enemyField.Ride(c); SendPacket (GameAction.RIDE_FROM_FIELD_OPP, p); } else if(_gameAction == GameAction.PERSISTENT_CRITICAL) { fieldPositions pos = (fieldPositions)other1; Card temp = enemyField.GetCardAt(Util.TranformToEnemyPosition(pos)); if(temp != null) { temp.SetPersistentCritical(other2); } } else if(_gameAction == GameAction.HEAL_TRIGGER_SELECT) { Card c = enemyField.RemoveFromDamage(other1); enemyField.AddToDropZone(c, false); } else if(_gameAction == GameAction.PLAY_CARD_FROM_DECK) { Card tempCard = enemyDeck.DrawCard(); Data.FillCardWithData(tempCard, _cardID); tempCard.TurnUp(); enemyField.Call(tempCard, (EnemyFieldPosition)other1); } else if(_gameAction == GameAction.FROM_DECK_TO_DAMAGE) { Card c = enemyDeck.DrawCard(); Data.FillCardWithData(c, _cardID); enemyField.AddToDamageZone(c); c.TurnDown(); } else if(_gameAction == GameAction.FROM_DECK_TO_DAMAGE_FACEUP) { Card c = enemyDeck.DrawCard(); Data.FillCardWithData(c, _cardID); enemyField.AddToDamageZone(c); c.TurnUp(); } else if(_gameAction == GameAction.FROM_FIELD_TO_SOUL) { Card tempCard = enemyField.GetCardAt((EnemyFieldPosition)other1); enemyField.MoveToSoul(Util.TransformToEquivalentEnemyPosition(tempCard.pos)); enemyField.AddToSoul(tempCard); enemyField.RemoveFrom(Util.TransformToEquivalentEnemyPosition(tempCard.pos)); } else if(_gameAction == GameAction.PLAY_CARD_FROM_DROP) { Card tempCard = enemyField.GetDropByID(_cardID); if(tempCard != null) { enemyField.RemoveFromDropZone(tempCard); enemyField.Call(tempCard, Util.TranformToEnemyPosition((fieldPositions)other1)); } else { } } else if(_gameAction == GameAction.CHECK_CARD_ABILITY) { Card c = EnemyTurnStackedCards[0]; EnemyTurnStackedCards.RemoveAt(0); EffectOnGoingEnemyTurn = true; c.CheckAbilities((CardState)other1); } else if(_gameAction == GameAction.FIELD_FROM_DAMAGE) { Card c = enemyField.GetDamageAtIndex(other2); enemyField.RemoveFromDamage(c); enemyField.Call(c, Util.TranformToEnemyPosition((fieldPositions)other1)); } else if(_gameAction == GameAction.BIND_HAND) { Card c = playerHand.GetCardAtIndex(playerHand.Size() - other1 - 1); if(c != null) { BindHand(c); } } else if(_gameAction == GameAction.RIDE_FROM_DECK) { Card tempCard = enemyDeck.DrawCard(); Data.FillCardWithData(tempCard, _cardID); enemyField.Ride(tempCard); } else if(_gameAction == GameAction.RETURN_CARD_FROM_HAND_TO_DECK) { Card tempCard = enemyHand.RemoveFromHand(); enemyDeck.AddCard(tempCard); enemyDeck.SetDeckPosition(); } else if(_gameAction == GameAction.PERFECT_GUARD) { guardZone.ActivePerfectGuard(); CardToAttack.PerfectGuard(); } else if(_gameAction == GameAction.MOVE_ALLY) { EnemyFieldPosition pos = Util.TranformToEnemyPosition((fieldPositions)other1); Card temp = enemyField.GetCardAt(pos); enemyField.Move(temp); } else if(_gameAction == GameAction.NEGATE_ENEMY_STAND) { fieldPositions pos = Util.TransformToPlayerField((fieldPositions)other1); Card temp = field.GetCardAt(pos); temp.NegateStand(); } else if(_gameAction == GameAction.ALLY_DISCARD) { bEffectOnGoing = true; GameChat.AddChatMessage("ADMIN", "ALLY_DISCARD"); bDiscard = true; _GameHelper.CustomMessage("Choose a card from your hand and discard it."); } else if(_gameAction == GameAction.RIDE_FROM_DROP) { Card tempCard = enemyField.SearchInDropZone(_cardID); enemyField.RemoveFromDropZone(tempCard); enemyField.Ride(tempCard); } else if(_gameAction == GameAction.FROM_DROP_TO_SOUL) { Card tmp = enemyField.SearchInDropZone(_cardID); if(tmp != null) { enemyField.MoveToSoul(tmp); enemyField.RemoveFromDropZone(tmp); } } else if(_gameAction == GameAction.FROM_DECK_TO_DROP) { Card tmp = enemyDeck.DrawCard(); Data.FillCardWithData(tmp, _cardID); tmp.TurnUp(); tmp.SetRotation(0,0,0); enemyField.AddToDropZone(tmp, false); } else if(_gameAction == GameAction.BLOCK_INTERCEPT_UNTIL_ENDTURN) { bBlockInterceptUntilEndTurn = true; } else if(_gameAction == GameAction.BLOCK_INTERCEPT_UNTIL_ENDBATTLE) { bBlockInterceptUntilEndBattle = true; } else if(_gameAction == GameAction.PLAY_CARD_FROM_DRIVE) { enemyField.Call(DriveCard, (EnemyFieldPosition)other1); DriveCard = null; } else if(_gameAction == GameAction.RETURN_FROM_FIELD_TO_HAND) { fieldPositions pos = (fieldPositions)other1; EnemyFieldPosition enemyPos = Util.TranformToEnemyPosition(pos); Card c = enemyField.GetCardAt(enemyPos); enemyField.RemoveFrom(enemyPos); enemyHand.AddToHand(c); } else if(_gameAction == GameAction.ATTACK_NOT_HIT) { CardAttacking.CheckAbilities(CardState.AttackNotHit); field.CheckAbilitiesExcept(CardAttacking.pos, CardState.AttackNotHit_NotMe); field.CheckAbilitiesBind(CardState.BindZone_AttackNotHit); } else if(_gameAction == GameAction.INCREASE_ENEMY_POWER_BATTLE) { fieldPositions p = Util.TransformToPlayerField((fieldPositions)other1); Card c = field.GetCardAt(p); if(c != null) { c.IncreasePower(other2); SendPacket(GameAction.POWER_INCREASE, c.pos, other2); } } else if(_gameAction == GameAction.INCREASE_ENEMY_POWER_TURN) { fieldPositions p = Util.TransformToPlayerField((fieldPositions)other1); Card c = field.GetCardAt(p); if(c != null) { c.IncreasePowerUntilEndTurn(other2); SendPacket(GameAction.INCREASE_POWER_END_TURN, c.pos, other2); } } else if(_gameAction == GameAction.BOOST) { Card c = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1)); if(c != null) { fieldPositions p = fieldPositions.DECK_ZONE; if(c.pos == fieldPositions.ENEMY_FRONT_LEFT) { p = fieldPositions.ENEMY_REAR_LEFT; } if(c.pos == fieldPositions.ENEMY_FRONT_RIGHT) { p = fieldPositions.ENEMY_REAR_RIGHT; } if(c.pos == fieldPositions.ENEMY_VANGUARD) { p = fieldPositions.ENEMY_REAR_CENTER; } Card d = enemyField.GetCardAt(Util.TransformToEquivalentEnemyPosition(p)); if(d != null) { c.IsBoostedBy = d; } } } else if(_gameAction == GameAction.REQUEST_BOOT) { bEffectOnGoing = true; GameChat.AddChatMessage("ADMIN", "REQUEST_BOOT"); if(CanBeBoosted(CardAttacking)) { bBoostWindow = true; } else { BoostUnit(); } } else if(_gameAction == GameAction.BEGIN_GUARD) { BeginGuardPhase(); gamePhase = GamePhase.GUARD; } else if(_gameAction == GameAction.FROM_HAND_TO_SOUL) { Card c = enemyHand.GetCardAtIndex(other1); Data.FillCardWithData(c, _cardID); enemyHand.RemoveFromHand(c); enemyField.AddToBindZone(c); c.TurnUp(); c.BindAnim(); /* FromHandToSoulCard = c; Vector3 newPos = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.VANGUARD); c.SetRotation(0,0,0); c.GoTo(newPos.x, newPos.y, newPos.z); c.TurnUp(); */ } else if(_gameAction == GameAction.FROM_HAND_TO_SOUL) { Card c = enemyHand.GetCardAtIndex(other1); Data.FillCardWithData(c, _cardID); FromHandToSoulCard = c; Vector3 newPos = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.VANGUARD); c.SetRotation(0,0,0); c.GoTo(newPos.x, newPos.y, newPos.z); c.TurnUp(); } else if(_gameAction == GameAction.REVEAL_TOP_CARD) { Card c = enemyDeck.TopCard(); Data.FillCardWithData(c, _cardID); c.TurnUp(); } else if(_gameAction == GameAction.HIDE_TOP_CARD) { enemyDeck.TopCard().TurnDown(); } else if(_gameAction == GameAction.TARGET_CARD) { Card c = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1)); c.IsTargetted(true); CardToAttack = c; } else if(_gameAction == GameAction.UNTARGET_CARD) { Card c = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1)); if(c != null) { c.IsTargetted(false); } } else if(_gameAction == GameAction.RIDE_FROM_SOUL) { Card c = enemyField.GetCardFromSoulByID(_cardID); if(c != null) { enemyField.RemoveFromSoul(c); enemyField.Ride(c); } } else if(_gameAction == GameAction.SELECT_ANIM_FIELD) { Card c = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1)); if(c != null) { c.DoSelectAnim(); } } else if(_gameAction == GameAction.OPPONENT_CALL_FROM_TOP_DECK) { bEffectOnGoing = true; dummyUnitObject.SetBool(1); dummyUnitObject.GetDeck().ViewDeck(1, SearchMode.TOP_CARD, other1, delegate(Game2DCard c) { return c._CardInfo.grade >= other2 && c._CardInfo.grade <= other3; }); } else if(_gameAction == GameAction.EVENT_END_BATTLE) { field.CheckAbilitiesEnemyTurn(CardState.EnemyBeginRide); } else if(_gameAction == GameAction.EVENT_BEGIN_RIDEPHASE) { field.CheckAbilitiesEnemyTurn(CardState.EnemyEndBattle); } else if(_gameAction == GameAction.EVENT_BEGIN_ENDTURN) { //field.CheckAbilities(CardState.EnemyEndTurn); field.CheckBindZoneAbilities(CardState.EnemyEndTurn); bEndEvent = true; //bEnemyWaiting = true; } else if(_gameAction == GameAction.DISPLAY_WINDOW) { bOpponentWindow = true; bOpponentWindowMessage = str1; bEffectOnGoing = true; GameChat.AddChatMessage("ADMIN", "DISPLAY_WINDOW"); } else if(_gameAction == GameAction.PLAYER_ACCEPT) { LastOpponentWindow = OPPWINDOW.ACCEPT; } else if(_gameAction == GameAction.PLAYER_DENIED) { LastOpponentWindow = OPPWINDOW.DENIED; } else if(_gameAction == GameAction.BLOCK_NORMALRIDE) { bRideThisTurn = false; bEffectOnGoing = false; } else if(_gameAction == GameAction.RIDE_FROM_FIELD_OPP) { //Opponent performs a Ride on my field. Card c = field.GetCardAt(Util.TransformToPlayerField((fieldPositions)other1)); if(c != null) { field.RemoveFrom(c.pos); field.Ride (c, false); } } else if(_gameAction == GameAction.OPPONENT_RIDE_FROM_SOUL) { field.ViewSoul(1); _OppRideFromSoulEvent = true; } else if(_gameAction == GameAction.OPPONENT_DRAW) { playerHand.AddToHand(playerDeck.DrawCard()); SendPacket(GameAction.DRAW_FROM_DECK, 1); bEffectOnGoing = false; bEndEvent = true; } else if(_gameAction == GameAction.END_EVENT) { //bEffectOnGoing = false; if(ownerCardCallEvent != null) { ownerCardCallEvent.unitAbilities.EndEvent(other1); ownerCardCallEvent = null; } else { bEffectOnGoing = false; } } else if(_gameAction == GameAction.OPPONENT_RETIRE_UNIT) { _OppRetireUnitEvent = true; _GameHelper.CustomMessage("Choose one of your rear-guards, and retire it"); GameChat.SetTab(ChatTab.HELP); } else if(_gameAction == GameAction.MESSAGE) { GameChat.AddHelpMessage(str1); } }
public void CallAnimation(Card c) { if(c != null) { bCallEffectAnimation = true; CallEffectTimer = MaxTimeCallEffect; CallEffect_Scale = 8; CallEffect.renderer.material.color = new Color(CallEffect.renderer.material.color.r, CallEffect.renderer.material.color.b, CallEffect.renderer.material.color.g, 1); CallEffect.transform.localScale = new Vector3(CallEffect_Scale, 1, CallEffect_Scale); if(c.pos == fieldPositions.VANGUARD_CIRCLE || c.pos == fieldPositions.REAR_GUARD_CENTER) { //CallEffect.transform.position = c.GetGameObject().transform.position + new Vector3(0, -0.55f, 0); CallEffect.transform.position = fieldInfo.GetPosition((int)c.pos) + new Vector3(0, -0.55f, 0); } else { CallEffect.transform.position = c.GetGameObject().transform.position + new Vector3(0, -0.5f, 0); } } }
public void Call(Card card, fieldPositions pos) { _Game.SendGameChatMessage(card.name + ", Call!", ChatTab.GAME); _Game.UnitsCalled.Add(card); _Game.LastCall = card; //Reseting current status. ResetCard(card); card._Coord = CardCoord.FIELD; card.pos = pos; if(pos == fieldPositions.FRONT_GUARD_LEFT) { if(Left_Front != null) { AddToDropZone(RemoveFrom(pos)); } Left_Front = card; Left_Front.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.FRONT_GUARD_LEFT); Left_Front.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation(); FrontLeftPower.text = card.GetPower() + ""; } else if(pos == fieldPositions.FRONT_GUARD_RIGHT) { if(Right_Front != null) { Debug.Log("Adding to DropZone"); AddToDropZone(RemoveFrom(pos)); } Right_Front = card; Right_Front.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.FRONT_GUARD_RIGHT); Right_Front.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation(); FrontRightPower.text = card.GetPower() + ""; } else if(pos == fieldPositions.REAR_GUARD_CENTER) { if(Center_Rear != null) AddToDropZone(RemoveFrom(pos)); Center_Rear = card; Center_Rear.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_CENTER); Center_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation(); RearCenterPower.text = card.GetPower() + ""; } else if(pos == fieldPositions.REAR_GUARD_LEFT) { if(Left_Rear != null) AddToDropZone(RemoveFrom(pos)); Left_Rear = card; Left_Rear.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_LEFT); Left_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation(); RearLeftPower.text = card.GetPower() + ""; } else if(pos == fieldPositions.REAR_GUARD_RIGHT) { if(Right_Rear != null) AddToDropZone(RemoveFrom(pos)); Right_Rear = card; Right_Rear.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_RIGHT); Right_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation(); RearRightPower.text = card.GetPower() + ""; } card.CheckAbilities(CardState.Call); LastUnitCalled = card; CheckAbilities(CardState.Call_NotMe, card); CallAnimation(card); }