Example #1
0
 public override IEnumerator Process(GameObject caster, CardEffectsController effectController, List <GameObject> target, Card card, int effectIndex)
 {
     foreach (GameObject targ in target)
     {
         HealthController targetHealth = targ.GetComponent <HealthController>();
         effectController.GetCard().GetCard().SetTempEffectValue(targetHealth.GetBonusShield());
     }
     yield return(new WaitForSeconds(0));
 }
    public override IEnumerator Process(GameObject caster, CardEffectsController effectController, List <GameObject> target, Card card, int effectIndex)
    {
        string[] targetTag = new string[] { "Player", "Enemy" };
        int      size      = caster.GetComponent <HealthController>().size;

        switch (card.targetType[effectIndex])
        {
        case Card.TargetType.Enemy:
            targetTag = new string[] { "Enemy" };
            break;

        case Card.TargetType.AllEnemies:
            targetTag = new string[] { "Enemy" };
            break;

        case Card.TargetType.Player:
            targetTag = new string[] { "Player" };
            break;

        case Card.TargetType.AllPlayers:
            targetTag = new string[] { "Player" };
            break;

        case Card.TargetType.Any:
            targetTag = new string[] { "Player", "Enemy" };
            break;

        case Card.TargetType.Self:
            try
            {
                caster.GetComponent <EnemyController>();
                targetTag = new string[] { "Enemy" };
            }
            catch
            {
                targetTag = new string[] { "Player" };
            }
            break;

        default:
            targetTag = new string[] { "xxxxxxxxxxxxxxxx" };
            break;
        }
        List <GameObject> objects = GridController.gridController.GetObjectsInAoE(caster.transform.position, card.radius, targetTag);

        if (objects.Contains(caster))
        {
            objects.Remove(caster);
        }
        effectController.GetCard().GetCard().SetTempEffectValue(objects.Count);
        yield return(new WaitForSeconds(0));
    }
    public override void Process(GameObject caster, CardEffectsController effectController, GameObject target, Card card, int effectIndex)
    {
        HealthController targetHealth = target.GetComponent <HealthController>();

        if (card.effectValue[effectIndex] != 0)
        {
            targetHealth.ChangeAttack(card.effectValue[effectIndex]);
        }
        else
        {
            targetHealth.ChangeAttack(effectController.GetCard().GetTempEffectValue());
        }
    }
 public override IEnumerator Process(GameObject caster, CardEffectsController effectController, List <GameObject> target, Card card, int effectIndex)
 {
     foreach (GameObject targ in target)
     {
         HealthController targetHealth = targ.GetComponent <HealthController>();
         if (card.effectValue[effectIndex] != 0)
         {
             targetHealth.ChangeAttack(card.effectValue[effectIndex]);
         }
         else
         {
             targetHealth.ChangeAttack(effectController.GetCard().GetCard().GetTempEffectValue());
         }
     }
     yield return(new WaitForSeconds(0));
 }
Example #5
0
    public override void Process(GameObject caster, CardEffectsController effectController, GameObject target, Card card, int effectIndex)
    {
        HealthController targetHealth = target.GetComponent <HealthController>();

        effectController.GetCard().SetTempEffectValue(targetHealth.GetCurrentVit() - targetHealth.GetMaxVit());
    }