game,feat: 추가 숙련 trigger추가, 숙련 유니크 추가
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -536,6 +536,7 @@ class General implements iAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
$dexType = "dex{$armType}";
|
$dexType = "dex{$armType}";
|
||||||
|
$exp = $this->onCalcStat($this, 'addDex', $exp, ['armType'=>$armType]);
|
||||||
|
|
||||||
$this->increaseVar($dexType, $exp);
|
$this->increaseVar($dexType, $exp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user