Status apply instruction / Bugfixes
This commit is contained in:
@@ -1320,6 +1320,35 @@ public class LExecutor{
|
||||
}
|
||||
}
|
||||
|
||||
public static class ApplyEffectI implements LInstruction{
|
||||
public boolean clear;
|
||||
public String effect;
|
||||
public int unit, duration;
|
||||
|
||||
public ApplyEffectI(boolean clear, String effect, int unit, int duration){
|
||||
this.clear = clear;
|
||||
this.effect = effect;
|
||||
this.unit = unit;
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public ApplyEffectI(){
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(LExecutor exec){
|
||||
if(net.client()) return;
|
||||
|
||||
if(exec.obj(unit) instanceof Unit unit && content.statusEffect(effect) != null){
|
||||
if(clear){
|
||||
unit.unapply(content.statusEffect(effect));
|
||||
}else{
|
||||
unit.apply(content.statusEffect(effect), exec.numf(duration) * 60f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class SetRuleI implements LInstruction{
|
||||
public LogicRule rule = LogicRule.waveSpacing;
|
||||
public int value, p1, p2, p3, p4;
|
||||
|
||||
Reference in New Issue
Block a user