Skip to content

Commit

Permalink
feat(server): mob drops upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Veradictus committed Jul 9, 2023
1 parent f69b916 commit 4e16841
Show file tree
Hide file tree
Showing 7 changed files with 534 additions and 129 deletions.
20 changes: 19 additions & 1 deletion packages/common/types/mob.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
import type { Bonuses, Stats } from '@kaetram/common/types/item';

// The mobs.json drops structure.
export interface MobDrop {
key: string;
count?: number; // Defaults to 1 if undefined.
chance: number;
variable?: number; // Whether or not the drop amount is randomized.
// Quest and achievement requirements.
quest?: string;
achievement?: string;
status?: 'started' | 'notstarted' | 'finished'; // Optional parameter for when to drop item given quest/achievement.
}

export interface MobDropTable {
drops: MobDrop[];
achievement?: string; // Achievement that has to be finished to unlock the drop table.
quest?: string; // Quest that must be completed to unlock drop table.
}

export interface MobSkills {
accuracy: number;
strength: number;
Expand All @@ -12,7 +30,7 @@ export interface MobData {
name: string;
description?: string | string[];
hitPoints?: number;
drops?: { [itemKey: string]: number };
drops?: MobDrop[];
dropTables?: string[];
level?: number;
skills?: MobSkills;
Expand Down
6 changes: 3 additions & 3 deletions packages/server/data/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@
"berylgoldring": {
"type": "ring",
"name": "Beryl Gold Ring",
"price": 200,
"price": 2000,
"skill": "defense",
"level": 20,
"attackStats": {
Expand Down Expand Up @@ -2693,8 +2693,8 @@
},
"goldnugget": {
"type": "object",
"name": "Gold Ore",
"description": "Raw gold ore, will need to be processed before it can be turned into something nice.",
"name": "Gold Nugget",
"description": "A piece of pure gold. For some reason it still has to be processed before it can be used.",
"price": 650
},
"iboore": {
Expand Down
40 changes: 36 additions & 4 deletions packages/server/data/mobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,20 @@
"goblin": {
"name": "Goblin",
"description": "Didn't I see this same style of goblin in RuneScape?",
"drops": { "tinsword": 10000, "copperhelmet": 10000, "tinchestplate": 10000 },
"drops": [
{
"key": "tinsword",
"chance": 10000
},
{
"key": "copperhelmet",
"chance": 10000
},
{
"key": "tinchestplate",
"chance": 10000
}
],
"dropTables": ["ordinary", "arrows", "unusual", "vegetables", "fruits", "mushrooms"],
"hitPoints": 90,
"level": 7,
Expand Down Expand Up @@ -434,7 +447,16 @@
"adherer": {
"name": "Dark Mage",
"description": "I heard that these things drop roses that I can then use to hit things with.",
"drops": { "darkmagehood": 600, "darkmagehoodgold": 20 },
"drops": [
{
"key": "darkmagehood",
"chance": 600
},
{
"key": "darkmagehoodgold",
"chance": 20
}
],
"dropTables": ["ordinary", "unusual", "shards"],
"hitPoints": 200,
"level": 38,
Expand Down Expand Up @@ -2028,7 +2050,12 @@
"icevulture": {
"name": "Ice Vulture",
"description": "It's like a frozen version of the vicious bird I've seen before.",
"drops": { "feather": 25000 },
"drops": [
{
"key": "feather",
"chance": 25000
}
],
"dropTables": ["ordinary", "shards", "unusual", "arrows"],
"hitPoints": 300,
"level": 96,
Expand Down Expand Up @@ -3680,7 +3707,12 @@

"vulture": {
"name": "Vulture",
"drops": { "feather": 25000 },
"drops": [
{
"key": "feather",
"chance": 25000
}
],
"dropTables": ["ordinary", "shards", "unusual", "arrows"],
"hitPoints": 100,
"level": 16,
Expand Down
206 changes: 172 additions & 34 deletions packages/server/data/spawns.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,24 @@

"224-359": {
"name": "Hermit Crab Warrior",
"drops": {
"flask": 200,
"gold": 750,
"spear": 75,
"platearmor": 100
},
"drops": [
{
"key": "flask",
"chance": 2000
},
{
"key": "gold",
"chance": 7500
},
{
"key": "ironspear",
"chance": 750
},
{
"key": "platearmor",
"chance": 1000
}
],
"dropTables": ["ordinary", "unusual", "warriorcrab"],
"roaming": true,
"miniboss": true,
Expand All @@ -29,13 +41,12 @@

"197-633": {
"name": "Water Guardian",
"drops": {
"redguardarmor": 75,
"redguardarcherarmor": 75,
"ring1": 100,
"scimitar": 100,
"watermelonbow": 100
},
"drops": [
{
"key": "ring1",
"chance": 1000
}
],
"miniboss": true,
"level": 36,
"hitPoints": 350,
Expand All @@ -56,20 +67,63 @@
"175-635": {
"name": "Mimic",
"achievement": "notwhatitseems",
"drops": {
"gold": 700,
"bigflask": 300,
"spear": 100,
"ring1": 100,
"pendant1": 100,
"goldring": 14
}
"drops": [
{
"key": "gold",
"chance": 7000
},
{
"key": "bigflask",
"chance": 3000
},
{
"key": "crystalspear",
"chance": 1000
},
{
"key": "ring1",
"chance": 1000
},
{
"key": "pendant1",
"chance": 1000
},
{
"key": "goldnugget",
"chance": 1000
}
]
},

"411-732": {
"name": "Mimic",
"achievement": "treadcarefully",
"drops": { "gold": 300, "bigflask": 500, "spear": 100, "ring1": 100, "pendant1": 100 }
"drops": [
{
"key": "gold",
"chance": 7000
},
{
"key": "bigflask",
"chance": 3000
},
{
"key": "crystalspear",
"chance": 1000
},
{
"key": "ring1",
"chance": 1000
},
{
"key": "pendant1",
"chance": 1000
},
{
"key": "goldnugget",
"chance": 1000
}
]
},

"228-156": {
Expand All @@ -78,7 +132,32 @@
"hitPoints": 1500,
"level": 30,
"defenseLevel": 10,
"drops": { "gold": 800, "bigflask": 400, "silverring": 10, "scimitar": 75, "pendant1": 125 }
"drops": [
{
"key": "gold",
"chance": 7000
},
{
"key": "bigflask",
"chance": 3000
},
{
"key": "crystalspear",
"chance": 1000
},
{
"key": "ring1",
"chance": 1000
},
{
"key": "pendant1",
"chance": 1000
},
{
"key": "goldnugget",
"chance": 1000
}
]
},

"460-725": {
Expand All @@ -87,13 +166,24 @@
"hitPoints": 2200,
"level": 84,
"defenseLevel": 10,
"drops": {
"gold": 800,
"manaflask": 100,
"sproutring": 10,
"bluescimitar": 50,
"shardt1": 50
}
"drops": [
{
"key": "gold",
"chance": 7000
},
{
"key": "manaflask",
"chance": 3000
},
{
"key": "sproutring",
"chance": 100
},
{
"key": "shardt2",
"chance": 3000
}
]
},

"855-611": {
Expand All @@ -102,7 +192,20 @@
"hitPoints": 2200,
"level": 84,
"defenseLevel": 10,
"drops": { "gold": 800, "cure": 100, "shardt2": 25, "bluescimitar": 50, "greenpendant": 50 }
"drops": [
{
"key": "gold",
"chance": 8000
},
{
"key": "cure",
"chance": 3000
},
{
"key": "greenpendant",
"chance": 500
}
]
},

"677-671": {
Expand All @@ -111,7 +214,20 @@
"hitPoints": 2200,
"level": 84,
"defenseLevel": 10,
"drops": { "gold": 800, "cure": 100, "shardt2": 25, "bluescimitar": 50, "greenpendant": 50 }
"drops": [
{
"key": "gold",
"chance": 8000
},
{
"key": "cure",
"chance": 3000
},
{
"key": "greenpendant",
"chance": 500
}
]
},

"706-555": {
Expand All @@ -120,7 +236,20 @@
"hitPoints": 1300,
"level": 62,
"defenseLevel": 15,
"drops": { "gold": 500, "cure": 50, "shardt1": 50, "bluescimitar": 50, "greenpendant": 45 }
"drops": [
{
"key": "gold",
"chance": 8000
},
{
"key": "cure",
"chance": 3000
},
{
"key": "greenpendant",
"chance": 500
}
]
},

"168-31": {
Expand Down Expand Up @@ -164,7 +293,16 @@
"name": "Ice Knight",
"miniboss": true,
"level": 62,
"drops": { "gold": 300, "icesword": 1000 }
"drops": [
{
"key": "gold",
"chance": 3000
},
{
"key": "icesword",
"chance": 10000
}
]
},

"784-676": {
Expand Down
Loading

0 comments on commit 4e16841

Please sign in to comment.