예제 #1
0
    public void TriggerTrap(MapSquare mapSquare)
    {
        switch (trapType)
        {
        case TrapTypes.DirectDamage:
            FindObjectOfType <MapData>().GetRunner().TakeDamageFromMap(trapAmount);
            isActive = false;
            break;

        case TrapTypes.NeurotoxinCloud:
        case TrapTypes.ElectrifiedZone:
            FindObjectOfType <MapData>().GetRunner().TakeDamageFromMap(trapAmount);
            mapSquare.SetTriggeredTrapType(trapType, trapAmount);
            isActive = false;
            break;

        case TrapTypes.Spam:
            for (int i = 0; i < trapAmount; i++)
            {
                FindObjectOfType <MapData>().AddToTemporaryCardIds(209);
            }
            isActive = false;
            break;

        case TrapTypes.MalwareInjection:
            for (int i = 0; i < trapAmount; i++)
            {
                FindObjectOfType <MapData>().AddToTemporaryCardIds(210);
            }
            isActive = false;
            break;

        case TrapTypes.FaradayCage:
        case TrapTypes.ParalysisAgent:
        case TrapTypes.ConcussiveBlast:
            mapSquare.SetTriggeredTrapType(trapType);
            isActive = false;
            break;

        case TrapTypes.EMP:
        case TrapTypes.RustAgent:
        case TrapTypes.NerveGas:
            mapSquare.SetTriggeredTrapType(trapType, trapAmount);
            isActive = false;
            break;
        }
    }