Ejemplo n.º 1
0
        public void Damage(Attack.attackName attack, EnergyType.energyTypeName energyTypeAttackingPok)
        {
            if (weakness.Energytype == energyTypeAttackingPok)
            {
                double damage = (int)attack * weakness.Multiplier;
                Health = Health - damage;
            }
            else if (resistance.Energytype == energyTypeAttackingPok)
            {
                double damage = (int)attack - resistance.Value1;
                Health = Health - damage;
            }
            else
            {
                Health = Health - (int)attack;
            }

            if (Health <= 0)
            {
                isAlive = false;
            }
        }
Ejemplo n.º 2
0
 private void charmeleonAttack2Btn_Click(object sender, EventArgs e)
 {
     charmeleonAttack2Btn.BackColor = Color.Green;
     attacking = charmeleon.Attacks[1];
     charmeleonAttack2Btn.Enabled = false;
 }
Ejemplo n.º 3
0
 public void Attack(Attack.attackName attack, EnergyType.energyTypeName energyTypeAttackingPok)
 {
     Damage(attack, energyTypeAttackingPok);
 }
Ejemplo n.º 4
0
 private void pikachuAttack2Btn_Click(object sender, EventArgs e)
 {
     pikachuAttack2Btn.BackColor = Color.Green;
     attacking = pikachu.Attacks[1];
     pikachuAttack2Btn.Enabled = false;
 }