@@ -6,7 +6,11 @@ import kotlin.math.max
66import kotlin.math.min
77import kotlin.random.Random
88
9- enum class PersonaType (val weight : Double , private var dropRate : String? = null ) {
9+ enum class PersonaType (
10+ val weight : Double ,
11+ val grade : PersonaGrade = PersonaGrade .DEFAULT ,
12+ private var dropRate : String? = null ,
13+ ) {
1014 GOOSE (1.0 ) {
1115 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
1216 val goose = gooseSvg.replace(" *{act}" , act(animationId))
@@ -916,7 +920,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
916920 .toString()
917921 },
918922
919- PIG_COLLABORATOR (0.0 ) {
923+ PIG_COLLABORATOR (0.0 , grade = PersonaGrade . COLLABORATOR ) {
920924 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
921925 return pigCollaboratorSvg.replace(" *{act}" , act(animationId))
922926 .replace(" *{id}" , animationId.toString())
@@ -1282,7 +1286,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
12821286 .toString()
12831287 },
12841288
1285- CHEESE_CAT_COLLABORATOR (0.0 ) {
1289+ CHEESE_CAT_COLLABORATOR (0.0 , grade = PersonaGrade . COLLABORATOR ) {
12861290 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
12871291 return cheeseCatCollaboratorSvg.replace(" *{act}" , act(animationId))
12881292 .replace(" *{id}" , animationId.toString())
@@ -1345,7 +1349,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
13451349 .toString()
13461350 },
13471351
1348- WHITE_CAT_COLLABORATOR (0.00 ) {
1352+ WHITE_CAT_COLLABORATOR (0.00 , grade = PersonaGrade . COLLABORATOR ) {
13491353 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
13501354 return whiteCatCollaboratorSvg.replace(" *{act}" , act(animationId))
13511355 .replace(" *{id}" , animationId.toString())
@@ -1546,7 +1550,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
15461550 StringBuilder ().moveRandomly(" rabbit" , id, 40 , " 180s" , 5 , 10.0 )
15471551 .toString()
15481552 },
1549- RABBIT_COLLABORATOR (0.0 ) {
1553+ RABBIT_COLLABORATOR (0.0 , grade = PersonaGrade . COLLABORATOR ) {
15501554 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
15511555 return rabbitCollaboratorSvg.replace(" *{act}" , act(animationId))
15521556 .replace(" *{id}" , animationId.toString())
@@ -1607,7 +1611,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
16071611 StringBuilder ().moveRandomly(" dessert-fox" , id, 40 , " 180s" , 5 , 26.0 )
16081612 .toString()
16091613 },
1610- DESSERT_FOX_COLLABORATOR (0.0 ) {
1614+ DESSERT_FOX_COLLABORATOR (0.0 , grade = PersonaGrade . COLLABORATOR ) {
16111615 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
16121616 return dessertFoxCollaboratorSvg.replace(" *{act}" , act(animationId))
16131617 .replace(" *{id}" , animationId.toString())
@@ -1767,7 +1771,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
17671771 .moveRandomly(" ghost" , id, 20 , " 180s" , 7 , 26.0 )
17681772 .toString()
17691773 },
1770- GHOST_COLLABORATOR (0.0 ) {
1774+ GHOST_COLLABORATOR (0.0 , grade = PersonaGrade . COLLABORATOR ) {
17711775 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
17721776 return ghostCollaboratorSvg.replace(" *{act}" , act(animationId))
17731777 .replace(" *{id}" , animationId.toString())
@@ -2067,7 +2071,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
20672071 StringBuilder ().moveRandomly(" maltese" , id, 40 , " 180s" , 5 , 12.0 )
20682072 .toString()
20692073 },
2070- HAMSTER_COLLABORATOR (0.0 ) {
2074+ HAMSTER_COLLABORATOR (0.0 , grade = PersonaGrade . COLLABORATOR ) {
20712075 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
20722076 return hamsterCollaboratorSvg.replace(" *{act}" , act(animationId))
20732077 .replace(" *{id}" , animationId.toString())
@@ -2108,7 +2112,7 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
21082112 .toString()
21092113 },
21102114
2111- MALTESE_COLLABORATOR (0.0 ) {
2115+ MALTESE_COLLABORATOR (0.0 , grade = PersonaGrade . COLLABORATOR ) {
21122116 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
21132117 return malteseCollaboratorSvg.replace(" *{act}" , act(animationId))
21142118 .replace(" *{id}" , animationId.toString())
0 commit comments