public void setAtkAtt(ref AttackAtt attackName, float atkSpd, float phPercent, float maPercent, float atkPwr, int status, float chance, Ailment ailment)
 {
     //Function to specifically designate the values each hero will have to their individual attacks
     attackName.AtkSpd    = atkSpd;
     attackName.phPercent = phPercent;
     attackName.maPercent = maPercent;
     attackName.atkPwr    = atkPwr;
     attackName.status    = status;
     attackName.chance    = chance;
     attackName.ailment   = ailment;
 }
Esempio n. 2
0
    public float maAttackDamage(AttackAtt attackName, float affinity)
    {
        float atkPwr    = attackName.atkPwr;
        float maPercent = attackName.maPercent;
        float maAtkSqrt = MaAtk * MaAtk;

        float damage = atkPwr * (((maPercent * maAtkSqrt + 70) + 16) / 16);

        damage *= affinity;

        return(damage);
    }
Esempio n. 3
0
    public float phAttackDamage(AttackAtt attackName, float affinity)
    {
        float atkPwr    = attackName.atkPwr;
        float phPercent = attackName.phPercent;
        float phAtkSqrt = PhAtk * PhAtk;

        float damage = atkPwr * (((phPercent * phAtkSqrt + 70) + 16) / 16);

        damage *= affinity;

        return(damage);
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        heroClass.setName("Yazir");
        attributes     = GameObject.Find("CharacterAttributes");
        myUtility      = attributes.GetComponent <CharacterAttributes>().getAttackAtt("YazirUtility");
        myUltimate     = attributes.GetComponent <CharacterAttributes>().getAttackAtt("YazirUltimate");
        myNormal       = attributes.GetComponent <CharacterAttributes>().getAttackAtt("YazirNormal");
        mySpecial      = attributes.GetComponent <CharacterAttributes>().getAttackAtt("YazirSpecial");
        GameController = GameObject.Find("GameController");

        Self = GameObject.Find("Yazir");
        heroClass.setUIPosition(Self, actionMeter, ref myText, health);
        PlayerController = GameObject.Find("PlayerController");
        audioSource      = GetComponent <AudioSource>();
        anim             = GetComponentInChildren <Animator>();
    }
    void attackCommand(AttackAtt myAttack, Target[] targets, int targetNumber, DragonAttack attackName, GameObject prefab)
    {
        EnemyAttack attack;

        attack.phDamage     = damageModule.phAttackDamage(myAttack, 1.0f);
        attack.maDamage     = damageModule.maAttackDamage(myAttack, 1.0f);
        attack.attackName   = attackName;
        attack.targetNumber = targetNumber;
        attack.targets      = new Target[targetNumber];
        attack.ailment      = myAttack.ailment;
        attack.ailChance    = myAttack.chance;
        for (int i = 0; i < targetNumber; ++i)
        {
            attack.targets[i] = targets[i];
        }
        attack.prefab = prefab;
        GameController.GetComponent <GameController>().EnemyQueue.Enqueue(attack);
    }
 // Use this for initialization
 void Start()
 {
     damageModule.setAttribute(Attribute.PhysicalAttack, defaultPhAtk);
     damageModule.setAttribute(Attribute.MagicalAttack, defaultMaAtk);
     damageModule.setAttribute(Attribute.PhysicalDefense, defaultPhDef);
     damageModule.setAttribute(Attribute.MagicalDefense, defaultMaDef);
     damageModule.setAttribute(Attribute.Resistance, defaultRes);
     damageModule.setAttribute(Attribute.Speed, defaultSpd);
     damageModule.setWeakness(defaultElement);
     GameController = GameObject.Find("GameController");
     attributes     = GameObject.Find("CharacterAttributes");
     Self           = GameObject.Find("Dragon");
     myTailSwipe    = attributes.GetComponent <CharacterAttributes>().getAttackAtt("DragonTailSwipe");
     myFireball     = attributes.GetComponent <CharacterAttributes>().getAttackAtt("DragonFireball");
     myEarthquake   = attributes.GetComponent <CharacterAttributes>().getAttackAtt("DragonEarthquake");
     mySnotbomb     = attributes.GetComponent <CharacterAttributes>().getAttackAtt("DragonHaze");
     setDoomsdayTimer(doomsdayTimer);
     setHealthBar(Self, health);
     nextAttack = getRandomAttack();
     setPositions();
     resetAttackTimerPos();
     audioSource = GetComponent <AudioSource>();
     anim        = GetComponentInChildren <Animator>();
 }
Esempio n. 7
0
 void attackCommand(Text newText, string attackName, AttackAtt myAttack, Action action)
 {
     heroClass.attackCommand(GameController, myText, newText, attackName, myAttack, action, hero);
 }
Esempio n. 8
0
    public void attackCommand(GameObject GameController, Text myText, Text newText, string attackName, AttackAtt myAttack, Action action, Hero hero)
    {
        newText.text = getName() + attackName;
        Attack attack;

        attack.phDamage = getDamageModule().phAttackDamage(myAttack, 1.0f);
        attack.maDamage = getDamageModule().maAttackDamage(myAttack, 1.0f);
        attack.hero     = hero;
        attack.action   = action;
        GameController.GetComponent <GameController>().AttackQueue.Enqueue(attack);
        setAttackSpeed(myAttack);
        getActionPoints().usePoints();
    }
Esempio n. 9
0
 public void setAttackSpeed(AttackAtt myAttack)
 {
     attackSpeed = myAttack.AtkSpd;
 }