static public void BattleBuddiesIon(GameObject current_card, Player_Behavior combatant) { List <GameObject> playfield = combatant.GetPlayField().GetComponent <SP_CardPile>().GetCardsInCardPile(); foreach (GameObject card in playfield) { CQBCard cardCharacteristics = card.GetComponent <CQBCard>(); if (card.GetComponent <CardModifier>().GetModifier() == Modifiers.CardModifiers.BattleBuddiesAssault && !cardCharacteristics.IsBuddy()) //////////////////////////////////// { int AssaultIndex = card.transform.GetSiblingIndex(); int AssaultSiblingIndex = card.transform.GetSiblingIndex() + 1; int IonIndex = current_card.transform.GetSiblingIndex(); CQBCard currentCharacteristics = current_card.GetComponent <CQBCard>(); GameObject IonSibling = combatant.GetHand().gameObject.transform.GetChild(AssaultSiblingIndex).gameObject; currentCharacteristics.ActivatePositiveSymbol(); currentCharacteristics.ActivatePositiveCost(currentCharacteristics.GetCurrentPower() + 3); currentCharacteristics.SetBuddy(); cardCharacteristics.ActivatePositiveSymbol(); cardCharacteristics.ActivatePositiveCost(cardCharacteristics.GetCurrentPower() + 3); cardCharacteristics.SetBuddy(); if (AssaultSiblingIndex != IonIndex) { AssaultSiblingIndex = IonIndex; IonIndex = AssaultIndex + 1; IonSibling.transform.SetSiblingIndex(AssaultSiblingIndex); current_card.transform.SetSiblingIndex(IonIndex); } } } }
static public void Anti_Capital(Player_Behavior opponent) { List <GameObject> opponentPlayfield = opponent.GetPlayField().GetComponent <SP_CardPile>().GetCardsInCardPile(); foreach (GameObject card in opponentPlayfield) { CQBCard cardCharacteristics = card.GetComponent <CQBCard>(); if (cardCharacteristics.GetUnitType() == CQBCard.UnitType.CAPITAL) { cardCharacteristics.SetPower(cardCharacteristics.GetCurrentPower() / 3); return; } } }
static public void Bomber(Player_Behavior opponent) { List <GameObject> opponentPlayfield = opponent.GetPlayField().GetComponent <SP_CardPile>().GetCardsInCardPile(); foreach (GameObject card in opponentPlayfield) { CQBCard cardCharacteristics = card.GetComponent <CQBCard>(); if (cardCharacteristics.GetUnitType() == CQBCard.UnitType.FRIGATE && !cardCharacteristics.GetDebuff()) { cardCharacteristics.SetPower(cardCharacteristics.GetCurrentPower() / 2); cardCharacteristics.SetDebuff(); return; } } }