debut gameManager
This commit is contained in:
59
projet/Types/PokemonBug.cs
Normal file
59
projet/Types/PokemonBug.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonBug : Pokemon {
|
||||
|
||||
public PokemonBug(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(92);
|
||||
this.setType(Type.BUG);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.POISON) ||
|
||||
cible.getType().Equals(Type.GHOST) ||
|
||||
cible.getType().Equals(Type.FLYING)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.DARK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if (cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.POISON) ||
|
||||
cible.getType().Equals(Type.GHOST) ||
|
||||
cible.getType().Equals(Type.FLYING)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.DARK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
49
projet/Types/PokemonDark.cs
Normal file
49
projet/Types/PokemonDark.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonDark : Pokemon {
|
||||
|
||||
public PokemonDark(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(95);
|
||||
this.setType(Type.DARK);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 4);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.DARK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.GHOST)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if (cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.DARK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.GHOST)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
49
projet/Types/PokemonDragon.cs
Normal file
49
projet/Types/PokemonDragon.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonDragon : Pokemon {
|
||||
|
||||
public PokemonDragon(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(125);
|
||||
this.setType(Type.DRAGON);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.FAIRY)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.DRAGON)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if (cible.getType().Equals(Type.FAIRY)) {
|
||||
damage = 0;
|
||||
}
|
||||
if (damage > 0) {
|
||||
if (cible.getType().Equals(Type.STEEL)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.DRAGON)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
55
projet/Types/PokemonElectric.cs
Normal file
55
projet/Types/PokemonElectric.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonElectric : Pokemon {
|
||||
|
||||
public PokemonElectric(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(80);
|
||||
this.setType(Type.ELECTRIC);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.GROUND)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.WATER)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(cible.getType().Equals(Type.GROUND)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FLYING) ||
|
||||
cible.getType().Equals(Type.WATER)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
51
projet/Types/PokemonFairy.cs
Normal file
51
projet/Types/PokemonFairy.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonFairy : Pokemon {
|
||||
|
||||
public PokemonFairy(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(106);
|
||||
this.setType(Type.FAIRY);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.POISON)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.DARK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 4);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if (cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.POISON)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.DARK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
63
projet/Types/PokemonFighting.cs
Normal file
63
projet/Types/PokemonFighting.cs
Normal file
@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonFighting : Pokemon {
|
||||
|
||||
public PokemonFighting(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(102);
|
||||
this.setType(Type.FIGHTING);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 4);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.GHOST)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.FLYING) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.FAIRY)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.NORMAL) ||
|
||||
cible.getType().Equals(Type.DARK) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.ROCK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if (cible.getType().Equals(Type.GHOST)) {
|
||||
damage = 0;
|
||||
}
|
||||
if (damage > 0) {
|
||||
if (cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.FLYING) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.FAIRY)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.NORMAL) ||
|
||||
cible.getType().Equals(Type.DARK) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.ROCK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
54
projet/Types/PokemonFire.cs
Normal file
54
projet/Types/PokemonFire.cs
Normal file
@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonFire : Pokemon {
|
||||
public PokemonFire(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(100);
|
||||
this.setType(Type.FIRE);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ROCK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.STEEL)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ROCK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.STEEL)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
51
projet/Types/PokemonFlying.cs
Normal file
51
projet/Types/PokemonFlying.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonFlying : Pokemon {
|
||||
|
||||
public PokemonFlying(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(120);
|
||||
this.setType(Type.FLYING);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 4);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.GRASS)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if (cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.GRASS)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
51
projet/Types/PokemonGhost.cs
Normal file
51
projet/Types/PokemonGhost.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonGhost : Pokemon {
|
||||
|
||||
public PokemonGhost(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(80);
|
||||
this.setType(Type.GHOST);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.NORMAL)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DARK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.GHOST)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if (cible.getType().Equals(Type.NORMAL)) {
|
||||
damage = 0;
|
||||
}
|
||||
if (damage > 0) {
|
||||
if (cible.getType().Equals(Type.DARK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.PSYCHIC) ||
|
||||
cible.getType().Equals(Type.GHOST)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
58
projet/Types/PokemonGrass.cs
Normal file
58
projet/Types/PokemonGrass.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonGrass : Pokemon {
|
||||
public PokemonGrass(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(105);
|
||||
this.setType(Type.GRASS);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.POISON) ||
|
||||
cible.getType().Equals(Type.FLYING)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.GROUND)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.POISON) ||
|
||||
cible.getType().Equals(Type.FLYING)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.GROUND)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
57
projet/Types/PokemonGround.cs
Normal file
57
projet/Types/PokemonGround.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonGround : Pokemon {
|
||||
|
||||
public PokemonGround(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(110);
|
||||
this.setType(Type.ELECTRIC);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.FLYING)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.BUG) ||
|
||||
cible.getType().Equals(Type.GRASS)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.POISON) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 4);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(cible.getType().Equals(Type.FLYING)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FLYING) ||
|
||||
cible.getType().Equals(Type.WATER)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
55
projet/Types/PokemonIce.cs
Normal file
55
projet/Types/PokemonIce.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonIce : Pokemon {
|
||||
|
||||
public PokemonIce(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(85);
|
||||
this.setType(Type.ICE);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ICE)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.GROUND) ||
|
||||
cible.getType().Equals(Type.FLYING)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if (damage > 0) {
|
||||
if (cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ICE)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.GRASS) ||
|
||||
cible.getType().Equals(Type.GROUND) ||
|
||||
cible.getType().Equals(Type.FLYING)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
43
projet/Types/PokemonNormal.cs
Normal file
43
projet/Types/PokemonNormal.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonNormal : Pokemon {
|
||||
|
||||
public PokemonNormal(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(90);
|
||||
this.setType(Type.NORMAL);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.GHOST)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) || cible.getType().Equals(Type.ROCK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(cible.getType().Equals(Type.GHOST)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) || cible.getType().Equals(Type.ROCK)) {
|
||||
damage /= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
57
projet/Types/PokemonPoison.cs
Normal file
57
projet/Types/PokemonPoison.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonPoison : Pokemon {
|
||||
|
||||
public PokemonPoison(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(110);
|
||||
this.setType(Type.POISON);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.STEEL)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.POISON) ||
|
||||
cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.GROUND) ||
|
||||
cible.getType().Equals(Type.GHOST)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.GRASS)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if (cible.getType().Equals(Type.STEEL)) {
|
||||
damage = 0;
|
||||
}
|
||||
if (damage > 0) {
|
||||
if (cible.getType().Equals(Type.POISON) ||
|
||||
cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.GROUND) ||
|
||||
cible.getType().Equals(Type.GHOST)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.GRASS)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
53
projet/Types/PokemonPsychic.cs
Normal file
53
projet/Types/PokemonPsychic.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonPsychic: Pokemon {
|
||||
|
||||
public PokemonPsychic(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(80);
|
||||
this.setType(Type.PSYCHIC);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 1);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(cible.getType().Equals(Type.DARK)) {
|
||||
damage = 0;
|
||||
}
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.PSYCHIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.POISON)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if (cible.getType().Equals(Type.DARK)) {
|
||||
damage = 0;
|
||||
}
|
||||
if (damage > 0) {
|
||||
if (cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.PSYCHIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.POISON)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
51
projet/Types/PokemonRock.cs
Normal file
51
projet/Types/PokemonRock.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonRock : Pokemon {
|
||||
|
||||
public PokemonRock(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(105);
|
||||
this.setType(Type.ROCK);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 4);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.GROUND)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.BUG)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.FIGHTING) ||
|
||||
cible.getType().Equals(Type.GROUND)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.BUG)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
53
projet/Types/PokemonSteel.cs
Normal file
53
projet/Types/PokemonSteel.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonSteel : Pokemon {
|
||||
|
||||
public PokemonSteel(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(105);
|
||||
this.setType(Type.STEEL);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.ROCK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if (cible.getType().Equals(Type.STEEL) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ELECTRIC)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if (cible.getType().Equals(Type.FAIRY) ||
|
||||
cible.getType().Equals(Type.ICE) ||
|
||||
cible.getType().Equals(Type.ROCK)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
50
projet/Types/PokemonWater.cs
Normal file
50
projet/Types/PokemonWater.cs
Normal file
@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Programmation_objet_TLESIO21.projet {
|
||||
public class PokemonWater : Pokemon {
|
||||
public PokemonWater(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) : base(Name, PV, ATKPhys, ATKSpe, DEFPhys, DEFSpe, Speed) {
|
||||
base.setPC(90);
|
||||
this.setType(Type.WATER);
|
||||
}
|
||||
|
||||
public override void PhysAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 3);
|
||||
int damage = cible.getDEFPhys() - this.getATKPhys();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.GRASS)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.GROUND)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SpeAttack(Pokemon cible) {
|
||||
this.setPC(this.getPC() - 2);
|
||||
int damage = cible.getDEFSpe() - this.getATKSpe();
|
||||
if(damage > 0) {
|
||||
if(cible.getType().Equals(Type.DRAGON) ||
|
||||
cible.getType().Equals(Type.WATER) ||
|
||||
cible.getType().Equals(Type.GRASS)) {
|
||||
damage /= 2;
|
||||
}
|
||||
if(cible.getType().Equals(Type.FIRE) ||
|
||||
cible.getType().Equals(Type.ROCK) ||
|
||||
cible.getType().Equals(Type.GROUND)) {
|
||||
damage *= 2;
|
||||
}
|
||||
cible.getDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user