game,feat: 새 도구 아이템 추가, 아이템 효과에 필요한 기능 추가 #206

Merged
Hide_D merged 25 commits from items_add into devel 2022-02-22 00:50:13 +09:00
3 changed files with 25 additions and 3 deletions
Showing only changes of commit b919a09d33 - Show all commits
@@ -0,0 +1,20 @@
<?php
namespace sammo\ActionItem;
use \sammo\iAction;
use \sammo\General;
class che_필살_둔갑천서 extends \sammo\BaseItem{
protected $rawName = '둔갑천서';
protected $name = '둔갑천서(필살)';
protected $info = '[전투] 필살 확률 +20%p';
protected $cost = 200;
protected $consumable = false;
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warCriticalRatio'){
return $value + 0.2;
}
return $value;
}
}
@@ -17,4 +17,6 @@ class che_회피_둔갑천서 extends \sammo\BaseItem{
}
return $value;
}
}
}
//NOTE: 구버전
@@ -7,13 +7,13 @@ class che_회피_태평요술 extends \sammo\BaseItem{
protected $rawName = '태평요술';
protected $name = '태평요술(회피)';
protected $info = '[전투] 회피 확률 +20%p';
protected $info = '[전투] 회피 확률 +15%p';
protected $cost = 200;
protected $consumable = false;
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warAvoidRatio'){
return $value + 0.2;
return $value + 0.15;
}
return $value;
}