@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $this->onCombatEnd[] = [$this, "resetInitiative"]; |
90 | 90 | $this->onRoundStart[] = [$this, "applyEffectProviders"]; |
91 | 91 | $this->onRoundStart[] = [$this, "decreaseEffectsDuration"]; |
92 | - $this->onRoundStart[] = [$this ,"recalculateStats"]; |
|
92 | + $this->onRoundStart[] = [$this, "recalculateStats"]; |
|
93 | 93 | $this->onRoundStart[] = [$this, "logRoundNumber"]; |
94 | 94 | $this->onRoundStart[] = [$this, "applyPoison"]; |
95 | 95 | $this->onRound[] = [$this, "mainStage"]; |
@@ -347,14 +347,14 @@ discard block |
||
347 | 347 | */ |
348 | 348 | public function selectAttackTarget(Character $attacker): ?Character { |
349 | 349 | $enemyTeam = $this->getEnemyTeam($attacker); |
350 | - $rangedWeapon = ($attacker->equipment->hasItems(["%class%" => Weapon::class, "worn" => true, "ranged" => true,])); |
|
350 | + $rangedWeapon = ($attacker->equipment->hasItems(["%class%" => Weapon::class, "worn" => true, "ranged" => true, ])); |
|
351 | 351 | if(!$rangedWeapon) { |
352 | 352 | $rowToAttack = $enemyTeam->rowToAttack; |
353 | 353 | if(is_null($rowToAttack)) { |
354 | 354 | return null; |
355 | 355 | } |
356 | 356 | /** @var Team $enemies */ |
357 | - $enemies = Team::fromArray($enemyTeam->getItems(["positionRow" => $rowToAttack, "hitpoints>" => 0,]), $enemyTeam->name); |
|
357 | + $enemies = Team::fromArray($enemyTeam->getItems(["positionRow" => $rowToAttack, "hitpoints>" => 0, ]), $enemyTeam->name); |
|
358 | 358 | } else { |
359 | 359 | $enemies = $enemyTeam; |
360 | 360 | } |
@@ -423,8 +423,8 @@ discard block |
||
423 | 423 | public function applyPoison(self $combat): void { |
424 | 424 | /** @var Character[] $characters */ |
425 | 425 | $characters = array_merge( |
426 | - $combat->team1->getItems(["hitpoints>" => 0, "poisoned!=" => false,]), |
|
427 | - $combat->team2->getItems(["hitpoints>" => 0, "poisoned!=" => false,]) |
|
426 | + $combat->team1->getItems(["hitpoints>" => 0, "poisoned!=" => false, ]), |
|
427 | + $combat->team2->getItems(["hitpoints>" => 0, "poisoned!=" => false, ]) |
|
428 | 428 | ); |
429 | 429 | foreach($characters as $character) { |
430 | 430 | $poisonValue = $character->getStatus(Character::STATUS_POISONED); |