game: 아이템을 실제로 사용할 수 있도록 등록

This commit is contained in:
2022-02-20 14:51:04 +09:00
parent cb42813597
commit b7b5c7b0da
7 changed files with 31 additions and 23 deletions
@@ -0,0 +1,23 @@
<?php
namespace sammo\ActionItem;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityHelper;
use \sammo\WarUnit;
class che_척사_오악진형도 extends \sammo\BaseItem{
protected $rawName = '오악진형도';
protected $name = '오악진형도(척사)';
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +15%, 아군 피해 -15%';
protected $cost = 200;
protected $consumable = false;
public function getWarPowerMultiplier(WarUnit $unit):array{
$opposeCrewType = $unit->getOppose()->getCrewType();
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
return [1.15, 0.85];
}
return [1, 1];
}
}