@@ -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 | } |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | foreach($team as $character) { |
| 229 | 229 | try { |
| 230 | 230 | $column++; |
| 231 | - if($character->positionRow > 0 AND $character->positionColumn > 0) { |
|
| 231 | + if($character->positionRow > 0 and $character->positionColumn > 0) { |
|
| 232 | 232 | continue; |
| 233 | 233 | } |
| 234 | 234 | setPosition: |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $characters = array_merge($combat->team1->toArray(), $combat->team2->toArray()); |
| 284 | 284 | foreach($characters as $character) { |
| 285 | 285 | foreach($character->effects as $effect) { |
| 286 | - if($effect->duration === CharacterEffect::DURATION_COMBAT OR is_int($effect->duration)) { |
|
| 286 | + if($effect->duration === CharacterEffect::DURATION_COMBAT or is_int($effect->duration)) { |
|
| 287 | 287 | $character->removeEffect($effect->id); |
| 288 | 288 | } |
| 289 | 289 | } |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | continue 2; |
| 405 | 405 | } |
| 406 | 406 | } |
| 407 | - throw new NotImplementedException("Action $action is not implemented."); |
|
| 407 | + throw new NotImplementedException("action $action is not implemented."); |
|
| 408 | 408 | } |
| 409 | 409 | } |
| 410 | 410 | |
@@ -581,7 +581,7 @@ |
||
| 581 | 581 | $stat = $effect->stat; |
| 582 | 582 | $type = $effect->type; |
| 583 | 583 | $duration = $effect->duration; |
| 584 | - if(is_int($duration) AND $duration < 1) { |
|
| 584 | + if(is_int($duration) and $duration < 1) { |
|
| 585 | 585 | $this->removeEffect($effect->id); |
| 586 | 586 | continue; |
| 587 | 587 | } |