|
|
|
@ -212,6 +212,7 @@ RAMBank::RAMBank(PixelGameEngine*pge,vf2d pos,std::vector<std::unique_ptr<Render |
|
|
|
|
allocatorManager.colText = olc::WHITE; |
|
|
|
|
allocatorButton = new QuickGUI::ImageButton(allocatorManager,*IMAGES[UNIT_ALLOCATOR],{0.5f,0.5f},pos-vf2d{8,48},{20,20}); |
|
|
|
|
isRAMBank=true; |
|
|
|
|
platformStructure=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void RAMBank::Attack(Unit&victim,std::vector<std::shared_ptr<Unit>>&otherUnits ,std::vector<std::unique_ptr<Audio>>&SOUNDS){ |
|
|
|
@ -314,6 +315,7 @@ std::vector<Memory> _Platform::resourceCost={{HEALTH,6}}; |
|
|
|
|
_Platform::_Platform(PixelGameEngine*pge,vf2d pos,std::vector<std::unique_ptr<Renderable>>&IMAGES,bool friendly,bool moveable) |
|
|
|
|
:Unit(pge,_Platform::resourceCost,pos,24,*IMAGES[PLATFORM],CONSTANT::ATTACKER_TARGET_COL,CONSTANT::ATTACKER_ATTACK_COL,friendly,false){ |
|
|
|
|
isPlatform=true; |
|
|
|
|
platformStructure=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void _Platform::Attack(Unit&victim,std::vector<std::shared_ptr<Unit>>&otherUnits ,std::vector<std::unique_ptr<Audio>>&SOUNDS){}; |
|
|
|
@ -360,7 +362,9 @@ std::string Refresher::unitDescription="Repairs missing bits to surrounding unit |
|
|
|
|
std::vector<Memory> Refresher::resourceCost={{ATKSPD,3},{RANGE,1},{PROCEDURE,8},{HEALTH,4}}; |
|
|
|
|
Refresher::Refresher(PixelGameEngine*pge,vf2d pos,std::vector<std::unique_ptr<Renderable>>&IMAGES,bool friendly,bool moveable) |
|
|
|
|
:Unit(pge,Refresher::resourceCost,pos,24,*IMAGES[REFRESHER],CONSTANT::ATTACKER_TARGET_COL,CONSTANT::ATTACKER_ATTACK_COL,friendly,false |
|
|
|
|
,true,false){} |
|
|
|
|
,true,false){ |
|
|
|
|
platformStructure=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Refresher::Attack(Unit&victim,std::vector<std::shared_ptr<Unit>>&otherUnits ,std::vector<std::unique_ptr<Audio>>&SOUNDS){ |
|
|
|
|
target.reset(); //Doesn't acquire a target.
|
|
|
|
@ -393,7 +397,9 @@ std::string Turret::unitName="Turret"; |
|
|
|
|
std::string Turret::unitDescription="Automatically targets attack and movement speed memory ranges before others."; |
|
|
|
|
std::vector<Memory> Turret::resourceCost={{ATKSPD,4},{RANGE,5},{HEALTH,6},{PROCEDURE,16}}; |
|
|
|
|
Turret::Turret(PixelGameEngine*pge,vf2d pos,std::vector<std::unique_ptr<Renderable>>&IMAGES,bool friendly,bool moveable) |
|
|
|
|
:Unit(pge,Turret::resourceCost,pos,24,*IMAGES[TURRET],CONSTANT::ATTACKER_TARGET_COL,CONSTANT::ATTACKER_ATTACK_COL,friendly,false){} |
|
|
|
|
:Unit(pge,Turret::resourceCost,pos,24,*IMAGES[TURRET],CONSTANT::ATTACKER_TARGET_COL,CONSTANT::ATTACKER_ATTACK_COL,friendly,false){ |
|
|
|
|
platformStructure=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Turret::Attack(Unit&victim,std::vector<std::shared_ptr<Unit>>&otherUnits ,std::vector<std::unique_ptr<Audio>>&SOUNDS){ |
|
|
|
|
if(victim.GetMoveSpd()>0){ |
|
|
|
@ -438,7 +444,9 @@ std::string MemoryGuard::unitDescription="Reduces the chance of bit modification |
|
|
|
|
std::vector<Memory> MemoryGuard::resourceCost={{HEALTH,10},{ATKSPD,4},{RANGE,4},{PROCEDURE,12}}; |
|
|
|
|
MemoryGuard::MemoryGuard(PixelGameEngine*pge,vf2d pos,std::vector<std::unique_ptr<Renderable>>&IMAGES,bool friendly,bool moveable) |
|
|
|
|
:Unit(pge,MemoryGuard::resourceCost,pos,24,*IMAGES[MEMORY_GUARD],CONSTANT::ATTACKER_TARGET_COL,CONSTANT::ATTACKER_ATTACK_COL,friendly,false |
|
|
|
|
,true,false){} |
|
|
|
|
,true,false){ |
|
|
|
|
platformStructure=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MemoryGuard::Attack(Unit&victim,std::vector<std::shared_ptr<Unit>>&otherUnits ,std::vector<std::unique_ptr<Audio>>&SOUNDS){ |
|
|
|
|
target.reset(); //Doesn't acquire a target.
|
|
|
|
@ -1126,3 +1134,7 @@ Unit*Unit::GetBuildUnit(){ |
|
|
|
|
bool Unit::IsRAMBank(){ |
|
|
|
|
return isRAMBank; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool Unit::IsPlatformStructure(){ |
|
|
|
|
return platformStructure; |
|
|
|
|
} |