아이템에 consumable 개념 추가, GameConstBase에 아이템 준비

This commit is contained in:
2019-05-13 03:17:48 +09:00
parent 85409263c8
commit 2e06b28e5a
8 changed files with 51 additions and 0 deletions
@@ -10,6 +10,7 @@ class che_계략_이추 extends \sammo\BaseItem{
protected static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p';
protected static $cost = 1000;
protected static $consumable = true;
protected static $buyable = true;
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
if($turnType == '계략'){
@@ -10,6 +10,7 @@ class che_계략_향낭 extends \sammo\BaseItem{
protected static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
protected static $cost = 3000;
protected static $consumable = true;
protected static $buyable = true;
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
if($turnType == '계략'){
@@ -11,6 +11,7 @@ class che_사기_탁주 extends \sammo\BaseItem{
protected static $info = '[전투] 사기 +3. 1회용';
protected static $cost = 1000;
protected static $consumable = true;
protected static $buyable = true;
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller([
@@ -15,6 +15,7 @@ class che_저격_수극 extends \sammo\BaseItem{
protected static $info = '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용';
protected static $cost = 1000;
protected static $consumable = true;
protected static $buyable = true;
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller([
@@ -12,6 +12,7 @@ class che_치료_환약 extends \sammo\BaseItem{
protected static $info = '[군사] 턴 실행 전 부상 회복. 1회용';
protected static $cost = 100;
protected static $consumable = true;
protected static $buyable = true;
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
return new GeneralTriggerCaller([
@@ -10,6 +10,7 @@ class che_훈련_청주 extends \sammo\BaseItem{
protected static $info = '[전투] 훈련 +3. 1회용';
protected static $cost = 1000;
protected static $consumable = true;
protected static $buyable = true;
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller([