From b7f37b746e9303163e57787f51103ea2890bab6a Mon Sep 17 00:00:00 2001
From: Chris Kearney <chris@kearneymail.com>
Date: Sun, 14 May 2017 20:40:23 -0700
Subject: [PATCH] added attack messages

---
 .../common/ColorizedTextTemplateTest.java     | 64 +++++++++++++++++++
 world/npcs/blood_wolf.json                    | 20 +++++-
 world/npcs/demon_cat.json                     | 20 +++++-
 world/npcs/red-eyed_bear.json                 | 24 ++++++-
 world/npcs/swamp_bear.json                    | 24 ++++++-
 world/npcs/swamp_berserker.json               | 20 +++++-
 world/npcs/tree_berserker.json                | 20 +++++-
 7 files changed, 186 insertions(+), 6 deletions(-)

diff --git a/src/test/com/comandante/creeper/common/ColorizedTextTemplateTest.java b/src/test/com/comandante/creeper/common/ColorizedTextTemplateTest.java
index 62d336b0..dabfcd8c 100644
--- a/src/test/com/comandante/creeper/common/ColorizedTextTemplateTest.java
+++ b/src/test/com/comandante/creeper/common/ColorizedTextTemplateTest.java
@@ -110,4 +110,68 @@ public class ColorizedTextTemplateTest {
         System.out.printf("u");
     }
 
+    @Test
+    public void testSomething() throws Exception {
+
+//        {
+//            Set<AttackMessage> attackMessageSet = Sets.newHashSet();
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ throws a massive log at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ throws a large boulder at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ lunges at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ swings at @player-name@ with a large tree branch!"));
+//            Gson gson = new GsonBuilder().setPrettyPrinting().create();
+//            String s = gson.toJson(attackMessageSet);
+//            System.out.println(s);
+//        }
+//
+//        {
+//            Set<AttackMessage> attackMessageSet = Sets.newHashSet();
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ howls maniacally to call its pack!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ growls and charges slightly at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ jumps into the air toward @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ tries to bite @player-name@ in the leg!"));
+//            Gson gson = new GsonBuilder().setPrettyPrinting().create();
+//            String s = gson.toJson(attackMessageSet);
+//            System.out.println(s);
+//        }
+
+
+//        {
+//            Set<AttackMessage> attackMessageSet = Sets.newHashSet();
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ growls and charges at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ opens its jaws and attempts to bite @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ stomps around and charges at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ swipes its paw toward @player-name@'s head!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ extends its claws and swings at @player-name@!"));
+//            Gson gson = new GsonBuilder().setPrettyPrinting().create();
+//            String s = gson.toJson(attackMessageSet);
+//            System.out.println(s);
+//        }
+
+//        {
+//            Set<AttackMessage> attackMessageSet = Sets.newHashSet();
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ swings a berserker baton at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ foams at the mouth and lunges at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ charges at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ wildly swings its fists at @player-name@!"));
+//            Gson gson = new GsonBuilder().setPrettyPrinting().create();
+//            String s = gson.toJson(attackMessageSet);
+//            System.out.println(s);
+//        }
+
+//        {
+//            Set<AttackMessage> attackMessageSet = Sets.newHashSet();
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ hisses and growls at @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ attempts to scratch @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ attempts to bite @player-name@!"));
+//            attackMessageSet.add(new AttackMessage(AttackMessage.Type.NORMAL, "The @npc-color-name@ runs toward @player-name@ with exposed teeth!"));
+//            Gson gson = new GsonBuilder().setPrettyPrinting().create();
+//            String s = gson.toJson(attackMessageSet);
+//            System.out.println(s);
+//        }
+
+
+
+    }
+
 }
\ No newline at end of file
diff --git a/world/npcs/blood_wolf.json b/world/npcs/blood_wolf.json
index 6687254e..0e8bc7fb 100644
--- a/world/npcs/blood_wolf.json
+++ b/world/npcs/blood_wolf.json
@@ -52,5 +52,23 @@
   "loot": {
     "lootGoldMax": 18,
     "lootGoldMin": 16
-  }
+  },
+  "attackMessages": [
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ jumps into the air toward @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ tries to bite @player-name@ in the leg!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ growls and charges slightly at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ howls maniacally to call its pack!"
+    }
+  ]
 }
\ No newline at end of file
diff --git a/world/npcs/demon_cat.json b/world/npcs/demon_cat.json
index 0f6087dc..d4cbcf4c 100644
--- a/world/npcs/demon_cat.json
+++ b/world/npcs/demon_cat.json
@@ -44,5 +44,23 @@
   "loot": {
     "lootGoldMax": 3,
     "lootGoldMin": 1
-  }
+  },
+  "attackMessages": [
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ hisses and growls at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ attempts to bite @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ runs toward @player-name@ with exposed teeth!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ attempts to scratch @player-name@!"
+    }
+  ]
 }
\ No newline at end of file
diff --git a/world/npcs/red-eyed_bear.json b/world/npcs/red-eyed_bear.json
index 3cee3298..1dee089f 100644
--- a/world/npcs/red-eyed_bear.json
+++ b/world/npcs/red-eyed_bear.json
@@ -54,5 +54,27 @@
   "loot": {
     "lootGoldMax": 24,
     "lootGoldMin": 18
-  }
+  },
+  "attackMessages": [
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ growls and charges at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ stomps around and charges at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ swipes its paw toward @player-name@\u0027s head!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ extends its claws and swings at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ opens its jaws and attempts to bite @player-name@!"
+    }
+  ]
 }
\ No newline at end of file
diff --git a/world/npcs/swamp_bear.json b/world/npcs/swamp_bear.json
index 3ef0fb4e..fbf6bd7c 100644
--- a/world/npcs/swamp_bear.json
+++ b/world/npcs/swamp_bear.json
@@ -53,5 +53,27 @@
   "loot": {
     "lootGoldMax": 18,
     "lootGoldMin": 12
-  }
+  },
+  "attackMessages": [
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ growls and charges at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ stomps around and charges at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ swipes its paw toward @player-name@\u0027s head!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ extends its claws and swings at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ opens its jaws and attempts to bite @player-name@!"
+    }
+  ]
 }
\ No newline at end of file
diff --git a/world/npcs/swamp_berserker.json b/world/npcs/swamp_berserker.json
index 43e6f9ac..92dff6bb 100644
--- a/world/npcs/swamp_berserker.json
+++ b/world/npcs/swamp_berserker.json
@@ -44,5 +44,23 @@
   "loot": {
     "lootGoldMax": 10,
     "lootGoldMin": 5
-  }
+  },
+  "attackMessages": [
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ swings a berserker baton at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ charges at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ wildly swings its fists at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ foams at the mouth and lunges at @player-name@!"
+    }
+  ]
 }
\ No newline at end of file
diff --git a/world/npcs/tree_berserker.json b/world/npcs/tree_berserker.json
index 559e52d0..9dfc4588 100644
--- a/world/npcs/tree_berserker.json
+++ b/world/npcs/tree_berserker.json
@@ -45,5 +45,23 @@
   "loot": {
     "lootGoldMax": 14,
     "lootGoldMin": 8
-  }
+  },
+  "attackMessages": [
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ swings a berserker baton at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ charges at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ wildly swings its fists at @player-name@!"
+    },
+    {
+      "type": "NORMAL",
+      "attackMessage": "The @npc-color-name@ foams at the mouth and lunges at @player-name@!"
+    }
+  ]
 }
\ No newline at end of file
-- 
GitLab