diff --git a/json/original_data/items.json b/json/original_data/items.json index 9211b629..39022ea5 100644 --- a/json/original_data/items.json +++ b/json/original_data/items.json @@ -273,6 +273,98 @@ "weight": "3", "value": "0" } + }, + + "wmst1": { + "type": "weapon", + "name": "magic staff", + "description": "A mysterious magic staff that can shoot magical projectiles", + "position": "bothHands", + "level": 2, + "properties": { + "damage": "+8", + "magicDamage": "+5", + "weight": "3", + "value": "100" + } + }, + "amro1": { + "type": "armour", + "name": "magic robe", + "description": "A starlit magic robe that provides magical protection", + "position": "chest", + "level": 2, + "properties": { + "armour": "+6", + "magicResist": "+5", + "weight": "4", + "value": "120" + } + }, + "amha1": { + "type": "armour", + "name": "magic hat", + "description": "A typical wizard's hat that enhances magical power", + "position": "head", + "level": 2, + "properties": { + "armour": "+3", + "magicPower": "+3", + "weight": "1", + "value": "80" + } + }, + "pman1": { + "type": "potion", + "name": "mana potion", + "description": "A blue potion that restores the caster's mana", + "position": "mouth", + "level": 1, + "properties": { + "mana": "+30", + "weight": "1", + "value": "25" + } + }, + "pfir1": { + "type": "potion", + "name": "fire resistance potion", + "description": "A red potion that temporarily provides fire resistance", + "position": "mouth", + "level": 2, + "properties": { + "fireResist": "+10", + "duration": "300", + "weight": "1", + "value": "45" + } + }, + "fapp1": { + "type": "food", + "name": "magic apple", + "description": "A golden apple that restores both health and mana when eaten", + "position": "mouth", + "level": 2, + "properties": { + "health": "+15", + "mana": "+15", + "weight": "1", + "value": "30" + } + }, + "fber1": { + "type": "food", + "name": "magic berries", + "description": "a pair of magic berries", + "position": "mouth", + "level": 1, + "properties": { + "health": "+5", + "speed": "+2", + "duration": "120", + "weight": "1", + "value": "20" + } } } } diff --git a/json/original_data/locations.json b/json/original_data/locations.json index 128c9cc2..a41ea4d7 100644 --- a/json/original_data/locations.json +++ b/json/original_data/locations.json @@ -1,508 +1,584 @@ { - "5,2,-1": { - "danger": 4, - "description": "A dark cave", - "title": "Cave", + "-4,4,-1": { + "danger": 0, + "description": "The headquaters of the Thieve's Guild", + "title": "Thieves' Guild", "locationType": "CAVE", - "coordinate": "5,2,-1"}, - "1,10,-1": { + "coordinate": "-4,4,-1"}, + "-3,4,-1": { + "danger": 0, "items": ["wdag1"], + "locationType": "CAVE", + "title": "Market Place", + "description": "The central market place of the underground", + "coordinate": "-3,4,-1"}, + "-3,5,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "1,10,-1"}, - "5,0,-1": { - "danger": 5, - "description": "A dark cave", + "coordinate": "-3,5,-1"}, + "-3,6,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", + "locationType": "CAVE", + "coordinate": "-3,6,-1"}, + "-2,2,-1": { + "danger": "4", "title": "Cave", "locationType": "CAVE", - "coordinate": "5,0,-1"}, - "1,3,0": { - "danger": "2", - "description": "The Ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "1,3,0"}, - "-1,4,0": { - "danger": "0", - "description": "The city gates", - "title": "Gate", - "locationType": "ROAD", - "coordinate": "-1,4,0"}, - "0,-1,-1": { - "danger": 0, - "items": ["pmil2"], - "locationType": "STAIRS", - "title": "Stairs", - "description": "Stairs up to the outside world.", - "coordinate": "0,-1,-1"}, - "1,2,0": { - "danger": "2", - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "1,2,0"}, - "7,9,-1": { - "danger": 4, + "items": ["wspe1"], "description": "A large open cave", - "title": "Cave", + "coordinate": "-2,2,-1"}, + "-2,3,-1": { + "danger": "3", + "description": "A dark corridor", + "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "7,9,-1"}, - "2,9,-1": { + "coordinate": "-2,3,-1"}, + "-2,6,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "2,9,-1"}, + "coordinate": "-2,6,-1"}, + "-2,7,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", + "locationType": "CAVE", + "coordinate": "-2,7,-1"}, "-2,8,-1": { "danger": 0, "description": "A tunnle to Above", "title": "Above", "locationType": "STAIRS", "coordinate": "-2,8,-1"}, - "1,6,-1": { + "-2,10,-1": { + "danger": "1", + "title": "The Syndicate Gang's Base", + "locationType": "CAVE", + "items": ["wdag1"], + "description": "The headquaters of the infamous Syndicate Gang", + "coordinate": "-2,10,-1"}, + "-1,3,-1": { + "danger": "3", + "description": "A long dark corridor", + "title": "Dark Corridor", + "locationType": "CAVE", + "coordinate": "-1,3,-1"}, + "-1,6,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "1,6,-1"}, - "0,1,0": { - "danger": 1, - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "0,1,0"}, - "6,2,-1": { - "danger": 4, - "description": "A dark cave", - "title": "Cave", - "locationType": "CAVE", - "coordinate": "6,2,-1"}, - "6,4,-1": { - "danger": 3, - "description": "A dark cave", - "title": "Cave", + "coordinate": "-1,6,-1"}, + "-1,10,-1": { + "danger": "2", + "description": "A long dark corridor", + "title": "Dark Corridor", + "npcs": ["syndicatemember"], "locationType": "CAVE", - "coordinate": "6,4,-1"}, - "-1,0,0": { - "danger": 0, - "description": "The city wall", - "title": "Wall", - "locationType": "WALL", - "coordinate": "-1,0,0"}, - "5,7,-1": { - "danger": 4, - "description": "A dark cave", - "title": "Cave", + "coordinate": "-1,10,-1"}, + "0,-1,-1": { + "danger": 0, + "items": ["pmil2"], + "locationType": "STAIRS", + "title": "Stairs", + "description": "Stairs up to the outside world.", + "coordinate": "0,-1,-1"}, + "0,0,-1": { + "danger": 0, + "npcs": ["guide"], + "items": ["wshi1"], "locationType": "CAVE", - "coordinate": "5,7,-1"}, + "title": "First Location Ever", + "description": "You are in a massive empty room.", + "coordinate": "0,0,-1"}, "0,1,-1": { "danger": 3, "description": "A very long dark corridor.", "title": "Dark Corridor", "locationType": "CAVE", "coordinate": "0,1,-1"}, - "-3,4,-1": { - "danger": 0, "items": ["wdag1"], + "0,2,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", "locationType": "CAVE", - "title": "Market Place", - "description": "The central market place of the underground", - "coordinate": "-3,4,-1"}, - "1,4,0": { - "danger": "1", - "description": "The road to Silliya", - "title": "Road", - "locationType": "ROAD", - "coordinate": "1,4,0"}, - "7,2,-1": { - "danger": 4, - "description": "A dark cave", - "title": "Cave", + "coordinate": "0,2,-1"}, + "0,3,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "7,2,-1"}, - "2,8,-1": { + "coordinate": "0,3,-1"}, + "0,4,-1": { + "danger": 1, "title": "Underground Entrance", + "locationType": "CAVE", + "items": ["tlap1"], + "description": "The entrance to Silliya's Underground Society", + "coordinate": "0,4,-1"}, + "0,5,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "2,8,-1"}, - "-1,1,0": { - "danger": 0, - "description": "The city wall", - "title": "Wall", - "locationType": "WALL", - "coordinate": "-1,1,0"}, - "-1,2,0": { - "danger": "0", - "description": "The city wall", - "title": "Wall", - "locationType": "WALL", - "coordinate": "-1,2,0"}, - "-3,6,-1": { + "coordinate": "0,5,-1"}, + "0,6,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "-3,6,-1"}, - "-1,3,0": { - "danger": "0", - "description": "The city wall", - "title": "Wall", - "locationType": "WALL", - "coordinate": "-1,3,0"}, + "coordinate": "0,6,-1"}, + "0,10,-1": { + "danger": 5, + "description": "The battle arena", + "title": "Arena", + "locationType": "CAVE", + "coordinate": "0,10,-1"}, + "1,0,-1":{ + "danger": 0, + "items": ["katana"], + "locationType": "CAVE", + "title": "Dark Alcove", + "description": "You see a pile of bones. Might be some equipment there.", + "coordinate": "1,0,-1"}, "1,1,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", "coordinate": "1,1,-1"}, - "5,10,-1": { - "danger": 5, - "description": "A large open cave", - "title": "Cave", + "1,6,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "5,10,-1"}, - "5,9,-1": { - "danger": 1, - "description": "A long dark corridor", - "title": "Dark corridor", + "coordinate": "1,6,-1"}, + "1,10,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "5,9,-1"}, - "-1,10,-1": { - "danger": "2", - "description": "A long dark corridor", + "coordinate": "1,10,-1"}, + "2,1,-1": { + "danger": 3, + "description": "A very long dark corridor", "title": "Dark Corridor", - "npcs": ["syndicatemember"], "locationType": "CAVE", - "coordinate": "-1,10,-1"}, - "-1,5,0": { - "danger": "0", - "description": "The city gates", - "title": "Gate", - "locationType": "ROAD", - "coordinate": "-1,5,0"}, - "0,6,-1": { + "coordinate": "2,1,-1"}, + "2,2,-1": { + "danger": 3, + "npcs": ["brotherhoodmember"], + "title": "Dark Corridor", + "locationType": "CAVE", + "description": "A very long dark corridor", + "coordinate": "2,2,-1"}, + "2,3,-1": { + "danger": 2, + "description": "The headquarters of the infamous Brotherhood Gang", + "title": "The Brotherhood Gang's Base", + "locationType": "CAVE", + "coordinate": "2,3,-1"}, + "2,6,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "0,6,-1"}, - "0,6,0": { - "danger": "1", - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "0,6,0"}, - "0,4,0": { - "danger": "1", - "description": "The main street", - "title": "Road", - "locationType": "ROAD", - "coordinate": "0,4,0"}, - "0,4,-1": { - "danger": 1, "title": "Underground Entrance", - "locationType": "CAVE", - "items": ["tlap1"], - "description": "The entrance to Silliya's Underground Society", - "coordinate": "0,4,-1"}, - "6,0,-1": { - "danger": 5, - "description": "A large lair of some unknown creature", - "title": "Lair", - "locationType": "CAVE", - "coordinate": "6,0,-1"}, - "-4,4,-1": { - "danger": 0, - "description": "The headquaters of the Thieve's Guild", - "title": "Thieves' Guild", + "coordinate": "2,6,-1"}, + "2,7,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "-4,4,-1"}, - "-1,7,0": { - "danger": "0", - "description": "The city wall", - "title": "Wall", - "locationType": "WALL", - "coordinate": "-1,7,0"}, - "0,-1,0": { - "danger": 0, - "description": "The entrance to a cave", - "title": "Cave Mouth", - "locationType": "STAIRS", - "coordinate": "0,-1,0"}, - "2,3,-1": { - "danger": 2, - "description": "The headquarters of the infamous Brotherhood Gang", - "title": "The Brotherhood Gang's Base", + "coordinate": "2,7,-1"}, + "2,8,-1": { + "danger": 3, + "description": "A very long dark corridor", + "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "2,3,-1"}, - "-3,5,-1": { + "coordinate": "2,8,-1"}, + "2,9,-1": { "danger": 3, "description": "A very long dark corridor", "title": "Dark Corridor", "locationType": "CAVE", - "coordinate": "-3,5,-1"}, - "4,3,-1": { + "coordinate": "2,9,-1"}, + "2,10,-1": { + "danger": 2, "title": "Underground Amphitheatre", + "locationType": "CAVE", + "items": ["wshs1"], + "description": "The central hub of the underground", + "coordinate": "2,10,-1"}, + "4,2,-1": { "danger": 3, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "4,3,-1"}, - "1,6,0": { - "danger": "2", - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "1,6,0"}, - "6,9,-1": { - "danger": 2, + "coordinate": "4,2,-1"}, + "4,3,-1": { + "danger": 3, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "6,9,-1"}, - "-1,3,-1": { - "danger": "3", - "description": "A long dark corridor", - "title": "Dark Corridor", - "locationType": "CAVE", - "coordinate": "-1,3,-1"}, - "6,5,-1": { + "coordinate": "4,3,-1"}, + "4,4,-1": { "danger": 3, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "6,5,-1"}, - "0,2,0": { - "danger": 1, - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "0,2,0"}, - "-1,6,0": { - "danger": "0", - "description": "The city wall", - "title": "Wall", - "locationType": "WALL", - "coordinate": "-1,6,0"}, + "coordinate": "4,4,-1"}, + "4,9,-1": { + "danger": 4, + "description": "A large open cave", + "title": "Cave", + "locationType": "CAVE", + "coordinate": "4,9,-1"}, "4,10,-1": { "danger": 5, "description": "A large open cave", "title": "Cave", "locationType": "CAVE", "coordinate": "4,10,-1"}, - "5,4,-1": { - "danger": 3, + "5,0,-1": { + "danger": 5, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "5,4,-1"}, - "0,5,0": { - "danger": "1", - "description": "The road to Silliya", - "title": "Road", - "locationType": "ROAD", - "coordinate": "0,5,0"}, - "2,6,-1": { - "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", + "coordinate": "5,0,-1"}, + "5,1,-1": { + "danger": 4, + "description": "A dark cave", + "title": "Cave", "locationType": "CAVE", - "coordinate": "2,6,-1"}, - "-2,10,-1": { - "danger": "1", - "title": "The Syndicate Gang's Base", + "coordinate": "5,1,-1"}, + "5,2,-1": { + "danger": 4, + "description": "A dark cave", + "title": "Cave", "locationType": "CAVE", - "items": ["wdag1"], - "description": "The headquaters of the infamous Syndicate Gang", - "coordinate": "-2,10,-1"}, - "0,0,0": { - "danger": 1, - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "0,0,0"}, - "0,2,-1": { + "coordinate": "5,2,-1"}, + "5,4,-1": { "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", + "description": "A dark cave", + "title": "Cave", "locationType": "CAVE", - "coordinate": "0,2,-1"}, - "1,5,0": { - "danger": "0", - "description": "The road to Silliya", - "title": "Road", - "locationType": "ROAD", - "coordinate": "1,5,0"}, - "4,2,-1": { - "danger": 3, + "coordinate": "5,4,-1"}, + "5,7,-1": { + "danger": 4, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "4,2,-1"}, - "7,10,-1": { + "coordinate": "5,7,-1"}, + "5,9,-1": { "danger": 1, - "description": "A way out", - "title": "Underground Entrance", + "description": "A long dark corridor", + "title": "Dark corridor", "locationType": "CAVE", - "coordinate": "7,10,-1"}, - "-2,3,-1": { - "danger": "3", - "description": "A dark corridor", - "title": "Dark Corridor", + "coordinate": "5,9,-1"}, + "5,10,-1": { + "danger": 5, + "description": "A large open cave", + "title": "Cave", "locationType": "CAVE", - "coordinate": "-2,3,-1"}, - "7,6,-1": { + "coordinate": "5,10,-1"}, + "6,0,-1": { + "danger": 5, + "description": "A large lair of some unknown creature", + "title": "Lair", + "locationType": "CAVE", + "coordinate": "6,0,-1"}, + "6,2,-1": { "danger": 4, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "7,6,-1"}, - "2,7,-1": { - "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", - "locationType": "CAVE", - "coordinate": "2,7,-1"}, - "4,4,-1": { + "coordinate": "6,2,-1"}, + "6,4,-1": { "danger": 3, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "4,4,-1"}, - "2,2,-1": { - "danger": 3, - "npcs": ["brotherhoodmember"], - "title": "Dark Corridor", - "locationType": "CAVE", - "description": "A very long dark corridor", - "coordinate": "2,2,-1"}, - "5,1,-1": { - "danger": 4, + "coordinate": "6,4,-1"}, + "6,5,-1": { + "danger": 3, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "coordinate": "5,1,-1"}, - "1,7,0": { - "danger": "2", - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "1,7,0"}, + "coordinate": "6,5,-1"}, "6,6,-1": { "danger": 3, "description": "A dark cave", "title": "Cave", "locationType": "CAVE", "coordinate": "6,6,-1"}, - "2,1,-1": { + "6,7,-1": { "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", + "description": "A dark cave", + "title": "Cave", "locationType": "CAVE", - "coordinate": "2,1,-1"}, - "-2,6,-1": { - "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", + "coordinate": "6,7,-1"}, + "6,8,-1": { + "danger": 2, + "description": "A dark cave", + "title": "Cave", "locationType": "CAVE", - "coordinate": "-2,6,-1"}, - "0,7,0": { - "danger": "1", - "description": "The ground", - "title": "Ground", - "locationType": "PLAINS", - "coordinate": "0,7,0"}, - "0,3,-1": { - "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", + "coordinate": "6,8,-1"}, + "6,9,-1": { + "danger": 2, + "description": "A dark cave", + "title": "Cave", "locationType": "CAVE", - "coordinate": "0,3,-1"}, - "0,10,-1": { - "danger": 5, - "description": "The battle arena", - "title": "Arena", + "coordinate": "6,9,-1"}, + "7,2,-1": { + "danger": 4, + "description": "A dark cave", + "title": "Cave", "locationType": "CAVE", - "coordinate": "0,10,-1"}, - "-2,2,-1": { - "danger": "4", + "coordinate": "7,2,-1"}, + "7,6,-1": { + "danger": 4, + "description": "A dark cave", "title": "Cave", "locationType": "CAVE", - "items": ["wspe1"], + "coordinate": "7,6,-1"}, + "7,9,-1": { + "danger": 4, "description": "A large open cave", - "coordinate": "-2,2,-1"}, + "title": "Cave", + "locationType": "CAVE", + "coordinate": "7,9,-1"}, + "7,10,-1": { + "danger": 1, + "description": "A way out", + "title": "Underground Entrance", + "locationType": "CAVE", + "coordinate": "7,10,-1"}, + + + + + "-1,0,0": { + "danger": 0, + "description": "The city wall", + "title": "Wall", + "locationType": "WALL", + "coordinate": "-1,0,0"}, + "-1,1,0": { + "danger": 0, + "description": "The city wall", + "title": "Wall", + "locationType": "WALL", + "coordinate": "-1,1,0"}, + "-1,2,0": { + "danger": "0", + "description": "The city wall", + "title": "Wall", + "locationType": "WALL", + "coordinate": "-1,2,0"}, + "-1,3,0": { + "danger": "0", + "description": "The city wall", + "title": "Wall", + "locationType": "WALL", + "coordinate": "-1,3,0"}, + "-1,4,0": { + "danger": "0", + "description": "The city gates", + "title": "Gate", + "locationType": "ROAD", + "coordinate": "-1,4,0"}, + "-1,5,0": { + "danger": "0", + "description": "The city gates", + "title": "Gate", + "locationType": "ROAD", + "coordinate": "-1,5,0"}, + "-1,6,0": { + "danger": "0", + "description": "The city wall", + "title": "Wall", + "locationType": "WALL", + "coordinate": "-1,6,0"}, + "-1,7,0": { + "danger": "0", + "description": "The city wall", + "title": "Wall", + "locationType": "WALL", + "coordinate": "-1,7,0"}, + + + "0,-1,0": { + "danger": 0, + "description": "The entrance to a cave", + "title": "Cave Mouth", + "locationType": "STAIRS", + "coordinate": "0,-1,0"}, + "0,1,0": { + "danger": 1, + "description": "The ground", + "title": "Ground", + "locationType": "PLAINS", + "coordinate": "0,1,0"}, + "0,0,0": { + "danger": "1", + "description": "An open plain, with what appears to be a road leading east.", + "title": "Plains", + "locationType": "PLAINS", + "coordinate": "0,0,0"}, + "0,2,0": { + "danger": 1, + "description": "The ground", + "title": "Ground", + "locationType": "PLAINS", + "coordinate": "0,2,0"}, "0,3,0": { "danger": "1", "description": "The ground", "title": "Ground", "locationType": "PLAINS", "coordinate": "0,3,0"}, - "6,8,-1": { - "danger": 2, - "description": "A dark cave", - "title": "Cave", - "locationType": "CAVE", - "coordinate": "6,8,-1"}, - "0,0,-1": { - "danger": 0, - "npcs": ["guide"], - "items": ["wshi1"], - "locationType": "CAVE", - "title": "First Location Ever", - "description": "You are in a massive empty room.", - "coordinate": "0,0,-1"}, - "1,0,-1":{ - "danger": 0, - "items": ["katana"], - "locationType": "CAVE", - "title": "Dark Alcove", - "description": "You see a pile of bones. Might be some equipment there.", - "coordinate": "1,0,-1"}, - "0,5,-1": { - "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", - "locationType": "CAVE", - "coordinate": "0,5,-1"}, + "0,4,0": { + "danger": "1", + "description": "The main street", + "title": "Road", + "locationType": "ROAD", + "coordinate": "0,4,0"}, + "0,5,0": { + "danger": "1", + "description": "The road to Silliya", + "title": "Road", + "locationType": "ROAD", + "coordinate": "0,5,0"}, + "0,6,0": { + "danger": "1", + "description": "The ground", + "title": "Ground", + "locationType": "PLAINS", + "coordinate": "0,6,0"}, + "0,7,0": { + "danger": "1", + "description": "The ground", + "title": "Ground", + "locationType": "PLAINS", + "coordinate": "0,7,0"}, "0,8,0": { "danger": "1", "description": "The ground", "title": "Ground", "locationType": "PLAINS", "coordinate": "0,8,0"}, - "4,9,-1": { - "danger": 4, - "description": "A large open cave", - "title": "Cave", - "locationType": "CAVE", - "coordinate": "4,9,-1"}, - "-1,6,-1": { - "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", - "locationType": "CAVE", - "coordinate": "-1,6,-1"}, - "6,7,-1": { - "danger": 3, - "description": "A dark cave", - "title": "Cave", - "locationType": "CAVE", - "coordinate": "6,7,-1"}, - "-2,7,-1": { - "danger": 3, - "description": "A very long dark corridor", - "title": "Dark Corridor", - "locationType": "CAVE", - "coordinate": "-2,7,-1"}, + + "1,0,0": { - "danger": 1, + "danger": "1", + "description": "A road leading east, with some buildings visible in the distance.", + "title": "Eastern Road", + "locationType": "ROAD", + "coordinate": "1,0,0"}, + "1,1,0": { + "danger": "2", "description": "The ground", "title": "Ground", "locationType": "PLAINS", - "coordinate": "1,0,0"}, - "2,10,-1": { - "danger": 2, "title": "Underground Amphitheatre", - "locationType": "CAVE", - "items": ["wshs1"], - "description": "The central hub of the underground", - "coordinate": "2,10,-1"} + "coordinate": "1,1,0"}, + "1,3,0": { + "danger": "2", + "description": "The ground", + "title": "Ground", + "locationType": "PLAINS", + "coordinate": "1,3,0"}, + "1,4,0": { + "danger": "1", + "description": "The road to Silliya", + "title": "Road", + "locationType": "ROAD", + "coordinate": "1,4,0"}, + "1,5,0": { + "danger": "0", + "description": "The road to Silliya", + "title": "Road", + "locationType": "ROAD", + "coordinate": "1,5,0"}, + "1,6,0": { + "danger": "2", + "description": "The ground", + "title": "Ground", + "locationType": "PLAINS", + "coordinate": "1,6,0"}, + "1,7,0": { + "danger": "2", + "description": "The ground", + "title": "Ground", + "locationType": "PLAINS", + "coordinate": "1,7,0"}, + + + "2,0,0": { + "danger": "1", + "description": "A wide road with mysterious plants growing along both sides.", + "title": "Magic District Entrance", + "locationType": "ROAD", + "coordinate": "2,0,0"}, + "2,1,0": { + "danger": "1", + "description": "The road continues north, and you can feel magical energy in the air.", + "title": "Magic District Road", + "locationType": "ROAD", + "coordinate": "2,1,0" + }, + "2,2,0": { + "danger": "1", + "description": "The air here is filled with magical energy, you can feel the presence of magic.", + "title": "Magic District Center", + "locationType": "ROAD", + "coordinate": "2,2,0" + }, + "2,3,0": { + "danger": "2", + "description": "At the end of the road stands a tall wizard's tower, with mysterious runes glowing on its surface.", + "title": "Tower Entrance", + "locationType": "ROAD", + "coordinate": "2,3,0" + }, + "2,4,0": { + "danger": "0", + "description": "This is the entrance to the wizard's tower, where a magical portal shimmers.", + "title": "Tower Portal", + "locationType": "STAIRS", + "coordinate": "2,4,0" + }, + "2,5,0": { + "danger": "2", + "description": "The first floor hall of the wizard's tower, with glowing crystals embedded in the walls.", + "title": "Tower First Floor", + "locationType": "TOWER", + "coordinate": "2,5,0" + }, + "2,6,0": { + "danger": "3", + "description": "This is the wizard's treasure room, filled with various magical artifacts.", + "title": "Magic Treasury", + "locationType": "TOWER", + "items": ["wmst1", "amro1", "amha1"], + "coordinate": "2,6,0" + }, + "2,7,0": { + "danger": "2", + "description": "A spacious magical laboratory with shelves full of magical potions.", + "title": "Magic Laboratory", + "locationType": "LABORATORY", + "items": ["pman1", "pfir1"], + "coordinate": "2,7,0" + }, + "2,8,0": { + "danger": "1", + "description": "A beautiful magical garden growing various mystical plants.", + "title": "Magic Garden", + "locationType": "GARDEN", + "items": ["fapp1", "fber1"], + "coordinate": "2,8,0" + } } + diff --git a/pom.xml b/pom.xml index e6a42601..ef8c7495 100644 --- a/pom.xml +++ b/pom.xml @@ -120,8 +120,8 @@ maven-compiler-plugin 3.1 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/src/main/java/com/jadventure/game/entities/Entity.java b/src/main/java/com/jadventure/game/entities/Entity.java index f51358ee..1823346b 100644 --- a/src/main/java/com/jadventure/game/entities/Entity.java +++ b/src/main/java/com/jadventure/game/entities/Entity.java @@ -32,6 +32,7 @@ public abstract class Entity { private int stealth; private int gold; private double damage = 30; + private double magicDamage = 0; private double critChance = 0.0; private int armour; private String weapon = "hands"; @@ -187,8 +188,17 @@ public String getWeapon() { return weapon; } + public double getMagicDamage() { + return magicDamage; + } + + public void setMagicDamage(double magicDamage) { + this.magicDamage = magicDamage; + } + public Map equipItem(EquipmentLocation place, Item item) { double oldDamage = this.damage; + double oldMagicDamage = this.magicDamage; int oldArmour = this.armour; if (place == null) { place = item.getPosition(); @@ -210,48 +220,35 @@ public Map equipItem(EquipmentLocation place, Item item) { unequipItem(bothArms); } equipment.put(place, item); + // Update weapon field for weapon type items + if (item.getType().startsWith("weapon") || place == EquipmentLocation.BOTH_HANDS + || place == EquipmentLocation.LEFT_HAND || place == EquipmentLocation.RIGHT_HAND) { + this.weapon = item.getId(); + } removeItemFromStorage(item); - Map result = new HashMap(); - switch (item.getId().charAt(0)) { - case 'w': { - this.weapon = item.getId(); - this.damage += item.getProperty("damage"); - double diffDamage = this.damage - oldDamage; - result.put("damage", String.valueOf(diffDamage)); - break; - } - case 'a': { - this.armour += item.getProperty("armour"); - int diffArmour = this.armour - oldArmour; - result.put("armour", String.valueOf(diffArmour)); - break; - } - case 'p': { - if (item.containsProperty("healthMax")) { - int healthOld = this.getHealth(); - this.healthMax += item.getProperty("healthMax"); - this.health += item.getProperty("health"); - this.health = (this.health > this.healthMax) ? this.healthMax : this.health; - int healthNew = this.health; - unequipItem(item); // One use only - removeItemFromStorage(item); - if (healthNew != healthOld) { - result.put("health", String.valueOf(health - healthOld)); - } else { - result.put("health", String.valueOf(item.getProperty("healthMax"))); + Map stats = item.getProperties(); + Map result = new HashMap<>(); + if (stats != null) { + for (Map.Entry stat : stats.entrySet()) { + String key = stat.getKey(); + int value = stat.getValue(); + switch (key) { + case "damage": { + this.damage += value; + result.put("damage", String.valueOf(damage - oldDamage)); + break; + } + case "magicDamage": { + this.magicDamage += value; + result.put("magicDamage", String.valueOf(magicDamage - oldMagicDamage)); + break; + } + case "armour": { + this.armour += value; + result.put("armour", String.valueOf(armour - oldArmour)); + break; } } - break; - } - case 'f': { - int healthOld = this.getHealth(); - this.health += item.getProperty("health"); - this.health = (this.health > this.healthMax) ? this.healthMax - : this.health; - unequipItem(item); // One use only - removeItemFromStorage(item); - result.put("health", String.valueOf(health - healthOld)); - break; } } return result; @@ -269,28 +266,46 @@ private void unequipTwoPlaces(EquipmentLocation leftLocation, EquipmentLocation } public Map unequipItem(Item item) { - for (EquipmentLocation key : equipment.keySet()) { - if (item.equals(equipment.get(key))) { - equipment.put(key, null); + double oldDamage = this.damage; + double oldMagicDamage = this.magicDamage; + int oldArmour = this.armour; + Map stats = item.getProperties(); + Map result = new HashMap<>(); + if (stats != null) { + for (Map.Entry stat : stats.entrySet()) { + String key = stat.getKey(); + int value = stat.getValue(); + switch (key) { + case "damage": { + this.damage -= value; + result.put("damage", String.valueOf(damage - oldDamage)); + break; + } + case "magicDamage": { + this.magicDamage -= value; + result.put("magicDamage", String.valueOf(magicDamage - oldMagicDamage)); + break; + } + case "armour": { + this.armour -= value; + result.put("armour", String.valueOf(armour - oldArmour)); + break; + } + } + } + } + EquipmentLocation place = item.getPosition(); + if (equipment.get(place) == item) { + equipment.remove(place); + // Reset weapon field if unequipping a weapon + if (item.getType().startsWith("weapon") || place == EquipmentLocation.BOTH_HANDS + || place == EquipmentLocation.LEFT_HAND || place == EquipmentLocation.RIGHT_HAND) { + this.weapon = "hands"; } } if (!item.equals(itemRepo.getItem("hands"))) { addItemToStorage(item); } - Map result = new HashMap(); - if (item.containsProperty("damage")) { - double oldDamage = damage; - weapon = "hands"; - damage -= item.getProperty("damage"); - double diffDamage = damage - oldDamage; - result.put("damage", String.valueOf(diffDamage)); - } - if (item.containsProperty("armour")) { - int oldArmour = armour; - armour -= item.getProperty("armour"); - int diffArmour = armour - oldArmour; - result.put("armour", String.valueOf(diffArmour)); - } return result; } diff --git a/src/main/java/com/jadventure/game/entities/Player.java b/src/main/java/com/jadventure/game/entities/Player.java index 73c4650b..0d7eed5b 100644 --- a/src/main/java/com/jadventure/game/entities/Player.java +++ b/src/main/java/com/jadventure/game/entities/Player.java @@ -57,8 +57,21 @@ public class Player extends Entity { /** Player type */ private String type; private static HashMapcharacterLevels = new HashMap(); + // 添加魔法相关属性 + private int mana; + private int manaMax; + private int magicPower; + private int magicResist; + private int fireResist; + private int speed; public Player() { + this.mana = 100; + this.manaMax = 100; + this.magicPower = 0; + this.magicResist = 0; + this.fireResist = 0; + this.speed = 1; } protected static void setUpCharacterLevels() { @@ -508,4 +521,132 @@ public boolean hasItem(Item item) { List searchStorage = searchItem(item.getName(), getStorage()); return !(searchEquipment.size() == 0 && searchStorage.size() == 0); } + + // 添加getter和setter方法 + public int getMana() { + return this.mana; + } + + public void setMana(int mana) { + this.mana = mana; + if (this.mana > this.manaMax) { + this.mana = this.manaMax; + } + } + + public int getManaMax() { + return this.manaMax; + } + + public void setManaMax(int manaMax) { + this.manaMax = manaMax; + } + + public int getMagicPower() { + return this.magicPower; + } + + public void setMagicPower(int magicPower) { + this.magicPower = magicPower; + } + + public int getMagicResist() { + return this.magicResist; + } + + public void setMagicResist(int magicResist) { + this.magicResist = magicResist; + } + + public int getFireResist() { + return this.fireResist; + } + + public void setFireResist(int fireResist) { + this.fireResist = fireResist; + } + + public int getSpeed() { + return this.speed; + } + + public void setSpeed(int speed) { + this.speed = speed; + } + + // 修改装备效果计算方法 + @Override + public Map equipItem(EquipmentLocation place, Item item) { + Map result = super.equipItem(place, item); + Map properties = item.getProperties(); + for (Map.Entry entry : properties.entrySet()) { + String key = entry.getKey(); + int value = entry.getValue(); + switch (key) { + case "mana": + setMana(getMana() + value); + break; + case "manaMax": + setManaMax(getManaMax() + value); + break; + case "magicPower": + setMagicPower(getMagicPower() + value); + break; + case "magicResist": + setMagicResist(getMagicResist() + value); + break; + case "fireResist": + setFireResist(getFireResist() + value); + break; + case "speed": + setSpeed(getSpeed() + value); + break; + } + } + return result; + } + + // 修改卸下装备效果计算方法 + @Override + public Map unequipItem(Item item) { + Map result = super.unequipItem(item); + Map properties = item.getProperties(); + for (Map.Entry entry : properties.entrySet()) { + String key = entry.getKey(); + int value = entry.getValue(); + switch (key) { + case "mana": + setMana(getMana() - value); + break; + case "manaMax": + setManaMax(getManaMax() - value); + break; + case "magicPower": + setMagicPower(getMagicPower() - value); + break; + case "magicResist": + setMagicResist(getMagicResist() - value); + break; + case "fireResist": + setFireResist(getFireResist() - value); + break; + case "speed": + setSpeed(getSpeed() - value); + break; + } + } + return result; + } + + // 修改状态显示方法 + @Override + public void printEquipment() { + super.printEquipment(); + QueueProvider.offer("\nMagic Stats:"); + QueueProvider.offer("Mana: " + getMana() + "/" + getManaMax()); + QueueProvider.offer("Magic Power: " + getMagicPower()); + QueueProvider.offer("Magic Resist: " + getMagicResist()); + QueueProvider.offer("Fire Resist: " + getFireResist()); + QueueProvider.offer("Speed: " + getSpeed()); + } } diff --git a/src/main/java/com/jadventure/game/items/Item.java b/src/main/java/com/jadventure/game/items/Item.java index d53330fa..2590e2d8 100644 --- a/src/main/java/com/jadventure/game/items/Item.java +++ b/src/main/java/com/jadventure/game/items/Item.java @@ -96,10 +96,22 @@ public boolean equals(Object obj) { } public void display() { - QueueProvider.offer("Name: " + name + - "\nDescription: " + description + "\nLevel: " + level); - for (Map.Entry entry : properties.entrySet()) { - QueueProvider.offer(entry.getKey() + ": " + entry.getValue()); + QueueProvider.offer("\n" + "Name: " + name); + QueueProvider.offer("Type: " + type); + QueueProvider.offer("Description: " + description); + QueueProvider.offer("Level: " + level); + QueueProvider.offer("Position: " + (position == null ? "None" : position)); + if (!properties.isEmpty()) { + QueueProvider.offer("Properties:"); + for (Map.Entry entry : properties.entrySet()) { + String key = entry.getKey(); + Integer value = entry.getValue(); + if (value >= 0) { + QueueProvider.offer("\t" + key + ": +" + value); + } else { + QueueProvider.offer("\t" + key + ": " + value); + } + } } } diff --git a/src/main/java/com/jadventure/game/monsters/MonsterFactory.java b/src/main/java/com/jadventure/game/monsters/MonsterFactory.java index d6444d3e..15a573bf 100644 --- a/src/main/java/com/jadventure/game/monsters/MonsterFactory.java +++ b/src/main/java/com/jadventure/game/monsters/MonsterFactory.java @@ -25,6 +25,11 @@ public Monster generateMonster(Player player) { return getCaveMonster(player.getLevel()); case PLAINS: return getPlainsMonster(player.getLevel()); + case TOWER: + case GARDEN: + case LABORATORY: + case SHOP: + return null; // 这些是安全区域,不生成怪物 default: // any non-hostile location return null; } diff --git a/src/main/java/com/jadventure/game/navigation/LocationType.java b/src/main/java/com/jadventure/game/navigation/LocationType.java index 2326653c..882ae380 100644 --- a/src/main/java/com/jadventure/game/navigation/LocationType.java +++ b/src/main/java/com/jadventure/game/navigation/LocationType.java @@ -13,5 +13,9 @@ public enum LocationType { WALL, ROAD, CAVE, - STAIRS; + STAIRS, + TOWER, + GARDEN, + LABORATORY, + SHOP; }