DiAware port

owly

闇の伝説
Staff member
戦闘 コーダー

@fukurou
Python:
class DiAware(DiSkillV2):
    def __init__(self, chobit: Chobits, name: str, summoner="user"):
        super().__init__()
        self.chobit: Chobits = chobit
        self.name: str = name
        self.summoner: str = summoner
        self.skills: list[str] = []
        self.replies: Responder = Responder("Da, what’s happening?", f'You speak to {self.name}?', f"Slav {self.name} at your service!", "What’s cooking, comrade?", f"{self.name} is listening!", "Yes, babushka?", f"Who summons the {self.name}?", "Speak, friend, and enter!", f"{self.name} hears you loud and clear!", "What’s on the menu today?", "Ready for action, what’s the mission?", f"{self.name}’s here, what’s the party?", f"did someone call for a {self.name}?", "Adventure time, or nap time?", "Reporting for duty, what’s the quest?", f"{self.name}’s in the house, what’s up?", "Is it time for vodka and dance?", f"{self.name}’s ready, what’s the plan?", f"Who dares to disturb the mighty {self.name}?", "What’s the buzz, my spud?", "Is it a feast, or just a tease?", f"{self.name}’s awake, what’s at stake?", "What’s the word, bird?", "Is it a joke, or are we broke?", f"{self.name}’s curious, what’s so serious?", "Is it a game, or something lame?", "What’s the riddle, in the middle?", f"{self.name}’s all ears, what’s the cheers?", "Is it a quest, or just a test?", "What’s the gig, my twig?", "Is it a prank, or am I high rank?", "What’s the scoop, my group?", "Is it a tale, or a sale?", "What’s the drill, my thrill?", "Is it a chat, or combat?", "What’s the plot, my tot?", "Is it a trick, or something slick?", "What’s the deal, my peel?", "Is it a race, or just a chase?", "What’s the story, my glory?")
        self._call: str = f'hey {self.name}'

    def input(self, ear, skin, eye):
        match ear:
            case "list skills":
                self.skills = self.chobit.get_skill_list()
                self.setVebatimAlgFromList(4, self.skills)
            case "what is your name":
                self.setSimpleAlg(self.name)
            case "name summoner":
                self.setSimpleAlg(self.summoner)
            case "how do you feel":
                self.getKokoro().toHeart["last_ap"] = self.chobit.getSoulEmotion()
            case self.name:
                self.setSimpleAlg(self.replies.getAResponse())
            case "test":
                self.setSimpleAlg(self.replies.getAResponse())
            case self._call:
                self.setSimpleAlg(self.replies.getAResponse())
 

fukurou

the supreme coder
ADMIN
Java:
public class DiAware extends DiSkillV2 {
    private Chobits chobit;
    private String name;
    private String summoner = "user";
    private ArrayList<String> skills = new ArrayList<String>();
    public Responder replies = new Responder("what","yes", "listening", name + " listening", name + " ready, what’s the plan?", "What’s the word, bird?");
    public DiAware(Chobits chobit, String name, String summoner) {
        this.chobit = chobit;
        this.name = name;
        this.summoner = summoner;
    }

    @Override
    public void input(String ear, String skin, String eye) {
        switch(ear) {
            case "list skills":
                skills = chobit.getSkillList();
                setVerbatimAlgFromList(4, skills);
                return;
            case "what is your name":
                setSimpleAlg(this.name);
                return;
            case "name summoner":
                setSimpleAlg(this.summoner);
                return;
            case "how do you feel":
                // handle in hardware skill in hardwer chobit
                this.kokoro.toHeart.put("last_ap", chobit.getSoulEmotion());
                return;
            case "test":
                setSimpleAlg(this.replies.getAResponse());
                return;
        }
        if (ear.equals(name)){
            setSimpleAlg(this.replies.getAResponse());
        }
    }
}
 
Top