Exemple #1
0
    public static object getWeaponInfo(CombatEntity c, string Name)
    {
        if (c.getInfo("Weapon") == null)
        {
            return(null);
        }
        Weapons w = new Weapons((int)c.getInfo("Weapon"));

        return(w.getInfo(Name));
    }
Exemple #2
0
    public static void VAMPIRE(int bonus, CombatEntity Attacker)
    {
        float percentage = 100f;
        int   value      = (int)Math.Round(bonus * percentage / 100);

        if (((int)Attacker.getInfo("CHealth") + value) < (int)Attacker.getInfo("MHealth"))
        {
            Attacker.changeValue("CHealth", value);
        }
        else
        {
            Attacker.setValue("CHealth", (int)Attacker.getInfo("MHealth"));
        }
    }
Exemple #3
0
    public static void QueueIPP(CombatEntity c, List <CombatEntity> l)
    {
        //int IPP =  ((+Agi*x) + Class ID*y + Level*z + (1-Element ID*n) + IPPP (belong to weapon) )
        int    IPP           = (((int)c.getInfo("Agi")) * 1 + ((int)c.getInfo("Class")) * 1 + ((int)c.getInfo("Level")) * 1 + (1 - ((int)c.getInfo("Element") * 1)) + (int)Weapons.getWeaponInfo(c, "IPPP"));///(difference);
        int    sortCompleted = 0;
        string name          = (string)c.getInfo("Name");

        for (int i = 0; i < l.Count; i++)
        {
            CombatEntity temp = l[i];
            if (name.Equals((string)temp.getInfo("Name")))
            {
                l.Remove(l[i]);
            }
        }
    }
Exemple #4
0
    public static void SLIPPERY(int bonus, CombatEntity Defender)
    {
        float percentage = 100f;
        int   value      = (int)Math.Round(bonus * percentage / 100);

        if (((int)Defender.getInfo("Accuracy") - value) > 0)
        {
            Defender.changeValue("Accuracy", -value);
        }
        else
        {
            Defender.setValue("Accuracy", 0);
        }
    }
Exemple #5
0
    public static void CRITICAL(int bonus, CombatEntity Attacker)
    {
        float percentage = 100f;
        int   value      = (int)Math.Round(bonus * percentage / 100);

        if (((int)Attacker.getInfo("Crit") + value) < 100)
        {
            Attacker.changeValue("Crit", value);
        }
        else
        {
            Attacker.setValue("Crit", value);
        }
    }
Exemple #6
0
    public static int elementVersus(CombatEntity Attacker, CombatEntity Defender, int damage)
    {
        int ATKE  = (int)Attacker.getInfo("Element");
        int DEFE  = (int)Defender.getInfo("Element");
        int bonus = damage * BONUS[ATKE, DEFE];

        Debug.Log(bonus);
        if (bonus > 0)
        {
            if (ATKE == (int)Elements.WOOD)
            {
                ElementMethods[ATKE](bonus, Attacker);
            }
            else
            {
                ElementMethods[ATKE](bonus, Defender);
            }
        }
        return(bonus);
    }