feat: 닥공전 기능 추가
- 장수 상대로 공격자인 경우 - 공, 방 50%씩
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\ActionScenarioEffect;
|
||||
|
||||
use \sammo\iAction;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitCity;
|
||||
|
||||
class event_StrongAttacker implements iAction
|
||||
{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit): array
|
||||
{
|
||||
if ($unit instanceof WarUnitCity) {
|
||||
return [1, 1];
|
||||
}
|
||||
if ($unit->getOppose() instanceof WarUnitCity) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
if ($unit->isAttacker()) {
|
||||
return [1.5, 0.667];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user