Trigger, Action 역할 재정의
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_대의 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 1;
|
||||
static $name = '대의';
|
||||
static $info = '명성 +10%, 훈련 -5';
|
||||
|
||||
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
|
||||
if($statName == 'experience'){
|
||||
return $value * 1.1;
|
||||
}
|
||||
if($statName == 'bonusTrain'){
|
||||
return $value - 5;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user