@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $this->onCombatEnd[] = [$this, "resetInitiative"]; |
75 | 75 | $this->onRoundStart[] = [$this, "applyEffectProviders"]; |
76 | 76 | $this->onRoundStart[] = [$this, "decreaseEffectsDuration"]; |
77 | - $this->onRoundStart[] = [$this ,"recalculateStats"]; |
|
77 | + $this->onRoundStart[] = [$this, "recalculateStats"]; |
|
78 | 78 | $this->onRoundStart[] = [$this, "logRoundNumber"]; |
79 | 79 | $this->onRoundStart[] = [$this, "applyPoison"]; |
80 | 80 | $this->onRound[] = [$this, "mainStage"]; |
@@ -343,14 +343,14 @@ discard block |
||
343 | 343 | */ |
344 | 344 | public function selectAttackTarget(Character $attacker): ?Character { |
345 | 345 | $enemyTeam = $this->getEnemyTeam($attacker); |
346 | - $rangedWeapon = ($attacker->equipment->hasItems(["%class%" => Weapon::class, "worn" => true, "ranged" => true,])); |
|
346 | + $rangedWeapon = ($attacker->equipment->hasItems(["%class%" => Weapon::class, "worn" => true, "ranged" => true, ])); |
|
347 | 347 | if(!$rangedWeapon) { |
348 | 348 | $rowToAttack = $enemyTeam->rowToAttack; |
349 | 349 | if(is_null($rowToAttack)) { |
350 | 350 | return null; |
351 | 351 | } |
352 | 352 | /** @var Team $enemies */ |
353 | - $enemies = Team::fromArray($enemyTeam->getItems(["positionRow" => $rowToAttack, "hitpoints>" => 0,]), $enemyTeam->name); |
|
353 | + $enemies = Team::fromArray($enemyTeam->getItems(["positionRow" => $rowToAttack, "hitpoints>" => 0, ]), $enemyTeam->name); |
|
354 | 354 | } else { |
355 | 355 | $enemies = $enemyTeam; |
356 | 356 | } |
@@ -419,8 +419,8 @@ discard block |
||
419 | 419 | public function applyPoison(self $combat): void { |
420 | 420 | /** @var Character[] $characters */ |
421 | 421 | $characters = array_merge( |
422 | - $combat->team1->getItems(["hitpoints>" => 0, "poisoned!=" => false,]), |
|
423 | - $combat->team2->getItems(["hitpoints>" => 0, "poisoned!=" => false,]) |
|
422 | + $combat->team1->getItems(["hitpoints>" => 0, "poisoned!=" => false, ]), |
|
423 | + $combat->team2->getItems(["hitpoints>" => 0, "poisoned!=" => false, ]) |
|
424 | 424 | ); |
425 | 425 | foreach($characters as $character) { |
426 | 426 | $poisonValue = $character->status["poisoned"]; |
@@ -462,7 +462,7 @@ |
||
462 | 462 | } |
463 | 463 | |
464 | 464 | public function hasStatus(string $status): bool { |
465 | - return (array_key_exists($status, $this->status) AND $this->status[$status]); |
|
465 | + return (array_key_exists($status, $this->status) and $this->status[$status]); |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | /** |