|
|
|
@ -55,11 +55,11 @@ class Entity{ |
|
|
|
|
bool dumb=false; |
|
|
|
|
stats_t(pstats_t stats) { |
|
|
|
|
this->HP=stats.HP; |
|
|
|
|
this->maxHP=stats.maxHP; |
|
|
|
|
this->PP=stats.PP; |
|
|
|
|
this->maxPP=stats.maxPP; |
|
|
|
|
this->targetHP=stats.targetHP; |
|
|
|
|
this->targetPP=stats.targetPP; |
|
|
|
|
this->maxHP=stats.maxHP; |
|
|
|
|
this->maxPP=stats.maxPP; |
|
|
|
|
this->baseAtk=stats.baseAtk; |
|
|
|
|
this->speed=stats.speed; |
|
|
|
|
this->resistances=stats.resistances; |
|
|
|
@ -141,7 +141,7 @@ class Entity{ |
|
|
|
|
} |
|
|
|
|
//Use this for initializing enemies as it lets you specify an object.
|
|
|
|
|
Entity(Object*obj,pstats_t stats,std::vector<Battle::Move*>moveSet,std::vector<Item*>items={},int money=0,std::array<Item*,3>equipment={}) |
|
|
|
|
:obj(obj),stats({stats.HP,stats.PP,stats.targetHP,stats.targetPP,stats.maxHP,stats.maxPP,stats.baseAtk,stats.speed,stats.resistances,stats.damageReduction,stats.smart,stats.dumb}),equipment(equipment),moveSet(moveSet),inventory(items),money(money){ |
|
|
|
|
:obj(obj),stats({HP:stats.HP,maxHP:stats.maxHP,PP:stats.PP,maxPP:stats.maxPP,targetHP:stats.targetHP,targetPP:stats.targetPP,baseAtk:stats.baseAtk,speed:stats.speed,resistances:stats.resistances,damageReduction:stats.damageReduction,smart:stats.smart,dumb:stats.dumb}),equipment(equipment),moveSet(moveSet),inventory(items),money(money){ |
|
|
|
|
for (int i=0;i<4;i++) { |
|
|
|
|
this->stats.resistances[i]=stats.resistances[i]; |
|
|
|
|
} |
|
|
|
|