Esempio n. 1
0
    private void ab_MultiShot(ABC_character target1, ABC_character target2, ABC_character target3)
    {
        // Slightly weaker attack, does damage to multiple characters
        int outDmg1 = gameEnums.DiceRoll(1, 3, 0);
        int outDmg2 = gameEnums.DiceRoll(1, 3, 0);
        int outDmg3 = gameEnums.DiceRoll(1, 3, 0);

        if (target1 != null)
        {
            target1.TakeDamage(outDmg1);
            Debug.Log(myName + " attacked " + target1.myName + " for " + outDmg1);
        }
        if (target2 != null)
        {
            target2.TakeDamage(outDmg2);
            Debug.Log(myName + " attacked " + target2.myName + " for " + outDmg2);
        }
        if (target3 != null)
        {
            target3.TakeDamage(outDmg3);
            Debug.Log(myName + " attacked " + target3.myName + " for " + outDmg3);
        }
        ab_MultiShot_Cooldown = 0;
        return;
    }
Esempio n. 2
0
    private void ab_BiasAttack(ABC_character targetChar, int attackType)
    {
        // Bias attack
        int outDmg = gameEnums.DiceRoll(3, 3, 0);

        targetChar.TakeDamage(outDmg);

        // Since all three do the same thing, if statements here are purely aesthetic
        if (attackType == 0)
        {
            Debug.Log(myName + " used Forest's Wrath against " + targetChar.myName + " for " + outDmg);
            ab_ForestWrath_Cooldown = 0;
        }
        if (attackType == 1)
        {
            Debug.Log(myName + " used Natural Order against " + targetChar.myName + " for " + outDmg);
            ab_NaturalOrder_Cooldown = 0;
        }
        if (attackType == 2)
        {
            Debug.Log(myName + " used Plains' Reclamation against " + targetChar.myName + " for " + outDmg);
            ab_PlainReclamation_Cooldown = 0;
        }
        return;
    }
Esempio n. 3
0
    // Functions for each ability the character is capable of
    #region Abilities
    private void ab_baseAttack(ABC_character targetChar)
    {
        // Standard attack
        int outDmg = gameEnums.DiceRoll(1, 4, 0);

        targetChar.TakeDamage(outDmg);
        Debug.Log(myName + " attacked " + targetChar.myName + " for " + outDmg);
    }
Esempio n. 4
0
 public void RemoveCharacter(ABC_character deadChar)
 {
     // Called when a character is killed
     if (allCombatants.Contains(deadChar))
     {
         allCombatants.Remove(deadChar);
     }
 }
Esempio n. 5
0
 private void ab_HolyFury(ABC_character targetChar)
 {
     // Holy Fury attack only affects demons
     if (targetChar.myRace == gameEnums.charRaces.demon)
     {
         int outDmg = gameEnums.DiceRoll(4, 2, 0);
         targetChar.TakeDamage(outDmg);
         Debug.Log(myName + " used Holy Fury against " + targetChar.myName + " for " + outDmg);
     }
     ab_HolyFury_Cooldown = 0;
     ab_HolyFury_Uses--;
 }
Esempio n. 6
0
 private void ab_FlankingMove(ABC_character myTarget)
 {
     // If target rolls higher
     if (myTarget.mySaveRoll > (gameEnums.DiceRoll(1, 6, 0)))
     {
         // Flanking attack
         int outDmg = gameEnums.DiceRoll(2, 5, 0);
         myTarget.TakeDamage(outDmg);
         Debug.Log(myName + " flanked " + myTarget.myName + " for " + outDmg);
     }
     ab_FlankingMove_Cooldown = 0;
     ab_FlankingMove_Uses--;
 }
Esempio n. 7
0
    private void ab_Intimidate(ABC_character targetChar)
    {
        int rollDie = gameEnums.DiceRoll(1, 6, 0);

        ab_Intimidate_Cooldown = 0;
        if (rollDie > targetChar.mySaveRoll)
        {
            targetChar.isMissingTurn = true;
            Debug.Log(myName         = " successfully intimidated " + targetChar.myName);
        }
        else
        {
            Debug.Log(myName = " failed to intimidate " + targetChar.myName);
        }
        ab_Intimidate_Cooldown = 0;
        return;
    }
Esempio n. 8
0
    // Functions for each ability the character is capable of
    #region Abilities
    private void ab_baseAttack(ABC_character targetChar)
    {
        // Standard attack
        // Enraged will cause the if statement to trigger, doing double the normal damage
        int outDmg = gameEnums.DiceRoll(1, 5, 0);

        if (ab_IsEnraged)
        {
            targetChar.TakeDamage(outDmg * 2);
            Debug.Log(myName + " attacked " + targetChar.myName + " for " + outDmg);
        }
        else
        {
            targetChar.TakeDamage(outDmg);
            Debug.Log(myName + " attacked " + targetChar.myName + " for " + outDmg);
        }
        return;
    }
Esempio n. 9
0
    private void ab_TurnUndead(ABC_character targetChar)
    {
        // Roll to cause fear in the enemy, causing them to skip a turn
        int rollDie = gameEnums.DiceRoll(1, 6, 0);

        ab_TurnUndead_Cooldown = 0;
        if (rollDie > targetChar.mySaveRoll)
        {
            targetChar.isMissingTurn = true;
            Debug.Log(myName         = " successfully intimidated " + targetChar.myName);
        }
        else
        {
            Debug.Log(myName = " failed to intimidate " + targetChar.myName);
        }
        ab_TurnUndead_Cooldown = 0;
        return;
    }
Esempio n. 10
0
 private void ab_BlessedHeal(ABC_character targetChar)
 {
     // Blessed Heal will harm undead/demons but heal (negative damage) all else
     if ((targetChar.myRace == gameEnums.charRaces.undead) || (targetChar.myRace == gameEnums.charRaces.demon))
     {
         int outDmg = gameEnums.DiceRoll(1, 6, 0);
         targetChar.TakeDamage(outDmg);
         Debug.Log(myName + " Blessed Healed " + targetChar.myName + " for " + outDmg);
     }
     else
     {
         int outDmg = gameEnums.DiceRoll(1, 3, 0);
         targetChar.TakeDamage(-outDmg);
         Debug.Log(myName + " Blessed Healed " + targetChar.myName + " for " + outDmg);
     }
     ab_BlessedHealing_Cooldown = 0;
     return;
 }
Esempio n. 11
0
 private void ab_Smite(ABC_character targetChar)
 {
     // Does extra damage against bias, less damage against nonbias
     if ((targetChar.myRace == gameEnums.charRaces.undead) || (targetChar.myRace == gameEnums.charRaces.demon))
     {
         // Smite damage
         int outDmg = gameEnums.DiceRoll(1, 6, 0);
         targetChar.TakeDamage(outDmg);
         Debug.Log(myName + " smited " + targetChar.myName + " for " + outDmg);
     }
     else
     {
         // Smite fail damage
         int outDmg = gameEnums.DiceRoll(1, 3, 0);
         targetChar.TakeDamage(outDmg);
         Debug.Log(myName + " smited " + targetChar.myName + " for " + outDmg);
     }
     ab_Smite_Cooldown = 0;
     return;
 }
Esempio n. 12
0
 public void AddNewCharacter(ABC_character newChar)
 {
     // Called when a character is generated
     allCombatants.Add(newChar);
 }