|
@@ -74,7 +74,7 @@ discard block |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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
|
} |