"/static/speech/deer/neutral.png", SpeechEmotion::Worried => "/static/speech/deer/sad.png", SpeechEmotion::Happy => "/static/speech/deer/happy.png", SpeechEmotion::Shocked => "/static/speech/deer/shock.png", null => "", }; return match ($this) { SpeechCharacter::Deer => $deeremotion, SpeechCharacter::You => "/static/speech/you.png", }; } public function alt(?SpeechEmotion $emotion): string { $deeremotion = match ($emotion) { SpeechEmotion::Neutral => "drawing of a deer, talking to you.", SpeechEmotion::Worried => "drawing of a sad or worried deer, talking to you.", SpeechEmotion::Happy => "drawing of a happy deer, talking to you.", SpeechEmotion::Shocked => "drawing of a shocked deer, talking to you.", null => "", }; return match ($this) { SpeechCharacter::Deer => $deeremotion, SpeechCharacter::You => "drawing of you, smiling.", }; } public function clazz() { return match ($this) { SpeechCharacter::Deer => "deer", SpeechCharacter::You => "you", }; } } function speech_start(SpeechCharacter $char, ?SpeechEmotion $emotion) { ?>