the 1st ever virtual drug for AIs DAdrenaliner

fukurou

the supreme coder
Staff member
Administrator
Java:
public class DAdrenaliner extends AbsCmdReq {
    /*
     * this skill makes the AI not feel pain for a set amount of time this drug
     * skill is to be placed on top level chobit in the Brain class so it can filter
     * out pain from the input.
     */
    private PlayGround playGround = new PlayGround();
    private Boolean drug = false;
    private int n = -1;
    private String outStr = "";
    private DISkillUtils diSkillUtils = new DISkillUtils();
    private final int DURATION = 9;
    @Override
    public void input(String ear, String skin, String eye) {
        if (ear.contains("perfect warrior") || skin.contains("adrenalin")) {
            n = playGround.getMinutesAsInt() + DURATION;
            return;
        }
        if (n > -1) {
            int rn = playGround.getMinutesAsInt();
            // effect wore off
            if (rn > n) {
                n = -1;
                return;
            }
            if (n > 60 && ((n - 60) < rn)) {
                n = -1;
                return;
            }
            if (skin.contains("pain")) {
                outStr = skin.replace("pain", "#skin");
                return;
            }
            if (ear.contains("pain")) {
                outStr = ear.replace("pain", "");
                return;
            }
        }
    }

    @Override
    public void output(Neuron noiron) {
        if (!outStr.isEmpty()) {
            Algorithm algorithm = diSkillUtils.customizedVerbatimGorithm("drug", new APSay(1, outStr));
            outStr = "";
            noiron.algParts.add(algorithm);
        }

    }

}
 
Top