mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:28 -05:00
Bring resistance piercing to parity with armor piercing
This commit is contained in:
+7
-1
@@ -2735,6 +2735,7 @@ function commence_attack(attacker, target, atype) {
|
|||||||
var mp_cost = 0;
|
var mp_cost = 0;
|
||||||
var info = {
|
var info = {
|
||||||
apiercing: 0,
|
apiercing: 0,
|
||||||
|
rpiercing: 0,
|
||||||
damage_type: attacker.damage_type,
|
damage_type: attacker.damage_type,
|
||||||
heal: false,
|
heal: false,
|
||||||
lines: true,
|
lines: true,
|
||||||
@@ -3141,10 +3142,15 @@ function complete_attack(attacker, target, info) {
|
|||||||
defense = "none_existent";
|
defense = "none_existent";
|
||||||
pierce = "non_existent";
|
pierce = "non_existent";
|
||||||
info.apiercing = 0;
|
info.apiercing = 0;
|
||||||
|
info.rpiercing = 0;
|
||||||
} else if (info.damage_type == "magical") {
|
} else if (info.damage_type == "magical") {
|
||||||
defense = "resistance";
|
defense = "resistance";
|
||||||
pierce = "rpiercing";
|
pierce = "rpiercing";
|
||||||
info.apiercing = 0;
|
info.apiercing = 0;
|
||||||
|
} else if(info.damage_type == "physical") {
|
||||||
|
defense = "armor";
|
||||||
|
pierce = "apiercing";
|
||||||
|
info.rpiercing = 0;
|
||||||
} else {
|
} else {
|
||||||
info.damage_type = "physical";
|
info.damage_type = "physical";
|
||||||
}
|
}
|
||||||
@@ -3436,7 +3442,7 @@ function complete_attack(attacker, target, info) {
|
|||||||
i_attack = attack = ceil(combo_m * attack * (0.9 + ((attack && Math.random() * 0.2) || 0)));
|
i_attack = attack = ceil(combo_m * attack * (0.9 + ((attack && Math.random() * 0.2) || 0)));
|
||||||
attack =
|
attack =
|
||||||
ceil(
|
ceil(
|
||||||
attack * dmg_mult * damage_multiplier((target[defense] || 0) - (attacker[pierce] || 0) - info.apiercing),
|
attack * dmg_mult * damage_multiplier((target[defense] || 0) - (attacker[pierce] || 0) - info[pierce]),
|
||||||
) || 0;
|
) || 0;
|
||||||
|
|
||||||
if (target.incdmgamp) {
|
if (target.incdmgamp) {
|
||||||
|
|||||||
Reference in New Issue
Block a user