125 lines
2.7 KiB
C#
125 lines
2.7 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace Programmation_objet_TLESIO21.projet {
|
|||
|
public abstract class Pokemon {
|
|||
|
private readonly string Name;
|
|||
|
private Type Type;
|
|||
|
private Nature Nature;
|
|||
|
private int PV;
|
|||
|
private int PC;
|
|||
|
private int ATKPhys;
|
|||
|
private int ATKSpe;
|
|||
|
private int DEFPhys;
|
|||
|
private int DEFSpe;
|
|||
|
private int Speed;
|
|||
|
|
|||
|
public Pokemon(string Name, int PV, int ATKPhys, int ATKSpe, int DEFPhys, int DEFSpe, int Speed) {
|
|||
|
this.Name = Name;
|
|||
|
this.PV = PV;
|
|||
|
this.ATKPhys = ATKPhys;
|
|||
|
this.ATKSpe = ATKSpe;
|
|||
|
this.DEFPhys = DEFPhys;
|
|||
|
this.DEFSpe = DEFSpe;
|
|||
|
this.Speed = Speed;
|
|||
|
}
|
|||
|
|
|||
|
public virtual void PhysAttack(Pokemon cible) {
|
|||
|
}
|
|||
|
|
|||
|
public virtual void SpeAttack(Pokemon cible) {
|
|||
|
}
|
|||
|
|
|||
|
public void getDamage(int d) {
|
|||
|
this.PV -= d;
|
|||
|
}
|
|||
|
|
|||
|
public Boolean hasEnoughtPC() {
|
|||
|
return (this.getPC() > 0);
|
|||
|
}
|
|||
|
|
|||
|
public Boolean isAlive() {
|
|||
|
return (this.getPV() > 0);
|
|||
|
}
|
|||
|
|
|||
|
public override string ToString() {
|
|||
|
return this.getName() + " - PV : " + getPV() + ", PC = " + getPC();
|
|||
|
}
|
|||
|
|
|||
|
public void setPV(int pv) {
|
|||
|
this.PV = pv;
|
|||
|
}
|
|||
|
|
|||
|
internal void setPC(int pc) {
|
|||
|
this.PC = pc;
|
|||
|
}
|
|||
|
|
|||
|
internal void setType(Type t) {
|
|||
|
this.Type = t;
|
|||
|
}
|
|||
|
|
|||
|
public void setATKPhys(int atk) {
|
|||
|
this.ATKPhys = atk;
|
|||
|
}
|
|||
|
|
|||
|
public void setATKSpe(int atk) {
|
|||
|
this.ATKSpe = atk;
|
|||
|
}
|
|||
|
|
|||
|
public void setDefPhys(int def) {
|
|||
|
this.DEFPhys = def;
|
|||
|
}
|
|||
|
|
|||
|
public void setDefSpe(int def) {
|
|||
|
this.DEFSpe = def;
|
|||
|
}
|
|||
|
|
|||
|
public void setSpeed(int speed) {
|
|||
|
this.Speed = speed;
|
|||
|
}
|
|||
|
|
|||
|
public String getName() {
|
|||
|
return this.Name;
|
|||
|
}
|
|||
|
|
|||
|
public Type getType() {
|
|||
|
return this.Type;
|
|||
|
}
|
|||
|
|
|||
|
public Nature GetNature() {
|
|||
|
return this.Nature;
|
|||
|
}
|
|||
|
|
|||
|
public int getPV() {
|
|||
|
return this.PV;
|
|||
|
}
|
|||
|
|
|||
|
public int getPC() {
|
|||
|
return this.PC;
|
|||
|
}
|
|||
|
|
|||
|
public int getATKPhys() {
|
|||
|
return this.ATKPhys;
|
|||
|
}
|
|||
|
|
|||
|
public int getATKSpe() {
|
|||
|
return this.ATKSpe;
|
|||
|
}
|
|||
|
|
|||
|
public int getDEFPhys() {
|
|||
|
return this.DEFPhys;
|
|||
|
}
|
|||
|
|
|||
|
public int getDEFSpe() {
|
|||
|
return this.DEFSpe;
|
|||
|
}
|
|||
|
|
|||
|
public int getSpeed() {
|
|||
|
return this.Speed;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|