Whoops. Turn off that dang flashing bar. Also enemy units can only build to the memory limit.... As the rules are supposed to be.

master
sigonasr2 1 year ago
parent a034845557
commit 07c1a841d4
  1. 3
      olcCodeJam2023Entry/Scenario.cpp
  2. BIN
      olcCodeJam2023Entry/pge.wasm

@ -143,6 +143,7 @@ void Scenario::RunAI(Resources&enemy_resources,std::vector<std::shared_ptr<Colle
if(enemy_resources.range>0){enemy_resources.range=std::max(0,enemy_resources.range-totalCost);}else if(enemy_resources.range>0){enemy_resources.range=std::max(0,enemy_resources.range-totalCost);}else
{enemy_resources.procedure=std::max(0,enemy_resources.procedure-totalCost); {enemy_resources.procedure=std::max(0,enemy_resources.procedure-totalCost);
} }
availableMemory-=totalCost;
} }
} }
if(!u->IsFriendly()&&u->IsPlatform()){ if(!u->IsFriendly()&&u->IsPlatform()){
@ -174,6 +175,7 @@ void Scenario::RunAI(Resources&enemy_resources,std::vector<std::shared_ptr<Colle
if(enemy_resources.range>0){enemy_resources.range=std::max(0,enemy_resources.range-totalCost);}else if(enemy_resources.range>0){enemy_resources.range=std::max(0,enemy_resources.range-totalCost);}else
{enemy_resources.procedure=std::max(0,enemy_resources.procedure-totalCost); {enemy_resources.procedure=std::max(0,enemy_resources.procedure-totalCost);
} }
availableMemory-=totalCost;
} }
} }
switch(flags.difficulty){ switch(flags.difficulty){
@ -650,6 +652,7 @@ void Stage4::Update(){
state=6; state=6;
box.SetVisible(false); box.SetVisible(false);
flags.playerInControl=true; flags.playerInControl=true;
flags.flashMemoryBar=false;
} }
}break; }break;
case 6:{ case 6:{

Binary file not shown.
Loading…
Cancel
Save