mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 10:33:47 -05:00
Overdrop logic for co-op events
This commit is contained in:
+8
-2
@@ -111,6 +111,7 @@ var B = {
|
|||||||
free_last_hits: false,
|
free_last_hits: false,
|
||||||
pause_instances: true,
|
pause_instances: true,
|
||||||
global_drops: true,
|
global_drops: true,
|
||||||
|
drop_table_multiplier: 1, // 2 means drop tables extended by their original selves, not %'s multiplied
|
||||||
};
|
};
|
||||||
var CC = {
|
var CC = {
|
||||||
auth: 2,
|
auth: 2,
|
||||||
@@ -2060,7 +2061,7 @@ function drop_something(player, monster, share) {
|
|||||||
let itemShouldDrop = shouldItemDrop(item);
|
let itemShouldDrop = shouldItemDrop(item);
|
||||||
if (itemShouldDrop || mode.drop_all) {
|
if (itemShouldDrop || mode.drop_all) {
|
||||||
// /hp_mult - removed [13/07/18]
|
// /hp_mult - removed [13/07/18]
|
||||||
drop_item_logic(drop, item, is_in_pvp(player, 1));
|
for (var d = 0; d < B.drop_table_multiplier; d++) drop_item_logic(drop, item, is_in_pvp(player, 1));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2381,14 +2382,18 @@ function calculate_monster_score(player, monster, share) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function issue_monster_awards(monster) {
|
function issue_monster_awards(monster) {
|
||||||
var total = 0.1;
|
var total = 0.1,
|
||||||
|
total_characters = 0;
|
||||||
for (var name in monster.points) {
|
for (var name in monster.points) {
|
||||||
var current = players[name_to_id[name]];
|
var current = players[name_to_id[name]];
|
||||||
if (current) {
|
if (current) {
|
||||||
// && current.map==monster.map
|
// && current.map==monster.map
|
||||||
total += max(0, monster.points[name]);
|
total += max(0, monster.points[name]);
|
||||||
}
|
}
|
||||||
|
var share = max(0, monster.points[name]) / total;
|
||||||
|
if (share > 0.0008) total_characters += 1;
|
||||||
}
|
}
|
||||||
|
B.drop_table_multiplier = parseInt(1 + Math.floor(total_characters / 10));
|
||||||
for (var name in monster.points) {
|
for (var name in monster.points) {
|
||||||
var current = players[name_to_id[name]];
|
var current = players[name_to_id[name]];
|
||||||
var share = max(0, monster.points[name]) / total;
|
var share = max(0, monster.points[name]) / total;
|
||||||
@@ -2428,6 +2433,7 @@ function issue_monster_awards(monster) {
|
|||||||
resend(current, "u+cid");
|
resend(current, "u+cid");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
B.drop_table_multiplier = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function issue_monster_award(monster) {
|
function issue_monster_award(monster) {
|
||||||
|
|||||||
Reference in New Issue
Block a user