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

Merged
Hide_D merged 25 commits from items_add into devel 2022-02-22 00:50:13 +09:00
2 changed files with 21 additions and 0 deletions
Showing only changes of commit 74efa5c502 - 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 = '숙련 +15%';
protected $cost = 200;
protected $consumable = false;
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName == 'addDex'){
return $value * 1.15;
}
return $value;
}
}
+1
View File
@@ -536,6 +536,7 @@ class General implements iAction
}
$dexType = "dex{$armType}";
$exp = $this->onCalcStat($this, 'addDex', $exp, ['armType'=>$armType]);
$this->increaseVar($dexType, $exp);
}