diff --git a/src/main/kotlin/org/gitanimals/core/PersonaType.kt b/src/main/kotlin/org/gitanimals/core/PersonaType.kt
index 973cf932..f747560a 100644
--- a/src/main/kotlin/org/gitanimals/core/PersonaType.kt
+++ b/src/main/kotlin/org/gitanimals/core/PersonaType.kt
@@ -267,9 +267,26 @@ enum class PersonaType(
.toString()
},
- LITTLE_CHICK(weight = 0.9, personaEvolution = PersonaEvolution(weight = 0.3, type = PersonaEvolutionType.LITTLE_CHICK)) {
+ LITTLE_CHICK(weight = 0.9, haveAnimation = true, personaEvolution = PersonaEvolution(weight = 0.3, type = PersonaEvolutionType.LITTLE_CHICK)) {
override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String {
+ val emotion = buildEmotionAnimation(
+ idPrefix = "little-chick",
+ animationId = animationId,
+ totalDuration = 180.0,
+ emotionDuration = 3.0,
+ emotionSvgs = listOf(
+ littleChickIdleFollowEmotionSvg,
+ littleChickThinkingEmotionSvg,
+ littleChickTypingEmotionSvg,
+ ),
+ emotionYOffsets = listOf(0.0, 0.0, 0.0),
+ minGap = 1.0,
+ maxGap = 1.0,
+ )
+
val littleChick = littleChickSvg.replace("*{act}", act(animationId))
+ .replace("*{emotion-style}", emotion.css)
+ .replace("*{emotions}", emotion.content)
.replace("*{id}", animationId.toString())
.replace("*{leg-iteration-count}", "360")
.replace("*{level}", level.toSvg(14.0, 2.0))
@@ -293,9 +310,26 @@ enum class PersonaType(
.toString()
},
- LITTLE_CHICK_SUNGLASSES(weight = 0.4, personaEvolution = PersonaEvolution(weight = 0.4, type = PersonaEvolutionType.LITTLE_CHICK)) {
+ LITTLE_CHICK_SUNGLASSES(weight = 0.4, haveAnimation = true, personaEvolution = PersonaEvolution(weight = 0.4, type = PersonaEvolutionType.LITTLE_CHICK)) {
override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String {
+ val emotion = buildEmotionAnimation(
+ idPrefix = "little-chick",
+ animationId = animationId,
+ totalDuration = 180.0,
+ emotionDuration = 3.0,
+ emotionSvgs = listOf(
+ littleChickIdleFollowEmotionSvg,
+ littleChickThinkingEmotionSvg,
+ littleChickTypingEmotionSvg,
+ ),
+ emotionYOffsets = listOf(0.0, 0.0, 0.0),
+ minGap = 1.0,
+ maxGap = 1.0,
+ )
+
val littleChick = littleChickSunglassesSvg.replace("*{act}", act(animationId))
+ .replace("*{emotion-style}", emotion.css)
+ .replace("*{emotions}", emotion.content)
.replace("*{id}", animationId.toString())
.replace("*{leg-iteration-count}", "360")
.replace("*{level}", level.toSvg(14.0, 2.0))
@@ -2459,9 +2493,29 @@ enum class PersonaType(
.toString()
},
- CAPYBARA_CARROT(0.6) {
+ CAPYBARA_CARROT(0.6, haveAnimation = true) {
override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String {
+ val emotion = buildEmotionAnimation(
+ idPrefix = "capybara-carrot",
+ animationId = animationId,
+ totalDuration = 180.0,
+ emotionDuration = 3.0,
+ emotionSvgs = listOf(
+ capybaraCarrotErrorEmotionSvg,
+ capybaraCarrotHappyEmotionSvg,
+ capybaraCarrotIdleFollowEmotionSvg,
+ capybaraCarrotNotificationEmotionSvg,
+ capybaraCarrotThinkingEmotionSvg,
+ capybaraCarrotTypingEmotionSvg,
+ ),
+ emotionYOffsets = listOf(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
+ minGap = 1.0,
+ maxGap = 1.0,
+ )
+
return capybaraCarrotSvg.replace("*{act}", act(animationId))
+ .replace("*{emotion-style}", emotion.css)
+ .replace("*{emotions}", emotion.content)
.replace("*{id}", animationId.toString())
.replace("*{leg-iteration-count}", "360")
.replace("*{level}", level.toSvg(14.0, 2.0))
diff --git a/src/main/kotlin/org/gitanimals/core/Svgs.kt b/src/main/kotlin/org/gitanimals/core/Svgs.kt
index 1d051753..c3d746cc 100644
--- a/src/main/kotlin/org/gitanimals/core/Svgs.kt
+++ b/src/main/kotlin/org/gitanimals/core/Svgs.kt
@@ -114,6 +114,18 @@ val littleChickLinuxSvg: String = ClassPathResource("persona/animal/little-chick
val littleChickSpringSvg: String = ClassPathResource("persona/animal/little-chick-spring.svg")
.getContentAsString(Charset.defaultCharset())
+val littleChickIdleFollowEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/little-chick/idle-follow.svg")
+ .getContentAsString(Charset.defaultCharset())
+
+val littleChickThinkingEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/little-chick/thinking.svg")
+ .getContentAsString(Charset.defaultCharset())
+
+val littleChickTypingEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/little-chick/typing.svg")
+ .getContentAsString(Charset.defaultCharset())
+
val penguinSvg: String = ClassPathResource("persona/animal/penguin.svg")
.getContentAsString(Charset.defaultCharset())
@@ -377,6 +389,30 @@ val capybaraCarrotSvg: String = ClassPathResource("persona/animal/capybara-carro
val capybaraSwimSvg: String = ClassPathResource("persona/animal/capybara-swim.svg")
.getContentAsString(Charset.defaultCharset())
+val capybaraCarrotErrorEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/capybara-carrot/error.svg")
+ .getContentAsString(Charset.defaultCharset())
+
+val capybaraCarrotHappyEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/capybara-carrot/happy.svg")
+ .getContentAsString(Charset.defaultCharset())
+
+val capybaraCarrotIdleFollowEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/capybara-carrot/idle-follow.svg")
+ .getContentAsString(Charset.defaultCharset())
+
+val capybaraCarrotNotificationEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/capybara-carrot/notification.svg")
+ .getContentAsString(Charset.defaultCharset())
+
+val capybaraCarrotThinkingEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/capybara-carrot/thinking.svg")
+ .getContentAsString(Charset.defaultCharset())
+
+val capybaraCarrotTypingEmotionSvg: String =
+ ClassPathResource("persona/animal/emotion/capybara-carrot/typing.svg")
+ .getContentAsString(Charset.defaultCharset())
+
val littleChickEggOnHatSvg: String = ClassPathResource("persona/animal/evolution/little-chick-egg-on-hat.svg")
.getContentAsString(Charset.defaultCharset())
diff --git a/src/main/resources/persona/animal/capybara-carrot.svg b/src/main/resources/persona/animal/capybara-carrot.svg
index c622c607..603f12e3 100644
--- a/src/main/resources/persona/animal/capybara-carrot.svg
+++ b/src/main/resources/persona/animal/capybara-carrot.svg
@@ -1,5 +1,6 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/happy.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/happy.svg
new file mode 100644
index 00000000..00d00ee2
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/capybara-carrot/happy.svg
@@ -0,0 +1,118 @@
+
diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/idle-follow.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/idle-follow.svg
new file mode 100644
index 00000000..b9366da1
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/capybara-carrot/idle-follow.svg
@@ -0,0 +1,71 @@
+
diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/notification.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/notification.svg
new file mode 100644
index 00000000..2ac5588f
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/capybara-carrot/notification.svg
@@ -0,0 +1,94 @@
+
diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/thinking.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/thinking.svg
new file mode 100644
index 00000000..105ad33b
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/capybara-carrot/thinking.svg
@@ -0,0 +1,78 @@
+
diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/typing.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/typing.svg
new file mode 100644
index 00000000..f391fde6
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/capybara-carrot/typing.svg
@@ -0,0 +1,85 @@
+
diff --git a/src/main/resources/persona/animal/emotion/little-chick/idle-follow.svg b/src/main/resources/persona/animal/emotion/little-chick/idle-follow.svg
new file mode 100644
index 00000000..6793c941
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/little-chick/idle-follow.svg
@@ -0,0 +1,70 @@
+
diff --git a/src/main/resources/persona/animal/emotion/little-chick/thinking.svg b/src/main/resources/persona/animal/emotion/little-chick/thinking.svg
new file mode 100644
index 00000000..5579c0ad
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/little-chick/thinking.svg
@@ -0,0 +1,59 @@
+
diff --git a/src/main/resources/persona/animal/emotion/little-chick/typing.svg b/src/main/resources/persona/animal/emotion/little-chick/typing.svg
new file mode 100644
index 00000000..5a43363c
--- /dev/null
+++ b/src/main/resources/persona/animal/emotion/little-chick/typing.svg
@@ -0,0 +1,62 @@
+
diff --git a/src/main/resources/persona/animal/little-chick-sunglasses.svg b/src/main/resources/persona/animal/little-chick-sunglasses.svg
index 78fecf61..22a9e4e8 100644
--- a/src/main/resources/persona/animal/little-chick-sunglasses.svg
+++ b/src/main/resources/persona/animal/little-chick-sunglasses.svg
@@ -1,6 +1,6 @@