Beispiel #1
0
    public bool critical(NPCData.CharAttacks attackid, float DEFDodge, float randNum)
    {
        if (randNum >= 99)
        {
            return(true);
        }
        // base dodge is 10 for regular races
        switch (attackid)
        {
        case NPCData.CharAttacks.PrecisionStrike:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.HoldLine:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.CombatManuevers:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ReachingAttack:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.BreakShield:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Charge:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.WarCry:
            return(false);

        case NPCData.CharAttacks.Disarm:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Meditation:
            return(false);

        case NPCData.CharAttacks.PalmStrike:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.FluidStance:
            return(false);

        case NPCData.CharAttacks.UnexpectedGrapple:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.HulkingPotion:
            return(false);

        case NPCData.CharAttacks.ArousingFumes:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.PoisonDarts:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.SmokeBombs:
            return(false);

        case NPCData.CharAttacks.ConcussiveStrike:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.FoulPlay:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.PoisonDagger:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ShadowStrike:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.HitAndRun:
            return(false);

        case NPCData.CharAttacks.CloackAndDagger:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.SexyDistraction:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Smite:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.DivineFavor:
            return(false);

        case NPCData.CharAttacks.Banish:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.HealingPrayer:
            return(false);

        case NPCData.CharAttacks.Temptation:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.LifeSteal:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.DarkIntervention:
            return(false);

        case NPCData.CharAttacks.MindVision:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.FeralCry:
            return(false);

        case NPCData.CharAttacks.PinDown:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.InescapableGrab:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.DominantPresence:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.RecklessCharge:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.MercilessAttack:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.BleedingSwipe:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Taunt:
            return(false);

        case NPCData.CharAttacks.ArrowTraps:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Ambush:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.TacticalRetreat:
            return(false);

        case NPCData.CharAttacks.Decoy:
            return(false);

        case NPCData.CharAttacks.TakeAim:
            return(false);

        case NPCData.CharAttacks.Headshot:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.DoubleShot:
            if (randNum > 90 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.SupressingFire:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.LitanyOfPain:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ImplacableSermon:
            return(false);

        case NPCData.CharAttacks.Scourge:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.IronResolve:
            return(false);

        case NPCData.CharAttacks.StunningBlow:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ShieldWall:
            return(false);

        case NPCData.CharAttacks.PepperGrenade:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ShieldCharge:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ElegantStance:
            return(false);

        case NPCData.CharAttacks.HypnoticDance:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.GraciousAttack:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.RiskyPerformance:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Striptease:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.CrotchGrab:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ForcedKissing:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.IndecentSmile:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Concentration:
            return(false);

        case NPCData.CharAttacks.ProtectiveRitual:
            return(false);

        case NPCData.CharAttacks.Hex:
            return(false);

        case NPCData.CharAttacks.IronWill:
            return(false);

        case NPCData.CharAttacks.HuntersMusk:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.AlphasAura:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Rending:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.FeralBite:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.DemonicAura:
            return(false);

        case NPCData.CharAttacks.SuccubusTouch:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.EnticingShow:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Charm:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.HornyLeap:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.BouncyGrab:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.BunnyHump:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.MatingSeason:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.EquineCharge:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.WildRide:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.StallionsMusk:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ImpetiousKick:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Bash:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Slash:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.HardBlow:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.LoudSlap:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.PocketSand:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.TakeCover:
            return(false);

        case NPCData.CharAttacks.TripUp:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Fondling:
            if (randNum > 85 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.BodyShowoff:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.PlayfulChase:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.SelfSpanking:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.SeductiveGesture:
            return(false);

        case NPCData.CharAttacks.Heal:
            return(false);

        case NPCData.CharAttacks.IceSpikes:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.FireBall:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ElectricShock:
            if (randNum > 75 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.AirBlast:
            if (randNum > 70 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.Purification:
            return(false);

        case NPCData.CharAttacks.PerverseVisions:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.MagicBinds:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.EtherealHands:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        case NPCData.CharAttacks.ArousingWave:
            if (randNum > 80 + DEFDodge)
            {
                return(true);
            }
            return(false);

        default:
            return(false);
        }
    }
    public float attackCalculation(NPCData.CharAttacks attackid, int npcidATT, int npcidDEF, bool ATTAlly, float DEFPhys, float DEFLust, float DEFMag, float DEFDodge, float ATTPhys, float ATTLust, float ATTMent, float ATTMag, float accuracy, bool critical)
    {
        Debug.Log("DEFPhys is " + DEFPhys.ToString());
        Debug.Log("ATTphys is " + ATTPhys.ToString());
        damage     = 0f;
        critfail   = false;
        fail       = false;
        iterator  += 1;
        manaCost   = 0f;
        attackCost = 0f;
        Random.InitState(hashcode + WorldControl.day * System.DateTime.Now.Millisecond + iterator);
        if (DEFPhys > ATTPhys)
        {
            ATTPhys = 0.1f;
            DEFPhys = 0.0f;
        }

        switch (attackid)
        {
        case NPCData.CharAttacks.PrecisionStrike:
            if (critical)
            {
                damage = Random.Range(15f, 20f) * (Random.Range(1.5f, 2.0f) + (0.1f + (ATTPhys - DEFPhys)));                   // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(15f, 20f) * (0.5f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost += Random.Range(3, 7);
                fail        = true;
            }
            else
            {
                attackCost += Random.Range(7, 12);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.HoldLine:
            damage     = 0f;
            attackCost = 5f;
            break;

        case NPCData.CharAttacks.CombatManuevers:
            damage     = 0f;
            attackCost = 5f;
            break;

        case NPCData.CharAttacks.ReachingAttack:
            if (critical)
            {
                damage = Random.Range(10, 15) * (Random.Range(0.5f, 1f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 25)
            {
                damage = Random.Range(10, 15) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost += Random.Range(3, 7);
                fail        = true;
            }
            else
            {
                attackCost += Random.Range(7, 12);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.BreakShield:
            if (critical)
            {
                damage = Random.Range(25, 30) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(25, 30) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost += Random.Range(3, 7);
                fail        = true;
            }
            else
            {
                attackCost += Random.Range(7, 12);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.Charge:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.5f, 1f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 15)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost += Random.Range(3, 7);
                fail        = true;
            }
            else
            {
                attackCost += Random.Range(7, 12);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.WarCry:
            attackCost = Random.Range(-5f, -15f);
            break;

        case NPCData.CharAttacks.Disarm:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.Meditation:
            attackCost = Random.Range(-7f, -20f);
            break;

        case NPCData.CharAttacks.PalmStrike:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.FluidStance:
            break;

        case NPCData.CharAttacks.UnexpectedGrapple:
            if (critical)
            {
                damage = Random.Range(10, 15) * (Random.Range(0.35f, 0.7f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(10, 15) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.HulkingPotion:
            break;

        case NPCData.CharAttacks.ArousingFumes:
            break;

        case NPCData.CharAttacks.DebilitatingFumes:
            if (accuracy - DEFDodge >= 10 && accuracy - DEFDodge <= 20)
            {
                attackCost = Random.Range(5, 15);
                fail       = true;
            }
            else
            {
                attackCost += Random.Range(10, 20);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.PoisonDarts:
            if (critical)
            {
                damage = Random.Range(10, 15) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(7, 10);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(10, 15);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.SmokeBombs:
            break;

        case NPCData.CharAttacks.ConcussiveStrike:
            if (critical)
            {
                damage = Random.Range(10, 15) * (Random.Range(0.5f, 1f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.FoulPlay:
            if (critical)
            {
                damage = Random.Range(7, 20) * (Random.Range(0.35f, 0.9f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.PoisonDagger:
            if (critical)
            {
                damage = Random.Range(10, 20) * (Random.Range(0.6f, 1f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(10, 15) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.ShadowStrike:
            if (critical)
            {
                damage = Random.Range(25, 30) * (Random.Range(0.5f, 1f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(10, 15);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.HitAndRun:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.CloackAndDagger:
            if (critical)
            {
                damage = Random.Range(10, 15) * (Random.Range(0.3f, 0.7f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(10, 15) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(5, 12);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(10, 15);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.SexyDistraction:
            break;

        case NPCData.CharAttacks.Smite:
            if (critical)
            {
                damage = Random.Range(25, 30) * (Random.Range(0.3f, 0.6f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(20, 25) * (0.7f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(8, 12);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(12, 16);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.DivineFavor:
            break;

        case NPCData.CharAttacks.Banish:
            attackCost = 5f;
            if (critical)
            {
                damage = Random.Range(25, 30) * (Random.Range(0.25f, 1.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 45)
            {
                damage = Random.Range(20, 30) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost += Random.Range(5, 15);
                fail        = true;
            }
            else
            {
                attackCost += Random.Range(15, 20);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.HealingPrayer:
            attackCost = -5f;
            break;

        case NPCData.CharAttacks.Temptation:
            break;

        case NPCData.CharAttacks.LifeSteal:
            if (critical)
            {
                damage     = Random.Range(10, 20) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));           // max dmg or something
                attackCost = -damage;
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage     = Random.Range(5, 15) * (0.1f + (ATTPhys - DEFPhys));
                attackCost = -damage;
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.DarkIntervention:
            attackCost = 10f;
            break;

        case NPCData.CharAttacks.MindVision:
            attackCost = 10f;
            break;

        case NPCData.CharAttacks.FeralCry:
            break;

        case NPCData.CharAttacks.PinDown:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.InescapableGrab:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.DominantPresence:
            break;

        case NPCData.CharAttacks.RecklessCharge:
            if (critical)
            {
                damage = Random.Range(20f, 25f) * (Random.Range(0.5f, 0.8f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(20f, 25f) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.MercilessAttack:
            if (critical)
            {
                damage = Random.Range(15, 20) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(10, 15) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.BleedingSwipe:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.Taunt:
            break;

        case NPCData.CharAttacks.ArrowTraps:
            if (critical)
            {
                damage = Random.Range(15, 20) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.Ambush:
            if (critical)
            {
                damage = Random.Range(15, 25) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(15, 20);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(15, 25);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.TacticalRetreat:
            break;

        case NPCData.CharAttacks.Decoy:
            break;

        case NPCData.CharAttacks.TakeAim:
            break;

        case NPCData.CharAttacks.Headshot:
            if (critical)
            {
                damage = Random.Range(25, 30) * (Random.Range(0.5f, 1.5f) + (0.2f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(20, 30) * (0.2f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.DoubleShot:
            if (critical)
            {
                damage = Random.Range(20, 30) * (Random.Range(0.3f, 0.6f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.SupressingFire:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.2f, 0.4f) + (0.3f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(3, 8) * (0.3f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.LitanyOfPain:
            if (critical)
            {
                damage = Random.Range(12, 20) * (Random.Range(0.2f, 0.4f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(10, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.ImplacableSermon:
            break;

        case NPCData.CharAttacks.Scourge:
            attackCost = 5f;
            if (critical)
            {
                damage = Random.Range(10, 15) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(10, 15) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost += Random.Range(3, 7);
                fail        = true;
            }
            else
            {
                attackCost += Random.Range(5, 10);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.IronResolve:
            attackCost = 5f;
            break;

        case NPCData.CharAttacks.StunningBlow:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.ShieldWall:
            break;

        case NPCData.CharAttacks.PepperGrenade:
            attackCost = 5f;
            break;

        case NPCData.CharAttacks.ShieldCharge:
            if (critical)
            {
                damage = Random.Range(5, 10) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.ElegantStance:
            break;

        case NPCData.CharAttacks.HypnoticDance:
            break;

        case NPCData.CharAttacks.GraciousAttack:
            if (critical)
            {
                damage = Random.Range(15, 20) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.RiskyPerformance:
            break;

        case NPCData.CharAttacks.Striptease:
            break;

        case NPCData.CharAttacks.CrotchGrab:
            break;

        case NPCData.CharAttacks.ForcedKissing:
            break;

        case NPCData.CharAttacks.IndecentSmile:
            break;

        case NPCData.CharAttacks.Concentration:
            break;

        case NPCData.CharAttacks.ProtectiveRitual:
            break;

        case NPCData.CharAttacks.Hex:
            attackCost = 5f;
            Debug.Log("hex activated in phys damage with attackCost of " + attackCost);
            break;

        case NPCData.CharAttacks.IronWill:
            break;

        case NPCData.CharAttacks.HuntersMusk:
            break;

        case NPCData.CharAttacks.AlphasAura:
            attackCost = 5f;
            break;

        case NPCData.CharAttacks.Rending:
            if (critical)
            {
                damage = Random.Range(10, 15) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(5, 10) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.FeralBite:
            if (critical)
            {
                damage = Random.Range(20, 25) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 25)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.DemonicAura:
            break;

        case NPCData.CharAttacks.SuccubusTouch:
            break;

        case NPCData.CharAttacks.EnticingShow:
            break;

        case NPCData.CharAttacks.Charm:
            break;

        case NPCData.CharAttacks.HornyLeap:
            break;

        case NPCData.CharAttacks.BouncyGrab:
            break;

        case NPCData.CharAttacks.BunnyHump:
            break;

        case NPCData.CharAttacks.MatingSeason:
            break;

        case NPCData.CharAttacks.EquineCharge:
            if (critical)
            {
                damage = Random.Range(20, 30) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(20, 25) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(5, 15);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(15, 25);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.WildRide:
            attackCost = 5f;
            if (critical)
            {
                damage = Random.Range(20, 30) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(15, 25) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost += Random.Range(5, 10);
                fail        = true;
            }
            else
            {
                attackCost += Random.Range(15, 20);
                critfail    = true;
            }
            break;

        case NPCData.CharAttacks.StallionsMusk:
            break;

        case NPCData.CharAttacks.ImpetiousKick:
            if (critical)
            {
                damage = Random.Range(15, 30) * (Random.Range(0.3f, 0.6f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.Bash:
            if (critical)
            {
                damage = Random.Range(15, 20) * (Random.Range(0.25f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 20)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.Slash:
            if (critical)
            {
                damage = Random.Range(25, 30) * (Random.Range(0.5f, 0.8f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 40)
            {
                damage = Random.Range(20, 30) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 15)
            {
                attackCost = Random.Range(3, 10);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(10, 15);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.HardBlow:
            if (critical)
            {
                damage = Random.Range(15, 20) * (Random.Range(0.5f, 1f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 25)
            {
                damage = Random.Range(15, 20) * (0.1f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.LoudSlap:
            if (critical)
            {
                damage = Random.Range(10, 20) * (Random.Range(0.2f, 0.5f) + (0.1f + (ATTPhys - DEFPhys)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(10, 20) * (0.2f + (ATTPhys - DEFPhys));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                attackCost = Random.Range(3, 7);
                fail       = true;
            }
            else
            {
                attackCost = Random.Range(7, 12);
                critfail   = true;
            }
            break;

        case NPCData.CharAttacks.PocketSand:
            break;

        case NPCData.CharAttacks.TakeCover:
            break;

        case NPCData.CharAttacks.TripUp:
            break;

        case NPCData.CharAttacks.Fondling:
            break;

        case NPCData.CharAttacks.BodyShowoff:
            break;

        case NPCData.CharAttacks.PlayfulChase:
            break;

        case NPCData.CharAttacks.SelfSpanking:
            break;

        case NPCData.CharAttacks.SeductiveGesture:
            break;

        case NPCData.CharAttacks.Heal:
            manaCost   = 20f;
            attackCost = Random.Range(-10f, -25f);
            break;

        case NPCData.CharAttacks.IceSpikes:
            manaCost = 20f;
            if (critical)
            {
                damage = Random.Range(20, 25) * (Random.Range(0.3f, 0.6f) + (1f + (DEFMag + ATTMag)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(20, 25) * (1f + (DEFMag + ATTMag));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                fail = true;
            }
            else
            {
                critfail = true;
            }
            break;

        case NPCData.CharAttacks.FireBall:
            manaCost = 25;
            if (critical)
            {
                damage = Random.Range(20, 30) * (Random.Range(0.3f, 0.6f) + (1f + (DEFMag + ATTMag)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(20, 30) * (1f + (DEFMag + ATTMag));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                fail = true;
            }
            else
            {
                critfail = true;
            }
            break;

        case NPCData.CharAttacks.ElectricShock:
            manaCost = 15f;
            if (critical)
            {
                damage = Random.Range(15, 20) * (Random.Range(0.3f, 0.6f) + (1f + (DEFMag + ATTMag)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 30)
            {
                damage = Random.Range(15, 20) * (1f + (DEFMag + ATTMag));
            }
            else if (accuracy - DEFDodge >= 10)
            {
                fail = true;
            }
            else
            {
                critfail = true;
            }
            break;

        case NPCData.CharAttacks.AirBlast:
            manaCost = 10f;
            if (critical)
            {
                damage = Random.Range(10, 20) * (Random.Range(0.3f, 0.6f) + (1f + (DEFMag + ATTMag)));               // max dmg or something
                break;
            }
            else if (accuracy - DEFDodge >= 15)
            {
                damage = Random.Range(10, 20) * (1f + (DEFMag + ATTMag));
            }
            else if (accuracy - DEFDodge >= 5)
            {
                fail = true;
            }
            else
            {
                critfail = true;
            }
            break;

        case NPCData.CharAttacks.Purification:
            manaCost = 20f;
            break;

        case NPCData.CharAttacks.PerverseVisions:
            manaCost = 30f;
            break;

        case NPCData.CharAttacks.MagicBinds:
            manaCost = 15f;
            break;

        case NPCData.CharAttacks.EtherealHands:
            manaCost = 20f;
            break;

        case NPCData.CharAttacks.ArousingWave:
            manaCost = 15f;
            break;

        default:
            break;
        }

        //RECEIVING END, the one who suffers damage. loop through list with npcidDEF to change HP, lust, etc.
        if (ATTAlly)
        {
            i = 0;
            while (i < NPCCharList.CharMonster.Count)
            {
                if (NPCCharList.CharMonster [i].charID == npcidDEF)
                {
                    NPCCharList.CharMonster [i].currentHealth -= damage;
                    Debug.Log("mark 1 - damage = " + damage);
                    break;
                }
                i++;
            }
        }
        else if (npcidDEF >= 10000000)
        {
            i = 0;
            while (i < NPCCharList.CharRetainers.Count)
            {
                if (NPCCharList.CharRetainers [i].charID == npcidDEF)
                {
                    NPCCharList.CharRetainers [i].currentHealth -= damage;
                    Debug.Log("mark 2 - damage = " + damage);

                    break;
                }
                i++;
            }
        }
        else if (npcidDEF == 0)
        {
            GameControl.actualHealth -= damage;
            Debug.Log("mark 3 - damage = " + damage);
        }
        else
        {
            while (i < NPCCharList.CharFollower.Count)
            {
                if (NPCCharList.CharFollower [i].charID == npcidDEF)
                {
                    NPCCharList.CharFollower [i].currentHealth -= damage;
                    Debug.Log("mark 4 - damage = " + damage);

                    break;
                }
                i++;
            }
        }

        //ATTACKER loop through list with npcidaTT to change HP, lust, mana due to the cost of the skill
        if (ATTAlly && npcidATT >= 10000000)
        {
            i = 0;
            while (i < NPCCharList.CharRetainers.Count)
            {
                if (NPCCharList.CharRetainers [i].charID == npcidATT)
                {
                    Debug.Log("mark 5 - attack Cost= " + attackCost);

                    NPCCharList.CharRetainers [i].currentHealth -= attackCost;
                    if (NPCCharList.CharRetainers [i].currentMP < manaCost)
                    {
                        NPCCharList.CharRetainers [i].currentHealth += (NPCCharList.CharRetainers [i].currentMP - manaCost);
                        NPCCharList.CharRetainers [i].currentMP      = 0;
                    }
                    break;
                }
                i++;
            }
        }
        else if (ATTAlly && npcidATT == 0)
        {
            Debug.Log("mark 6 - attack Cost= " + attackCost);

            if (GameControl.actualMP < manaCost)
            {
                GameControl.actualHealth += (GameControl.actualMP - manaCost);
                GameControl.actualMP      = 0;
            }
            GameControl.actualHealth -= attackCost;
        }
        else if (ATTAlly)
        {
            i = 0;
            while (i < NPCCharList.CharFollower.Count)
            {
                if (NPCCharList.CharFollower [i].charID == npcidATT)
                {
                    Debug.Log("mark 7 - attack Cost= " + attackCost);

                    NPCCharList.CharFollower [i].currentHealth -= attackCost;
                    if (NPCCharList.CharFollower [i].currentMP < manaCost)
                    {
                        NPCCharList.CharFollower [i].currentHealth += (NPCCharList.CharFollower [i].currentMP - manaCost);
                        NPCCharList.CharFollower [i].currentMP      = 0;
                    }
                    break;
                }
                i++;
            }
        }
        else
        {
            i = 0;
            while (i < NPCCharList.CharMonster.Count)
            {
                if (NPCCharList.CharMonster [i].charID == npcidATT)
                {
                    Debug.Log("mark 8 - attack Cost= " + attackCost);

                    NPCCharList.CharMonster [i].currentHealth -= attackCost;
                    if (NPCCharList.CharMonster [i].currentMP < manaCost)
                    {
                        NPCCharList.CharMonster [i].currentHealth += (NPCCharList.CharMonster[i].currentMP - manaCost);
                        NPCCharList.CharMonster[i].currentMP       = 0;
                    }
                    break;
                }
                i++;
            }
        }



        if (fail || critfail)
        {
            Debug.Log("mark 9 - returning attack Cost = " + attackCost);
            return(attackCost);
        }
        Debug.Log("mark 10 - returning damage = " + damage);
        return(damage);
    }
    /// D////////////////////////////////////////
    public CombatEffects designEffects(NPCData.CharAttacks attackid, CombatEffects combatEffect)
    {
        switch (attackid)
        {
        case NPCData.CharAttacks.PrecisionStrike:
            break;

        case NPCData.CharAttacks.HoldLine:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = 0.3f;
            combatEffect.physDMG  = -0.15f;
            break;

        case NPCData.CharAttacks.CombatManuevers:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = -5;
            combatEffect.physDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.ReachingAttack:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = 5;
            combatEffect.physDEF  = 0.2f;
            break;

        case NPCData.CharAttacks.BreakShield:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.5f;
            break;

        case NPCData.CharAttacks.Charge:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = -10;

            break;

        case NPCData.CharAttacks.WarCry:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = 0.2f;
            combatEffect.physDEF  = -0.2f;
            combatEffect.dodge    = -5;
            break;

        case NPCData.CharAttacks.Disarm:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.5f;
            break;

        case NPCData.CharAttacks.Meditation:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = -5;
            combatEffect.physDEF  = 0.2f;
            break;

        case NPCData.CharAttacks.PalmStrike:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.2f;
            combatEffect.dodge    = -5;
            break;

        case NPCData.CharAttacks.FluidStance:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = 15;
            break;

        case NPCData.CharAttacks.UnexpectedGrapple:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.5f;
            combatEffect.dodge    = -10;
            break;

        case NPCData.CharAttacks.HulkingPotion:
            combatEffect.cooldown = Random.Range(3, 4);
            combatEffect.physDMG  = 0.5f;
            combatEffect.physDEF  = 0.5f;
            combatEffect.lustDEF  = -0.5f;
            break;

        case NPCData.CharAttacks.ArousingFumes:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustMod  = Random.Range(3, 10);
            combatEffect.lustDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.DebilitatingFumes:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDMG  = -0.2f;
            combatEffect.physDEF  = -0.2f;
            combatEffect.dodge    = -5;
            break;

        case NPCData.CharAttacks.PoisonDarts:
            combatEffect.cooldown  = Random.Range(2, 4);
            combatEffect.healthMod = Random.Range(-5, -10);
            break;

        case NPCData.CharAttacks.SmokeBombs:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = 20;
            break;

        case NPCData.CharAttacks.ConcussiveStrike:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.stunned  = true;
            break;

        case NPCData.CharAttacks.FoulPlay:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.2f;
            combatEffect.physDEF  = -0.2f;
            combatEffect.dodge    = -5;
            combatEffect.lustDEF  = 0.5f;
            break;

        case NPCData.CharAttacks.PoisonDagger:
            combatEffect.cooldown  = Random.Range(2, 4);
            combatEffect.healthMod = Random.Range(-5, -15);
            break;

        case NPCData.CharAttacks.ShadowStrike:
            break;

        case NPCData.CharAttacks.HitAndRun:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = 15;
            break;

        case NPCData.CharAttacks.CloackAndDagger:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = 5;
            break;

        case NPCData.CharAttacks.SexyDistraction:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = -5;

            break;

        case NPCData.CharAttacks.Smite:
            break;

        case NPCData.CharAttacks.DivineFavor:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = 0.4f;
            combatEffect.lustDEF  = 0.4f;
            break;

        case NPCData.CharAttacks.Banish:
            break;

        case NPCData.CharAttacks.HealingPrayer:
            combatEffect.cooldown  = Random.Range(2, 5);
            combatEffect.healthMod = Random.Range(3, 8);
            combatEffect.physDEF   = -0.2f;
            combatEffect.lustDEF   = -0.2f;
            break;

        case NPCData.CharAttacks.Temptation:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = -0.3f;
            break;

        case NPCData.CharAttacks.LifeSteal:
            break;

        case NPCData.CharAttacks.DarkIntervention:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.2f;
            combatEffect.physDEF  = -0.1f;
            combatEffect.lustDEF  = -0.1f;
            break;

        case NPCData.CharAttacks.MindVision:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustMod  = Random.Range(3, 7);
            combatEffect.lustDEF  = -0.1f;
            break;

        case NPCData.CharAttacks.FeralCry:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.2f;
            combatEffect.dodge    = -5;
            break;

        case NPCData.CharAttacks.PinDown:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = -0.3f;
            combatEffect.dodge    = -5;
            break;

        case NPCData.CharAttacks.InescapableGrab:
            break;

        case NPCData.CharAttacks.DominantPresence:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = 0.3f;
            combatEffect.lustDEF  = 0.3f;
            combatEffect.physDMG  = 0.3f;
            combatEffect.dodge    = -15;
            break;

        case NPCData.CharAttacks.RecklessCharge:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.MercilessAttack:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = -7;
            break;

        case NPCData.CharAttacks.BleedingSwipe:
            combatEffect.cooldown  = Random.Range(2, 4);
            combatEffect.healthMod = Random.Range(3, 8);
            combatEffect.dodge     = -3;
            break;

        case NPCData.CharAttacks.Taunt:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.4f;
            combatEffect.dodge    = -5;
            combatEffect.lustDEF  = 0.2f;
            break;

        case NPCData.CharAttacks.ArrowTraps:
            combatEffect.cooldown = Random.Range(2, 5);
            combatEffect.physDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.Ambush:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.stunned  = true;
            break;

        case NPCData.CharAttacks.TacticalRetreat:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDMG  = -0.5f;
            combatEffect.physDMG  = -0.5f;
            combatEffect.dodge    = 25;
            break;

        case NPCData.CharAttacks.Decoy:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.4f;
            combatEffect.physDEF  = 0.2f;
            combatEffect.lustDMG  = -0.4f;
            combatEffect.lustDEF  = 0.2f;
            break;

        case NPCData.CharAttacks.TakeAim:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.dodge    = -20;
            combatEffect.physDMG  = 0.3f;
            break;

        case NPCData.CharAttacks.Headshot:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.physDMG  = -0.3f;
            break;

        case NPCData.CharAttacks.DoubleShot:
            break;

        case NPCData.CharAttacks.SupressingFire:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.physDMG  = -0.4f;
            combatEffect.lustDMG  = -0.4f;
            break;

        case NPCData.CharAttacks.LitanyOfPain:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.5f;
            break;

        case NPCData.CharAttacks.ImplacableSermon:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.2f;
            combatEffect.lustDEF  = 0.5f;
            break;

        case NPCData.CharAttacks.Scourge:

            break;

        case NPCData.CharAttacks.IronResolve:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = 0.35f;
            combatEffect.lustDEF  = 0.35f;
            break;

        case NPCData.CharAttacks.StunningBlow:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.stunned  = true;
            break;

        case NPCData.CharAttacks.ShieldWall:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = 1f;
            combatEffect.lustDEF  = -0.4f;
            combatEffect.dodge    = -10;
            break;

        case NPCData.CharAttacks.PepperGrenade:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.3f;
            combatEffect.lustDMG  = -0.3f;
            break;

        case NPCData.CharAttacks.ShieldCharge:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = 0.3f;
            break;

        case NPCData.CharAttacks.ElegantStance:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.3f;
            combatEffect.lustDMG  = -0.3f;
            combatEffect.physDEF  = -0.5f;
            combatEffect.dodge    = 25;
            break;

        case NPCData.CharAttacks.HypnoticDance:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.stunned  = true;
            combatEffect.physDEF  = -0.3f;
            break;

        case NPCData.CharAttacks.GraciousAttack:
            break;

        case NPCData.CharAttacks.RiskyPerformance:

            break;

        case NPCData.CharAttacks.Striptease:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.CrotchGrab:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.ForcedKissing:
            break;

        case NPCData.CharAttacks.IndecentSmile:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = -0.5f;
            break;

        case NPCData.CharAttacks.Concentration:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.magDMG   = 0.4f;
            combatEffect.physDEF  = -0.2f;
            combatEffect.dodge    = -5;

            break;

        case NPCData.CharAttacks.ProtectiveRitual:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.2f;
            combatEffect.physDEF  = 0.4f;
            combatEffect.magDEF   = 0.4f;
            combatEffect.dodge    = -5;
            break;

        case NPCData.CharAttacks.Hex:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.magDEF   = -0.3f;
            combatEffect.dodge    = -7;
            break;

        case NPCData.CharAttacks.IronWill:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = 0.3f;
            combatEffect.magDEF   = 0.3f;
            combatEffect.dodge    = -7;
            break;

        case NPCData.CharAttacks.HuntersMusk:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = -0.4f;
            break;

        case NPCData.CharAttacks.AlphasAura:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.2f;
            combatEffect.lustDEF  = 0.2f;
            break;

        case NPCData.CharAttacks.Rending:

            break;

        case NPCData.CharAttacks.FeralBite:
            break;

        case NPCData.CharAttacks.DemonicAura:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = 0.3f;
            combatEffect.lustDMG  = 0.3f;
            break;

        case NPCData.CharAttacks.SuccubusTouch:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = 0.3f;
            break;

        case NPCData.CharAttacks.EnticingShow:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.2f;
            combatEffect.lustDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.Charm:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.stunned  = true;
            combatEffect.lustDEF  = -0.15f;
            break;

        case NPCData.CharAttacks.HornyLeap:
            combatEffect.cooldown = Random.Range(2, 6);
            combatEffect.lustDEF  = -0.1f;
            break;

        case NPCData.CharAttacks.BouncyGrab:

            break;

        case NPCData.CharAttacks.BunnyHump:

            break;

        case NPCData.CharAttacks.MatingSeason:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = -0.5f;
            break;

        case NPCData.CharAttacks.EquineCharge:
            break;

        case NPCData.CharAttacks.WildRide:

            break;

        case NPCData.CharAttacks.StallionsMusk:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = -0.2f;
            combatEffect.physDEF  = -0.2f;
            break;

        case NPCData.CharAttacks.ImpetiousKick:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.stunned  = true;
            break;

        case NPCData.CharAttacks.Bash:
            break;

        case NPCData.CharAttacks.Slash:
            break;

        case NPCData.CharAttacks.HardBlow:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.dodge    = -10;
            break;

        case NPCData.CharAttacks.LoudSlap:
            combatEffect.cooldown = 2;
            combatEffect.stunned  = true;
            break;

        case NPCData.CharAttacks.PocketSand:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.6f;
            break;

        case NPCData.CharAttacks.TakeCover:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = 0.8f;
            combatEffect.physDMG  = -0.5f;
            break;

        case NPCData.CharAttacks.TripUp:
            break;

        case NPCData.CharAttacks.Fondling:
            break;

        case NPCData.CharAttacks.BodyShowoff:

            break;

        case NPCData.CharAttacks.PlayfulChase:

            break;

        case NPCData.CharAttacks.SelfSpanking:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = 0.4f;
            break;

        case NPCData.CharAttacks.SeductiveGesture:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustDEF  = -0.6f;
            break;

        case NPCData.CharAttacks.Heal:
            combatEffect.cooldown = Random.Range(2, 7);
            combatEffect.physDEF  = -0.1f;
            break;

        case NPCData.CharAttacks.IceSpikes:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDEF  = -0.6f;
            combatEffect.lustDEF  = 0.3f;
            break;

        case NPCData.CharAttacks.FireBall:
            combatEffect.cooldown  = Random.Range(2, 4);
            combatEffect.healthMod = Random.Range(-4f, -8f);
            break;

        case NPCData.CharAttacks.ElectricShock:
            combatEffect.cooldown = Random.Range(2, 3);
            combatEffect.stunned  = true;
            break;

        case NPCData.CharAttacks.AirBlast:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.physDMG  = -0.3f;
            break;

        case NPCData.CharAttacks.Purification:
            combatEffect.cooldown = Random.Range(2, 7);
            combatEffect.physDEF  = -0.1f;
            break;

        case NPCData.CharAttacks.PerverseVisions:

            break;

        case NPCData.CharAttacks.MagicBinds:

            break;

        case NPCData.CharAttacks.EtherealHands:

            break;

        case NPCData.CharAttacks.ArousingWave:
            combatEffect.cooldown = Random.Range(2, 4);
            combatEffect.lustMod  = Random.Range(3, 7);
            break;

        default:
            break;
        }
        return(combatEffect);
    }
    // ATT retainer is if the Attacker (the one doing damage) is a retainer (so the MC side) or an enemy, this is relevant because retainers are in a different list than enemies
    public string attack(NPCData.CharAttacks attackid, int slotATT, int slotDEF, int npcidATT, int npcidDEF, bool ATTally, float DEFPhys, float DEFLust, float DEFMag, float DEFDodge, float ATTPhys, float ATTLust, float ATTMag, float ATTMent)
    {
        Debug.Log("start of AttackScript - attack");
        iterator += 1;
        Random.InitState(hashcode + WorldControl.day * System.DateTime.Now.Millisecond + iterator);
        accuracy = Random.Range(30, 100);          // also is accuracy for the attackdamage script

        if (combatEffects.effectAdd(attackid, accuracy, DEFDodge))
        {
            if (combatEffects.effectBuff(attackid, accuracy))
            {
                switch (slotATT)
                {
                case 0:
                    CombatScript.ch0Effects.Add(new CombatEffects());
                    CombatScript.ch0Effects [CombatScript.ch0Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch0Effects [CombatScript.ch0Effects.Count - 1]);
                    Debug.Log("AttackScript - attack: switch(slot) case 0");
                    break;

                case 1:
                    CombatScript.ch1Effects.Add(new CombatEffects());
                    CombatScript.ch1Effects [CombatScript.ch1Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch1Effects [CombatScript.ch1Effects.Count - 1]);
                    break;

                case 2:
                    CombatScript.ch2Effects.Add(new CombatEffects());
                    CombatScript.ch2Effects [CombatScript.ch2Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch2Effects [CombatScript.ch2Effects.Count - 1]);
                    break;

                case 3:
                    CombatScript.ch3Effects.Add(new CombatEffects());
                    CombatScript.ch3Effects [CombatScript.ch3Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch3Effects [CombatScript.ch3Effects.Count - 1]);
                    break;

                case 4:
                    CombatScript.ch4Effects.Add(new CombatEffects());
                    CombatScript.ch4Effects [CombatScript.ch4Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch4Effects [CombatScript.ch4Effects.Count - 1]);
                    break;

                case 5:
                    CombatScript.ch5Effects.Add(new CombatEffects());
                    CombatScript.ch5Effects [CombatScript.ch5Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch5Effects [CombatScript.ch5Effects.Count - 1]);
                    break;

                case 6:
                    CombatScript.ch6Effects.Add(new CombatEffects());
                    CombatScript.ch6Effects [CombatScript.ch6Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch6Effects [CombatScript.ch6Effects.Count - 1]);
                    break;

                case 7:
                    CombatScript.ch7Effects.Add(new CombatEffects());
                    CombatScript.ch7Effects [CombatScript.ch7Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch7Effects [CombatScript.ch7Effects.Count - 1]);
                    break;
                }
            }
            else
            {
                switch (slotDEF)
                {
                case 0:
                    CombatScript.ch0Effects.Add(new CombatEffects());
                    CombatScript.ch0Effects [CombatScript.ch0Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch0Effects [CombatScript.ch0Effects.Count - 1]);
                    Debug.Log("AttackScript - attack: switch(slot) case 0");
                    break;

                case 1:
                    CombatScript.ch1Effects.Add(new CombatEffects());
                    CombatScript.ch1Effects [CombatScript.ch1Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch1Effects [CombatScript.ch1Effects.Count - 1]);
                    break;

                case 2:
                    CombatScript.ch2Effects.Add(new CombatEffects());
                    CombatScript.ch2Effects [CombatScript.ch2Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch2Effects [CombatScript.ch2Effects.Count - 1]);
                    break;

                case 3:
                    CombatScript.ch3Effects.Add(new CombatEffects());
                    CombatScript.ch3Effects [CombatScript.ch3Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch3Effects [CombatScript.ch3Effects.Count - 1]);
                    break;

                case 4:
                    CombatScript.ch4Effects.Add(new CombatEffects());
                    CombatScript.ch4Effects [CombatScript.ch4Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch4Effects [CombatScript.ch4Effects.Count - 1]);
                    break;

                case 5:
                    CombatScript.ch5Effects.Add(new CombatEffects());
                    CombatScript.ch5Effects [CombatScript.ch5Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch5Effects [CombatScript.ch5Effects.Count - 1]);
                    break;

                case 6:
                    CombatScript.ch6Effects.Add(new CombatEffects());
                    CombatScript.ch6Effects [CombatScript.ch6Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch6Effects [CombatScript.ch6Effects.Count - 1]);
                    break;

                case 7:
                    CombatScript.ch7Effects.Add(new CombatEffects());
                    CombatScript.ch7Effects [CombatScript.ch7Effects.Count - 1] = combatEffects.designEffects(attackid, CombatScript.ch7Effects [CombatScript.ch7Effects.Count - 1]);
                    break;
                }
            }
        }



        bool  critical = attackCritical.critical(attackid, DEFDodge, accuracy);
        float physDMG;
        float lustDMG;

        physDMG = physDamage.attackCalculation(attackid, npcidATT, npcidDEF, ATTally, DEFPhys, DEFLust, DEFMag, DEFDodge, ATTPhys, ATTLust, ATTMent, ATTMag, accuracy, critical);
        lustDMG = lustDamage.attackCalculation(attackid, npcidATT, npcidDEF, ATTally, DEFPhys, DEFLust, DEFMag, DEFDodge, ATTPhys, ATTLust, ATTMag, ATTMent, accuracy, critical);

        if (ATTally)
        {
            return(attackText.attackTextAlly(attackid, npcidATT, npcidDEF, critical, physDMG, lustDMG, accuracy, slotATT, slotDEF, DEFDodge));
        }
        else
        {
            return(attackText.attackTextEnemy(attackid, npcidATT, npcidDEF, critical, physDMG, lustDMG, accuracy, slotATT, slotDEF, DEFDodge));
        }



        /*switch (attackid) {
         * case NPCData.CharAttacks.PrecisionStrike:
         *      physDMG = physDamage.attackCalculation(attackid, npcidATT, npcidDEF, ATTally, DEFPhys, DEFLust, DEFMag, DEFDodge, ATTPhys, ATTLust, ATTMent, ATTMag, accuracy, critical);
         *      lustDMG = lustDamage.attackCalculation(attackid, npcidATT, npcidDEF, ATTally, DEFPhys, DEFLust, DEFMag, DEFDodge, ATTPhys, ATTLust, ATTMag, ATTMent, accuracy, critical);
         *      return attackText.attackText(attackid, npcidATT, npcidDEF, critical, physDMG, lustDMG, accuracy, slotATT, slotDEF);
         * default:
         *      return "This is a bug in AttackScript, report it.";
         *
         * }*/
    }