package skills;
import AXJava.*;
import LivinGrimoire.DiSkillV2;
public class DiTreater extends DiSkillV2 {
private TrgTime trgTime = new TrgTime();
public TrgTolerance trgTolerance = new TrgTolerance(10);
public AXShoutOut shoutOut = new AXShoutOut();
public Responder replies = new Responder("stop arguing", "just do it", "behave","be a big boy and do it","bad boy no more fussing","i know best");
public TrgArgue contextCmd = new TrgArgue();
private PercentDripper dripper = new PercentDripper();
public DiTreater setTime(String time_stamp){
// set time in which the event eventifies
trgTime.setTime(time_stamp);
return this;
}
public DiTreater setDripper(int percentage){
dripper.setLimis(percentage);
return this;
}
public DiTreater() {
trgTime.setTime("19:30");
shoutOut.handshake.addResponse("what");
shoutOut.handshake.addResponse("yes");
shoutOut.handshake.addResponse("i am here");
contextCmd.contextCommands.add("do i have to wear a diaper");
contextCmd.commands.add("but");
contextCmd.commands.add("do not want to");
contextCmd.commands.add("why");
contextCmd.commands.add("no");
}
@Override
public void input(String ear, String skin, String eye) {
if (trgTime.alarm()){trgTolerance.reset();}
// stop shout out
if (shoutOut.engage(ear)){contextCmd.engageCommand("do i have to wear a diaper");trgTolerance.disable();setVerbatimAlg(4,"put on your diaper sweet heart");return;}
// shout out
if (trgTolerance.trigger()){
if (dripper.drip()){shoutOut.activate();setVerbatimAlg(4,"user");return;}
}
switch (contextCmd.engageCommand(ear)){
case 1:
setVerbatimAlg(4,"you know you do");
break;
case 2:
setVerbatimAlg(4, replies.getAResponse());
break;
}
}
}