refactor: format project
This commit is contained in:
@@ -116,8 +116,8 @@ const std::map<std::pair<TowerType, TowerLevel>, TowerStats> TowerConstants = {
|
||||
};
|
||||
|
||||
const TowerStats* getTowerStats(TowerType type, TowerLevel level) {
|
||||
auto it = TowerConstants.find({type, level});
|
||||
if(it == TowerConstants.end()) return nullptr;
|
||||
auto it = TowerConstants.find({ type, level });
|
||||
if (it == TowerConstants.end()) return nullptr;
|
||||
return &it->second;
|
||||
}
|
||||
|
||||
@@ -251,30 +251,30 @@ void PoisonTower::tick(std::uint64_t delta, World* world) {
|
||||
if (m_Timer.update(delta)) {
|
||||
for (MobPtr mob : world->getMobList()) {
|
||||
if (isMobInRange(mob)) {
|
||||
if(getLevel().getPath() == TowerPath::Bottom){
|
||||
if (getLevel().getPath() == TowerPath::Bottom) {
|
||||
mob->damage(getStats()->getDamage(), this);
|
||||
}else{
|
||||
} else {
|
||||
float durationSec;
|
||||
switch(getLevel().getLevel()){
|
||||
case 1:
|
||||
durationSec = 5;
|
||||
break;
|
||||
switch (getLevel().getLevel()) {
|
||||
case 1:
|
||||
durationSec = 5;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
durationSec = 15;
|
||||
break;
|
||||
case 2:
|
||||
durationSec = 15;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
durationSec = 30;
|
||||
break;
|
||||
case 3:
|
||||
durationSec = 30;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
durationSec = 1e10; // about 3 million hours. It should be enough
|
||||
break;
|
||||
case 4:
|
||||
durationSec = 1e10; // about 3 million hours. It should be enough
|
||||
break;
|
||||
|
||||
default:
|
||||
durationSec = 0; // how did we get there ?
|
||||
break;
|
||||
default:
|
||||
durationSec = 0; // how did we get there ?
|
||||
break;
|
||||
}
|
||||
mob->addEffect(EffectType::Poison, durationSec, this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user