Fixed amplifier and duration of poison afflicted from straw totem to balance it better.

This commit is contained in:
micle
2021-06-01 23:58:16 +01:00
parent 34557c3e83
commit 4332e9eaac
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ public class C2SRequestPlayerRevive {
if (Utils.randomIntRange(0, 100) <= fail_chance) { if (Utils.randomIntRange(0, 100) <= fail_chance) {
item.getOrCreateTag().putInt(StrawTotemItem.TAG_CHARGE_AMOUNT, item.getOrCreateTag().getInt(StrawTotemItem.TAG_CHARGE_AMOUNT)-required_charge); item.getOrCreateTag().putInt(StrawTotemItem.TAG_CHARGE_AMOUNT, item.getOrCreateTag().getInt(StrawTotemItem.TAG_CHARGE_AMOUNT)-required_charge);
item.getOrCreateTag().putInt(StrawTotemItem.TAG_FAIL_CHANCE, fail_chance-(5*required_charge)); item.getOrCreateTag().putInt(StrawTotemItem.TAG_FAIL_CHANCE, fail_chance-(5*required_charge));
sender.addEffect(new EffectInstance(Effects.POISON, (fail_chance / 2), 2)); sender.addEffect(new EffectInstance(Effects.POISON, ((fail_chance*10) / 2), 1));
return; return;
} else { } else {
item.getOrCreateTag().putInt(StrawTotemItem.TAG_FAIL_CHANCE, fail_chance-(5*required_charge)); item.getOrCreateTag().putInt(StrawTotemItem.TAG_FAIL_CHANCE, fail_chance-(5*required_charge));

View File

@ -54,7 +54,7 @@ public class C2SRequestTotemCharge {
int fail_chance = totem_item.getOrCreateTag().getInt(StrawTotemItem.TAG_FAIL_CHANCE); int fail_chance = totem_item.getOrCreateTag().getInt(StrawTotemItem.TAG_FAIL_CHANCE);
if (Utils.randomIntRange(0, 100) <= fail_chance) { if (Utils.randomIntRange(0, 100) <= fail_chance) {
sender.setItemInHand(msg.hand, new ItemStack(Items.AIR)); sender.setItemInHand(msg.hand, new ItemStack(Items.AIR));
sender.addEffect(new EffectInstance(Effects.POISON, (fail_chance / 2), 2)); sender.addEffect(new EffectInstance(Effects.POISON, ((fail_chance*10) / 2), 1));
} else { } else {
totem_item.getOrCreateTag().putInt(StrawTotemItem.TAG_FAIL_CHANCE, fail_chance+5); totem_item.getOrCreateTag().putInt(StrawTotemItem.TAG_FAIL_CHANCE, fail_chance+5);
} }